[cfe-dev] Read/Write Accesses of global variables in a Function body...

Peter clang_llvm_123-4 at yahoo.de
Mon Dec 19 14:02:40 PST 2011


>and see if you find any others?...but of course...I can subtract the list found by 'VisitBinaryOperator' from the
list found by 'VisitDeclRefExpr'... 

only left site -> 0
only right site -> 1
left and right site ->2

Thaaaaaaanks so much Eli!!!!!!!!!!!!!!




________________________________
 Von: Eli Friedman <eli.friedman at gmail.com>
An: Peter <clang_llvm_123-4 at yahoo.de> 
Cc: "cfe-dev at cs.uiuc.edu" <cfe-dev at cs.uiuc.edu> 
Gesendet: 22:34 Montag, 19.Dezember 2011
Betreff: Re: [cfe-dev] Read/Write Accesses of global variables in a Function body...
 
On Mon, Dec 19, 2011 at 1:30 PM, Peter <clang_llvm_123-4 at yahoo.de> wrote:
> Thanks Eli, you helped me a lot...!!!
>
> One last question, is there any way to find that a
> a DeclRefExpr only occurred on the left hand site?
>
> I can overwrite 'VisitBinaryOperator' to see if it occurred
> on the left hand site. But how do I know, that it doesn't occur
> on the right hand site?
>
> 'VisitDeclRefExpr' finds any occurrences...and it looks like 'DeclRefExpr'
> doesn't tell
> me on which site is...

How about you just record all the DeclRefExprs you see on the
left-hand side of an assignment, and see if you find any others?

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111219/153abf3a/attachment.html>


More information about the cfe-dev mailing list