[cfe-dev] Attributes on function calls
Riyaz Puthiyapurayil via cfe-dev
cfe-dev at lists.llvm.org
Tue Sep 20 18:21:30 PDT 2016
For a custom clang-tidy check, I need to be able to add an attribute to a function call (not function declaration). I have never added an attribute before. Does clang support attributes on function calls? I see that CallExpr derives from DStmt<Expr> in StmtNodes.td and the documentation on adding attributes states that SubjectList of an attribute can be a statement node. Before I attempt this, can anyone tell me if this is even going to work? Will this involve making changes in parser (which I would really like to avoid)? Ideally, I want to be able to add the attribute in Attr.td and then be able to query it in the check. Is there an existing attribute that I can model this after?
More information about the cfe-dev