6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
cl.init.list/basic.cpp
cl.init.list/p3-0x.cpp
cl.init.list/p7-0x-fixits.cpp
cl.init.list/p7-0x.cpp
cl.init.list/p7-cxx11-nowarn.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
cl.init.list/p7-0x.cpp
cl.init.list/p7-cxx11-nowarn.cpp
|
ef8f90caa14d85cffba2fea4b6bd425c3b22eea7 |
20-Sep-2013 |
Richard Trieu <rtrieu@google.com> |
Modify the uninitialized field visitor to detect uninitialized use across the fields in the class. This allows a better checking of member intiailizers and in class initializers in regards to initialization ordering. For instance, this code will now produce warnings: class A { int x; int y; A() : x(y) {} // y is initialized after x, warn here A(int): y(x) {} // default initialization of leaves x uninitialized, warn here }; Several test cases were updated with -Wno-uninitialized to silence this warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191068 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p7.cpp
|
7c3e615f01e8f9f587315800fdaf2305ed824568 |
13-Jun-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12086, PR15117 Introduce CXXStdInitializerListExpr node, representing the implicit construction of a std::initializer_list<T> object from its underlying array. The AST representation of such an expression goes from an InitListExpr with a flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr). This more detailed representation has several advantages, the most important of which is that the new MaterializeTemporaryExpr allows us to directly model lifetime extension of the underlying temporary array. Using that, this patch *drastically* simplifies the IR generation of this construct, provides IR generation support for nested global initializer_list objects, fixes several bugs where the destructors for the underlying array would accidentally not get invoked, and provides constant expression evaluation support for std::initializer_list objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183872 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p3-0x.cpp
|
993f43f24d7a45a5cd4678a3316b0852261fc5d4 |
06-May-2013 |
John McCall <rjmccall@apple.com> |
Grab-bag of bit-field fixes: - References to ObjC bit-field ivars are bit-field lvalues; fixes rdar://13794269, which got me started down this. - Introduce Expr::refersToBitField, switch a couple users to it where semantically important, and comment the difference between this and the existing API. - Discourage Expr::getBitField by making it a bit longer and less general-sounding. - Lock down on const_casts of bit-field gl-values until we hear back from the committee as to whether they're allowed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181252 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5.cpp
|
c3bf52ced9652f555aa0767bb822ec4c64546212 |
21-Apr-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
C++1y: Allow aggregates to have default initializers. Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in CXXCtorInitializers and in InitListExprs to represent a default initializer. There's an additional complication here: because the default initializer can refer to the initialized object via its 'this' pointer, we need to make sure that 'this' points to the right thing within the evaluation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179958 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
cl.init.aggr/p7.cpp
|
1fd1e288d0f45b86d191d8f53f569e5143f3a18a |
11-Apr-2013 |
Jordan Rose <jordan_rose@apple.com> |
Force a load when creating a reference to a temporary copied from a bitfield. For this source: const int &ref = someStruct.bitfield; We used to generate this AST: DeclStmt [...] `-VarDecl [...] ref 'const int &' `-MaterializeTemporaryExpr [...] 'const int' lvalue `-ImplicitCastExpr [...] 'const int' lvalue <NoOp> `-MemberExpr [...] 'int' lvalue bitfield .bitfield [...] `-DeclRefExpr [...] 'struct X' lvalue ParmVar [...] 'someStruct' 'struct X' Notice the lvalue inside the MaterializeTemporaryExpr, which is very confusing (and caused an assertion to fire in the analyzer - PR15694). We now generate this: DeclStmt [...] `-VarDecl [...] ref 'const int &' `-MaterializeTemporaryExpr [...] 'const int' lvalue `-ImplicitCastExpr [...] 'int' <LValueToRValue> `-MemberExpr [...] 'int' lvalue bitfield .bitfield [...] `-DeclRefExpr [...] 'struct X' lvalue ParmVar [...] 'someStruct' 'struct X' Which makes a lot more sense. This allows us to remove code in both CodeGen and AST that hacked around this special case. The commit also makes Clang accept this (legal) C++11 code: int &&ref = std::move(someStruct).bitfield PR15694 / <rdar://problem/13600396> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179250 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
defa32ef4fdc166d39d2d0859e5edbd78da2ddd0 |
27-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13278115> Improve diagnostic when failing to bind an rvalue reference to an lvalue of compatible type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178095 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
6c5aaed0d4faf9ab8793423529306e7116e9f0fd |
26-Mar-2013 |
Douglas Gregor <dgregor@apple.com> |
<rdar://problem/13395022> Strip references when extracting an initializer_list's element type during application of an initialization sequence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177944 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p3-0x.cpp
|
a4dc51b46861eb52626f89183da7610437baba93 |
05-Feb-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add some missing diagnostics for C++11 narrowing conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174337 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p3-0x.cpp
|
d538ed9b2a617239d5bd56357663de62f6f9224c |
20-Dec-2012 |
Alexander Kornienko <alexfh@google.com> |
Implement AST dumper for Decls. http://llvm-reviews.chandlerc.com/D52 Patch by Philip Craig! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170634 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-examples.cpp
|
d5bc867f6597ee8d4eb31ea217934e436fc7c7e3 |
08-Dec-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement C++03 [dcl.init]p5's checking for value-initialization of references properly, rather than faking it up by pretending that a reference member makes the default constructor non-trivial. That leads to rejects-valids when putting such types inside unions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169662 91177308-0d34-0410-b5e6-96231b3b80d8
5.cpp
|
8e8fb3be5bd78f0564444eca02b404566a5f3b5d |
19-Oct-2012 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/basic.cpp
cl.init.ref/p1.cpp
cl.init.string/p1.cpp
|
6678a05ba19c40d60ed68b37262942eb887be217 |
18-Oct-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Tests for DR1507. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166162 91177308-0d34-0410-b5e6-96231b3b80d8
7.cpp
|
72ab27732ea7a42d756a1e79727f86fbe391b42b |
28-Sep-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
When processing an InitListExpr and skipping the initialization of an invalid record, skip at least one element from the InitListExpr to avoid an infinite loop if we're initializing an array of unknown bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164851 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p4.cpp
|
20599392a99956eaac4cf351a0935574090cb6c3 |
07-Jul-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR12670: Support for initializing an array of non-aggregate class type from an initializer list. Patch by Olivier Goffart, with extra testcases by Meador Inge and Daniel Lunow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159896 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p3-0x.cpp
|
5d7700ed7645698f3e5bea8f983e61a1ec2f423b |
19-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix -Wc++11-narrowing warnings for narrowing negative values to larger unsigned types to actually includes the value, rather than saying <uninitialized>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158745 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p7-0x.cpp
|
0d3317e0a2e0adb57ce8d075ebdcb41a3f939805 |
19-Jun-2012 |
Kaelyn Uhrain <rikka@google.com> |
Improve the error message when a function overload candidate is rejected because it expects a reference and receives a non-l-value. For example, given: int foo(int &); template<int x> void b() { foo(x); } clang will now print "expects an l-value for 1st argument" instead of "no known conversion from 'int' to 'int &' for 1st argument". The change in wording (and associated code to detect the case) was prompted by comment #5 in PR3104, and should be the last bit of work needed for the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158691 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-cxx03-extra-copy.cpp
|
cd65f4903dc737d92655a0cf72755c16831ae668 |
13-Jun-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Add missing narrowing check: converting from a signed integral type to a wider unsigned type is narrowing if the source is non-constant or negative. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158377 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p7-0x.cpp
|
3003e1d6626d07e8fc4af95fad95b3a5d4c4af98 |
15-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fold the six functions checking explicitly-defaulted special member functions into one. These were all performing almost identical checks, with different bugs in each of them. This fixes PR12806 (we weren't setting the exception specification for an explicitly-defaulted, non-user-provided default constructor) and enforces 8.4.2/2's rule that an in-class defaulted member must exactly match the implicit parameter type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156802 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
|
a9b55a499a8b5ae0c4b373f751ef62af74ec494e |
04-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Dependent-sequence initialization of a single element can be direct list-initialization. Loosen an over-eager assertion to fix PR12453. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153995 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/basic.cpp
|
6c4c36c4ed1007143f5b8655eb68b313a7e12e76 |
30-Mar-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR10217: Provide diagnostics explaining why an implicitly-deleted special member function is deleted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153773 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
|
e4e68d45f89ff4899d30cbd196603d09b7fbc150 |
15-Feb-2012 |
Douglas Gregor <dgregor@apple.com> |
When overload resolution picks an implicitly-deleted special member function, provide a specialized diagnostic that indicates the kind of special member function (default constructor, copy assignment operator, etc.) and that it was implicitly deleted. Add a hook where we can provide more detailed information later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150611 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
|
f96241dedab95d633f090191c93250b347b84f53 |
23-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Add -Wnarrowing as an alias for -Wc++11-narrowing, for better GCC compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148702 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p7-cxx11-nowarn.cpp
|
f3c82c5f5c0321babf054983c29ad84cc90244f7 |
23-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Downgrade C++11 narrowing conversion errors to warnings default-mapped to an error, so that users can turn them off if necessary. Note that this does *not* change the behavior of in a SFINAE context, where we still flag an error even if the warning is disabled. This matches GCC's behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148701 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p7-0x.cpp
cl.init.list/p7-cxx11-nowarn.cpp
|
4c3fc9b38d3723f73e4ded594cebf38c76f91d93 |
18-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Move narrowing conversion detection code from SemaInit to SemaOverload, ready for it to be used in converted constant expression checking, and fix a couple of issues: - Conversion operators implicitly invoked prior to the narrowing conversion were not being correctly handled when determining whether a constant value was narrowed. - For conversions from floating-point to integral types, the diagnostic text incorrectly always claimed that the source expression was not a constant expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148381 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p7-0x.cpp
|
ec789163a42a7be654ac34aadb750b508954d53c |
12-Jan-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
constexpr: initialization of a union from an empty initializer-list should zero-initialize the first union member. Also fix a bug where initializing an array of types compatible with wchar_t from a wide string literal failed in C, and fortify the C++ tests in this area. This part can't be tested without a code change to enable array evaluation in C (where an existing test fails). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148035 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.string/p1.cpp
|
10f04a6267eb07d3be00db1fd0369e1398f5d0a8 |
22-Dec-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
List-initialization via constructor part 1. Still needs: pretty-printing, overloading, initializer_list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147145 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
|
2fe9b7fb07dff15dd15dd8755a9a9e6de0fe46fc |
15-Dec-2011 |
Richard Trieu <rtrieu@google.com> |
Modify how the -verify flag works. Currently, the verification string and diagnostic message are compared. If either is a substring of the other, then no error is given. This gives rise to an unexpected case: // expect-error{{candidate function has different number of parameters}} will match the following error messages from Clang: candidate function has different number of parameters (expected 1 but has 2) candidate function has different number of parameters It will also match these other error messages: candidate function function has different number of parameters number of parameters This patch will change so that the verification string must be a substring of the diagnostic message before accepting. Also, all the failing tests from this change have been corrected. Some stats from this cleanup: 87 - removed extra spaces around verification strings 70 - wording updates to diagnostics 40 - extra leading or trailing characters (typos, unmatched parens or quotes) 35 - diagnostic level was included (error:, warning:, or note:) 18 - flag name put in the warning (-Wprotocol) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146619 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-cxx03-extra-copy.cpp
|
45fa560c72441069d9e4eb1e66efd87349caa552 |
07-Nov-2011 |
Douglas Gregor <dgregor@apple.com> |
When we notice that a member function is defined with "= delete" or "= default", make a note of which is used when creating the initial declaration. Previously, we would wait until later to handle default/delete as a definition, but this is too late: when adding the declaration, we already treated the declaration as "user-provided" when in fact it was merely "user-declared". Fixes PR10861 and PR10442, along with a bunch of FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144011 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
|
dd67723af339f94870149ee1934dd652f83ca738 |
18-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Simplify RecordDeclCXX::setBases slightly. No functional change. Add test that a variadic base list which expands to 0 bases doesn't make the class a non-aggregate. This test passed before the change, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142411 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
|
5f31f0893d75203c326ddcd9808099bbfe34aec0 |
18-Oct-2011 |
David Blaikie <dblaikie@gmail.com> |
Switch to the C++11 warning flags in tests. Patch by Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142340 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p7-0x-fixits.cpp
cl.init.ref/p5-0x.cpp
|
762bb9d0ad20320b9f97a841dce57ba5e8e48b07 |
14-Oct-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Update all tests other than Driver/std.cpp to use -std=c++11 rather than -std=c++0x. Patch by Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
cl.init.list/p7-0x.cpp
cl.init.ref/p1.cpp
cl.init.ref/p5-0x.cpp
cl.init.ref/p5-cxx0x-no-extra-copy.cpp
14-0x.cpp
|
d24c306e693a1013b233f062291e87d49fa8a580 |
10-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
When adding a direct initializer to a declaration, allow the initializer to update the type of the declaration. For example, this allows us to determine the size of an incomplete array from its initializer. Fixes PR10288. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141543 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.string/p1.cpp
|
203050c2d5413c3f7e18dfa39451bf6f954136ca |
05-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't allow an rvalue reference to bind to the result of a calling a conversion function whose result type is an lvalue reference. The initialization code already handled this properly, but overload resolution was allowing the binding. Fixes PR11003 / <rdar://problem/10233078>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141137 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
be1aa410274b28fc143c47c814f07c989f4534d6 |
29-Sep-2011 |
Daniel Dunbar <daniel@zuster.org> |
Basic/Diagnostics: Rewrite DiagnosticIDs::getDiagnosticLevel completely to be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings. - This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140770 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p4.cpp
|
017ab77655b262311a3550342ca19b85380f8f20 |
05-Sep-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement the suggested resolution of WG21 N3307 issue 19: When determining whether a class is an aggregate in C++0x, treat all functions which are neither deleted nor defaulted as user-provided, not just special member functions. The wording of the standard only defines the term "user-provided" for special member functions, but the intent seems to be that any function can be user-provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139111 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
|
b89d5ed785e2eb7dd64aa38d481d939155f62c41 |
31-Aug-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Fix PR10694: Boolean conversions can be from pointers, and those conversions aren't considered narrowing conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138838 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p7-0x.cpp
|
85ea7aa961deac1d754f610af8062ae3f8b4e2a5 |
30-Aug-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Declare and define implicit move constructor and assignment operator. This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138821 91177308-0d34-0410-b5e6-96231b3b80d8
14-0x.cpp
|
9906149972906e340f512a60f72a8676748f24d8 |
29-Aug-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Print 'int' instead of 'const int' in the narrowing conversion error, since the qualification of a type doesn't affect whether a conversion is a narrowing conversion. This doesn't work in template cases because SubstTemplateTypeParmType gets in the way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138735 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p7-0x.cpp
|
f20d27288c7f124dcc9c50c7c6bf766d522ceb31 |
15-Aug-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach reference initialization from the result of a user-defined conversion to initialize the standard conversion *after* the user-defined conversion properly. Fixes PR10644. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137608 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
6d0ee8d77b6d37fa0dec1d55aa13429a6608e7a9 |
12-Aug-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
Conversions to bool count as integer conversions for the purposes of the C++0x narrowing error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137512 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/p7-0x.cpp
|
191591336f639dad1504e863733fb831645c1644 |
27-Jul-2011 |
Jeffrey Yasskin <jyasskin@google.com> |
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
cl.init.list/p7-0x-fixits.cpp
cl.init.list/p7-0x.cpp
|
12ce0a085f89f07c76bf034aa6b838ef50542241 |
15-Jul-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Revert 135177 to fix PR10363. Revert "For C++11, do more checking of initializer lists up-front, enabling some subset of the final functionality. C just leaves the function early. C++98 runs through the same code path, but has no changed functionality either." This reverts commit ac420c5053d6aa41d59f782caad9e46e5baaf2c2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135210 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
|
ac420c5053d6aa41d59f782caad9e46e5baaf2c2 |
14-Jul-2011 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
For C++11, do more checking of initializer lists up-front, enabling some subset of the final functionality. C just leaves the function early. C++98 runs through the same code path, but has no changed functionality either. This is a first baby step towards supporting generalized initializer lists. This also removes an aggregate test case that was just plain wrong, assuming that non-aggregates couldn't be initialized with initializer lists in C++11 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135177 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
|
7a614d8380297fcd2bc23986241905d97222948c |
11-Jun-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Implement support for C++11 in-class initialization of non-static data members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132878 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p1-0x.cpp
14-0x.cpp
|
4337dc776074ac0143b49823890303f952d3d9ae |
21-May-2011 |
Douglas Gregor <dgregor@apple.com> |
Teach Sema::ActOnUninitializedDecl() not to try to interpret when one should use a constructor to default-initialize a variable. InitializationSequence knows the rules for default initialization, better. Fixes <rdar://problem/8501008>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131796 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
|
bc34b1d7f4f371bfdebf68d66086f54586d68abe |
11-Apr-2011 |
Eli Friedman <eli.friedman@gmail.com> |
PR9669: implement correct checking for [dcl.init.string]p2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129260 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.string/p2.cpp
|
8dde14e7f43a4b29e592b3e8e576eb467ddb6c6e |
24-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Re-instate r123977/r123978, my updates of the reference-binding implementation used by overload resolution to support rvalue references. The original commits caused PR9026 and some hard-to-reproduce self-host breakage. The only (crucial!) difference between this commit and the previous commits is that we now properly check the SuppressUserConversions flag before attempting to perform a second user-defined conversion in reference binding, breaking the infinite recursion chain of user-defined conversions. Rvalue references should be working a bit better now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124121 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
aa5952c53f6c6a844a22fa2294186e16018b31e1 |
22-Jan-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
revert r123977 and r123978 to fix PR9026. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124033 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
68ed68b227c25babfbdd38d9a5b4b423d501951f |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Update the reference-binding implementation used for overload resolution to match the latest C++0x working paper's semantics. The implementation now matching up with the reference-binding implementation used for initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123977 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
00d66cce52cf027eac77591a9847f87dacf36995 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add more reference-binding examples from the C++0x working paper, all of which seem to be working fine git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123955 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
b2855ad68d93824faf47c09bbef90ba74157f0f4 |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
More work to bring reference binding up to the latest C++0x specification. In particular, an rvalue reference can bind to an initializer expression that is an lvalue if the referent type and the initializer expression type are not reference-related. This is a newer formulation to the previous "rvalue references can never bind to lvalues" rule. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123952 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
564cb06b1f010ab3c5e316ac79ba6cfdd72e9c1d |
21-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing reference binding via a conversion function, perform type checking based on the actual reference type we're trying to bind the result to, rather than stripping the reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123950 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
35e99fa40f1245cc554d8a26373e0486eb9c28f2 |
20-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
More tests for reference binding in the presence of rvalue references. Note that we're currently failing reference binding to a function lvalue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123920 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
c5db24dfbc860a9fd1501c72f398bf6b6d5b6e0e |
20-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Start refactoring reference binding to more closely match the C++0x working paper's structure. The only functional change here is that we now handling binding to array rvalues, which we would previously reject. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123918 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
69d831645f429d3b806d2ae220aee45ca44f8c6c |
20-Jan-2011 |
Douglas Gregor <dgregor@apple.com> |
Add some tests for reference-collapsing and referencing binding involving rvalue references, to start scoping out what is and what isn't implemented. In the process, tweak some standards citations, type desugaring, and teach the tentative parser about && in ptr-operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123913 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-0x.cpp
|
f89e55ab1bfb3ea997f8b02997c611a02254eb2d |
18-Nov-2010 |
John McCall <rjmccall@apple.com> |
Calculate the value kind of an expression when it's created and store it on the expression node. Also store an "object kind", which distinguishes ordinary "addressed" l-values (like variable references and pointer dereferences) and bitfield, @property, and vector-component l-values. Currently we're not using these for much, but I aim to switch pretty much everything calculating l-valueness over to them. For now they shouldn't necessarily be trusted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119685 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-examples.cpp
|
8ff338bfd8abd9ac5d0c1d89c1b05e2c02727174 |
12-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing initialization of a copy of a temporary object, use direct-initialization (rather than copy-initialization) to initialize the temporary, allowing explicit constructors. Fixes PR8342. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118880 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-cxx03-extra-copy.cpp
|
b72db8977ed032d6425045d7e9d36e49d9b2d3f8 |
05-Oct-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
In Sema's TryRefInitWithConversionFunction, suppress user conversions for the overload candidates. Fixes an infinite recursion in overload resolution for rdar://8499524. Many thanks to Doug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115588 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-var.cpp
|
0c42bb653dc40b1caae010618831e320af824b18 |
05-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
'const std::type_info*' instead of 'std::type_info const*' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113092 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-examples.cpp
cl.init.ref/p5-var.cpp
6.cpp
|
58f9e13e87e57236fee4b914eea9be6f92a1c345 |
05-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
make clang print types as "const int *" instead of "int const*", which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113090 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-examples.cpp
cl.init.ref/p5-var.cpp
6.cpp
|
1baf2f778c26a71d1353ff2cc1701fcd1dbeaf76 |
31-Aug-2010 |
Chandler Carruth <chandlerc@gmail.com> |
Fix a regression that allowed clearly ill formed code. The diagnostic is still terrible, FIXME left to do a proper job of diagnosing this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112581 91177308-0d34-0410-b5e6-96231b3b80d8
5.cpp
|
57d12fd4a2bc739c4a4d62a364b7f08cd483c59e |
07-Jun-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
PR7245: Make binding a reference to a temporary without a usable copy constructor into an extension warning into the error that C++98 requires. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105529 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-cxx03-extra-copy.cpp
cl.init.ref/p5-cxx0x-no-extra-copy.cpp
|
cd7c4d8c122e7cfd6ce2a65db9e824bfe17634c2 |
03-Jun-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
There is no dcl.init.ref p16. This test deals with p5. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105351 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p16-cxx0x-no-extra-copy.cpp
cl.init.ref/p5-cxx0x-no-extra-copy.cpp
|
5cf86ba6b5a724bf91cb52feade1158f1fbeb605 |
24-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Actually produce base paths for CastExprs of kind CK_DerivedToBase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102259 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-examples.cpp
|
2559a7045a74679c80376305397a5953d038e1d0 |
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When checking the copy constructor for the optional copy during a reference binding to an rvalue of reference-compatible type, check parameters after the first for complete parameter types and build any required default function arguments. We're effectively simulating the type-checking for a call without building the call itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101705 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p16-cxx0x-no-extra-copy.cpp
cl.init.ref/p5-cxx03-extra-copy.cpp
|
523d46af407f32fc53861e6f068e8076d4fe84a8 |
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
In C++98/03, when binding a reference to an rvalue of reference-compatible type, the implementation is permitted to make a copy of the rvalue (or many such copies, even). However, even though we don't make that copy, we are required to check for the presence of a suitable copy constructor. With this change, we do. Note that in C++0x we are not allowed to make these copies, so we test both dialects separately. Also note the FIXME in one of the C++03 tests, where we are not instantiating default function arguments for the copy constructor we pick (but do not call). The fix is obvious; eliminating the infinite recursion it causes is not. Will address that next. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101704 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p16-cxx0x-no-extra-copy.cpp
cl.init.ref/p5-cxx03-extra-copy.cpp
|
d1fed3e8595a15edd7e14cee166ef90634fcf141 |
13-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
During referencing binding, only consider conversion functions for direct reference binding when the source and target types are not reference-related. Fixes PR6066. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101132 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5.cpp
|
7c2342dd4c9947806842e5aca3d2bb2e542853c9 |
10-Mar-2010 |
John McCall <rjmccall@apple.com> |
When pretty-printing tag types, only print the tag if we're in C (and 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98149 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-examples.cpp
cl.init.ref/p5-var.cpp
6.cpp
|
516a6bc399f1f4595423e80c9d4bc687f870acd1 |
08-Mar-2010 |
Douglas Gregor <dgregor@apple.com> |
In C++98/03, an uninitialized variable that has POD class type will be uninitialized. This seems not to be the case in C++0x, where we still call the (trivial) default constructor for a POD class (!). Previously, we had implemented only the C++0x rules; now we implement both. Fixes PR6536. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97928 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
|
692f85c1d217c8c3cdc06d884ad61b101c75c856 |
26-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Commit Eli's fix for implicit conversions to array type. Fixes PR6264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97202 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5.cpp
|
60c93c9981c467738369702e7aa23fd58c2b6aac |
09-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Migrate the mish-mash of declaration checks in Sema::ActOnUninitializedDecl over to InitializationSequence (with default initialization), eliminating redundancy. More importantly, we now check that a const definition in C++ has an initilizer, which was an #if 0'd code for many, many months. A few other tweaks were needed to get everything working again: - Fix all of the places in the testsuite where we defined const objects without initializers (now that we diagnose this issue) - Teach instantiation of static data members to find the previous declaration, so that we build proper redeclaration chains. Previously, we had the redeclaration chain but built it too late to be useful, because... - Teach instantiation of static data member definitions not to try to check an initializer if a previous declaration already had an initializer. This makes sure that we don't complain about static const data members with in-class initializers and out-of-line definitions. - Move all of the incomplete-type checking logic out of Sema::FinalizeDeclaratorGroup; it makes more sense in ActOnUnitializedDecl. There may still be a few places where we can improve these diagnostics. I'll address that as a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95657 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
|
9db7dbb918ca49f4ee6c181e4917e7b6ec547353 |
31-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework base and member initialization in constructors, with several (necessarily simultaneous) changes: - CXXBaseOrMemberInitializer now contains only a single initializer rather than a set of initialiation arguments + a constructor. The single initializer covers all aspects of initialization, including constructor calls as necessary but also cleanup of temporaries created by the initializer (which we never handled before!). - Rework + simplify code generation for CXXBaseOrMemberInitializers, since we can now just emit the initializer as an initializer. - Switched base and member initialization over to the new initialization code (InitializationSequence), so that it - Improved diagnostics for the new initialization code when initializing bases and members, to match the diagnostics produced by the previous (special-purpose) code. - Simplify the representation of type-checked constructor initializers in templates; instead of keeping the fully-type-checked AST, which is rather hard to undo at template instantiation time, throw away the type-checked AST and store the raw expressions in the AST. This simplifies instantiation, but loses a little but of information in the AST. - When type-checking implicit base or member initializers within a dependent context, don't add the generated initializers into the AST, because they'll look like they were explicit. - Record in CXXConstructExpr when the constructor call is to initialize a base class, so that CodeGen does not have to infer it from context. This ensures that we call the right kind of constructor. There are also a few "opportunity" fixes here that were needed to not regress, for example: - Diagnose default-initialization of a const-qualified class that does not have a user-declared default constructor. We had this diagnostic specifically for bases and members, but missed it for variables. That's fixed now. - When defining the implicit constructors, destructor, and copy-assignment operator, set the CurContext to that constructor when we're defining the body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94952 91177308-0d34-0410-b5e6-96231b3b80d8
6.cpp
|
e14654b3b749421e21a4d917cdbcaf5589c0c6c3 |
29-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
PR5909 had a test case for binding of const, non-volatile references to bitfields. Add it here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94832 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5.cpp
|
ef06e2451c3069569ba543e7b1c5e0de7a257005 |
29-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix reference-binding when we have a reference to const volatile type; previously, we were allowing this to bind to a temporary. Now, we don't; add test-cases and improve diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94831 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-var.cpp
|
220ccbf2c9ef97034cce80561f9f46c4f1f63bc7 |
13-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the reporting of non-viable overload candidates by noting the reason 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93277 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-var.cpp
|
b1622a1fd7b7f4ab8d00d0183d17c90ad25c14e3 |
06-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the diagnostics used to report implicitly-generated class members as parts of overload sets. Also, refer to constructors as 'constructors' rather than functions. Adjust a lot of tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92832 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-var.cpp
|
2d48e7811216b2a2d15dcf7e4be8f73ad48cc60a |
19-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
A CXXExprWithTemporaries expression is an lvalue if its subexpression is an lvalue. Fixes PR5787. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91765 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/basic.cpp
|
18ef5e28a9a2677f8b1dce1fb2638d66e0a1621f |
18-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch the initialization required by return statements over to the new InitializationSequence. This fixes some bugs (e.g., PR5808), changed some diagnostics, and caused more churn than expected. What's new: - InitializationSequence now has a "C conversion sequence" category and step kind, which falls back to - Changed the diagnostics for returns to always have the result type of the function first and the type of the expression second. CheckSingleAssignmentConstraints to peform checking in C. - Improved ASTs for initialization of return values. The ASTs now capture all of the temporaries we need to create, but intentionally do not bind the tempoary that is actually returned, so that it won't get destroyed twice. - Make sure to perform an (elidable!) copy of the class object that is returned from a class. - Fix copy elision in CodeGen to properly see through the subexpressions that occur with elidable copies. - Give "new" its own entity kind; as with return values and thrown objects, we don't bind the expression so we don't call a destructor for it. Note that, with this patch, I've broken returning move-only types in C++0x. We'll fix it later, when we tackle NRVO. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91669 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p5-var.cpp
|
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 |
15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. - 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p4.cpp
cl.init.list/basic.cpp
cl.init.ref/p1.cpp
cl.init.ref/p3.cpp
cl.init.ref/p5-examples.cpp
cl.init.ref/p5-var.cpp
|
d87b61f6398bab21176f73818a8d11ca1c3632c8 |
10-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Move initialization via initializer list over to InitializationSequences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91050 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.list/basic.cpp
|
20093b4bf698f292c664676987541d5103b65b15 |
10-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Reimplement reference initialization (C++ [dcl.init.ref]) using the new notion of an "initialization sequence", which encapsulates the computation of the initialization sequence along with diagnostic information and the capability to turn the computed sequence into an expression. At present, I've only switched one CheckReferenceInit callers over to this new mechanism; more will follow. Aside from (hopefully) being much more true to the standard, the diagnostics provided by this reference-initialization code are a bit better than before. Some examples: p5-var.cpp:54:12: error: non-const lvalue reference to type 'struct Derived' cannot bind to a value of unrelated type 'struct Base' Derived &dr2 = b; // expected-error{{non-const lvalue reference to ... ^ ~ p5-var.cpp:55:9: error: binding of reference to type 'struct Base' to a value of type 'struct Base const' drops qualifiers Base &br3 = bc; // expected-error{{drops qualifiers}} ^ ~~ p5-var.cpp:57:15: error: ambiguous conversion from derived class 'struct Diamond' to base class 'struct Base': struct Diamond -> struct Derived -> struct Base struct Diamond -> struct Derived2 -> struct Base Base &br5 = diamond; // expected-error{{ambiguous conversion from ... ^~~~~~~ p5-var.cpp:59:9: error: non-const lvalue reference to type 'long' cannot bind to a value of unrelated type 'int' long &lr = i; // expected-error{{non-const lvalue reference to type ... ^ ~ p5-var.cpp:74:9: error: non-const lvalue reference to type 'struct Base' cannot bind to a temporary of type 'struct Base' Base &br1 = Base(); // expected-error{{non-const lvalue reference to ... ^ ~~~~~~ p5-var.cpp:102:9: error: non-const reference cannot bind to bit-field 'i' int & ir1 = (ib.i); // expected-error{{non-const reference cannot ... ^ ~~~~~~ p5-var.cpp:98:7: note: bit-field is declared here int i : 17; // expected-note{{bit-field is declared here}} ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90992 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p1.cpp
cl.init.ref/p3.cpp
cl.init.ref/p5-examples.cpp
cl.init.ref/p5-var.cpp
|
fa184a46526eca735e08a483bba56a5d69fc4b5b |
07-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove empty test cases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90749 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p1.cpp
cl.init.ref/p3.cpp
cl.init.ref/p5-var.cpp
|
d490f953e812a9bb1729637cc70a6db7d997ced0 |
06-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
PointerUnion == PointerUnion does not do what I thought it did. Also, fix a thinko in a PointerUnion::get call. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90719 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.ref/p1.cpp
cl.init.ref/p3.cpp
cl.init.ref/p5-var.cpp
|
d75191f0d100b596281f99ea8f2f0a0d0560d969 |
17-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
In some dependent contexts, incomplete array types persist into FinalizeDeclaratorGroup. Don't require them to have a complete type. This allows us to compile Hello World with the Apache stdcxx library. If you don't use endl, it even links and runs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84347 91177308-0d34-0410-b5e6-96231b3b80d8
cl.init.aggr/p4.cpp
|