Remove references to the ast_type_traits namespace
authorAlexander Kornienko <alexfh@google.com>
Fri, 11 Dec 2020 01:26:21 +0000 (02:26 +0100)
committerAlexander Kornienko <alexfh@google.com>
Fri, 11 Dec 2020 11:39:33 +0000 (12:39 +0100)
Follow up to https://reviews.llvm.org/D92994

clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.cpp
clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp

index ab55dd7..5ded02a 100644 (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("/"),
index 8e81e1b..3d8a0b7 100644 (file)
@@ -19,7 +19,6 @@
 #include <algorithm>
 
 using namespace clang::ast_matchers;
-using namespace clang::ast_type_traits;
 
 namespace clang {
 
index 72e7cd5..d7a7852 100644 (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)