The prefix 'Ms-' should be 'MS-'
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 2 Feb 2015 19:30:52 +0000 (19:30 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 2 Feb 2015 19:30:52 +0000 (19:30 +0000)
Clang is otherwise consistent that Microsoft be abbreviated as MS, not
Ms.

llvm-svn: 227842

clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/DiagnosticOptions.h
clang/lib/AST/Decl.cpp
clang/lib/CodeGen/CGClass.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/TextDiagnostic.cpp
clang/lib/Sema/SemaAttr.cpp
clang/lib/Sema/SemaDeclAttr.cpp

index 7245e49..5171b0c 100644 (file)
@@ -1761,17 +1761,17 @@ def TypeTagForDatatype : InheritableAttr {
 
 // Microsoft-related attributes
 
-def MsNoVTable : InheritableAttr {
+def MSNoVTable : InheritableAttr {
   let Spellings = [Declspec<"novtable">];
   let Subjects = SubjectList<[CXXRecord]>;
-  let Documentation = [MsNoVTableDocs];
+  let Documentation = [MSNoVTableDocs];
 }
 
-def MsProperty : IgnoredAttr {
+def : IgnoredAttr {
   let Spellings = [Declspec<"property">];
 }
 
-def MsStruct : InheritableAttr {
+def MSStruct : InheritableAttr {
   let Spellings = [GCC<"ms_struct">];
   let Subjects = SubjectList<[Record]>;
   let Documentation = [Undocumented];
index 933bc36..64e4cea 100644 (file)
@@ -1253,7 +1253,7 @@ an error:
 }];
 }
 
-def MsNoVTableDocs : Documentation {
+def MSNoVTableDocs : Documentation {
   let Category = DocCatType;
   let Content = [{
 This attribute can be added to a class declaration or definition to signal to
index 058e00f..a16c774 100644 (file)
@@ -27,7 +27,7 @@ enum OverloadsShown : unsigned {
 /// \brief Options for controlling the compiler diagnostics engine.
 class DiagnosticOptions : public RefCountedBase<DiagnosticOptions>{
 public:
-  enum TextDiagnosticFormat { Clang, Msvc, Vi };
+  enum TextDiagnosticFormat { Clang, MSVC, Vi };
 
   // Default values.
   enum { DefaultTabStop = 8, MaxTabStop = 100,
index e43c28a..9988c71 100644 (file)
@@ -3589,7 +3589,7 @@ void RecordDecl::completeDefinition() {
 /// This which can be turned on with an attribute, pragma, or the
 /// -mms-bitfields command-line option.
 bool RecordDecl::isMsStruct(const ASTContext &C) const {
-  return hasAttr<MsStructAttr>() || C.getLangOpts().MSBitfields == 1;
+  return hasAttr<MSStructAttr>() || C.getLangOpts().MSBitfields == 1;
 }
 
 static bool isFieldOrIndirectField(Decl::Kind K) {
index 459b774..2e2b420 100644 (file)
@@ -1954,7 +1954,7 @@ CodeGenFunction::InitializeVTablePointer(BaseSubobject Base,
   // Don't initialize the vtable pointer if the class is marked with the
   // 'novtable' attribute.
   if ((RD == VTableClass || RD == NearestVBase) &&
-      VTableClass->hasAttr<MsNoVTableAttr>())
+      VTableClass->hasAttr<MSNoVTableAttr>())
     return;
 
   // Compute the address point.
index ab5c8f8..b5685d8 100644 (file)
@@ -709,9 +709,9 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
   if (Format == "clang")
     Opts.setFormat(DiagnosticOptions::Clang);
   else if (Format == "msvc")
-    Opts.setFormat(DiagnosticOptions::Msvc);
+    Opts.setFormat(DiagnosticOptions::MSVC);
   else if (Format == "msvc-fallback") {
-    Opts.setFormat(DiagnosticOptions::Msvc);
+    Opts.setFormat(DiagnosticOptions::MSVC);
     Opts.CLFallbackMode = true;
   } else if (Format == "vi")
     Opts.setFormat(DiagnosticOptions::Vi);
index bbc9914..17e41f6 100644 (file)
@@ -799,14 +799,14 @@ void TextDiagnostic::emitDiagnosticLoc(SourceLocation Loc, PresumedLoc PLoc,
   OS << PLoc.getFilename();
   switch (DiagOpts->getFormat()) {
   case DiagnosticOptions::Clang: OS << ':'  << LineNo; break;
-  case DiagnosticOptions::Msvc:  OS << '('  << LineNo; break;
+  case DiagnosticOptions::MSVC:  OS << '('  << LineNo; break;
   case DiagnosticOptions::Vi:    OS << " +" << LineNo; break;
   }
 
   if (DiagOpts->ShowColumn)
     // Compute the column number.
     if (unsigned ColNo = PLoc.getColumn()) {
-      if (DiagOpts->getFormat() == DiagnosticOptions::Msvc) {
+      if (DiagOpts->getFormat() == DiagnosticOptions::MSVC) {
         OS << ',';
         // Visual Studio 2010 or earlier expects column number to be off by one
         if (LangOpts.MSCompatibilityVersion &&
@@ -819,7 +819,7 @@ void TextDiagnostic::emitDiagnosticLoc(SourceLocation Loc, PresumedLoc PLoc,
   switch (DiagOpts->getFormat()) {
   case DiagnosticOptions::Clang:
   case DiagnosticOptions::Vi:    OS << ':';    break;
-  case DiagnosticOptions::Msvc:  OS << ") : "; break;
+  case DiagnosticOptions::MSVC:  OS << ") : "; break;
   }
 
   if (DiagOpts->ShowSourceRanges && !Ranges.empty()) {
index 7629797..e3b66bf 100644 (file)
@@ -131,7 +131,7 @@ void Sema::AddAlignmentAttributesForRecord(RecordDecl *RD) {
 
 void Sema::AddMsStructLayoutForRecord(RecordDecl *RD) {
   if (MSStructPragmaOn)
-    RD->addAttr(MsStructAttr::CreateImplicit(Context));
+    RD->addAttr(MSStructAttr::CreateImplicit(Context));
 
   // FIXME: We should merge AddAlignmentAttributesForRecord with
   // AddMsStructLayoutForRecord into AddPragmaAttributesForRecord, which takes
index 63695e8..a05856e 100644 (file)
@@ -4689,11 +4689,11 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
     break;
 
   // Microsoft attributes:
-  case AttributeList::AT_MsNoVTable:
-    handleSimpleAttribute<MsNoVTableAttr>(S, D, Attr);
+  case AttributeList::AT_MSNoVTable:
+    handleSimpleAttribute<MSNoVTableAttr>(S, D, Attr);
     break;
-  case AttributeList::AT_MsStruct:
-    handleSimpleAttribute<MsStructAttr>(S, D, Attr);
+  case AttributeList::AT_MSStruct:
+    handleSimpleAttribute<MSStructAttr>(S, D, Attr);
     break;
   case AttributeList::AT_Uuid:
     handleUuidAttr(S, D, Attr);