Right now when exiting the file Headers.cpp will identify the recursive
inclusion (with a new FileID) as non self-contained and will add it to the set
from which it will never be removed. As a result, we get incorrect results in
the IncludeStructure and Include Cleaner. This patch is a fix.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clangd/Headers.cpp | ||
---|---|---|
109–116 | nit: reverse the if condition to avoid double-negative. | |
110 | second sentence just echoes the code: say why, not what isSelfContainedHeader only returns true once the full header-guard structure has been seen, i.e. when exiting the *outer* copy of the file. So last result wins. |
second sentence just echoes the code: say why, not what
isSelfContainedHeader only returns true once the full header-guard structure has been seen, i.e. when exiting the *outer* copy of the file. So last result wins.