[cfe-dev] Mode attribute not in clang AST.

Enea Zaffanella zaffanella at cs.unipr.it
Tue Jun 4 03:15:53 PDT 2013


I was wondering why the gnu "mode" attribute, even though being parsed 
by clang and affecting the AST construction, is not otherwise recorded 
in its own AST node:

def Mode : Attr {
   let Spellings = [GNU<"mode">, CXX11<"gnu", "mode">];
   let Args = [IdentifierArgument<"Mode">];
   let ASTNode = 0;
}

Other attributes having ASTNode = 0 are typically those corresponding to 
AttributedType nodes, but "mode" is not modeled as an AttributedType.

Would it be OK to remove the line "let ASTNode = 0" above and modify 
Sema::handleModeAttr to actually build the node?

Enea.



More information about the cfe-dev mailing list