[cfe-commits] r157288 - in /cfe/trunk: include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/TokenKinds.def include/clang/Parse/Parser.h lib/Parse/ParseDecl.cpp lib/Parse/ParseDeclCXX.cpp lib/Sema/SemaDeclAttr

John McCall rjmccall at apple.com
Wed Jun 6 18:29:13 PDT 2012


On Jun 6, 2012, at 5:55 AM, Hans Wennborg wrote:
> On Tue, May 22, 2012 at 10:28 PM, John McCall <rjmccall at apple.com> wrote:
>> Author: rjmccall
>> Date: Tue May 22 16:28:12 2012
>> New Revision: 157288
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=157288&view=rev
>> Log:
>> Recognize the MS inheritance attributes and turn them into attributes
>> on the RecordDecl.  Persist the MS portability type attributes and
>> ignore them in Sema rather than the parser.
>> 
>> Patch by João Matos!
>> 
>> Modified:
>>    cfe/trunk/include/clang/Basic/Attr.td
>>    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
>>    cfe/trunk/include/clang/Basic/TokenKinds.def
>>    cfe/trunk/include/clang/Parse/Parser.h
>>    cfe/trunk/lib/Parse/ParseDecl.cpp
>>    cfe/trunk/lib/Parse/ParseDeclCXX.cpp
>>    cfe/trunk/lib/Sema/SemaDeclAttr.cpp
>>    cfe/trunk/lib/Sema/SemaType.cpp
>>    cfe/trunk/test/Parser/MicrosoftExtensions.c
>>    cfe/trunk/test/Parser/MicrosoftExtensions.cpp
> 
> [snip]
> 
>> Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=157288&r1=157287&r2=157288&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
>> +++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue May 22 16:28:12 2012
>> @@ -1630,7 +1630,8 @@
>>   "variables and functions|functions and methods|parameters|"
>>   "functions, methods and blocks|functions, methods, and parameters|"
>>   "classes|variables|methods|variables, functions and labels|"
>> -  "fields and global variables|structs}1">;
>> +  "fields and global variables|structs|"
>> +  "variables, functions and tag types}1">;
> 
> I tried to find where this new "variables, functions and tag types"
> variant is used, but couldn't find it.

Hmm, yes, I missed this.  João, it doesn't look like you're actually doing
validation for the kind of decl these attributes can appear on;  would you
mind writing up a patch for that?

Also, is it really "variables, functions, and tag types"?  The MSVC docs
suggest that the inheritance attributes are only legal on struct or class
declarations.

John.



More information about the cfe-commits mailing list