mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00

Summary: Preivously we would only discard it if we failed to parse parameter lists. If we do not consume the body, parser sees tokens inside directive. In turn, this leads to spurious diagnostics and a crash in TokenBuffer, see the added tests. Reviewers: sammccall Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65517 llvm-svn: 367530
6 lines
211 B
C
6 lines
211 B
C
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
// Ensure we see the error from PP and do not see errors from the parser.
|
|
|
|
// expected-error@+1{{'#' is not followed by a macro parameter}}
|
|
#define INVALID() #B 10+10
|