Remember the number of positive and negative bits used by the enumerators of
an enum in the enum decl itself. Use some spare bits from TagDecl for this
purpose.
llvm-svn: 103173
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index e19a9fb..0336ca1 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -1572,10 +1572,14 @@
}
void EnumDecl::completeDefinition(QualType NewType,
- QualType NewPromotionType) {
+ QualType NewPromotionType,
+ unsigned NumPositiveBits,
+ unsigned NumNegativeBits) {
assert(!isDefinition() && "Cannot redefine enums!");
IntegerType = NewType;
PromotionType = NewPromotionType;
+ setNumPositiveBits(NumPositiveBits);
+ setNumNegativeBits(NumNegativeBits);
TagDecl::completeDefinition();
}