diff options
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/Basic/Attr.td | 50 | ||||
-rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 3 | ||||
-rw-r--r-- | clang/include/clang/Basic/TokenKinds.def | 3 | ||||
-rw-r--r-- | clang/include/clang/Parse/Parser.h | 1 |
4 files changed, 44 insertions, 13 deletions
diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td index f4370113fd0..72e0c69bf33 100644 --- a/clang/include/clang/Basic/Attr.td +++ b/clang/include/clang/Basic/Attr.td @@ -308,14 +308,6 @@ def Destructor : InheritableAttr { let Args = [IntArgument<"Priority">]; } -def DLLExport : InheritableAttr { - let Spellings = ["dllexport"]; -} - -def DLLImport : InheritableAttr { - let Spellings = ["dllimport"]; -} - def ExtVectorType : Attr { let Spellings = ["ext_vector_type"]; let Args = [ExprArgument<"NumElements">]; @@ -336,10 +328,6 @@ def Final : InheritableAttr { let SemaHandler = 0; } -def MsStruct : InheritableAttr { - let Spellings = ["__ms_struct__"]; -} - def Format : InheritableAttr { let Spellings = ["format"]; let Args = [StringArgument<"Type">, IntArgument<"FormatIdx">, @@ -816,3 +804,41 @@ def SharedLocksRequired : InheritableAttr { let LateParsed = 1; let TemplateDependent = 1; } + +// Microsoft-related attributes + +def MsStruct : InheritableAttr { + let Spellings = ["__ms_struct__"]; +} + +def DLLExport : InheritableAttr { + let Spellings = ["dllexport"]; +} + +def DLLImport : InheritableAttr { + let Spellings = ["dllimport"]; +} + +def Win64 : InheritableAttr { + let Spellings = ["__w64"]; +} + +def Ptr32 : InheritableAttr { + let Spellings = ["__ptr32"]; +} + +def Ptr64 : InheritableAttr { + let Spellings = ["__ptr64"]; +} + +def SingleInheritance : InheritableAttr { + let Spellings = ["__single_inheritance"]; +} + +def MultipleInheritance : InheritableAttr { + let Spellings = ["__multiple_inheritance"]; +} + +def VirtualInheritance : InheritableAttr { + let Spellings = ["__virtual_inheritance"]; +}
\ No newline at end of file diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index d2292af4684..fba50ece830 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -1630,7 +1630,8 @@ def warn_attribute_wrong_decl_type : Warning< "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">; def err_attribute_wrong_decl_type : Error< "%0 attribute only applies to %select{functions|unions|" "variables and functions|functions and methods|parameters|" diff --git a/clang/include/clang/Basic/TokenKinds.def b/clang/include/clang/Basic/TokenKinds.def index 9ea2c186939..7c800df7fbb 100644 --- a/clang/include/clang/Basic/TokenKinds.def +++ b/clang/include/clang/Basic/TokenKinds.def @@ -496,6 +496,9 @@ KEYWORD(__leave , KEYMS | KEYBORLAND) KEYWORD(__int64 , KEYMS) KEYWORD(__if_exists , KEYMS) KEYWORD(__if_not_exists , KEYMS) +KEYWORD(__single_inheritance , KEYMS) +KEYWORD(__multiple_inheritance , KEYMS) +KEYWORD(__virtual_inheritance , KEYMS) ALIAS("__int8" , char , KEYMS) ALIAS("__int16" , short , KEYMS) ALIAS("__int32" , int , KEYMS) diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index 814b45afc74..f3143766cb4 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -1859,6 +1859,7 @@ private: SourceLocation *endLoc = 0); void ParseMicrosoftDeclSpec(ParsedAttributes &attrs); void ParseMicrosoftTypeAttributes(ParsedAttributes &attrs); + void ParseMicrosoftInheritanceClassAttributes(ParsedAttributes &attrs); void ParseBorlandTypeAttributes(ParsedAttributes &attrs); void ParseOpenCLAttributes(ParsedAttributes &attrs); void ParseOpenCLQualifiers(DeclSpec &DS); |