Skip to content
Commit 460fc440 authored by Dávid Bolvanský's avatar Dávid Bolvanský
Browse files

[Clang] -Wunused-but-set-variable warning - handle also pre/post unary operators

Clang fails to diagnose:
```
void test() {
    int j = 0;
    for (int i = 0; i < 1000; i++)
            j++;
    return;
}
```

Reason: Missing support for UnaryOperator.

We should not warn with volatile variables... so add check for it.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D122271
parent 7fdb50c8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment