[clang] [LifetimeSafety] Add additional test for buildOriginFlowChain (PR #204124)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 16 05:10:36 PDT 2026
================
@@ -1250,6 +1250,16 @@ void conditional_operator_lifetimebound_nested_deep(bool cond) {
(void)*p; // expected-note 4 {{later used here}}
}
+void simpleparen() {
+ MyObj* p;
+ {
+ MyObj a;
+ MyObj* b = &a; // expected-warning {{local variable 'a' does not live long enough}}
+ p = (((b)));
----------------
usx95 wrote:
Consider adding a FIXME to add a note for the innermost 'b' here. The outer parens must be ignored but I would expect it behave same as `p = b;`
https://github.com/llvm/llvm-project/pull/204124
More information about the cfe-commits
mailing list