diff options
Diffstat (limited to 'clang/lib/Lex/Pragma.cpp')
-rw-r--r-- | clang/lib/Lex/Pragma.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp index 87410f9ff4a..73d36414ba9 100644 --- a/clang/lib/Lex/Pragma.cpp +++ b/clang/lib/Lex/Pragma.cpp @@ -117,7 +117,6 @@ void Preprocessor::Handle_Pragma(Token &Tok) { // Remember the string. std::string StrVal = getSpelling(Tok); - SourceLocation StrLoc = Tok.getLocation(); // Read the ')'. Lex(Tok); @@ -126,6 +125,8 @@ void Preprocessor::Handle_Pragma(Token &Tok) { return; } + SourceLocation RParenLoc = Tok.getLocation(); + // The _Pragma is lexically sound. Destringize according to C99 6.10.9.1: // "The string literal is destringized by deleting the L prefix, if present, // deleting the leading and trailing double-quotes, replacing each escape @@ -163,7 +164,7 @@ void Preprocessor::Handle_Pragma(Token &Tok) { // Make and enter a lexer object so that we lex and expand the tokens just // like any others. - Lexer *TL = Lexer::Create_PragmaLexer(TokLoc, StrLoc, + Lexer *TL = Lexer::Create_PragmaLexer(TokLoc, PragmaLoc, RParenLoc, // do not include the null in the count. StrVal.size()-1, *this); |