================
@@ -1386,6 +1402,74 @@ bool Parser::HandlePragmaMSAllocText(StringRef 
PragmaName,
   return true;
 }
 
+bool Parser::zOSHandlePragmaHelper(tok::TokenKind PragmaKind) {
+  assert(Tok.is(PragmaKind));
+
+  StringRef PragmaName = "export";
+
+  using namespace clang::charinfo;
+  auto *TheTokens =
+      (std::pair<std::unique_ptr<Token[]>, size_t> *)Tok.getAnnotationValue();
+  PP.EnterTokenStream(std::move(TheTokens->first), TheTokens->second, true,
+                      false);
+  ConsumeAnnotationToken();
+
+  do {
+    PP.Lex(Tok);
----------------
perry-ca wrote:

I took a look at this.  My conclusion is we should be calling PP.Lex().  The 
reasons are:
- ConsumeToken()/ConsumeAnyToken() track state information which applies to the 
user source code, not the pragmas.  An unbalanced '(' would affect code outside 
of the pragma
- All the other pragma handling functions call PP.Lex() too

https://github.com/llvm/llvm-project/pull/141671
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to