================
@@ -465,6 +465,30 @@ TEST(DiagnosticTest, TemplatesInHeaders) {
                                       "'Derived<int>' requested here")))));
 }
 
+// Verify that non-fatal warnings originating from included headers are not
+// promoted and shown in the main file, as this would clutter the user's
+// diagnostics with warnings from code they didn't write.
----------------
ArcsinX wrote:

The code in this test shows why diagnostic can't be dropped.
We have a templated code in header, which is completely fine if a caller use it 
right (e.g. f(1)), but we call it incorrectly (pass double instead of int) and 
we MUST shown diagnostic here, so dropping it is not right

https://github.com/llvm/llvm-project/pull/223860
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to