poelmanc added a comment.

In D69238#1739429 <https://reviews.llvm.org/D69238#1739429>, @gribozavr2 wrote:

> If it is indeed the extra AST node for the elidable constructor, see if you 
> can use the `ignoringElidableConstructorCall` AST matcher to ignore it, 
> therefore smoothing over AST differences between language modes.


Thanks for the tip. Adding `ignoringElidableConstructorCall` in front of 
`cxxConstructExpr` for the `EmptyStringCtorExpr` and 
`EmptyStringCtorExprWithTemporaries` in RedundantStringInitCheck.cpp resulted 
in the checker no longer matching any of `std::string a = ""` lines, i.e. 
basically disabling the check for those types of lines.

Is there a tool to print the AST? That would show whether the AST already has 
some expression with the right SourceRange.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69238/new/

https://reviews.llvm.org/D69238



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to