summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-10-08 23:50:27 +0000
committerDouglas Gregor <dgregor@apple.com>2010-10-08 23:50:27 +0000
commit0bf3140424a0a13a928a4e6bf0f112e6167a5636 (patch)
treeaef7f4fa057fc4672999ce4ec62b01064035c242 /clang/lib/AST/ASTContext.cpp
parent959fcc6c634cb4d4fd8bd8c8b4bc3e6b99ebc228 (diff)
downloadbcm5719-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.cpp4
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);
}
OpenPOWER on IntegriCloud