[PATCH] D59802: [clang-tidy] Add new checker: llvm-avoid-cast-in-conditional
Don Hinton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 25 15:30:42 PDT 2019
hintonda marked an inline comment as done.
hintonda added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/utils/HeaderFileExtensionsUtils.h:23
-typedef llvm::SmallSet<llvm::StringRef, 5> HeaderFileExtensionsSet;
+typedef SmallSet<StringRef, 5> HeaderFileExtensionsSet;
----------------
Eugene.Zelenko wrote:
> Please use using. See modernize-use-using.
Normally I'd agree, but since the llvm checkers live in the llvm namespace, including any llvm checker prior to this header will prevent clang from finding `llvm::SmallSet`. As you can see, the other llvm classes don't need the `llvm::` prefix, but that's because `clang/include/clang/Basic/LLVM.h` already has a bunch of `using` statements.
So, this code won't compile without this change, or the addition of `using llvm::SmallSet;` to `clang/include/clang/Basic/LLVM.h`. Should I make that change first? Then just remove the `llvm::` prefix?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59802/new/
https://reviews.llvm.org/D59802
More information about the cfe-commits
mailing list