[clang-tools-extra] Follow style configuration in clangd when inserting missing includes (PR #140594)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Sun May 25 23:03:35 PDT 2025
================
@@ -262,6 +264,8 @@ TEST(IncludeCleaner, GenerateMissingHeaderDiags) {
TU.Filename = "main.cpp";
TU.AdditionalFiles["a.h"] = guard("#include \"b.h\"");
TU.AdditionalFiles["b.h"] = guard("void b();");
+ TU.AdditionalFiles["a_angled.h"] = guard("#include \"b_angled.h\"");
----------------
HighCommander4 wrote:
```c++
TU.ExtraArgs.push_back("-I" + testPath("."));
```
should be sufficient to get `#include <b_angled.h>` to compile.
Will leave the naming up to you as it's a minor point. (Possible suggestion: `b_angled` --> `angled`, and `a_angled` --> `angled_wrapper`?)
https://github.com/llvm/llvm-project/pull/140594
More information about the cfe-commits
mailing list