> I noticed that the proposed patch is wrong. Sorry about that. I will
> try to code a proper fix.

The good news is the correct one is smaller :-)

Cheers,
-- 
Rafael Ávila de Espíndola
Index: test/Preprocessor/line-directive-built-in.c
===================================================================
--- test/Preprocessor/line-directive-built-in.c	(revision 0)
+++ test/Preprocessor/line-directive-built-in.c	(revision 0)
@@ -0,0 +1 @@
+// RUN: clang-cc -E %s -o - | grep  "\<built-in\>.*2"
Index: lib/Frontend/InitPreprocessor.cpp
===================================================================
--- lib/Frontend/InitPreprocessor.cpp	(revision 83024)
+++ lib/Frontend/InitPreprocessor.cpp	(working copy)
@@ -488,6 +488,11 @@
       AddImplicitInclude(PredefineBuffer, I->first);
   }
 
+  // Exit the command line and go back to <built-in>
+  LineDirective = "# 1 \"<built-in>\" 2\n";
+  PredefineBuffer.insert(PredefineBuffer.end(),
+                         LineDirective, LineDirective+strlen(LineDirective));
+
   // Null terminate PredefinedBuffer and add it.
   PredefineBuffer.push_back(0);
   PP.setPredefines(&PredefineBuffer[0]);
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to