Depends on D156122
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/include-cleaner/lib/Record.cpp | ||
---|---|---|
248 | If I understand correctly, you should be able to extract IncludedFile from IncludedHeader->physical() and then you don't need the extra parameter. Also, technically this and the below code used to work for standard and verbatim headers before this change. Now it probably won't, since there will be no corresponding IncludedFile. Is this actually something to worry about? | |
262 | nit: remove braces. | |
419 | Consider inlining this function. |
clang-tools-extra/include-cleaner/lib/Record.cpp | ||
---|---|---|
248 |
Not really, if included file is recognized as a system include we won't have a physical file entry.
It still does (and I am adding tests for those). All of them were still recorded based on their line number into this structure, now instead we're recording them through their fileentry (even if their include_cleaner::Header representation is non-physical, we're talking about an include here, so it must have a logical file it resolves to, when it exists). So this still implies some behavior changes of course:
WDYT? | |
262 | because the condition is spanning multiple lines, i'd rather keep it | |
419 | same concerns about inlining as in the previous patch |
If I understand correctly, you should be able to extract IncludedFile from IncludedHeader->physical() and then you don't need the extra parameter.
Also, technically this and the below code used to work for standard and verbatim headers before this change. Now it probably won't, since there will be no corresponding IncludedFile. Is this actually something to worry about?