gribozavr accepted this revision. gribozavr added inline comments. This revision is now accepted and ready to land.
================ Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6538 /// -/// In C++17 copy elidable constructors are no longer being -/// generated in the AST as it is not permitted by the standard. They are -/// however part of the AST in C++14 and earlier. Therefore, to write a matcher -/// that works in all language modes, the matcher has to skip elidable -/// constructor AST nodes if they appear in the AST. This matcher can be used to -/// skip those elidable constructors. +/// In C++17 copy elidable constructors are no longer being generated in the AST +/// as it is not permitted by the standard. They are, however, part of the AST ---------------- while you're editing it: "elidable copy constructors" ================ Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6540 +/// as it is not permitted by the standard. They are, however, part of the AST +/// in C++14 and earlier. So, a matcher must elide these differences to work in +/// all language modes. This matcher supports such elision by skipping elidable ---------------- "elide these differences" => "abstract over these differences"? ================ Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6541 +/// in C++14 and earlier. So, a matcher must elide these differences to work in +/// all language modes. This matcher supports such elision by skipping elidable +/// constructor-call AST nodes, `ExprWithCleanups` nodes wrapping elidable ---------------- "This matcher skips elidable constructor call AST nodes, ... "? ================ Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:6556 /// -/// ``varDecl(hasInitializer(any( -/// ignoringElidableConstructorCall(callExpr()), -/// exprWithCleanups(ignoringElidableConstructorCall(callExpr()))))`` -/// matches ``H D = G()`` +/// ``varDecl(hasInitializer(ignoringElidableConstructorCall(callExpr())))`` +/// matches ``H D = G()`` in C++11 through C++17 (and beyond). ---------------- Could you add this matcher as a test? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65944/new/ https://reviews.llvm.org/D65944 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits