diff options
| author | Joerg Sonnenberger <joerg@bec.de> | 2011-07-20 01:03:50 +0000 |
|---|---|---|
| committer | Joerg Sonnenberger <joerg@bec.de> | 2011-07-20 01:03:50 +0000 |
| commit | 869f0b70d482b3db13e314d84a938118e3ea2fd7 (patch) | |
| tree | 2b08ea224092c33fc415cc083df2da990dea733f /clang/lib | |
| parent | 19d2635d8c1ef0b0a78a050de756c00692299013 (diff) | |
| download | bcm5719-llvm-869f0b70d482b3db13e314d84a938118e3ea2fd7.tar.gz bcm5719-llvm-869f0b70d482b3db13e314d84a938118e3ea2fd7.zip | |
PR10392: "#pragma GCC visibility" must not expand macros in its
arguments.
llvm-svn: 135552
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Parse/ParsePragma.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParsePragma.cpp b/clang/lib/Parse/ParsePragma.cpp index c30ab75b76e..445a72465c5 100644 --- a/clang/lib/Parse/ParsePragma.cpp +++ b/clang/lib/Parse/ParsePragma.cpp @@ -38,7 +38,7 @@ void PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, SourceLocation VisLoc = VisTok.getLocation(); Token Tok; - PP.Lex(Tok); + PP.LexUnexpandedToken(Tok); const IdentifierInfo *PushPop = Tok.getIdentifierInfo(); @@ -49,20 +49,20 @@ void PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, VisType = 0; } else if (PushPop && PushPop->isStr("push")) { IsPush = true; - PP.Lex(Tok); + PP.LexUnexpandedToken(Tok); if (Tok.isNot(tok::l_paren)) { PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen) << "visibility"; return; } - PP.Lex(Tok); + PP.LexUnexpandedToken(Tok); VisType = Tok.getIdentifierInfo(); if (!VisType) { PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_identifier) << "visibility"; return; } - PP.Lex(Tok); + PP.LexUnexpandedToken(Tok); if (Tok.isNot(tok::r_paren)) { PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_rparen) << "visibility"; @@ -73,7 +73,7 @@ void PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP, << "visibility"; return; } - PP.Lex(Tok); + PP.LexUnexpandedToken(Tok); if (Tok.isNot(tok::eod)) { PP.Diag(Tok.getLocation(), diag::warn_pragma_extra_tokens_at_eol) << "visibility"; |

