]> granicus.if.org Git - clang/commit
Implement C++0x [expr.static.cast]p9, which permits explicitly casting
authorDouglas Gregor <dgregor@apple.com>
Fri, 18 Feb 2011 03:01:41 +0000 (03:01 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 18 Feb 2011 03:01:41 +0000 (03:01 +0000)
commit1e856d99c52d9e93eab48084c3aca4a59204b94b
treea40dae4dafc5ae2df7cd42c84cb6f6f5ae5710ef
parent0d3c985ad5b07121149957e5993cf1e3df26a413
Implement C++0x [expr.static.cast]p9, which permits explicitly casting
a scoped enumeration type to an integral or floating type,
properly. There was an over-eager assertion, and it was missing the
floating-point case.

Fixes PR9107/<rdar://problem/8937402>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125825 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaCXXCast.cpp
test/CXX/expr/expr.post/expr.static.cast/p9-0x.cpp [new file with mode: 0644]