Thanks, this solved my problem!
On Sun, Aug 4, 2019 at 11:07 PM Richard Smith wrote:
> On Fri, 2 Aug 2019 at 15:05, Romulo via cfe-users <
> cfe-users@lists.llvm.org> wrote:
>
>> Hello there, thanks for your time reading this :)
>>
>> I am trying to extract the code for a specialized template fu
Sure, Not a problem.
What's the way to get the declarations such as *ptr and &bar as it is
inside the *DeclRefExpr *block*. *
*Example: *
void foo(){
int bar=1;
int **ptr;
**ptr = &bar;* // this line
}
*If I query like this way:*
if (const ValueDecl *VD = dyn_cast(DRE->getDecl())){
O
The declarations are "ptr" and "bar". "*ptr" and "&bar" are expressions
since * and & are C++ operators. If you want the type of "*ptr" or "&bar",
then you need to get the associated UnaryOperator (a sub-class of Expr) and
call getType() on it.
On Wed, Aug 7, 2019 at 2:28 PM Ayush Mittal
wrote: