Issue 152500
Summary [LifetimeSafety] Add basic a use-after-scope diagnostic
Labels new issue
Assignees
Reporter usx95
    ```cpp
void bar(bool cond) {
  int* res = nullptr;
  if (cond) {
    int a = 1;
    res = &a;   // warning: 'a' may not live long enough.
  }
  use(res);     // note: later used here.
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to