NoQ added a comment.

Hmm, the original code seems quite quick-and-dirty. It, indeed, tries to 
blindly dereference something that's accidentally "some pointer".

Could you change the type check to consider AST types instead, i.e. check that 
`(*I)->getType()` is a double-pointer type? And then pass its single-pointee 
type into `getSVal` as the second optional argument, so that it knew what to 
expect. This would be the correct way to express what the author was trying to 
say.

Because your code ignores possible layers of sub-regions contained within 
`Reg`, and i'm afraid we may loose notes because of that.

(in any case there are many more ways in which a pointer can be passed into a 
function that this visitor doesn't pattern-match, but that's not super 
problematic)


Repository:
  rL LLVM

https://reviews.llvm.org/D42396



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

Reply via email to