3c3af140263c3761665aa2c0aac4266115f5caf1 |
|
01-Jul-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR16502: Fix a dumb bug where we might look past the last initializer in an InitListExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/decl-init-ref.cpp
|
6242a45ca50586ed3f363d4ac7422e07092e4d96 |
|
31-May-2013 |
Richard Smith <richard-llvm@metafoo.co.uk> |
Fix handling of braced-init-list as reference initializer within aggregate initialization. Previously we would incorrectly require an extra set of braces around such initializers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/decl-init-ref.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
/external/clang/test/SemaCXX/decl-init-ref.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
/external/clang/test/SemaCXX/decl-init-ref.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
/external/clang/test/SemaCXX/decl-init-ref.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
/external/clang/test/SemaCXX/decl-init-ref.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
/external/clang/test/SemaCXX/decl-init-ref.cpp
|
e180ed2f014d49587bc49f09313cabf38080d6fa |
|
09-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix PR number in test case git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/decl-init-ref.cpp
|
2c79281ef66cb5001f0ebadf6b317250c21a1c01 |
|
09-Feb-2010 |
Douglas Gregor <dgregor@apple.com> |
Be more careful when checking initializer lists that involve reference types; we don't want to give an expression reference type. Fixes PR6177. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/decl-init-ref.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
/external/clang/test/SemaCXX/decl-init-ref.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
/external/clang/test/SemaCXX/decl-init-ref.cpp
|
52bb5d2a1474460707e5ca11656b2749a7a33a82 |
|
16-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
In Sema::CheckInitializerTypes, replace a use of CheckReferenceInit with an InitializationSequence git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/decl-init-ref.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
/external/clang/test/SemaCXX/decl-init-ref.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
/external/clang/test/SemaCXX/decl-init-ref.cpp
|
27687cf7f6fea50e592f653549a33f07bf5c0667 |
|
12-Oct-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
If built-in operators could not be selected because of ambiguity in user-defined type conversions, issue list of ambiguites in addition to the diagnostic. So, clang now issues the following: b.cpp:19:19: error: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'struct C1' int i = c1->*pmf; ~~^ b.cpp:19:19: note: because of ambiguity in conversion of 'struct C1' to 'struct E *' b.cpp:5:5: note: candidate function operator E*(); ^ b.cpp:11:5: note: candidate function operator E*(); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/decl-init-ref.cpp
|
893f955321cdf49dd0ceaf4ff821632e9b265000 |
|
30-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue good diagnostics when initializing a refernce type with a bad initializer. Fixes pr4274. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/decl-init-ref.cpp
|
51bebc83e74001ed0412d82aadae9eb247fee2d4 |
|
23-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch addresses a few issues related to 8.5.3 [dcl.init.ref] It uses a recent API to find inherited conversion functions to do the initializer to reference lvalue conversion (and removes a FIXME). It issues the ambiguity diagnostics when multiple conversions are found. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/decl-init-ref.cpp
|