summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx0x-initializer-scalars.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make the "too many braces in scalar initialization" extension causeRichard Smith2018-12-201-0/+23
| | | | | | SFINAE failures. llvm-svn: 349820
* Fix handling of initialization from parenthesized initializer list.Richard Smith2017-03-241-5/+5
| | | | | | | | | | | | | This change fixes a crash on initialization of a reference from ({}) during template instantiation and incidentally improves diagnostics. This reverts a prior attempt to handle this in r286721. Instead, we teach the initialization code that initialization cannot be performed if a source type is required and the initializer is an initializer list (which is not an expression and does not have a type), and likewise for function-style cast expressions. llvm-svn: 298676
* Use descriptive message if list initializer is incorrectly parenthesized.Serge Pavlov2016-11-121-4/+17
| | | | | | | | | | | | | 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 help much. Both gcc and msvc issue message `list-initializer for non-class type must not be parenthesized`, which is more descriptive. This change implements similar message for clang. Differential Revision: https://reviews.llvm.org/D25816 llvm-svn: 286721
* Improve the "braces around scalar init" warning to determine whether to warnRichard Smith2015-02-121-5/+5
| | | | | | | | based on whether "redundant" braces are ever reasonable as part of the initialization of the entity, rather than whether the initialization is "top-level". In passing, add a warning flag for it. llvm-svn: 228896
* Tweak diagnostic wording for init list narrowingAlp Toker2014-05-171-2/+2
| | | | | | | | | The conventional form is '<action> to silence this warning'. Also call the diagnostic an 'issue' rather than a 'message' because the latter term is more widely used with reference to message expressions. llvm-svn: 209052
* Parse brace initializers as default arguments. PR12236.Sebastian Redl2012-03-141-0/+7
| | | | llvm-svn: 152721
* Single- and zero-element initializer lists to scalars are ↵Sebastian Redl2012-02-281-0/+42
| | | | | | list-initializations. Fixes PR12118. llvm-svn: 151666
* Accept braced-init-lists in conditions, and, in passing, dramatically improveRichard Smith2012-02-221-0/+2
| | | | | | the diagnostic for using a parenthesized direct-initializer in a condition. llvm-svn: 151137
* Proper initializer list support for new expressions and type construct ↵Sebastian Redl2012-02-121-1/+3
| | | | | | expressions. Array new still missing. llvm-svn: 150346
* Change the way we store initialization kinds so that all direct inits can ↵Sebastian Redl2012-02-121-0/+5
| | | | | | distinguish between list and parens form. This allows us to correctly diagnose the last test cases from litb. llvm-svn: 150343
* Sema support for initialization of std::initializer_list from initializer lists.Sebastian Redl2012-01-171-1/+0
| | | | | | This does not yet support CodeGen. llvm-svn: 148349
* Implement overload resolution from init lists for scalar parameter types.Sebastian Redl2011-10-161-1/+21
| | | | llvm-svn: 142148
* Prove that non-overloaded function calls using init list arguments work.Sebastian Redl2011-10-161-0/+5
| | | | llvm-svn: 142144
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Correctly parse braced member initializers (even in delayed parsing) and ↵Sebastian Redl2011-09-241-0/+34
correctly pass the information on to Sema. There's still an incorrectness in the way template instantiation works now, but that is due to a far larger underlying representational problem. Also add a test case for various list initialization cases of scalars, which test this commit as well as the previous one. llvm-svn: 140460
OpenPOWER on IntegriCloud