[PATCH] D72534: Change default traversal in AST Matchers to ignore invisible nodes

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 10 11:56:02 PST 2020


steveire created this revision.
steveire added a reviewer: aaron.ballman.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72534

Files:
  clang/include/clang/AST/ASTContext.h


Index: clang/include/clang/AST/ASTContext.h
===================================================================
--- clang/include/clang/AST/ASTContext.h
+++ clang/include/clang/AST/ASTContext.h
@@ -561,7 +561,8 @@
   clang::PrintingPolicy PrintingPolicy;
   std::unique_ptr<interp::Context> InterpContext;
 
-  ast_type_traits::TraversalKind Traversal = ast_type_traits::TK_AsIs;
+  ast_type_traits::TraversalKind Traversal =
+      ast_type_traits::TK_IgnoreUnlessSpelledInSource;
 
 public:
   ast_type_traits::TraversalKind getTraversalKind() const { return Traversal; }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72534.237410.patch
Type: text/x-patch
Size: 574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200110/15c8daa9/attachment.bin>


More information about the cfe-commits mailing list