Fixes #178098 --- This patch addressed the issue when `__has_cpp_attribute` is expanded with incomplete scoped attributes. The scoped name parsing can lex to `eof`/`eod` at3f5a5d45d1/clang/lib/Lex/PPMacroExpansion.cpp (L1877-L1881)and then proceed with3f5a5d45d1/clang/lib/Lex/PPMacroExpansion.cpp (L1425-L1430)since `eof`/`eod` is not guarded at3f5a5d45d1/clang/lib/Lex/PPMacroExpansion.cpp (L1367-L1372)this could lead to a preprocessor crash3f5a5d45d1/clang/lib/Lex/PPMacroExpansion.cpp (L1370)
10 lines
363 B
C
10 lines
363 B
C
// RUN: %clang_cc1 -triple i386-unknown-unknown -Eonly -verify %s
|
|
|
|
// expected-error@+2 {{builtin feature check macro requires a parenthesized identifier}}
|
|
// expected-error@+1 {{expected value in expression}}
|
|
#if __has_c_attribute(clang::
|
|
#endif
|
|
|
|
// expected-error@+1 {{builtin feature check macro requires a parenthesized identifier}}
|
|
__has_c_attribute(clang::
|