Zequan Wu
Zequan Wu
> while that's technically correct, it doesn't lead to the right outcome here. Do you mean the right outcome should be that variables declared in condition expression of if/while/switch/for should...
Fixed by https://reviews.llvm.org/rG15a3ae1ab1a64cc62041c32ba54914a9dd7b8361.
Yes, I'll take this one.
> The right way to solve is to emit a gap area between the end of each statement which may terminate its region, and the start of the next statement....
mentioned in issue llvm/llvm-bugzilla-archive#37046
*** Bug llvm/llvm-bugzilla-archive#37046 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug llvm/llvm-project#36327 ***
There is a Sema test case for clang's -Wparentheses diagnostics. It seems like that it intentionally ignores this case: https://github.com/llvm/llvm-project/blob/master/clang/test/Sema/parentheses.c#L46-L47
It no longer crashes in latest lldb and gives the correct result if let foo() to return different values in base class and derived class. I guess it's already fixed.
A new attribute called "nomerge" has been introduced to prevent callsites merging. You can read more about it on https://clang.llvm.org/docs/AttributeReference.html#nomerge