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

Done -- ready for review again.

It turns out that for some of these (`typeid`, `sizeof`), the tests already 
passed even before I excluded them in `ResultObjectVisitor`. This is because 
`getReferencedDecls()` does actually collect declarations referenced in these 
unevaluated contexts (even though maybe it shouldn't). Nevertheless, I have 
decided to exclude these unevaluated contexts from `ResultObjectVisitor` 
because the transfer function will never visit them, so they don't need result 
objects to be propagated into them.

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, and hence 
we also need to propagate result objects for it (see also comments added to the 
code). Maybe there's a reason for this, or maybe it's something that should be 
fixed in the CFG, but for the time being, I've chosen to leave this as it is 
here.

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

Reply via email to