]> granicus.if.org Git - clang/commit
This patch implements as much of the narrowing conversion error specified by
authorJeffrey Yasskin <jyasskin@google.com>
Tue, 26 Jul 2011 23:20:30 +0000 (23:20 +0000)
committerJeffrey Yasskin <jyasskin@google.com>
Tue, 26 Jul 2011 23:20:30 +0000 (23:20 +0000)
commit191591336f639dad1504e863733fb831645c1644
tree37cb1ccfc5b0a823b8e41faf0ef5ec91c3467b2a
parent3e23d68e2e642db107b78aac2bb27585ed0ef337
This patch implements as much of the narrowing conversion error specified by
[dcl.init.list] as is possible without generalized initializer lists or full
constant expression support, and adds a c++0x-compat warning in C++98 mode.

The FixIt currently uses a typedef's basename without qualification, which is
likely to be incorrect on some code.  If it's incorrect on too much code, we
should write a function to get the string that refers to a type from a
particular context.

The warning is currently off by default. I'll fix LLVM and clang before turning
it on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136181 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Initialization.h
include/clang/Sema/Sema.h
lib/Sema/SemaInit.cpp
test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x-fixits.cpp [new file with mode: 0644]
test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp [new file with mode: 0644]