diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index d0411c035a..6cb2bcf512 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -7083,6 +7083,10 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceLocation LBraceLoc, QualType BestPromotionType; bool Packed = Enum->getAttr<PackedAttr>() ? true : false; + // -fshort-enums is the equivalent to specifying the packed attribute on all + // enum definitions. + if (LangOpts.ShortEnums) + Packed = true; if (NumNegativeBits) { // If there is a negative value, figure out the smallest integer type (of |