================
@@ -943,3 +946,10 @@ void parentheses(bool cond) {
} // expected-note 4 {{destroyed here}}
(void)*p; // expected-note 4 {{later used here}}
}
+
+void use_temporary_after_destruction() {
+ View a;
+ a = temporary(); // expected-warning {{object whose reference is captured
does not live long enough}} \
+ expected-note {{destroyed here}}
+ use(a); // expected-note {{later used here}}
+}
----------------
Xazax-hun wrote:
Nit: missing new line at the end of file.
https://github.com/llvm/llvm-project/pull/172007
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits