ymandel added a comment.

In D139544#3984532 <https://reviews.llvm.org/D139544#3984532>, @isuckatcs wrote:

>> Sorry, I should fix my response above: I *never* see the BindingDecls in the 
>> CFG, whether or not they are used.
>
> It was my fault, I was wrong with the wording. I meant the `DeclRefExpr`s 
> that refer to the `BindingDecl`s. You can 
> access the `BindingDecl`s through the `DeclRefExpr`s, they are not present in 
> the CFG directly.
>
> That's also how the static analyzer handles the `BindingDecl`s in 
> `ExprEngine::VisitCommonDeclRefExpr()`.

Got it, thanks!

So, I think everything is resolved now, you've been incredibly helpful. Based 
on my now understanding the CFG representation of DecompositionDecls a lot 
better, I found a simpler solution that doesn't even need to involve our 
handling of `DeclRefExpr`s and is therefore consistent with how we already 
handle the struct references.

I think there's a separate discussion we might want to have about whether it 
would be valuable (to the static analyzer and the dataflow framework, among 
others) to update CFG to explicitly represent BindingDecls and the AST nodes in 
their bindings. But, that seems better for a discourse thread. :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139544/new/

https://reviews.llvm.org/D139544

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to