[PATCH] D19689: Add Subjects to NoDebugAttr [NFC]

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 29 09:25:57 PDT 2016


On Fri, Apr 29, 2016 at 12:24 PM, Paul Robinson <paul.robinson at sony.com> wrote:
> probinson added a comment.
>
> I'll proceed from here without doing anything about the inconsistencies, because this particular one should go away and you're already doing something about the rest of it.

I think that's a good idea. :-)

~Aaron

>
>
> ================
> Comment at: include/clang/Basic/Attr.td:977
> @@ -976,1 +976,3 @@
> +  let Subjects = SubjectList<[FunctionLike, ObjCMethod, GlobalVar], WarnDiag,
> +                              "ExpectedFunctionGlobalVarMethodOrProperty">;
>    let Documentation = [NoDebugDocs];
> ----------------
> aaron.ballman wrote:
>> It's really strange that the diagnostic kind is `ExpectedFunctionGlobalVarMethodOrProperty` but the subject list does not have objective-c properties. It's even more strange that this diagnostic kind corresponds to the diagnostic text "functions and global variables" without mention of objective-c methods or properties. I see that the Alias attribute suffers from this same discombobulation.
> I agree, but I didn't want to do anything about it because my next step is to replace GlobalVar with Var in the SubjectList, and therefore change the diagnostic enum to something else, making the inconsistency moot (at least for this attribute).
>
>
>
> http://reviews.llvm.org/D19689
>
>
>


More information about the cfe-commits mailing list