steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. steveire requested review of this revision.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D91918 Files: clang-tools-extra/clang-query/QueryParser.cpp clang/docs/ReleaseNotes.rst clang/include/clang/AST/ASTNodeTraverser.h clang/include/clang/AST/ASTTypeTraits.h clang/lib/AST/ParentMapContext.cpp Index: clang/lib/AST/ParentMapContext.cpp =================================================================== --- clang/lib/AST/ParentMapContext.cpp +++ 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(); } Index: clang/include/clang/AST/ASTTypeTraits.h =================================================================== --- clang/include/clang/AST/ASTTypeTraits.h +++ 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 Index: clang/include/clang/AST/ASTNodeTraverser.h =================================================================== --- clang/include/clang/AST/ASTNodeTraverser.h +++ 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; Index: clang/docs/ReleaseNotes.rst =================================================================== --- clang/docs/ReleaseNotes.rst +++ 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. Index: clang-tools-extra/clang-query/QueryParser.cpp =================================================================== --- clang-tools-extra/clang-query/QueryParser.cpp +++ clang-tools-extra/clang-query/QueryParser.cpp @@ -134,8 +134,6 @@ unsigned Value = LexOrCompleteWord<unsigned>(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);
Index: clang/lib/AST/ParentMapContext.cpp =================================================================== --- clang/lib/AST/ParentMapContext.cpp +++ 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(); } Index: clang/include/clang/AST/ASTTypeTraits.h =================================================================== --- clang/include/clang/AST/ASTTypeTraits.h +++ 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 Index: clang/include/clang/AST/ASTNodeTraverser.h =================================================================== --- clang/include/clang/AST/ASTNodeTraverser.h +++ 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; Index: clang/docs/ReleaseNotes.rst =================================================================== --- clang/docs/ReleaseNotes.rst +++ 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. Index: clang-tools-extra/clang-query/QueryParser.cpp =================================================================== --- clang-tools-extra/clang-query/QueryParser.cpp +++ clang-tools-extra/clang-query/QueryParser.cpp @@ -134,8 +134,6 @@ unsigned Value = LexOrCompleteWord<unsigned>(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);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits