[PATCH] Implement no_sanitize attribute.
Peter Collingbourne
peter at pcc.me.uk
Thu May 14 15:34:55 PDT 2015
On Thu, May 14, 2015 at 04:44:45PM -0400, Aaron Ballman wrote:
> I was unclear, I apologize. I was thinking along the lines of:
>
>
> def NoSanitizeAttrs : InheritableAttr {
> let Spellings = [GNU<"no_sanitize_thread">, GNU<"no_sanitize_memory">, etc];
> let ASTNode = 0; // No AST representations; creates a NoSanitizeAttr
> object instead
> let Subjects = SubjectList<[Function], ErrorDiag>;
> let Documentation = [Undocumented];
> }
>
> Then in SemaDeclAttr.cpp, the handler for all these attributes can be
> implemented as instead attaching a no_sanitize attribute with the
> proper mask. The downside to this is that it could lose source
> fidelity when pretty printing (it would be equivalent, but not
> identical attributes in that case). The upside is that we're not
> carrying around AST nodes for these things, and we can remove some of
> the clutter in Attr.td.
But we can't document the attributes properly that way, right? We probably want
to keep the attribute documentation as these attributes are GCC-compatible.
Thanks,
--
Peter
More information about the cfe-commits
mailing list