aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-18 18:52:52 +0000
committerChris Lattner <sabre@nondot.org>2009-02-18 18:52:52 +0000
commit2197c963543397777919cec22b65feb31a9ddf79 (patch)
tree5df2b7171289b81d9b173e9d8b39505facd333d6 /lib/Lex/Preprocessor.cpp
parent5934e75d98d99374f72722a69c5eefe026f35c74 (diff)
Fix some issues handling sub-token locations that come from macro expansions.
We now emit: t.m:6:15: warning: field width should have type 'int', but argument has type 'unsigned int' printf(STR, (unsigned) 1, 1); ^ ~~~~~~~~~~~~ t.m:3:18: note: instantiated from: #define STR "abc%*ddef" ^ which has the correct location in the string literal in the note line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index f50004c666..789d931221 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -296,7 +296,7 @@ SourceLocation Preprocessor::AdvanceToTokenCharacter(SourceLocation TokStart,
// the instantiation point (the name). We could point to the source
// character, but without also pointing to instantiation info, this is
// confusing.
- if (CharNo == 0 || TokStart.isMacroID()) return TokStart;
+ if (CharNo == 0) return TokStart;
// Figure out how many physical characters away the specified instantiation
// character is. This needs to take into consideration newlines and