================
@@ -1472,3 +1472,56 @@ template<typename T> struct Outer {
   };
 };
 Outer<int>::Inner outerinner;
+
+void aggregate() {
+  struct NonAgg {
+    NonAgg() { }
+    [[clang::requires_explicit_initialization]] int f;  // expected-warning 
{{attribute is ignored}}
+  };
+  NonAgg nonagg;
+  (void)nonagg;
+
+  struct S {
+    [[clang::requires_explicit_initialization]] int x; // expected-note 
{{declared}} // expected-note {{declared}} // expected-note {{declared}} // 
expected-note {{declared}}
----------------
erichkeane wrote:

```suggestion
    [[clang::requires_explicit_initialization]] int x; // expected-note 
4{{declared here}}
```

THOUGH, I VASTLY prefer to use 'bookmarks' for diagnostics and have these notes 
be shown in text right below the warning.

Also, please don't use partial matches so aggressively, it makes reviewing 
these now/in the future much more difficult

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

Reply via email to