llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Sean Perry (perry-ca) <details> <summary>Changes</summary> The changes in https://github.com/llvm/llvm-project/pull/141671 had a failure in some asan bots. The code for parsing pragma export is the same as for the MS pragmas. I did noticed that the MS pragma handling code says the tokens are reinjected when calling EnterTokenStream(). Do the same for pragma export. The tokens on the MS pragma and pragma export are handled by: 1. PragmaMSPragma::HandlePragma - collect the tokens into an array - an annotated token is created with the pragma token & array of tokens - calls EnterToken() adds the annotated token 2. Parser::HandlePragmaMSPragma() - takes the array of tokens off the annotated token can adds them to the stream using EnterTokenStream() - this call says the tokens are reinjected. --- Full diff: https://github.com/llvm/llvm-project/pull/177979.diff 1 Files Affected: - (modified) clang/lib/Parse/ParsePragma.cpp (+1-1) ``````````diff diff --git a/clang/lib/Parse/ParsePragma.cpp b/clang/lib/Parse/ParsePragma.cpp index 54b96fd2102b5..3d7e7b5d8ac49 100644 --- a/clang/lib/Parse/ParsePragma.cpp +++ b/clang/lib/Parse/ParsePragma.cpp @@ -1412,7 +1412,7 @@ void Parser::zOSHandlePragmaHelper(tok::TokenKind PragmaKind) { auto *TheTokens = (std::pair<std::unique_ptr<Token[]>, size_t> *)Tok.getAnnotationValue(); PP.EnterTokenStream(std::move(TheTokens->first), TheTokens->second, true, - false); + /*IsReinject=*/true); ConsumeAnnotationToken(); llvm::scope_exit OnReturn([this]() { `````````` </details> https://github.com/llvm/llvm-project/pull/177979 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
