================
@@ -101,17 +101,23 @@ void PragmaNamespace::RemovePragmaHandler(PragmaHandler
*Handler) {
Handlers.erase(I);
}
+// Names may be C++ operator keywords, which have punctuator token kinds.
+static IdentifierInfo *getPragmaIdentifierInfo(const Token &Tok) {
+ if (Tok.isAnnotation() || Tok.is(tok::raw_identifier))
----------------
yronglin wrote:
This might be missing if early return without any diagnostic:
```
if (!Handler) {
PP.Diag(Tok, diag::warn_pragma_ignored);
return;
}
```
Without an IdentifierInfo, clang cannot find a suitable handler for the pragma
directive. Please correct me if I have missed any other scenarios.
https://github.com/llvm/llvm-project/pull/230927
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits