[PATCH] D71650: [AST] Fix compilation with GCC < 8 for MinGW

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 19 02:16:05 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf20fc65887e2: [clang] Fix compilation with GCC < 8 for MinGW (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71650/new/

https://reviews.llvm.org/D71650

Files:
  clang/include/clang/AST/Decl.h


Index: clang/include/clang/AST/Decl.h
===================================================================
--- clang/include/clang/AST/Decl.h
+++ clang/include/clang/AST/Decl.h
@@ -873,6 +873,8 @@
     DAK_Normal
   };
 
+  enum { NumScopeDepthOrObjCQualsBits = 7 };
+
   class ParmVarDeclBitfields {
     friend class ASTDeclReader;
     friend class ParmVarDecl;
@@ -895,8 +897,6 @@
     /// Whether this parameter is an ObjC method parameter or not.
     unsigned IsObjCMethodParam : 1;
 
-    enum { NumScopeDepthOrObjCQualsBits = 7 };
-
     /// If IsObjCMethodParam, a Decl::ObjCDeclQualifier.
     /// Otherwise, the number of function parameter scopes enclosing
     /// the function parameter scope in which this parameter was
@@ -1627,7 +1627,7 @@
   }
 
   static constexpr unsigned getMaxFunctionScopeDepth() {
-    return (1u << ParmVarDeclBitfields::NumScopeDepthOrObjCQualsBits) - 1;
+    return (1u << NumScopeDepthOrObjCQualsBits) - 1;
   }
 
   /// Returns the index of this parameter in its prototype or method scope.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71650.234682.patch
Type: text/x-patch
Size: 1036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191219/ffcd525d/attachment-0001.bin>


More information about the cfe-commits mailing list