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.
jahanian
fjahanian at apple.com
Wed Jul 16 13:43:18 PDT 2014
Thanks. I don’t know all the parts of the attribute processing.
- 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