[PATCH] add __attribute__ no_uninitialized_checks. Map no_uninitialized_checks/no_thread_safety_analysis to LLVM function attributes.
Dmitri Gribenko
gribozavr at gmail.com
Mon Feb 11 05:07:21 PST 2013
================
Comment at: lib/Sema/SemaDeclAttr.cpp:655-656
@@ +654,4 @@
+ if (!isa<FunctionDecl>(D) && !isa<FunctionTemplateDecl>(D)) {
+ S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
+ << Attr.getName() << ExpectedFunctionOrMethod;
+ return;
----------------
Can we promote this to an error? There's no existing code that (mis)uses this attribute, so there should be no compatibility concerns.
Please also add tests for this warning or error, and for checkAttributeNumArgs() condition above.
http://llvm-reviews.chandlerc.com/D390
More information about the cfe-commits
mailing list