[llvm-branch-commits] [clang-tools-extra] 4c5e0c7 - Remove references to the ast_type_traits namespace

Alexander Kornienko via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Dec 11 03:45:47 PST 2020


Author: Alexander Kornienko
Date: 2020-12-11T12:39:33+01:00
New Revision: 4c5e0c7fd801ccc52d3b137fa685d4215a6c57ed

URL: https://github.com/llvm/llvm-project/commit/4c5e0c7fd801ccc52d3b137fa685d4215a6c57ed
DIFF: https://github.com/llvm/llvm-project/commit/4c5e0c7fd801ccc52d3b137fa685d4215a6c57ed.diff

LOG: Remove references to the ast_type_traits namespace

Follow up to https://reviews.llvm.org/D92994

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.cpp b/clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.cpp
index ab55dd7f9019..5ded02a2097b 100644
--- a/clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.cpp
+++ b/clang-tools-extra/clang-tidy/abseil/DurationDivisionCheck.cpp
@@ -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("/"),

diff  --git a/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp b/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
index 8e81e1bebd1f..3d8a0b7b3970 100644
--- a/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp
@@ -19,7 +19,6 @@
 #include <algorithm>
 
 using namespace clang::ast_matchers;
-using namespace clang::ast_type_traits;
 
 namespace clang {
 

diff  --git a/clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp b/clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp
index 72e7cd5a2527..d7a7852925db 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/DumpAST.cpp
@@ -49,13 +49,13 @@ class DumpAST : public Tweak {
   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)
 


        


More information about the llvm-branch-commits mailing list