If i defined a variable with register
qualifier:
register int a = 0
and variable a
does not get a qualifier, how to tell if a
has register
qualifier ?
VarDecl *var = cast(decl);
QualType t = var->getType();
t.hasQualifiers(); // false
If i defined a variable with register
qualifier:
register int a = 0
and variable a
does not get a qualifier, how to tell if a
has register
qualifier ?
VarDecl *var = cast(decl);
QualType t = var->getType();
t.hasQualifiers(); // false
This is not a qualifier, it's a storage class specifier.
-Krzysztof
I don't think that "qualifier" is not the right terminology for
`register` in this situation. VarDecl::getStorageClass() [1] seems to
be what you are looking for.
[1] <http://clang.llvm.org/doxygen/classclang_1_1VarDecl.html#aabdb595f049bd0ce4703ca3a97dd2445>