diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h --- a/clang/include/clang/AST/Decl.h +++ b/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.