r213193 - Specifying the diagnostic argument through the attribute table generator instead of having to enter it manually as part of the attribute subject list. This only affects attributes appertaining to ObjC interfaces and protocols.

Aaron Ballman aaron at aaronballman.com
Wed Jul 16 13:45:34 PDT 2014


On Wed, Jul 16, 2014 at 4:43 PM, jahanian <fjahanian at apple.com> wrote:
> Thanks. I don’t know all the parts of the attribute processing.

Not a problem! It's all pretty fresh in my head still, and since that
combination seems like a reasonable one (heck, we already had the
flags for each part), this just saves someone else the extra typing
later.

~Aaron

> - Fariborz
>
> On Jul 16, 2014, at 1:28 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
>
>> Author: aaronballman
>> Date: Wed Jul 16 15:28:10 2014
>> New Revision: 213193
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=213193&view=rev
>> Log:
>> Specifying the diagnostic argument through the attribute table generator instead of having to enter it manually as part of the attribute subject list. This only affects attributes appertaining to ObjC interfaces and protocols.
>>
>> No new tests required as this is covered by existing tests.
>>
>> Modified:
>>    cfe/trunk/include/clang/Basic/Attr.td
>>    cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
>>
>> Modified: cfe/trunk/include/clang/Basic/Attr.td
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=213193&r1=213192&r2=213193&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Basic/Attr.td (original)
>> +++ cfe/trunk/include/clang/Basic/Attr.td Wed Jul 16 15:28:10 2014
>> @@ -990,11 +990,10 @@ def ObjCDesignatedInitializer : Attr {
>> }
>>
>> def ObjCRuntimeName : Attr {
>> -    let Spellings = [GNU<"objc_runtime_name">];
>> -    let Subjects = SubjectList<[ObjCInterface, ObjCProtocol], ErrorDiag,
>> -    "ExpectedObjectiveCInterfaceOrProtocol">;
>> -    let Args = [StringArgument<"MetadataName">];
>> -    let Documentation = [ObjCRuntimeNameDocs];
>> +  let Spellings = [GNU<"objc_runtime_name">];
>> +  let Subjects = SubjectList<[ObjCInterface, ObjCProtocol], ErrorDiag>;
>> +  let Args = [StringArgument<"MetadataName">];
>> +  let Documentation = [ObjCRuntimeNameDocs];
>> }
>>
>> def OptimizeNone : InheritableAttr {
>>
>> Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=213193&r1=213192&r2=213193&view=diff
>> ==============================================================================
>> --- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
>> +++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Wed Jul 16 15:28:10 2014
>> @@ -2154,6 +2154,8 @@ static std::string CalculateDiagnostic(c
>>                                            "ExpectedVariableOrFunction)";
>>
>>     case ObjCMethod | ObjCProp: return "ExpectedMethodOrProperty";
>> +    case ObjCProtocol | ObjCInterface:
>> +      return "ExpectedObjectiveCInterfaceOrProtocol";
>>     case Field | Var: return "ExpectedFieldOrGlobalVar";
>>   }
>>
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list