r195841 - Laying the basic groundwork for table generating the diagnostics for attribute subjects. This makes some modifications to the way subjects are listed in Attr.td, and updates the attr emitter to handle the new constructs.

Alexander Kornienko alexfh at google.com
Wed Nov 27 07:05:26 PST 2013


On Wed, Nov 27, 2013 at 2:27 PM, Aaron Ballman <aaron at aaronballman.com>wrote:

> Author: aaronballman
> Date: Wed Nov 27 07:27:02 2013
> New Revision: 195841
>
> URL: http://llvm.org/viewvc/llvm-project?rev=195841&view=rev
> Log:
> Laying the basic groundwork for table generating the diagnostics for
> attribute subjects. This makes some modifications to the way subjects are
> listed in Attr.td, and updates the attr emitter to handle the new
> constructs.
>
> I have disabled some attribute subject lines on purpose in Attr.td;
> this part is a WIP with the goal being to restore those subjects
> incrementally. By commenting them out, it leaves the original behavior
> the same as before for those attributes and so those are not
> functionality changes.
>
...

> @@ -4286,13 +3956,8 @@ static void handleObjCReturnsInnerPointe
>  static void handleObjCRequiresSuperAttr(Sema &S, Decl *D,
>                                          const AttributeList &attr) {
>    SourceLocation loc = attr.getLoc();
>

This variable is unused. I'm going to remove it to fix the build, if you
don't mind.


> -  ObjCMethodDecl *method = dyn_cast<ObjCMethodDecl>(D);
> +  ObjCMethodDecl *method = cast<ObjCMethodDecl>(D);
>
> -  if (!method) {
> -   S.Diag(D->getLocStart(), diag::err_attribute_wrong_decl_type)
> -   << SourceRange(loc, loc) << attr.getName() << ExpectedMethod;
> -    return;
> -  }
>    DeclContext *DC = method->getDeclContext();
>    if (const ObjCProtocolDecl *PDecl =
> dyn_cast_or_null<ObjCProtocolDecl>(DC)) {
>      S.Diag(D->getLocStart(), diag::warn_objc_requires_super_protocol)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131127/252228ac/attachment.html>


More information about the cfe-commits mailing list