diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-17 06:46:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-17 06:46:14 +0000 |
commit | bde1b81eb8550bb61c0c6600882ca9f8100e2d3d (patch) | |
tree | 3bcac806fad045330fe947d4a56cd97b2fab9bc9 /clang/lib/Sema/SemaChecking.cpp | |
parent | 3a324d32325a578038fab0dabf55c66f47980002 (diff) | |
download | bcm5719-llvm-bde1b81eb8550bb61c0c6600882ca9f8100e2d3d.tar.gz bcm5719-llvm-bde1b81eb8550bb61c0c6600882ca9f8100e2d3d.zip |
push use of Preprocessor out farther.
llvm-svn: 119471
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 278d8203201..fb231731b98 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -84,16 +84,13 @@ SourceLocation Sema::getLocationOfStringLiteralByte(const StringLiteral *SL, // Use the StringLiteralParser to compute the length of the string in bytes. StringLiteralParser SLP(&TheTok, 1, PP, /*Complain=*/false); + // PP.getSourceManager(), PP.getLangOptions(), PP.getTargetInfo()); unsigned TokNumBytes = SLP.GetStringLength(); // If the byte is in this token, return the location of the byte. if (ByteNo < TokNumBytes || (ByteNo == TokNumBytes && TokNo == SL->getNumConcatenated())) { - unsigned Offset = - StringLiteralParser::getOffsetOfStringByte(TheTok, ByteNo, - PP.getSourceManager(), - PP.getLangOptions(), - PP.getTargetInfo()); + unsigned Offset = SLP.getOffsetOfStringByte(TheTok, ByteNo); // Now that we know the offset of the token in the spelling, use the // preprocessor to get the offset in the original source. |