summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/direct-initializer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Lit Test] Updated 34 Lit tests to be C++11 compatible.Charles Li2015-11-171-1/+11
| | | | | | | Added expected diagnostics new to C++11. Expanded RUN line to: default, C++98/03 and C++11. llvm-svn: 253371
* 'const std::type_info*' instead of 'std::type_info const*'Chris Lattner2010-09-051-1/+1
| | | | llvm-svn: 113092
* Turn access control on by default in -cc1.John McCall2010-04-091-1/+1
| | | | | | | | Remove -faccess-control from -cc1; add -fno-access-control. Make the driver pass -fno-access-control by default. Update a bunch of tests to be correct under access control. llvm-svn: 100880
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-101-3/+3
| | | | | | | | | | therefore not creating ElaboratedTypes, which are still pretty-printed with the written tag). Most of these testcase changes were done by script, so don't feel too sorry for my fingers. llvm-svn: 98149
* Improve the reporting of non-viable overload candidates by noting the reasonJohn McCall2010-01-131-2/+2
| | | | | | | | why the candidate is non-viable. There's a lot we can do to improve this, but it's a good start. Further improvements should probably be integrated with the bad-initialization reporting routines. llvm-svn: 93277
* Improve the diagnostics used to report implicitly-generated class membersJohn McCall2010-01-061-6/+6
| | | | | | | | | as parts of overload sets. Also, refer to constructors as 'constructors' rather than functions. Adjust a lot of tests. llvm-svn: 92832
* Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequenceDouglas Gregor2009-12-221-1/+1
| | | | llvm-svn: 91927
* Switch default-initialization of variables of class type (or array thereof) ↵Douglas Gregor2009-12-201-3/+3
| | | | | | over to InitializationSequence. I could swear that this fixes a PR somewhere, but I couldn't figure out which one llvm-svn: 91796
* Initialization improvements: addition of string initialization and a fewEli Friedman2009-12-191-2/+2
| | | | | | | | small bug fixes in SemaInit, switch over SemaDecl to use it more often, and change a bunch of diagnostics which are different with the new initialization code. llvm-svn: 91767
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* 1) don't do overload resolution in selecting conversionFariborz Jahanian2009-09-151-4/+4
| | | | | | | | to pointer function for delete expression. 2) Treat type conversion function and its 'const' version as identical in building the visible conversion list. llvm-svn: 81930
* Issue good diagnostics when initialization failes due toFariborz Jahanian2009-09-151-0/+14
| | | | | | ambiguity in type conversion function selection. llvm-svn: 81898
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Removed the warningDouglas Gregor2008-12-171-1/+1
| | | | | | | | | | warning: statement was disambiguated as declaration because it is currently firing in cases where the declaration would not actually parse as a statement. We'd love to bring this warning back if we can make it more accurate. llvm-svn: 61137
* Implement C++ copy-initialization for declarations. There is now someDouglas Gregor2008-11-051-3/+3
| | | | | | | | duplication in the handling of copy-initialization by constructor, which occurs both for initialization of a declaration and for overloading. The initialization code is due for some refactoring. llvm-svn: 58756
* Implicit support for direct initialization of objects of class type, e.g.,Douglas Gregor2008-11-031-0/+26
| | | | | | X x(5, 7); llvm-svn: 58641
* In ParseParenDeclarator match "D.setGroupingParens(true);" with another ↵Argyrios Kyrtzidis2008-10-071-1/+3
| | | | | | | | | setGroupingParens call after the ')' is parsed. Fixes this bug: int (x)(0); // error, expected function declarator where the '(0)' initializer is llvm-svn: 57241
* Implement support for C++ direct initializers in declarations, e.g. "int x(1);".Argyrios Kyrtzidis2008-10-061-0/+8
This is how this kind of initializers appear in the AST: -The Init expression of the VarDecl is a functional type construction (of the VarDecl's type). -The new VarDecl::hasCXXDirectInitializer() returns true. e.g, for "int x(1);": -VarDecl 'x' has Init with expression "int(1)" (CXXFunctionalCastExpr). -hasCXXDirectInitializer() of VarDecl 'x' returns true. A major benefit is that clients that don't particularly care about which exactly form was the initializer can handle both cases without special case code. Note that codegening works now for "int x(1);" without any changes to CodeGen. llvm-svn: 57178
OpenPOWER on IntegriCloud