[PATCH] D45416: [analyzer] ExprEngine: model GCC inline asm rvalue cast outputs

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 10 11:12:17 PDT 2018


NoQ added a comment.

In https://reviews.llvm.org/D45416#1062901, @a.sidorin wrote:

> > The ultimate solution would probably be to add a fake cloned asm statement to the CFG (instead of the real asm statement) that would point to the correct output child-expression(s) that are untouched themselves but simply have their noop casts removed.
>
> I have some concerns about this solution. It will result in difference between AST nodes and nodes that user will receive during analysis and I'm not sure that it is good. What is even worse here is that a lot of AST stuff won't work properly - ParentMap, for example.


Yep. But i'd rather avoid using the `ParentMap`. Also we already do this for `DeclStmt`s that declare more than one `VarDecl` (split them up into single-decl statements), and the practical effect of such simplification is barely noticeable even though `DeclStmt`s are so much more common.

>> Or we could try
> 
> Looks like something is missed here :)

Whoops sry nvm. And and and mmm you didn't include the diff context :p

In https://reviews.llvm.org/D45416#1063366, @a.sidorin wrote:

> Maybe we should just remove the condition and leave a FIXME?


The fix is already there and it's valid and it makes things better overall, why not keep it around. We still need a FIXME though.


Repository:
  rC Clang

https://reviews.llvm.org/D45416





More information about the cfe-commits mailing list