Fix a bug that I noticed by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63094 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp
index 4bf012c..d277ec9 100644
--- a/lib/Lex/PPDirectives.cpp
+++ b/lib/Lex/PPDirectives.cpp
@@ -219,6 +219,7 @@
}
memcpy(Directive, &DirectiveStr[0], IdLen);
Directive[IdLen] = 0;
+ FirstChar = Directive[0];
}
if (FirstChar == 'i' && Directive[1] == 'f') {
diff --git a/test/Preprocessor/skipping_unclean.c b/test/Preprocessor/skipping_unclean.c
new file mode 100644
index 0000000..9efdd64
--- /dev/null
+++ b/test/Preprocessor/skipping_unclean.c
@@ -0,0 +1,9 @@
+// RUN: clang -E %s | grep bark
+
+#if 0
+blah
+#\
+else
+bark
+#endif
+