[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363262: Added AST matcher for ignoring elidable constructors (authored by gribozavr, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTest.h:153 + case LanguageMode::Cxx2aOrLater: +LangModes = {LanguageMode::Cxx2a}; + } hokein wrote: > nit: add a

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks, looks good to me. I'll commit for you. @gribozavr do you want to take another look on the patch? Comment at: clang/unittests/ASTMatchers/ASTMatchersTest.h:153 +

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204447. jvikstrom marked 3 inline comments as done. jvikstrom added a comment. - Removed unnecessary return Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149 Files:

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. looks most good to me, a few nits. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6488 + } + return InnerMatcher.matches(*CtorExpr, Finder, Builder); +} This `return` statement is not needed.

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204443. jvikstrom marked an inline comment as done. jvikstrom added a comment. - Removed dependency on unordered map Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204442. jvikstrom added a comment. - Updated outdated docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-13 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204437. jvikstrom marked an inline comment as done. jvikstrom added a comment. - Added default to switch for language modes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTest.h:69 + CXX17OrLater, + CXX2AOrLater +}; Cxx2aOrLater? (no need to uppercase things) Comment at: clang/unittests/ASTMatchers/ASTMatchersTest.h:159 +

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204282. jvikstrom marked 7 inline comments as done. jvikstrom added a comment. - Using switch for choosing language standard Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:600 + EXPECT_TRUE(matches(code2, matcher2, LanguageMode::CXX11OrLater)); + EXPECT_TRUE(matches(code3, matcher3, LanguageMode::CXX11OrLater)); +} Please inline

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204277. jvikstrom marked 10 inline comments as done. jvikstrom added a comment. - Fixed wrong formatting in test code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204269. jvikstrom marked 3 inline comments as done. jvikstrom added a comment. - Added match conditionally overload to control in what language standard a match should run in Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204245. jvikstrom added a comment. - Using CamelCase and also renamed ignoringElidableMoveConstructorCall to ignoringElidableConstructorCall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204244. jvikstrom marked an inline comment as done. jvikstrom added a comment. - Updated example and fixed edge case in ignoringElidableConstructorCall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6477 +/// matches ``D1 = B(B(1))`` +AST_MATCHER_P(Expr, ignoringElidableMoveConstructorCall, + ast_matchers::internal::Matcher, InnerMatcher) { Is the matcher

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6455 +/// Matches expressions that match InnerMatcher after any elidable constructor +/// are stripped off. In C++17 copy elidable constructors are no longer being

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-12 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 204229. jvikstrom added a comment. - Made ignoreElidable also ignore materializeTemporaryExpr and reformatted code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63149/new/ https://reviews.llvm.org/D63149

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-11 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6455 +/// Matches expressions that match InnerMatcher after any elidable constructor are stripped off. +/// 80 columns Comment at:

[PATCH] D63149: Added AST matcher for ignoring elidable constructors

2019-06-11 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, gribozavr. Herald added a project: clang. Herald added a subscriber: cfe-commits. Added AST matcher for ignoring elidable move constructors Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63149 Files: