Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| clang-tools-extra/clangd/IncludeCleaner.cpp | ||
|---|---|---|
| 124–128 | Add a comment | |
| 129 | I'm not 100% sure these should be unconditional. It's *probably* right, but... #define ab x #define concat(x, y) x##y int foo(a, b); and verify that we get the expected set of file IDs when seeding with the location of the VarDecl x? | |
| clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp | ||
| 170 | this doesn't seem to test very much, a comment should indicate that this is guarding against a crash. Ideally we'd (also?) have a test that calls findReferencedFiles and actually assert which IDs we get, rather than run some big blob of code and hope not to crash. | |
LG with the new test
| clang-tools-extra/clangd/IncludeCleaner.cpp | ||
|---|---|---|
| 124–128 | This is about token pasting, nested macro expansions are neither necessary nor sufficient. | |
| clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp | ||
| 198 | Nit: I think this should be asserting on FileIDs (i.e. before translation). It's narrower, and the contract is that findReferecedFiles should filter them out already. | |
| 198 | Comment: no "<scratch space>" FID | |
| 199 | Comment: should not crash due to "files" missing from include structure | |
Add a comment