[PATCH] D114095: [clang][lex] Include tracking: simplify and move to preprocessor
Jan Svoboda via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 19 00:48:58 PST 2021
jansvoboda11 marked an inline comment as done.
jansvoboda11 added inline comments.
================
Comment at: clang/lib/Lex/Preprocessor.cpp:552
+ if (const FileEntry *FE = SourceMgr.getFileEntryForID(MainFileID)) {
+ HeaderInfo.getFileInfo(FE);
+ markIncluded(FE);
----------------
vsapsai wrote:
> Why do you need to `getFileInfo` but don't use it? I have no objections but it looks like it deserves a comment because it's not obvious.
Without the call, I'm hitting some assertions when running C++20 modules tests:
```
Assertion failed: (CurDiagID == std::numeric_limits<unsigned>::max() && "Multiple diagnostics in flight at once!"), function Report, file Diagnostic.h, line 1526.
```
```
fatal error: error in backend: -verify directives found after rather than during normal parsing of <llvm>/clang/test/CXX/modules-ts/basic/basic.def.odr/p6/global-vs-module.cpp
```
Might need to investigate more to be able to write up a reasonable comment here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114095/new/
https://reviews.llvm.org/D114095
More information about the cfe-commits
mailing list