fix rdar://6816766 - Crash with function-like macro test at end of directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69964 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 4d6450b..fff6f10 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -1276,6 +1276,7 @@
   
   // Save state that can be changed while lexing so that we can restore it.
   const char *TmpBufferPtr = BufferPtr;
+  bool inPPDirectiveMode = ParsingPreprocessorDirective;
   
   Token Tok;
   Tok.startToken();
@@ -1283,6 +1284,7 @@
   
   // Restore state that may have changed.
   BufferPtr = TmpBufferPtr;
+  ParsingPreprocessorDirective = inPPDirectiveMode;
   
   // Restore the lexer back to non-skipping mode.
   LexingRawMode = false;