diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-10-08 23:50:27 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-10-08 23:50:27 +0000 |
| commit | 0bf3140424a0a13a928a4e6bf0f112e6167a5636 (patch) | |
| tree | aef7f4fa057fc4672999ce4ec62b01064035c242 /clang/lib/AST/ASTContext.cpp | |
| parent | 959fcc6c634cb4d4fd8bd8c8b4bc3e6b99ebc228 (diff) | |
| download | bcm5719-llvm-0bf3140424a0a13a928a4e6bf0f112e6167a5636.tar.gz bcm5719-llvm-0bf3140424a0a13a928a4e6bf0f112e6167a5636.zip | |
Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a
bit by me).
llvm-svn: 116122
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 1fddd3256f8..72d7f600f04 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -5154,10 +5154,10 @@ QualType ASTContext::mergeObjCGCQualifiers(QualType LHS, QualType RHS) { //===----------------------------------------------------------------------===// unsigned ASTContext::getIntWidth(QualType T) { - if (T->isBooleanType()) - return 1; if (EnumType *ET = dyn_cast<EnumType>(T)) T = ET->getDecl()->getIntegerType(); + if (T->isBooleanType()) + return 1; // For builtin types, just use the standard type sizing method return (unsigned)getTypeSize(T); } |

