r241598 - Don't put anonymous structs within anonymous unions.

Douglas Gregor dgregor at apple.com
Tue Jul 7 08:48:11 PDT 2015


Author: dgregor
Date: Tue Jul  7 10:48:11 2015
New Revision: 241598

URL: http://llvm.org/viewvc/llvm-project?rev=241598&view=rev
Log:
Don't put anonymous structs within anonymous unions.

Modified:
    cfe/trunk/include/clang/AST/DeclObjC.h

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=241598&r1=241597&r2=241598&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Tue Jul  7 10:48:11 2015
@@ -608,12 +608,15 @@ public:
 /// @end
 /// \endcode
 class ObjCTypeParamList {
+  /// Stores the components of a SourceRange as a POD.
+  struct PODSourceRange {
+    unsigned Begin;
+    unsigned End;
+  };
+
   union { 
     /// Location of the left and right angle brackets.
-    struct {
-      unsigned Begin;
-      unsigned End;
-    } Brackets;
+    PODSourceRange Brackets;
 
     // Used only for alignment.
     ObjCTypeParamDecl *AlignmentHack;





More information about the cfe-commits mailing list