The prefix 'Ms-' should be 'MS-'

Clang is otherwise consistent that Microsoft be abbreviated as MS, not
Ms.

llvm-svn: 227842
This commit is contained in:
David Majnemer 2015-02-02 19:30:52 +00:00
parent 6ffb1d7e3c
commit 8ab003a0db
9 changed files with 18 additions and 18 deletions

View 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];

View 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

View 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,

View 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) {

View 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.

View 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);

View 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()) {

View 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

View 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);