diff --git a/clang-tools-extra/clang-query/QueryParser.cpp b/clang-tools-extra/clang-query/QueryParser.cpp --- a/clang-tools-extra/clang-query/QueryParser.cpp +++ b/clang-tools-extra/clang-query/QueryParser.cpp @@ -134,8 +134,6 @@ unsigned Value = LexOrCompleteWord(this, ValStr) .Case("AsIs", ast_type_traits::TK_AsIs) - .Case("IgnoreImplicitCastsAndParentheses", - ast_type_traits::TK_IgnoreImplicitCastsAndParentheses) .Case("IgnoreUnlessSpelledInSource", ast_type_traits::TK_IgnoreUnlessSpelledInSource) .Default(~0u); diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -57,7 +57,7 @@ Improvements to clang-query --------------------------- -The improvements are... +- The IgnoreImplicitCastsAndParentheses traversal mode has been removed. Improvements to clang-rename ---------------------------- diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -234,6 +234,9 @@ has been changed to no longer match on template instantiations or on implicit nodes which are not spelled in the source. +- The TK_IgnoreImplicitCastsAndParentheses traversal kind was removed. It + is recommended to use TK_IgnoreUnlessSpelledInSource instead. + - The behavior of the forEach() matcher was changed to not internally ignore implicit and parenthesis nodes. diff --git a/clang/include/clang/AST/ASTNodeTraverser.h b/clang/include/clang/AST/ASTNodeTraverser.h --- a/clang/include/clang/AST/ASTNodeTraverser.h +++ b/clang/include/clang/AST/ASTNodeTraverser.h @@ -126,9 +126,6 @@ switch (Traversal) { case TK_AsIs: break; - case TK_IgnoreImplicitCastsAndParentheses: - S = E->IgnoreParenImpCasts(); - break; case TK_IgnoreUnlessSpelledInSource: S = E->IgnoreUnlessSpelledInSource(); break; diff --git a/clang/include/clang/AST/ASTTypeTraits.h b/clang/include/clang/AST/ASTTypeTraits.h --- a/clang/include/clang/AST/ASTTypeTraits.h +++ b/clang/include/clang/AST/ASTTypeTraits.h @@ -40,10 +40,6 @@ /// Will traverse all child nodes. TK_AsIs, - /// Will not traverse implicit casts and parentheses. - /// Corresponds to Expr::IgnoreParenImpCasts() - TK_IgnoreImplicitCastsAndParentheses, - /// Ignore AST nodes not written in the source TK_IgnoreUnlessSpelledInSource }; @@ -542,8 +538,6 @@ using TraversalKind = ::clang::TraversalKind; constexpr TraversalKind TK_AsIs = ::clang::TK_AsIs; -constexpr TraversalKind TK_IgnoreImplicitCastsAndParentheses = - ::clang::TK_IgnoreImplicitCastsAndParentheses; constexpr TraversalKind TK_IgnoreUnlessSpelledInSource = ::clang::TK_IgnoreUnlessSpelledInSource; } // namespace ast_type_traits diff --git a/clang/lib/AST/ParentMapContext.cpp b/clang/lib/AST/ParentMapContext.cpp --- a/clang/lib/AST/ParentMapContext.cpp +++ b/clang/lib/AST/ParentMapContext.cpp @@ -36,8 +36,6 @@ switch (Traversal) { case TK_AsIs: return E; - case TK_IgnoreImplicitCastsAndParentheses: - return E->IgnoreParenImpCasts(); case TK_IgnoreUnlessSpelledInSource: return E->IgnoreUnlessSpelledInSource(); }