[PATCH] D20131: Fixed crash during code completion in file included within declaration

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Tue May 10 19:33:08 PDT 2016


rsmith added a comment.

Please add a test to test/CodeCompletion.


================
Comment at: lib/Lex/PPLexerChange.cpp:380-382
@@ -379,3 +379,5 @@
         CurLexer->FormTokenWithChars(Result, CurLexer->BufferEnd, tok::eof);
         CurLexer.reset();
+        if (CurLexerKind == CLK_Lexer)
+          CurLexerKind = CLK_CachingLexer;
       } else {
----------------
Can you use `CurLexer->cutOffLexing()` instead?


http://reviews.llvm.org/D20131





More information about the cfe-commits mailing list