From: Aaron Ballman Date: Wed, 27 Nov 2013 20:14:30 +0000 (+0000) Subject: Renaming Struct to GenericRecord for clarity; could not use Record as the enumerant... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ecc018d2f097b25f984b029c998acd5226ff82b5;p=clang Renaming Struct to GenericRecord for clarity; could not use Record as the enumerant because that's already taken by the Record class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195875 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index 1a7d566ad0..abdb98d8f2 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -1713,7 +1713,7 @@ static std::string CalculateDiagnostic(const Record &S) { ObjCMethod = 1U << 2, Param = 1U << 3, Class = 1U << 4, - Struct = 1U << 5, + GenericRecord = 1U << 5, Type = 1U << 6, ObjCIVar = 1U << 7, ObjCProp = 1U << 8, @@ -1737,7 +1737,7 @@ static std::string CalculateDiagnostic(const Record &S) { .Case("TypedefName", Type) .Case("ObjCIvar", ObjCIVar) .Case("ObjCProperty", ObjCProp) - .Case("Record", Struct) + .Case("Record", GenericRecord) .Case("ObjCInterface", ObjCInterface) .Case("Block", Block) .Case("CXXRecord", Class) @@ -1771,10 +1771,10 @@ static std::string CalculateDiagnostic(const Record &S) { case Type: return "ExpectedType"; case ObjCInterface: return "ExpectedObjectiveCInterface"; - // "Struct" means struct, union or class; check the language options and if - // not compiling for C++, strip off the class part. Note that this relies - // on the fact that the context for this declares "Sema &S". - case Struct: + // "GenericRecord" means struct, union or class; check the language options + // and if not compiling for C++, strip off the class part. Note that this + // relies on the fact that the context for this declares "Sema &S". + case GenericRecord: return "(S.getLangOpts().CPlusPlus ? ExpectedStructOrUnionOrClass : " "ExpectedStructOrUnion)"; case Func | ObjCMethod | Block: return "ExpectedFunctionMethodOrBlock";