From 2536c072f76f355a4ddc3c8ddced9098f5f9d03f Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 8 Jul 2011 01:04:21 +0000 Subject: Switch the token-paste source locations inside of function style macro argument expansion to use the macro argument source locations as well. Add a few tests to exercise this. There is still a bit more work needed here though. llvm-svn: 134674 --- clang/lib/Lex/TokenLexer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/Lex') diff --git a/clang/lib/Lex/TokenLexer.cpp b/clang/lib/Lex/TokenLexer.cpp index fac6b7dc3ea..8aa2c79ac30 100644 --- a/clang/lib/Lex/TokenLexer.cpp +++ b/clang/lib/Lex/TokenLexer.cpp @@ -289,9 +289,9 @@ void TokenLexer::ExpandFunctionArguments() { for (unsigned i = ResultToks.size() - NumToks, e = ResultToks.size(); i != e; ++i) { Token &Tok = ResultToks[i]; - Tok.setLocation(SM.createInstantiationLoc(Tok.getLocation(), - curInst, curInst, - Tok.getLength())); + Tok.setLocation(SM.createMacroArgInstantiationLoc(Tok.getLocation(), + curInst, + Tok.getLength())); } } -- cgit v1.2.3