]> granicus.if.org Git - clang/commit
Move narrowing conversion detection code from SemaInit to SemaOverload, ready
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 18 Jan 2012 05:21:49 +0000 (05:21 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 18 Jan 2012 05:21:49 +0000 (05:21 +0000)
commit4c3fc9b38d3723f73e4ded594cebf38c76f91d93
treecdba7956c4da548d2d932d58a1e99b14be707e05
parent8013afe5752551d72d290991046c3942138d2df1
Move narrowing conversion detection code from SemaInit to SemaOverload, ready
for it to be used in converted constant expression checking, and fix a couple
of issues:
 - Conversion operators implicitly invoked prior to the narrowing conversion
   were not being correctly handled when determining whether a constant value
   was narrowed.
 - For conversions from floating-point to integral types, the diagnostic text
   incorrectly always claimed that the source expression was not a constant
   expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148381 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Expr.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Overload.h
lib/AST/ExprConstant.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaOverload.cpp
test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp