diff options
Diffstat (limited to 'clang/tools/clang-cc/CacheTokens.cpp')
| -rw-r--r-- | clang/tools/clang-cc/CacheTokens.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/tools/clang-cc/CacheTokens.cpp b/clang/tools/clang-cc/CacheTokens.cpp index 6e2a20d9878..c417eb49028 100644 --- a/clang/tools/clang-cc/CacheTokens.cpp +++ b/clang/tools/clang-cc/CacheTokens.cpp @@ -475,8 +475,10 @@ PTHEntry PTHWriter::LexTokens(Lexer& L) { // Get the next token. L.LexFromRawLexer(Tok); - - assert(!Tok.isAtStartOfLine()); + + // If we see the start of line, then we had a null directive "#". + if (Tok.isAtStartOfLine()) + goto NextToken; // Did we see 'include'/'import'/'include_next'? if (Tok.isNot(tok::identifier)) { |

