A HTML report of gtest after this patch:
https://gist.githubusercontent.com/hokein/73eee6f65a803e5702d8388c187524a6/raw/cf05a503519703a2fb87840bb0b270fe11a7a9fd/RecordTest.html
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| clang-tools-extra/include-cleaner/lib/FindHeaders.cpp | ||
|---|---|---|
| 58 ↗ | (On Diff #478156) | this seems like unneccesary indirection:
|
| clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp | ||
| 231 | I find this test very hard to follow because it combines a lot of complicated and separate test cases, fixtures etc. | |
| 301 | all this stuff around name-based lookup can be much simpler if you make your tests narrower, and require the ref target to have a fixed name (use llvm::to_string(Ref.Target)) int ^target = 1; #define M target #define USE_M M int y = ^USE_M; | |
| clang-tools-extra/include-cleaner/lib/Analysis.cpp | ||
|---|---|---|
| 38 | as discussed offline we're introducing this extra constraint on references being provided, so let's mention that in the documentation as well. apart from that I agree with rest of the comments from Sam | |
address comments:
- polish and simplify the tests
- inline the spelling-loc-check logic
- add a comment for the walkUsed
| clang-tools-extra/include-cleaner/include/clang-include-cleaner/Analysis.h | ||
|---|---|---|
| 43 | maybe rather say Only reports references from main file ? | |
| clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp | ||
| 243 | i think it's better to make declarations for target always part of the header. otherwise there are changes to both target and extra step in between (e.g. CALL_FUNC) between tests (so multiple things could go wrong and cancel each other). | |
| 259 | nit: i think you can still have int target() and convert PLUS_ONE to X() + 1 (same for other examples). (or you can do it the other way around, always have an static int target = 0;) | |
| 321 | nit: no need for optional SourceLocation will be invalid by default. | |
thanks!
| clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp | ||
|---|---|---|
| 292 | nit: this and the following test case is pretty much the same. maybe drop this one? | |
maybe rather say Only reports references from main file ?