]> granicus.if.org Git - clang/commit
Introduce Type::isSignedIntegerOrEnumerationType() and
authorDouglas Gregor <dgregor@apple.com>
Fri, 20 May 2011 16:38:50 +0000 (16:38 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 20 May 2011 16:38:50 +0000 (16:38 +0000)
commit575a1c9dc8dc5b4977194993e289f9eda7295c39
tree0c66c4e1cf78a06c917e05557458f05fcf025a99
parentf752d5bbaee7485b484f5e6aa69e50748e02dda8
Introduce Type::isSignedIntegerOrEnumerationType() and
Type::isUnsignedIntegerOrEnumerationType(), which are like
Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also
consider the underlying type of a C++0x scoped enumeration type.

Audited all callers to the existing functions, switching those that
need to also handle scoped enumeration types (e.g., those that deal
with constant values) over to the new functions. Fixes PR9923 /
<rdar://problem/9447851>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131735 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/clang/AST/ASTContext.h
include/clang/AST/CanonicalType.h
include/clang/AST/Type.h
lib/AST/ExprConstant.cpp
lib/AST/Type.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprCXX.cpp
lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CGRecordLayoutBuilder.cpp
lib/Sema/SemaCXXCast.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaStmt.cpp
lib/Sema/SemaTemplate.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp
test/CodeGenCXX/scoped-enums.cpp [new file with mode: 0644]