llvm-project
9e013a24 - [clang][Lex] Fix crash on pragma annotations in preprocessor expressions (#232413)

Commit
2 days ago
[clang][Lex] Fix crash on pragma annotations in preprocessor expressions (#232413) Reject annotation tokens before accessing `IdentifierInfo`, emitting the existing invalid-token diagnostic instead of asserting. ```cpp #define M _Pragma("pack(push, 1)") #if (0 + M 1) #endif ``` https://godbolt.org/z/sqjs9nPrj Assisted by Codex. --------- Signed-off-by: yronglin <yronglin777@gmail.com> Co-authored-by: Ambrose Leeb <aeternalmail@gmail.com>
Author
Parents
Loading