[clang] [clang][dataflow] Don't propagate result objects in unevaluated contexts (PR #90438)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 30 08:26:09 PDT 2024


================
@@ -350,6 +350,13 @@ class ResultObjectVisitor : public RecursiveASTVisitor<ResultObjectVisitor> {
     return RecursiveASTVisitor<ResultObjectVisitor>::TraverseDecl(D);
   }
 
+  bool TraverseDecltypeTypeLoc(DecltypeTypeLoc Node) {
----------------
Xazax-hun wrote:

> It also turns out that, even though the operand of the noexcept operator in an unevaluated operand, it still shows up in the CFG for some reason

This surprises me, I can't think of a reason why we would want to have it in the CFG. This keyword appeards a lot in generic code, so maybe excluding it from the CFG might have measurable perf/memory benefits. I'd think it might be worth to give this a try and see if something breaks (in a separate PR). 

https://github.com/llvm/llvm-project/pull/90438


More information about the cfe-commits mailing list