[llvm-branch-commits] [cfe-branch] r186204 - Make sure the assembler-with-cpp hack for "#" works with multiple "#"s in
Tom Stellard
thomas.stellard at amd.com
Fri Jul 12 13:58:29 PDT 2013
Author: tstellar
Date: Fri Jul 12 15:58:28 2013
New Revision: 186204
URL: http://llvm.org/viewvc/llvm-project?rev=186204&view=rev
Log:
Make sure the assembler-with-cpp hack for "#" works with multiple "#"s in
succession. Fixes PR16363.
Merged from r184240
Author: Eli Friedman <eli.friedman at gmail.com>
Date: Tue Jun 18 21:33:38 2013 +0000
Modified:
cfe/branches/release_33/lib/Lex/PPDirectives.cpp
cfe/branches/release_33/test/Preprocessor/assembler-with-cpp.c
Modified: cfe/branches/release_33/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_33/lib/Lex/PPDirectives.cpp?rev=186204&r1=186203&r2=186204&view=diff
==============================================================================
--- cfe/branches/release_33/lib/Lex/PPDirectives.cpp (original)
+++ cfe/branches/release_33/lib/Lex/PPDirectives.cpp Fri Jul 12 15:58:28 2013
@@ -1896,6 +1896,8 @@ void Preprocessor::HandleDefineDirective
// confused.
if (getLangOpts().AsmPreprocessor && Tok.isNot(tok::eod)) {
LastTok.setKind(tok::unknown);
+ MI->AddTokenToBody(LastTok);
+ continue;
} else {
Diag(Tok, diag::err_pp_stringize_not_parameter);
ReleaseMacroInfo(MI);
Modified: cfe/branches/release_33/test/Preprocessor/assembler-with-cpp.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_33/test/Preprocessor/assembler-with-cpp.c?rev=186204&r1=186203&r2=186204&view=diff
==============================================================================
--- cfe/branches/release_33/test/Preprocessor/assembler-with-cpp.c (original)
+++ cfe/branches/release_33/test/Preprocessor/assembler-with-cpp.c Fri Jul 12 15:58:28 2013
@@ -77,3 +77,7 @@
// rdar://8823139
# ##
// CHECK-Identifiers-False: # ##
+
+#define X(a) # # # 1
+X(1)
+// CHECK-Identifiers-False: # # # 1
More information about the llvm-branch-commits
mailing list