================
@@ -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:
How about to early return if the token is not an identifier? The
HandlePragmaDirective will discard the rest token in current line.
```
if (Tok.isNot(tok::identifier)) return;
StringRef Name = Tok.getIdentifier()->getName();
....
```
https://github.com/llvm/llvm-project/pull/230927
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits