Skip over elidable nodes, and ensure that intermediate
CXXFunctionalCastExpr nodes are also skipped if they are semantic.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp | ||
---|---|---|
80 | While I believe the change is necessary here, it's not obvious to me what "hints" tell me this behavior is correct for the given matchers. None of the matchers look like they're going to care about implicit nodes, so how am I to know that AsIs is correct or not as a reviewer? As it stands, I sort of feel like I have to take it on faith that this change is correct and it looks a little suspicious because the code using the matcher is creating a fix-it at what now may be the location of an implicit node. | |
clang/lib/AST/Expr.cpp | ||
3001 | Looks like the change introduced new curly braces for a single-line if. | |
clang/lib/AST/ParentMapContext.cpp | ||
157 | const auto * |
clang-tools-extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp | ||
---|---|---|
80 | I don't know if I was wrong about it being required before, or if it was required before, but the change to this file is not required now. | |
clang/lib/AST/Expr.cpp | ||
3001 | The ignoringElidableConstructorCall does it this way. I'm afraid I don't know more than that. |
While I believe the change is necessary here, it's not obvious to me what "hints" tell me this behavior is correct for the given matchers. None of the matchers look like they're going to care about implicit nodes, so how am I to know that AsIs is correct or not as a reviewer? As it stands, I sort of feel like I have to take it on faith that this change is correct and it looks a little suspicious because the code using the matcher is creating a fix-it at what now may be the location of an implicit node.