[cfe-commits] r63094 - in /cfe/trunk: lib/Lex/PPDirectives.cpp test/Preprocessor/skipping_unclean.c

Chris Lattner sabre at nondot.org
Mon Jan 26 21:34:03 PST 2009


Author: lattner
Date: Mon Jan 26 23:34:03 2009
New Revision: 63094

URL: http://llvm.org/viewvc/llvm-project?rev=63094&view=rev
Log:
Fix a bug that I noticed by inspection.

Added:
    cfe/trunk/test/Preprocessor/skipping_unclean.c
Modified:
    cfe/trunk/lib/Lex/PPDirectives.cpp

Modified: cfe/trunk/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=63094&r1=63093&r2=63094&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Mon Jan 26 23:34:03 2009
@@ -219,6 +219,7 @@
       }
       memcpy(Directive, &DirectiveStr[0], IdLen);
       Directive[IdLen] = 0;
+      FirstChar = Directive[0];
     }
     
     if (FirstChar == 'i' && Directive[1] == 'f') {

Added: cfe/trunk/test/Preprocessor/skipping_unclean.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/skipping_unclean.c?rev=63094&view=auto

==============================================================================
--- cfe/trunk/test/Preprocessor/skipping_unclean.c (added)
+++ cfe/trunk/test/Preprocessor/skipping_unclean.c Mon Jan 26 23:34:03 2009
@@ -0,0 +1,9 @@
+// RUN: clang -E %s | grep bark
+
+#if 0
+blah
+#\
+else
+bark
+#endif
+





More information about the cfe-commits mailing list