================
@@ -396,6 +400,24 @@ void loan_from_previous_iteration(MyObj safe, bool
condition) {
} // expected-note {{destroyed here}}
}
+void trivial_int_uaf(){
+ int * a;
+ {
+ int b = 1;
+ a = &b; // expected-warning {{object whose reference is captured does
not live long enough}}
+ } // expected-note {{destroyed here}}
+ (void)*a; // expected-note {{later used here}}
+}
----------------
kashika0112 wrote:
Done
https://github.com/llvm/llvm-project/pull/168855
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits