[clang] [clang][dataflow] Don't propagate result objects inside `decltype`. (PR #90438)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 29 23:17:49 PDT 2024


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

> There are other instances in the language that are unevaluated including: `typeid`, `noexcept`, `sizeof`. Do you anticipate similar problems with those?

Excellent point, thanks. I'll expand this PR to more generally exclude all unevaluated contexts. Will ping this PR when I've changed this.

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


More information about the cfe-commits mailing list