================
@@ -34,6 +34,6 @@ struct basic_string {
 };
 }  // namespace std
 void test(const char* a) {
-  // verify we're emitting the `-Wdangling-assignment` warning.
+  // verify we're emitting the `-Wdangling-assignment-gsl` warning.
   a = std::basic_string().c_str(); // expected-warning {{object backing the 
pointer a will be destroyed at the end of the full-expression}}
----------------
hokein wrote:

The warning is triggered by the implicit `gsl::Owner` attribute on 
`std::basic_string`. Without this attribute, the warning would not be issued.

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

Reply via email to