r195875 - Renaming Struct to GenericRecord for clarity; could not use Record as the enumerant because that's already taken by the Record class.

Aaron Ballman aaron at aaronballman.com
Wed Nov 27 12:14:30 PST 2013


Author: aaronballman
Date: Wed Nov 27 14:14:30 2013
New Revision: 195875

URL: http://llvm.org/viewvc/llvm-project?rev=195875&view=rev
Log:
Renaming Struct to GenericRecord for clarity; could not use Record as the enumerant because that's already taken by the Record class.

Modified:
    cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp

Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=195875&r1=195874&r2=195875&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Wed Nov 27 14:14:30 2013
@@ -1713,7 +1713,7 @@ static std::string CalculateDiagnostic(c
     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(c
                    .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(c
     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";





More information about the cfe-commits mailing list