This revision was automatically updated to reflect the committed changes.
Closed by commit rL286721: Use descriptive message if list initializer is
incorrectly parenthesized. (authored by sepavloff).
Changed prior to commit:
https://reviews.llvm.org/D25816?vs=75404&id=77725#toc
Repository:
r
I think you can go ahead and commit it, yes.
Alex
On 11 November 2016 at 05:28, Serge Pavlov wrote:
> Is it OK to commit this patch?
>
> Thanks,
> --Serge
>
> 2016-10-21 18:21 GMT+07:00 Alex Lorenz :
>
>> arphaman added a subscriber: rsmith.
>> arphaman added a comment.
>>
>> LGTM, I added Rich
Is it OK to commit this patch?
Thanks,
--Serge
2016-10-21 18:21 GMT+07:00 Alex Lorenz :
> arphaman added a subscriber: rsmith.
> arphaman added a comment.
>
> LGTM, I added Richard in case he has something to add.
>
> > I chose to retain current clang behavior and reject questionable code.
> GCC
arphaman added a subscriber: rsmith.
arphaman added a comment.
LGTM, I added Richard in case he has something to add.
> I chose to retain current clang behavior and reject questionable code. GCC
> patch that introduced this message explains using warning by some
> uncertainty, 5 years passed, I
sepavloff marked 5 inline comments as done.
sepavloff added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1762
def err_init_incomplete_type : Error<"initialization of incomplete type %0">;
+def err_list_init_in_parens : Error<"list-initializer for non-c
sepavloff updated this revision to Diff 75404.
sepavloff added a comment.
Addressed reviewr's notes.
https://reviews.llvm.org/D25816
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaExprCXX.cpp
test/SemaCXX/cxx0x-initialize
arphaman added a comment.
Thanks for working on this! I have a couple of comments:
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1762
def err_init_incomplete_type : Error<"initialization of incomplete type %0">;
+def err_list_init_in_parens : Error<"list-initializer f
sepavloff created this revision.
sepavloff added a subscriber: cfe-commits.
If initializer contains parentheses around braced list where it is not allowed,
as in
construct `int({0})`, clang issued message like `functional-style cast from
'void' to
'int' is not allowed`, which does not much help.