6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/test/SemaCXX/conversion-function.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/SemaCXX/conversion-function.cpp
|
ef4579cda09b73e3d4d98af48201da25adc29326 |
|
06-Aug-2013 |
Larisse Voufo <lvoufo@google.com> |
Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
4cde94a04694d5d24dc9e3bf6c5fa3403629838e |
|
20-Jun-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Clean up warning and add a test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
f108c63ccc576fe6a3ca08399dbcec574b089ea8 |
|
06-May-2012 |
Richard Smith <richard-llvm@metafoo.co.uk> |
A conversion operator in a base class shouldn't hide another conversion operator in the same class, even if they convert to the same type. Fixes PR12712. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
87c1f1f7c400deb2eb40d4599a40006072fb948c |
|
14-Jul-2011 |
Richard Smith <richard-llvm@metafoo.co.uk> |
PR8800: When building a conversion to A& using a member operatorA&(), do not require A to be a complete type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
5453d93ab8668f2d9d0bc02182695b02d207e32d |
|
06-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
When performing template argument deduction for a non-reference conversion function when we're binding the result to a reference, drop cv-qualifiers on the type we're referring to, since we should be deducing a type that can be adjusted (via cv-qualification) to the requested type. Fixes PR9336, and the remaining Boost.Assign failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
8fcc516a5d5b2fec0023a9dced29285a38b95355 |
|
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing overload resolution, only compare the final conversion sequences for two conversion functions when in fact we are in the text of initialization by a user-defined conversion sequences. Fixes PR8034. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
da0fd9a7faa8b8a666e3c31ff0b5897e0f73f892 |
|
12-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Don't complain about useless user-defined conversion functions when they were instantiated from a template. In template metaprogramming, stuff happens. Fixes PR8065. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.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/conversion-function.cpp
|
06ebc98ff017fadfaed515bc06f50ce94ca468d6 |
|
19-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
We don't actually need to check the implicit object argument's conversion a second time for a conversion candidate (with the real acting context), because the only problems we would find are access or ambiguity issues that won't be diagnosed until we pick this candidate. Add a test case to prove it to myself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
c774b2f66478008196f497a227d5ab88ea157582 |
|
19-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Properly implement the part of C++ [over.match.funcs]p4 that treats conversion functions as if their acting context were the class that we're converting from (the implicit object argument's type). Retroactively tweaking the implicit conversion sequence, as we were trying to do before, breaks the invariants of that implicit conversion sequence (e.g., the types and conversions don't match up). Fixes <rdar://problem/8018274>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
4e938f57bdd68b3716a4476acf151cdd27bb8a50 |
|
18-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
There is no pointer conversion between to similar types (i.e., same type ignoring cv-qualifiers). These are qualification conversions. Fixes PR7934. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
604eb65686590f73551d4ea608b174d2244cdd0f |
|
11-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of user-defined conversions when computing implicit conversion sequences. In particular, model the "standard conversion" from a class to its own type (or a base type) directly as a standard conversion in the normal path *without* trying to determine if there is a valid copy constructor. This appears to match the intent of C++ [over.best.ics]p6 and more closely matches GCC and EDG. As part of this, model non-lvalue reference initialization via user-defined conversion in overloading the same way we handle it in InitializationSequence, separating the "general user-defined conversion" and "conversion to compatible class type" cases. The churn in the overload-call-copycon.cpp test case is because the test case was originally wrong; it assumed that we should do more checking for copy constructors that we actually should, which affected overload resolution. Fixes PR7055. Bootstrapped okay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
b92caa5aa6f428ab1bf1a71bea5a35e15c309d8c |
|
23-Jul-2010 |
John McCall <rjmccall@apple.com> |
Ted pointed out that this test case could be using access control instead of __attribute__((unavailable)). I've done so, but unfortunately there's still a case of redundant diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
d1a272204cef9304df3930d94f66713b05db27d6 |
|
24-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When we are performing copy initialization of a class type via its copy constructor, suppress user-defined conversions on the argument. Otherwise, we can end up in a recursion loop where the bind the argument of the copy constructor to another copy constructor call, whose argument is then a copy constructor call... Found by Boost.Regex which, alas, still isn't building. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
3fbaf3e5d524bfff219d1e3e9ac4801a8411590f |
|
18-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of user-defined conversions as part of overload resolution. There are two sources of problems involving user-defined conversions that this change eliminates, along with providing simpler interfaces for checking implicit conversions: - It eliminates a case of infinite recursion found in Boost. - It eliminates the search for the constructor needed to copy a temporary generated by an implicit conversion from overload resolution. Overload resolution assumes that, if it gets a value of the parameter's class type (or a derived class thereof), there is a way to copy if... even if there isn't. We now model this properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
a3f8137d9f7cd1af7a6cbe736b9419f7eb99e86c |
|
13-Apr-2010 |
John McCall <rjmccall@apple.com> |
Diagnose declarations of conversion functions with declarators other than '()'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
05baacbfd67017b2724f3e0503fd23609f5d32bc |
|
13-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve source-location information for C++ conversion functions, by copying the type location information from the conversion-type-id into the type location information for the function type. Do something similar for constructors and destructors, by giving their "void" return type source-location information. In all of these cases, we previously left this type-source information uninitialized, which led to various unfortunate crashes. We still aren't tracking good source-location information for the actual names. That's PR6357. John, please check my sanity on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.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/conversion-function.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/conversion-function.cpp
|
7abfbdbc97ad8e7f340789f751df1e32b10118b4 |
|
19-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Switch more of Sema::CheckInitializerTypes over to InitializationSequence. Specially, switch initialization of a C++ class type (either copy- or direct-initialization). Also, make sure that we create an elidable copy-construction when performing copy initialization of a C++ class variable. Fixes PR5826. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.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/conversion-function.cpp
|
578b69b186d9cba0a6ae1dd7f4c04cd6a49f0aac |
|
16-Dec-2009 |
John McCall <rjmccall@apple.com> |
Introduce a centralized routine in Sema for diagnosing failed lookups (when used as expressions). In dependent contexts, try to recover by doing a lookup in previously-dependent base classes. We get better diagnostics out, but unfortunately the recovery fails: we need to turn it into a method call expression, not a bare call expression. Thus this is still a WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.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/conversion-function.cpp
|
79b680ea869983d62b84a9175eeb6b6efb376326 |
|
13-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When performing copy initialization (= "implicit conversion", here) to a class type from itself or a derived class thereof, enumerate constructors and permit user-defined conversions to the arguments of those constructors. This fixes the wacky implicit conversion sequence used in std::auto_ptr's lame emulation of move semantics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
78cf9a26d27349a7b9ae83a0b7d5451571b9b41e |
|
15-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Issue a good diagnostics when attempt to select a type convesion function results in ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
b191e2dda9f4dc033cb21f9625a78fe80d4ac105 |
|
14-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Used visible conversion function api to do overload resolution of type conversion functions in base and current class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
2c59d3c19715cb318a0a5939c735b8345d14d281 |
|
13-Sep-2009 |
Anders Carlsson <andersca@mac.com> |
Perform the C++ specific semantic checks of a function declaration after it's been merged with the previous declaration. This ensures that getPreviousDecl() will have the right value when ActOnConversionDeclarator is called. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
6e4750188e836e119f8605cbd34023d0a3b18011 |
|
25-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
change a couple more c++ sema methods to be based on isinvalid bits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
3201f6beec688ab9fe8750527e28f52d5420e22d |
|
16-Apr-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Fix a crash bug when comparing overload quality of conversion operators with conversion constructors. Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself. Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere. Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression. And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 |
|
24-Mar-2009 |
Daniel Dunbar <daniel@zuster.org> |
Rename clang to clang-cc. Tests and drivers updated, still need to shuffle dirs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
17330019f05966762bc952840ef1926b9becb145 |
|
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix our semantic analysis of unqualified-id '(' in C++. The unqualified-id might not refer to any declaration in our current scope, but declarations by that name might be found via argument-dependent lookup. We now do so properly. As part of this change, CXXDependentNameExpr, which was previously designed to express the unqualified-id in the above constructor within templates, has become UnresolvedFunctionNameExpr, which does effectively the same thing but will work for both templates and non-templates. Additionally, we cope with all unqualified-ids, since ADL also applies in cases like operator+(x, y) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
5f4a6829dc58cab2f76e2b98492859aa3b91e3f2 |
|
24-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Make all the 'redefinition' diagnostics more consistent, and make the "previously defined here" diagnostics all notes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
10c4262aeb5212375e3fa64e76887bd9bcc79924 |
|
18-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
As threatened previously: consolidate name lookup and the creation of DeclRefExprs and BlockDeclRefExprs into a single function Sema::ActOnDeclarationNameExpr, eliminating a bunch of duplicate lookup-name-and-check-the-result code. Note that we still have the three parser entry points for identifiers, operator-function-ids, and conversion-function-ids, since the parser doesn't (and shouldn't) know about DeclarationNames. This is a Good Thing (TM), and there will be more entrypoints coming (e.g., for C++ pseudo-destructor expressions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
10bd36882406cdf4805e35add1ce2f11ab9ae152 |
|
17-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Eliminate all of the placeholder identifiers used for constructors, destructors, and conversion functions. The placeholders were used to work around the fact that the parser and some of Sema really wanted declarators to have simple identifiers; now, the code that deals with declarators will use DeclarationNames. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
2def48394f6d48bde0dec2b514193c2b533265b5 |
|
17-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Updated IdentifierResolver to deal with DeclarationNames. The names of C++ constructors, destructors, and conversion functions now have a FETokenInfo field that IdentifierResolver can access, so that these special names are handled just like ordinary identifiers. A few other Sema routines now use DeclarationNames instead of IdentifierInfo*'s. To validate this design, this code also implements parsing and semantic analysis for id-expressions that name conversion functions, e.g., return operator bool(); The new parser action ActOnConversionFunctionExpr takes the result of parsing "operator type-id" and turning it into an expression, using the IdentifierResolver with the DeclarationName of the conversion function. ActOnDeclarator pushes those conversion function names into scope so that the IdentifierResolver can find them, of course. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|
2f1bc5285ccd40f411af5f5993f013e27e74ab78 |
|
07-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Parsing, ASTs, and semantic analysis for the declaration of conversion functions in C++, e.g., struct X { operator bool() const; }; Note that these conversions don't actually do anything, since we don't yet have the ability to use them for implicit or explicit conversions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/conversion-function.cpp
|