| Issue |
202312
|
| Summary |
Fix for readability-delete-null-pointer breaks code when there is a variable declaration inside the if statement
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
igor-akhmetov
|
Applying the fix on this code
```
struct X {};
X* foo();
void bar()
{
if (auto x = foo())
delete x;
}
```
leads to
```
struct X {};
X* foo();
void bar()
{
delete x;
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs