Remove references to the ast_type_traits namespace

Follow up to https://reviews.llvm.org/D92994
This commit is contained in:
Alexander Kornienko 2020-12-11 02:26:21 +01:00
parent c28b18af19
commit 4c5e0c7fd8
3 changed files with 3 additions and 4 deletions

View File

@ -21,7 +21,7 @@ void DurationDivisionCheck::registerMatchers(MatchFinder *finder) {
const auto DurationExpr =
expr(hasType(cxxRecordDecl(hasName("::absl::Duration"))));
finder->addMatcher(
traverse(ast_type_traits::TK_AsIs,
traverse(TK_AsIs,
implicitCastExpr(
hasSourceExpression(ignoringParenCasts(
cxxOperatorCallExpr(hasOverloadedOperatorName("/"),

View File

@ -19,7 +19,6 @@
#include <algorithm>
using namespace clang::ast_matchers;
using namespace clang::ast_type_traits;
namespace clang {

View File

@ -49,13 +49,13 @@ public:
bool hidden() const override { return true; }
private:
static bool dumpable(const ast_type_traits::DynTypedNode &N) {
static bool dumpable(const DynTypedNode &N) {
// Sadly not all node types can be dumped, and there's no API to check.
// See DynTypedNode::dump().
return N.get<Decl>() || N.get<Stmt>() || N.get<Type>();
}
llvm::Optional<ast_type_traits::DynTypedNode> Node;
llvm::Optional<DynTypedNode> Node;
};
REGISTER_TWEAK(DumpAST)