[PATCH] D61835: Extract ASTDumper to a header file

2019-05-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D61835#1505228 , @aaron.ballman wrote: > In D61835#1505202 , @steveire wrote: > > > 3. Anyone who wants traversal in the same way that dumping is done and who > > needs to call API on

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-05-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 199884. steveire added a comment. Update Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61837/new/ https://reviews.llvm.org/D61837 Files: include/clang/AST/ASTContext.h include/clang/AST/ASTNodeTraverser.h include/clan

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-05-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 2 inline comments as done. steveire added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:718 +template +internal::Matcher traverse(ast_type_traits::TraversalKind TK, + const internal::Matcher &InnerMatcher) { ---

[PATCH] D61835: Extract ASTDumper to a header file

2019-05-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D61835#1505314 , @aaron.ballman wrote: > In D61835#1505280 , @steveire wrote: > > > In D61835#1505228 , @aaron.ballman > > wrote: > > > > > In

[PATCH] D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser

2019-05-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D61834#1505124 , @aaron.ballman wrote: > In D61834#1505056 , @steveire wrote: > > > In D61834#1504665 , @aaron.ballman > > wrote: > > > > > Wha

[PATCH] D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser

2019-05-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 199922. steveire added a comment. Herald added a subscriber: mgorny. Add basic traverser test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61834/new/ https://reviews.llvm.org/D61834 Files: include/clang/AST/ASTNodeTraver

[PATCH] D62056: Use ASTDumper to dump the AST from clang-query

2019-05-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. This way, the output is not limited by the various API differences between the dump() member functions. For example, all dumps are now in color, while t

[PATCH] D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser

2019-05-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 12. steveire added a comment. Update Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61834/new/ https://reviews.llvm.org/D61834 Files: include/clang/AST/ASTNodeTraverser.h unittests/AST/ASTTraverserTest.cpp unittest

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-05-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:240 + + assert(RestrictKind.isBaseOf(NodeKind)); + if (Implementation->dynMatches(N, Finder, Builder)) { aaron.ballman wrote: > Add an

[PATCH] D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser

2019-05-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 5 inline comments as done. steveire added inline comments. Comment at: unittests/AST/ASTTraverserTest.cpp:75 + +template std::string dumpASTString(NodeType &&... N) { + std::string Buffer; aaron.ballman wrote: > Did clang-format produce this for

[PATCH] D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser

2019-05-17 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. steveire marked an inline comment as done. Closed by commit rL361033: Add a Visit overload for DynTypedNode to ASTNodeTraverser (authored by steveire, committed by ). Herald added a project: LLVM. Herald added a subscriber:

[PATCH] D61835: Extract ASTDumper to a header file

2019-05-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Great, thanks. I'm going to investigate whether we can move the `dump` method implementations to their respective class files, and then look into a rename for this to `StreamNodeDumper` or so (name tbd). Repository: rC Clang CHANGES SINCE LAST ACTION https://rev

[PATCH] D61835: Extract ASTDumper to a header file

2019-05-17 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361034: Extract ASTDumper to a header file (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D61835?vs=199179&id=200038#toc Repository: rC Clang CHANGES SINCE

[PATCH] D62065: Move dump method implementations to their respective class files

2019-05-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. There is no need to group them together. Repository: rC Clang https://reviews.llvm.org/D62065 Files: lib/AST/ASTDumper.cpp lib/AST/Comment.cpp

[PATCH] D61837: Make it possible control matcher traversal kind with ASTContext

2019-05-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:240 + + assert(RestrictKind.isBaseOf(NodeKind)); + if (Implementation->dynMatches(N, Finder, Builder)) { aaron.ballman wrote: > stevei

[PATCH] D55595: Share the forced linking code between clang-tidy tool and plugin

2018-12-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. FYI, CMake target property `INTERFACE_SOURCES` is designed to make this easy. For each module you would generate a file containing extern volatile int ${MODULE_NAME}ModuleAnchorSource; static int LLVM_ATTRIBUTE_UNUSED ${MODULE_NAME}ModuleAnchorDestination = ${

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Can you say where else it is common in LLVM? I'm curious. Maybe those places could be changed too. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55595/new/ https://reviews.llvm.org/D55595 ___

[PATCH] D55489: Implement dumpFunctionDeclParameters in NodeDumper

2018-12-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire abandoned this revision. steveire added a comment. Abandoning this because it's not really the right approach as it appears in the interface between the generic traverser and the generic node dumper, which it really shouldn't. Repository: rC Clang CHANGES SINCE LAST ACTION https:

[PATCH] D55490: Add dumpMethodDeclOverrides to NodeDumper

2018-12-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire abandoned this revision. steveire added a comment. Abandoning this because it's not really the right approach as it appears in the interface between the generic traverser and the generic node dumper, which it really shouldn't. Repository: rC Clang CHANGES SINCE LAST ACTION https:

[PATCH] D54408: Add matchers available through casting to derived

2018-12-30 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 179725. steveire added a comment. Some updates Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54408/new/ https://reviews.llvm.org/D54408 Files: lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/Dynamic/RegistryT

[PATCH] D54408: [ASTMatchers] Add matchers available through casting to derived

2019-01-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 179953. steveire added a comment. Case Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54408/new/ https://reviews.llvm.org/D54408 Files: lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatchers/Dynamic/RegistryTest.cpp

[PATCH] D56354: Replace asserts with if() in SourceLocation accessors

2019-01-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Nowhere else in the AST classes assert on these kinds of accessors. This way, we can call the accessors and check the validity of the result instead of externally duplicating the cond

[PATCH] D55337: NFC: Move dumpDeclRef to NodeDumper

2019-01-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: include/clang/AST/TextNodeDumper.h:28 const comments::FullComment *> { + TextTreeStructure &TreeStructure; raw_ostream &OS; aaro

[PATCH] D55337: NFC: Move dumpDeclRef to NodeDumper

2019-01-05 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: include/clang/AST/TextNodeDumper.h:28 const comments::FullComment *> { + TextTreeStructure &TreeStructure; raw_ostream &OS; stev

[PATCH] D56354: [AST] Replace asserts with if() in SourceLocation accessors

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 180548. steveire added a comment. Fix formatting Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56354/new/ https://reviews.llvm.org/D56354 Files: include/clang/AST/DeclarationName.h include/clang/AST/TemplateBase.h lib

[PATCH] D56354: [AST] Replace asserts with if() in SourceLocation accessors

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: include/clang/AST/DeclarationName.h:735 + Name.getNameKind() != DeclarationName::CXXConversionFunctionName) + return nullptr; return LocInfo.NamedType.TInfo; ---

[PATCH] D56407: Implement the TreeStructure interface through the TextNodeDumper

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, erichkeane. Herald added a subscriber: cfe-commits. This way, when the generic ASTTraverser is extracted from ASTDumper, there can't be any problem related to ordering of class members, a concern that was raised in https://re

[PATCH] D55337: NFC: Move dumpDeclRef to NodeDumper

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: include/clang/AST/TextNodeDumper.h:28 const comments::FullComment *> { + TextTreeStructure &TreeStructure; raw_ostream &OS; stev

[PATCH] D56354: [AST] Replace asserts with if() in SourceLocation accessors

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL350573: NFC: Replace asserts with if() in SourceLocation accessors (authored by steveire, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D5635

[PATCH] D56354: [AST] Replace asserts with if() in SourceLocation accessors

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: lib/AST/NestedNameSpecifier.cpp:465 TypeLoc NestedNameSpecifierLoc::getTypeLoc() const { - assert((Qualifier->getKind() == NestedNameSpecifier::TypeSpec || - Qualifier->getKind() ==

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. There is no reason for it to not be a StringRef. Making it one simplifies existing code, and makes follow-up features easier. Repository: rCTE Clang Tools Extra https://reviews.l

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 180626. steveire added a comment. Run clang-format Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56415/new/ https://reviews.llvm.org/D56415 Files: clang-query/QueryParser.cpp clang-query/QueryParser.h Ind

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added a comment. Thanks, I ran clang-format, and I'd rather let it be the rulemaker, rather than try to add newlines in the lambdas :). Comment at: clang-query/QueryParser.cpp:36 + if (Line.front() == '#') { +Line = {};

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 2 inline comments as done. steveire added inline comments. Comment at: clang-query/QueryParser.cpp:33 + if (Line.empty()) +return StringRef(Line.begin(), 0); aaron.ballman wrote: > Why not just return `Line`? It is the pre-existing behavior

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: clang-query/QueryParser.cpp:33 + if (Line.empty()) +return StringRef(Line.begin(), 0); aaron.ballman wrote: > steveire wrote: > > aaron.ballman wrote: > > > Why not just

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: clang-query/QueryParser.cpp:33 + if (Line.empty()) +return StringRef(Line.begin(), 0); steveire wrote: > aaron.ballman wrote: > > steveire wrote: > > > aaron.ballman wro

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: clang-query/QueryParser.cpp:37 +Line = {}; return StringRef(); } aaron.ballman wrote: > steveire wrote: > > aaron.ballman wrote: > > > Why not just return `Line` he

[PATCH] D56415: NFC: Port QueryParser to StringRef

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE350660: [Query] NFC: Port QueryParser to StringRef (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D56415?vs=180626&id=180740#toc Repository: rCTE Clang Too

[PATCH] D56407: Implement the TreeStructure interface through the TextNodeDumper

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350665: Implement the TreeStructure interface through the TextNodeDumper (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D56407?vs=180552&id=180742#toc Reposito

[PATCH] D55337: NFC: Move dumpDeclRef to NodeDumper

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350677: [ASTDump] NFC: Move dumpDeclRef to NodeDumper (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D55337?vs=177670&id=180752#toc Repository: rC Clang CHA

[PATCH] D55488: Add utility for dumping a label with child nodes

2019-01-08 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 180754. steveire added a comment. Replace std::string with StringRef Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55488/new/ https://reviews.llvm.org/D55488 Files: include/clang/AST/TextNodeDumper.h lib/AST/ASTDumper.c

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. The timing of this is unfortunate because the change will not be needed soon. Refactoring is underway to extract a generic traverser from ASTDumper. Then the parent/child traversal of ASTMatchFinder can be implemented in terms of it without any of these kinds of proble

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D56444#1350935 , @sammccall wrote: > In D56444#1350897 , @steveire wrote: > > > > > > I'm not inclined to hold off fixing this bug though, because: > > - it's blocking other patches, and

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D56444#1350946 , @JonasToth wrote: > Should still be fixed for 8.0 (probably with this patch). The refactoring is > more realistic to land in 9.0 i guess? That's why I said timing is unfortunate :). Repository: rC Clang

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D56444#1351096 , @sammccall wrote: > In D56444#1351056 , @aaron.ballman > wrote: > > > Given that, I kind of think we should have functionDecl() match only > > functions, and give user

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D56444#1351125 , @aaron.ballman wrote: > if the location isn't somewhere in user code, then don't consider the node or > its children for traversal. However, that may be insufficient and equally as > mysterious behavior. T

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D56444#1351130 , @steveire wrote: > In D56444#1351125 , @aaron.ballman > wrote: > > > if the location isn't somewhere in user code, then don't consider the node > > or its children for

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D56444#1351145 , @sammccall wrote: > In D56444#1351128 , @aaron.ballman > wrote: > > > In D56444#1351127 , @steveire > > wrote: > > > > > I sug

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D56444#1351150 , @sammccall wrote: > In D56444#1351130 , @steveire wrote: > > > In D56444#1351125 , @aaron.ballman > > wrote: > > > > > if the l

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D56444#1351182 , @steveire wrote: > In D56444#1351150 , @sammccall wrote: > > > In D56444#1351130 , @steveire > > wrote: > > > > > In D56444#135

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D56444#1351194 , @JonasToth wrote: > >> Is the suggestion to make that change, but then modify the semantics of > >> the `functionDecl()` etc matchers to hide it? Or something else? > > > > My suggestion is to extract the tra

[PATCH] D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on.

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D56444#1351247 , @sammccall wrote: > In D56444#1351174 , @steveire wrote: > > > Yes - don't use RAV to traverse parents when AST-matching. > > > OK, this is certainly a much more invasiv

[PATCH] D55488: Add utility for dumping a label with child nodes

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 180935. steveire added a comment. Nits Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55488/new/ https://reviews.llvm.org/D55488 Files: include/clang/AST/TextNodeDumper.h lib/AST/ASTDumper.cpp test/AST/ast-dump-stmt.cp

[PATCH] D55492: Implement Attr dumping in terms of visitors

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 180943. steveire added a comment. Updates Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55492/new/ https://reviews.llvm.org/D55492 Files: include/clang/AST/AttrVisitor.h include/clang/AST/CMakeLists.txt include/clang/

[PATCH] D55492: Implement Attr dumping in terms of visitors

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: utils/TableGen/ClangAttrEmitter.cpp:3726 +functionContent = SS.str(); +if (SS.tell()) { + OS << " void Visit" << R.getName() << "Attr(const " << R.getName() aaron

[PATCH] D55491: Implement TemplateArgument dumping in terms of Visitor

2019-01-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 180947. steveire added a comment. Rebase Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55491/new/ https://reviews.llvm.org/D55491 Files: include/clang/AST/TemplateArgumentVisitor.h include/clang/AST/TextNodeDumper.h l

[PATCH] D55491: Implement TemplateArgument dumping in terms of Visitor

2019-01-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: lib/AST/ASTDumper.cpp:449-450 +void VisitPackTemplateArgument(const TemplateArgument &TA) { + for (TemplateArgument::pack_iterator I = TA.pack_begin(), +

[PATCH] D55492: Implement Attr dumping in terms of visitors

2019-01-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 181182. steveire marked an inline comment as done. steveire added a comment. Nits Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55492/new/ https://reviews.llvm.org/D55492 Files: include/clang/AST/AttrVisitor.h include/c

[PATCH] D55492: Implement Attr dumping in terms of visitors

2019-01-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/AST/ASTDumper.cpp:89 // Utilities -void dumpType(QualType T) { NodeDumper.dumpType(T); } void dumpTypeAsChild(QualType T); aaron.ballman wrote: > This seems unrelated to this patch (same below) ? These

[PATCH] D55492: Implement Attr dumping in terms of visitors

2019-01-10 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: lib/AST/TextNodeDumper.cpp:44-45 +void TextNodeDumper::Visit(const Attr *A) { + { +ColorScope Color(OS, ShowColors, AttrColor); aaron.ballman wrote: > Formatting is inco

[PATCH] D49100: Inline DeclarationNameInfo::getLocEnd into callers

2018-07-09 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: rsmith. Herald added a subscriber: cfe-commits. Note that CXXDependentScopeMemberExpr uses getEndLoc, not getLocEnd, unlike UnresolvedMemberExpr and UnresolvedLookupExpr (which are changed by this commit). Repository: rC Clang https:/

[PATCH] D72532: Make the ExprMutationAnalyzer explicit about how it traverses the AST

2020-05-21 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf85aedc167cd: Make the ExprMutationAnalyzer explicit about how it traverses the AST (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D72531: Set traversal explicitly where needed in tests

2020-05-21 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa30d411629d5: Set traversal explicitly where needed in tests (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72531/new/ https://re

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

2020-05-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 265626. steveire added a comment. Touch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72534/new/ https://reviews.llvm.org/D72534 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/ParentMapContext

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2020-05-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I like the approach of using clang-format to implement this. It's much faster than a `clang-tidy` approach. The broader C++ community has already chosen `East`/`West` and it has momentum. If you choose `Left`/`Right` now, you will get pressure to add `East`/`West` in

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2020-05-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D69764#2050538 , @MyDeveloperDay wrote: > In D69764#2050226 , @steveire wrote: > > > I like the approach of using clang-format to implement this. It's much > > faster than a `clang-tid

[PATCH] D73037: Add a way to set traversal mode in clang-query

2020-05-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 265826. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73037/new/ https://reviews.llvm.org/D73037 Files: clang-tools-extra/clang-query/Query.cpp clang-tools-extra/clang-que

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

2020-05-22 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 265827. steveire added a comment. Touch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72534/new/ https://reviews.llvm.org/D72534 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/ParentMapContext

[PATCH] D73037: Add a way to set traversal mode in clang-query

2020-05-25 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG10f0f98eac5b: Add a way to set traversal mode in clang-query (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73037/new/ https://re

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

2020-05-25 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 265946. steveire added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72534/new/ https://reviews.llvm.org/D72534 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/ParentMapContex

[PATCH] D80499: Remove obsolete ignore*() matcher uses

2020-05-25 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, arphaman, kbarton, nemanjai. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D80499 Files: clang-tools-extra/clang-tidy/abseil/Duration

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

2020-05-25 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd0da5d2bbe83: Change default traversal in AST Matchers to ignore invisible nodes (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. @MyDeveloperDay Thanks for the update. I pinged you on slack about this, but I guess you're not using it at the moment. I asked if you have a git branch somewhere with this change. Downloading patches from phab is such a pain I have no idea why we use it. If you can l

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. > if I put any declarations inside the preprocess clauses they actually don't > get converted. Sorry, I'm not certain what this means. Does it mean that if you have #if 0 Foo> P; #else Foo> P; #endif that neither of them get converted? Can you point me to

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/lib/Format/EastWestConstFixer.cpp:22 + +#define DEBUG_TYPE "using-declarations-sorter" + Should this be removed? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69764/new/ https://reviews.llvm.org/D69764

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D69764#2056104 , @rsmith wrote: > I'm uncomfortable about `clang-format` performing this transformation at all. > Generally, clang-format only makes changes that are guaranteed to preserve > the meaning of the source program,

[PATCH] D54408: [ASTMatchers] Add matchers available through casting to derived

2020-05-26 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. @aaron.ballman I think we agreed in Belfast in November (after the most recent comment) to get this in as it is and not be as draconian about `auto`. Is anything blocking this? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54408/new/

[PATCH] D80623: WIP: Add an API to simplify setting TraversalKind in clang-tidy matchers

2020-05-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: sammccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D80623 Files: clang/include/clang/ASTMatchers/ASTMatchFinder.h clang/lib/ASTMatchers/AST

[PATCH] D80606: [libTooling][NFC] Demo bug introduced in D72534.

2020-05-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. It might make sense for now (in order to unblock you) to make the `Transformer` library explicitly require the `AsIs` mode. I am not so familiar with the transformer library, but I think you can do that by adding `traverse(AsIs, ...)` in `Transformer::registerMatchers`

[PATCH] D80654: WIP: Make it possible to use the traverse() matcher in clang-query

2020-05-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: ymandel. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D80654 Files: clang/include/clang/ASTMatchers/ASTMatchersInternal.h clang/include/clang/AS

[PATCH] D80654: WIP: Make it possible to use the traverse() matcher in clang-query

2020-05-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. This is not ready for review, but is it a direction we want to go, given that we can already use set traversal in clang-query? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80654/new/ https://reviews.llvm.org/D80654

[PATCH] D80654: WIP: Make it possible to use the traverse() matcher in clang-query

2020-05-27 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:383 + static DynTypedMatcher + constructTraversalWrapper(const DynTypedMatcher &InnerMatcher, +ast_type_trait

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Here's some more failing testcases. class Aa; class A; struct timespec; // Crash // #define UL unsigned long // Transformed, but with error reported: bool foo(Aa const &); // Not transformed (uppercase) template bool bar(T const &); template

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: sammccall, aaron.ballman, gribozavr2, ymandel, klimek. Herald added a project: clang. Herald added a subscriber: cfe-commits. steveire updated this revision to Diff 267750. steveire added a comment. Update IgnoreUnlessSpelledInSource mode

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 267750. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80961/new/ https://reviews.llvm.org/D80961 Files: clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp clang-

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2068902 , @aaron.ballman wrote: > My experience with clang-tidy has been that template instantiations are a > double-edged sword. The instantiation is the only place at which you have > sufficient information to perfo

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2068865 , @ymandel wrote: > Thank you for bringing up this issue. I think it highlights an underlying > problem -- editing templates is quite difficult -- that neither setting will > address, as Dmitri expanded on abov

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2067638 , @gribozavr2 wrote: > If IgnoreUnlessSpelledInSource is indeed for novice users (and not to be > strictly interpreted as "it does what it says") we should think about whether > it more useful to ignore instant

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-04 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2073049 , @klimek wrote: > Without jumping into the discussion whether it should be the default, I think > we should be able to control template instantiation visitation separately > from other implicit nodes. Hmm, `

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-04 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2074915 , @steveire wrote: > Hmm, `IgnoreUnlessSpelledInSource` is designed and named to fill that role. In other words: to me this change is a bug fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D81336: [clang-tidy] simplify-bool-expr ignores template instantiations

2020-06-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. This isn't needed if https://reviews.llvm.org/D80961 is merged. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81336/new/ https://reviews.llvm.org/D81336 ___ cfe-commits mailin

[PATCH] D80961: Ignore template instantiations if not in AsIs mode

2020-06-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 269081. steveire added a comment. Herald added a subscriber: martong. Herald added a reviewer: shafik. Port unit tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80961/new/ https://reviews.llvm.org/D80961

[PATCH] D80961: Ignore template instantiations if not in AsIs mode

2020-06-07 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2074915 , @steveire wrote: > I don't think that's true. You have to change the matchers you've written > which deliberately match the instantiation, but you can also (optionally) > simplify the others to remove `unless

[PATCH] D80961: Ignore template instantiations if not in AsIs mode

2020-06-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2079419 , @aaron.ballman wrote: > In D80961#2079044 , @klimek wrote: > > > In D80961#2076242 , @aaron.ballman > > wrote: > > > > > In D8

[PATCH] D80961: Ignore template instantiations if not in AsIs mode

2020-06-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 270472. steveire edited the summary of this revision. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80961/new/ https://reviews.llvm.org/D80961 Files: clang-tools-extra/clang

[PATCH] D80961: Ignore template instantiations if not in AsIs mode

2020-06-12 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 270517. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80961/new/ https://reviews.llvm.org/D80961 Files: clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp clang-

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-06-13 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D69764#2063798 , @MyDeveloperDay wrote: > @steveire Thanks for the additional test cases, I'm reworking how I handle > the Macro case as I realized that I didn't actually even try to change the > case @rsmith came up with in

[PATCH] D80961: Ignore template instantiations if not in AsIs mode

2020-06-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2095254 , @klimek wrote: > 1. the scare quotes around "standing objections" reads like you're not > respecting the opinions of others here; Hmm, this wasn't intended. I sometimes quote things if they are a particular

[PATCH] D83076: Revert AST Matchers default to AsIs mode

2020-07-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: aaron.ballman, klimek. Herald added a project: clang. Herald added a subscriber: cfe-commits. steveire added a reviewer: sammccall. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D83076 Files: clang-tools-extra/clang-que

[PATCH] D83076: Revert AST Matchers default to AsIs mode

2020-07-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 275245. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83076/new/ https://reviews.llvm.org/D83076 Files: clang-tools-extra/clang-query/Query.cpp clang-tools-extra/clang-que

<    1   2   3   4   5   6   7   8   9   10   >