================
@@ -508,6 +508,11 @@ class ResultObjectVisitor : public 
RecursiveASTVisitor<ResultObjectVisitor> {
         isa<CXXStdInitializerListExpr>(E)) {
       return;
     }
+    if (auto *Op = dyn_cast<BinaryOperator>(E);
----------------
ymand wrote:

I guess the `isa` calls were what we really jumped out since they amount to N 
calls and tests on `getStmtClass` rather than one and a jump. But, readability 
wins over performance here.

But, I do wonder about readability win from converting to a switch because it 
will directly express which cases are covered in this function, rather than 
leaving it implicit in a series of `if`s. FWIW.

https://github.com/llvm/llvm-project/pull/88726
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to