summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/constructor-initializer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Don't gratuitously mark the default constructors of base or member ↵Douglas Gregor2009-11-151-0/+15
| | | | | | initializers as used llvm-svn: 88847
* Unify the codepaths used to verify base and member initializers for explicitlyEli Friedman2009-11-091-4/+7
| | | | | | | | | | | | | | | | and implicitly defined constructors. This has a number of benefits: 1. Less code. 2. Explicit and implicit constructors get the same diagnostics. 3. The AST explicitly contains constructor calls from implicit default constructors. This allows handing some cases that previously weren't handled correctly in IRGen without any additional code. Specifically, implicit default constructors containing calls to constructors with default arguments are now handled correctly. llvm-svn: 86500
* Diagnose using a field to initialize itself. Patch by Brandon Pearcy!John McCall2009-11-041-0/+33
| | | | llvm-svn: 86061
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-7/+7
| | | | llvm-svn: 81346
* Top-level semicolons are allowed in C++0x. Fixes PR4755.Douglas Gregor2009-08-241-1/+0
| | | | llvm-svn: 79912
* Fixed test.Fariborz Jahanian2009-07-291-1/+1
| | | | llvm-svn: 77506
* fix test (broken in r77224)Benjamin Kramer2009-07-271-1/+1
| | | | llvm-svn: 77241
* Fixes broken test by accident.Fariborz Jahanian2009-07-241-1/+2
| | | | llvm-svn: 77001
* More Sema check for constructor's member initializer along Fariborz Jahanian2009-07-241-2/+8
| | | | | | with type conversion to fix ir-gen crash. llvm-svn: 77000
* Diagnose when base classes and members to be intializedFariborz Jahanian2009-07-231-0/+20
| | | | | | with constructors don't have a matching constructor. llvm-svn: 76913
* Add constructor used to initialize base/member inFariborz Jahanian2009-07-231-0/+1
| | | | | | | CXXBaseOrMemberInitializer AST node. Needed by its clients to do the initialization. llvm-svn: 76826
* Sema check on out of order object initialization ofFariborz Jahanian2009-07-091-4/+6
| | | | | | class object's base and members under -Wreorder flag. llvm-svn: 75168
* Patch to support optional nested-name-specifier in in ctor-initializerFariborz Jahanian2009-06-301-0/+19
| | | | | | list. llvm-svn: 74571
* Diagnose multiple initialization of anonymous unionFariborz Jahanian2009-06-301-0/+8
| | | | | | fields in the ctor-initializer list. llvm-svn: 74554
* More diagnostics related to initialization of direct basesFariborz Jahanian2009-06-301-0/+12
| | | | | | in ctor-initializer list. llvm-svn: 74541
* Improve handling of base initializers. We now parse initializers in out of ↵Anders Carlsson2009-03-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | line decls, such as: class C { C() { } int a; }; C::C() : a(10) { } We also diagnose when initializers are used on declarations that aren't constructors: t.cpp:1:10: error: only constructors take base initializers void f() : a(10) { } ^ Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.) llvm-svn: 67672
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Fix a long standard problem with clang retaining "too much" sugar Chris Lattner2009-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | information about types. We often print diagnostics where we say "foo_t" is bad, but the user doesn't know how foo_t is declared (because it is a typedef). Fix this by expanding sugar when present in a diagnostic (and not one of a few special cases, like vectors). Before: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)') MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ After: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ llvm-svn: 65081
* Improve parser error recovery after a constructor initializerDouglas Gregor2008-11-101-0/+4
| | | | llvm-svn: 58989
* Initial implementation of parsing, semantic analysis, and AST-buildingDouglas Gregor2008-11-051-0/+43
for constructor initializations, e.g., class A { }; class B : public A { int m; public: B() : A(), m(17) { }; }; llvm-svn: 58749
OpenPOWER on IntegriCloud