Fix PR27429.
Details
Diff Detail
Event Timeline
| clang-tidy/misc/UnusedUsingDeclsCheck.cpp | ||
|---|---|---|
| 63 | Use early return here instead of "else". | |
| 65 | No braces for single statement ifs. | |
| 68 | Wouldn't you also want to do this via the canonical decl? Add a test. | |
| 71 | Would it be important to look at something like the canonical decl here? Can you add a test with a (static) class variable that is initialized out of line? | |
| test/clang-tidy/misc-unused-using-decls.cpp | ||
| 60 | Can you add tests where variables and functions are solely referenced by pointers to members? Compare: | |
I ran the check on LLVM project. The check found 8 hits: http://reviews.llvm.org/D20060 (Check all of them, no false positives).
Update.
| clang-tidy/misc/UnusedUsingDeclsCheck.cpp | ||
|---|---|---|
| 39 | If we ignore them in function context, we will also skip the following case: namespace a {
class A {};
};
void func() {
using a::A; // unused-using decls.
} | |
nit: Add an empty line after this.