Hi All ,
We added the below code to differentiate Local and Global Variable in
the "NamedDecl *Sema::HandleDeclarator" function.
if(S->getFlags() == Scope::DeclScope)
Where S is a pointer parameter to the HandleDeclarator of type Scope.
At first place ,we decided to use
"D.getDeclSpec().getStorageClassSpec()" ,but has no luck ,since its
always "SCS_unspecified " .
Question is that , do using the "Scope::DeclScope" to differentiate
the variable scope is the right approach, if so
we have a problem for some instance like a nested local declaration,
we are not able to differentiate.
if the "Scope::DeclScope" is not the right approach, then please
anybody here , help us with the right approach and would like to
inform you all that, we need this info before any Act call like