================
@@ -1239,13 +1270,15 @@ void parentheses(bool cond) {
MyObj* p;
----------------
suoyuan666 wrote:
Below is the output for this case:
```txt
test.cpp:7:17: warning: local variable 'a' does not live long enough
[-Wlifetime-safety-use-after-scope]
7 | MyObj* b = &a;
| ^
test.cpp:9:3: note: destroyed here
9 | }
| ^
test.cpp:7:16: note: expression aliases the storage of local variable 'a'
7 | MyObj* b = &a;
| ^~
test.cpp:10:10: note: later used here
10 | (void)*p;
| ^
```
The expression `p = (((b)));` is not printed. As I understand it, this happens
because `shouldShowInAliasChain` currently only calls `IgnoreImpCasts()` and
does not call `IgnoreParens()` as well.
https://github.com/llvm/llvm-project/pull/199345
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits