diff --git a/clang-tools-extra/clang-query/Query.cpp b/clang-tools-extra/clang-query/Query.cpp --- a/clang-tools-extra/clang-query/Query.cpp +++ b/clang-tools-extra/clang-query/Query.cpp @@ -46,12 +46,12 @@ " set traversal " "Set traversal kind of clang-query session. Available kinds are:\n" " AsIs " - "Print and match the AST as clang sees it.\n" + "Print and match the AST as clang sees it. This mode is the " + "default.\n" " IgnoreImplicitCastsAndParentheses " "Omit implicit casts and parens in matching and dumping.\n" " IgnoreUnlessSpelledInSource " - "Omit AST nodes unless spelled in the source. This mode is the " - "default.\n" + "Omit AST nodes unless spelled in the source.\n" " set output " "Set whether to output only content.\n" " enable output " diff --git a/clang-tools-extra/clang-query/QuerySession.h b/clang-tools-extra/clang-query/QuerySession.h --- a/clang-tools-extra/clang-query/QuerySession.h +++ b/clang-tools-extra/clang-query/QuerySession.h @@ -26,7 +26,7 @@ QuerySession(llvm::ArrayRef> ASTs) : ASTs(ASTs), PrintOutput(false), DiagOutput(true), DetailedASTOutput(false), BindRoot(true), PrintMatcher(false), - Terminate(false), TK(ast_type_traits::TK_IgnoreUnlessSpelledInSource) {} + Terminate(false), TK(ast_type_traits::TK_AsIs) {} llvm::ArrayRef> ASTs; diff --git a/clang/include/clang/AST/ParentMapContext.h b/clang/include/clang/AST/ParentMapContext.h --- a/clang/include/clang/AST/ParentMapContext.h +++ b/clang/include/clang/AST/ParentMapContext.h @@ -67,7 +67,7 @@ private: ASTContext &ASTCtx; class ParentMap; - TraversalKind Traversal = TK_IgnoreUnlessSpelledInSource; + TraversalKind Traversal = TK_AsIs; std::unique_ptr Parents; };