================
@@ -508,6 +508,11 @@ class ResultObjectVisitor : public
RecursiveASTVisitor<ResultObjectVisitor> {
isa<CXXStdInitializerListExpr>(E)) {
return;
}
+ if (auto *Op = dyn_cast<BinaryOperator>(E);
----------------
martinboehme wrote:
I'm not sure.
* The cases involving a `dyn_cast` need a cast anyway, as they access
properties of the cast class. So if we introduced a switch, we would need a
`case` _and_ a cast.
* This leaves the `isa<>` cases above. IIUC, `isa<>` essentially compiles down
to a test on `E->getStmtClass()`. So in terms of performance, replacing the
`isa<>` calls above with a switch statement shouldn't make much of a
difference. I think the `isa<>` version is more readable though.
So in all, I don't see a clear advantage, and I would prefer to keep this as-is.
https://github.com/llvm/llvm-project/pull/88726
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits