diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-03-19 01:51:19 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-03-19 01:51:19 +0000 |
| commit | bada7f5143e28101db8a88252bdb5cd56f0c417e (patch) | |
| tree | 39aa0350f1bdb7c2c00aaa09a7febf21d1904c67 /lib/Lex/PreprocessorLexer.cpp | |
| parent | 6e323b2030566b88627f140e5675bf7aed04bc07 (diff) | |
| download | clang-bada7f5143e28101db8a88252bdb5cd56f0c417e.tar.gz | |
Factor out repeated code parsing and concatenating header-names from
tokens.
We now actually form an angled_string_literal token for a header name by
concatenation rather than just working out what its contents would be.
This substantially simplifies downstream processing and is necessary for
C++20 header unit imports.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PreprocessorLexer.cpp')
| -rw-r--r-- | lib/Lex/PreprocessorLexer.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Lex/PreprocessorLexer.cpp b/lib/Lex/PreprocessorLexer.cpp index f721bdcd1e..5f6f4a1341 100644 --- a/lib/Lex/PreprocessorLexer.cpp +++ b/lib/Lex/PreprocessorLexer.cpp @@ -30,9 +30,7 @@ PreprocessorLexer::PreprocessorLexer(Preprocessor *pp, FileID fid) /// After the preprocessor has parsed a \#include, lex and /// (potentially) macro expand the filename. void PreprocessorLexer::LexIncludeFilename(Token &FilenameTok) { - assert(ParsingPreprocessorDirective && - ParsingFilename == false && - "Must be in a preprocessing directive!"); + assert(ParsingFilename == false && "reentered LexIncludeFilename"); // We are now parsing a filename! ParsingFilename = true; @@ -45,10 +43,6 @@ void PreprocessorLexer::LexIncludeFilename(Token &FilenameTok) { // We should have obtained the filename now. ParsingFilename = false; - - // No filename? - if (FilenameTok.is(tok::eod)) - PP->Diag(FilenameTok.getLocation(), diag::err_pp_expects_filename); } /// getFileEntry - Return the FileEntry corresponding to this FileID. Like |
