http://llvm.org/bugs/show_bug.cgi?id=22481

Alexander Kornienko <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #1 from Alexander Kornienko <[email protected]> ---
Clang-tidy can run any Clang diagnostic and apply suggested fixes if the
diagnostic produces them. The -Wignored-qualifiers can produce fixes, you can
use it in clang-tidy like this:

$ cat q.cc
const int f() { return 42; }
$ clang-tidy -extra-arg=-Wignored-qualifiers -fix q.cc --
1 warning generated.
q.cc:1:1: warning: 'const' type qualifier on return type has no effect
[clang-diagnostic-ignored-qualifiers]
const int f() { return 42; }
^
q.cc:1:1: note: FIX-IT applied suggested code changes
const int f() { return 42; }
^
clang-tidy applied 1 of 1 suggested fixes.
$ cat q.cc
int f() { return 42; }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to