[PATCH] D91918: Remove the IgnoreImplicitCastsAndParentheses traversal kind
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 21 10:55:58 PST 2020
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91918.306859.patch
Type: text/x-patch
Size: 3050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201121/5fa88ed5/attachment.bin>
More information about the cfe-commits
mailing list