================
@@ -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\"");
----------------
Harald-R wrote:

> if a_angled.h is not part of the Angled filter, it should probably be called 
> a_quoted.h (or c.h or something else that doesn't include "angled")

I can rename `a_angled.h` to `a_quoted.h` or something similar, if that helps 
avoid confusion. Here I wanted to follow the example with `a.h` and `b.h`, 
where `a.h` only includes `b.h` and is used inside the test itself, as it is 
necessary for the `TU.build()` call to be successful; otherwise, the `b` symbol 
would be undeclared when this `build()` method is called during the test 
execution.

Here, the `a_angled.h` and `b_angled.h` headers follow the same pattern, albeit 
the names could be reworked. I something like `c.h` is preferred, I can replace 
it, if it doesn't bring confusion with the other `dir/c.h` header.

> to avoid confusion, let's make the include style of b_angled.h angled here in 
> the contents of a_angled.h as well

Using angled brackets here leads to an error:

```
TestTU failed to build (suppress with /*error-ok*/): 
[2:9-2:21] in included file: 'b_angled.h' file not found with <angled> include; 
use "quotes" instead, notes: {[/clangd-test/a_angled.h:1:9-1:21] error occurred 
here}
```
I believe its parent directory would need to be added to the SYSTEM include 
path.

Let me know which rename makes most sense and whether this header should be in 
the SYSTEM path, and I will push a commit with the changes.

https://github.com/llvm/llvm-project/pull/140594
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to