6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 |
|
29-May-2014 |
Stephen Hines <srhines@google.com> |
Update Clang for 3.5 rebase (r209713). Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
3f93d4ce2ba550f1dac4ae544ffe1349e42f708a |
|
28-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Improve error for assignment to incomplete class. PR7681. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
fcb5a251e9c0c8c2d54323677d4f2ba5219301d0 |
|
12-Jul-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Fix crash on zero-argument assignment operator. Make sure we don't crash when checking whether an assignment operator without any arguments is a special member. <rdar://problem/14397774>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
c2fe81898b1b3b948791ca4ababd3d495601f22a |
|
04-Jun-2013 |
David Blaikie <dblaikie@gmail.com> |
Bound member function diagnostic - suggest no-args calls and note overload candidates Still missing cases for templates, but this is a step in the right direction. Also omits suggestions that would be ambiguous (eg: void func(int = 0); + void func(float = 0); func;) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
16b0a310f5649d25849d84409841f401e7a9a0e5 |
|
03-Jun-2013 |
David Blaikie <dblaikie@gmail.com> |
UnresolvedMemberExpr should have an expr location of the member (not the base) This matches the behavior of MemberExpr and makes diagnostics such as "reference to non-static member function must be called" more legible in the case that the base & member are split over multiple lines (prior to this change the diagnostic would point to the base, not the member - making it very unclear in chained multi-line builder-style calls) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
7a534b94138ef2ad1a75b26b3b5bf1aa948d4121 |
|
04-Mar-2013 |
John McCall <rjmccall@apple.com> |
Perform non-overload placeholder conversions on the operands to a subscript operator. rdar://13332183 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
8788491e10a24e70b7282f312c22d74ac478c899 |
|
17-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Correctly resolve an overload set passed to an overloaded operator=. PR11784. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.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
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
5acb0c98b363400f6ade0ae7250f0102224e806b |
|
17-Oct-2011 |
John McCall <rjmccall@apple.com> |
Teach the ARC compiler to not require __bridge casts when passing/receiving CF objects at +0 to/from Objective-C methods or audited C functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
6dbba4fc128e2e2f5b26be996392bd32c0707f13 |
|
12-Oct-2011 |
John McCall <rjmccall@apple.com> |
Catch placeholder types in DefaultLvalueConversion and DefaultFunctionArrayLvalueConversion. To prevent significant regression for should-this-be-a-call fixits, and to repair some such regression from the introduction of bound member placeholders, make those placeholder checks try to build calls appropriately. Harden the build-a-call logic while we're at it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
9b10683a3f222d8dc6e139073ca96b97b439747b |
|
17-Aug-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Whitelist operator== and operator!= as valid for unused value warnings, even when overloaded and user-defined. These operators are both more valuable to warn on (due to likely typos) and extremely unlikely to be reasonable for use to trigger side-effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
439d3c3d76f858df5f25239f2a70f04312eacb5b |
|
05-May-2011 |
Douglas Gregor <dgregor@apple.com> |
With invalid overloaded operators, we can get into funny cases where the overloading of member and non-member functions results in arity mismatches that don't fit well into our overload-printing scheme. This only happens for invalid code (which breaks the arity invariants for these cases), so just suppress the diagnostic rather than inventing anything new. Fixes <rdar://problem/9222009>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
864c041e118155c2b1ce0ba36942a3da5a4a055e |
|
26-Apr-2011 |
John McCall <rjmccall@apple.com> |
Make yet another placeholder type, this one marking that an expression is a bound member function, i.e. something of the form 'x.f' where 'f' is a non-static member function. Diagnose this in the general case. Some of the new diagnostics are probably worse than the old ones, but we now get this right much more universally, and there's certainly room for improvement in the diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 |
|
07-Apr-2011 |
John McCall <rjmccall@apple.com> |
Basic, untested implementation for an "unknown any" type requested by LLDB. The idea is that you can create a VarDecl with an unknown type, or a FunctionDecl with an unknown return type, and it will still be valid to access that object as long as you explicitly cast it at every use. I'm still going back and forth about how I want to test this effectively, but I wanted to go ahead and provide a skeletal implementation for the LLDB folks' benefit and because it also improves some diagnostic goodness for placeholder expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
60b3e38d421cab497de1c62c06be6a6a5f321edf |
|
16-Mar-2011 |
Douglas Gregor <dgregor@apple.com> |
Don't indescriminately print overload candidates when we have invalid operands to a binary expression; it doesn't make sense in all contexts. The right answer would be to see if the user forgot at (). Fixes <rdar://problem/9136502>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
543cb655b174087f6c2d22009934c9fed6c32114 |
|
17-Feb-2011 |
Chandler Carruth <chandlerc@gmail.com> |
Implement -Wenum-compare, which warns when comparing two enums of different types. We omit the warning when the enum types are anonymous. Unlike GCC, this warning does not distinguish between C++ and C/ObjC for controling whether it is on by default, it is always on by default. Original patch contributed by Richard Trieu (@ Google), I fixed some style issues, and cleaned it up for submission. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
ae2cf767de457df939d07c44b162de5fe0b5e607 |
|
13-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When complaining about ambiguous overload resolution for a unary or binary operator, provide the types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
1b2ad2fd9e2d5352144481aa1fd995d333d9adc9 |
|
20-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Revert r114316, -Wunused-value enabled by default was intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
6dff2288a8054bdbc97217568e5831bcce809db8 |
|
19-Sep-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make -Wunused-value off by default, matching GCC. Fixes rdar://7126194. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.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/overloaded-operator.cpp
|
6d82ef45d624da4fc88a2fbf7dd1dc144aeb05b0 |
|
08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Bowing to popular demand, reduce the "comma at end of enumerator list" ExtWarn to an Extension. Let the broken code propagate! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
fe2dd6ceeeb31a7c681b2873a8459c5de5d1a3e9 |
|
02-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
By default, warn about commas at the end of an enumerator list in C++/C89. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
25973455aed1cdc9c40b208c792b5db4f8f1297d |
|
30-Jun-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix rdar://8139785 "implement warning on dead expression in comma operator" As a bonus, fix the warning for || and && operators; it was emitted even if one of the operands had side effects, e.g: x || test_logical_foo1(); emitted a bogus "expression result unused" for 'x'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
d64fdd0c056f1e50488519254f852fa8050f0470 |
|
08-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Warn about comparisons between arrays and improve self-comparison warnings, from Troy Straszheim! Fixes PR6163. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
6bf356fb8f769575d5e6e54a3bf81436ddec106a |
|
25-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
When performing name lookup for an operator name, be sure to look through using declarations. Fixes ~18 tests in Boost.Fusion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
d1aa800a19c956c72319025dd302ae78ed47f9ee |
|
23-Apr-2010 |
Anders Carlsson <andersca@mac.com> |
Change the 'declared at' diagnostic to say 'declared here'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
7002f4c03c2d0544f4e8bea8d3a5636519081e35 |
|
09-Apr-2010 |
John McCall <rjmccall@apple.com> |
Turn access control on by default in -cc1. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.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/overloaded-operator.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
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
9007328043c9c17029e07c99d89d0488fb3da3a7 |
|
11-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When computing surrogates for calls to a value of object type, look for all visible conversion functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
1eb3e1003d5cda4d47f54321d81d678c26981e7a |
|
07-Jan-2010 |
John McCall <rjmccall@apple.com> |
Improve the lead diagnostic for C++ object subscript expressions with no viable overloads. Use a different message when the class provides no operator[] overloads at all; use it for operator(), too. Partially addresses PR 5900. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.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/overloaded-operator.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/overloaded-operator.cpp
|
275c2b47a1dc200d6b55dd867bdfeb7a91b8d876 |
|
19-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Do overload resolution for compound assignment even if only the RHS is overloadable. Compound assignment may be overloaded as a non-member, and anyway the overload resolution is necessary because it triggers implicit (used-defined) conversions. Fixes PR5512, but not really the deeper issues lurking. Those are standard defects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
a9efadada0430493a4d68b34b2e76580d0fd8f10 |
|
18-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Don't generate superfluous and ambiguous built-in candidates for multi-level array subscript and arithmetic. Fixes PR5546. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
593564ba94ff854b7a410a4ca17ad34a90c5b761 |
|
15-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
When looking for operator() to type-check a call to an object of class type, use full qualified name lookup rather than the poking the declaration context directly. This makes sure that we see operator()'s in superclasses. Also, move the complete-type check before this name lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
a65b55142bd8e8c94f371bb056d8f58f11de220f |
|
05-Nov-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When collecting types for built-in candidates, make arrays decay to pointers. Otherwise, subscripting an array leads to no candidates at all. Fixes PR5360. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
644be853b87cae94fcabaf309a5e482a8c291fb9 |
|
23-Oct-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Apply the special enum restrictions from [over.match.oper]p3b2 in argument-dependent lookup too. This fixes PR5244. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
54e14c4db764c0636160d26c5bbf491637c83a76 |
|
23-Oct-2009 |
John McCall <rjmccall@apple.com> |
When building types from declarators, instead of building two types (one for the DeclaratorInfo, one for semantic analysis), just build a single type whose canonical type will reflect the semantic analysis (assuming the type is well-formed, of course). To make that work, make a few changes to the type system: * allow the nominal pointee type of a reference type to be a (possibly sugared) reference type. Also, preserve the original spelling of the reference type. Both of these can be ignored on canonical reference types. * Remove ObjCProtocolListType and preserve the associated source information on the various ObjC TypeLocs. Preserve the spelling of protocol lists except in the canonical form. * Preserve some level of source type structure on parameter types, but canonicalize on the canonical function type. This is still a WIP. Drops code size, makes strides towards accurate source location representation, slight (~1.7%) progression on Cocoa.h because of complexity drop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
3307475eb0dd6e5d88be9392ea8247d0b6b812df |
|
30-Sep-2009 |
Douglas Gregor <dgregor@apple.com> |
When overload resolution fails for an overloaded operator, show the overload candidates (but not the built-in ones). We still rely on the underlying built-in semantic analysis to produce the initial diagnostic, then print the candidates following that diagnostic. One side advantage of this approach is that we can perform more validation of C++'s operator overloading with built-in candidates vs. the semantic analysis for those built-in operators: when there are no viable candidates, we know to expect an error from the built-in operator handling code. Otherwise, we are not modeling the built-in semantics properly within operator overloading. This is checked as: assert(Result.isInvalid() && "C++ binary operator overloading is missing candidates!"); if (Result.isInvalid()) PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false); The assert() catches cases where we're wrong in a +Asserts build. The "if" makes sure that, if this happens in a production clang (-Asserts), we still build the proper built-in operator and continue on our merry way. This is effectively what happened before this change, but we've added the assert() to catch more flies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
7a8233a69103a6eeb6602bd4a17fb5d9b7bacaad |
|
30-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
Note location of operators caused the circularity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
c4e8321deb2bd83f734a09749460050f40ec51d1 |
|
30-Sep-2009 |
John McCall <rjmccall@apple.com> |
Detect operator-> chains of arbitrary length. Use a terrible data structure to strike fear into the hearts of CPUs everywhere. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
4a4e345a8bf749b5462a127ecfb1f90d4a9d6ba7 |
|
30-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
self-referecing operator '->' member function was causing infinit recursion. This patch fixes it. [13.3.1.2]-p2 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
7605618e3b0e7c3855ca804dbe0692a89835c71a |
|
29-Sep-2009 |
Fariborz Jahanian <fjahanian@apple.com> |
13.1-p3 Overloadable declarations Parameter declarations that differ only in the presence or absence of const and/or volatile are equivalent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
8a5ae2401645788144c0ae769a2fb899866801f5 |
|
28-Aug-2009 |
Douglas Gregor <dgregor@apple.com> |
When looking for overloaded member operators, make sure to instantiate class template specializations (when possible) and look into base classes. Thanks to Eli for the test case! FIXME -=1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
d249e1d1f1498b81314459ceda19d6ff25c278ad |
|
29-May-2009 |
Douglas Gregor <dgregor@apple.com> |
Create a new PrintingPolicy class, which we pass down through the AST printing logic to help customize the output. For now, we use this rather than a special flag to suppress the "struct" when printing "struct X" and to print the Boolean type as "bool" in C++ but "_Bool" in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.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/overloaded-operator.cpp
|
7c80bd64032e610c0dbd74fc0ef6ea334447f2fd |
|
17-Mar-2009 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
f680a0fe2dcab32b59fe6fdf71145b5313c40950 |
|
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Bring operator name lookup (as required for C++ operator overloading) into the general name-lookup fold. This cleans up some ugly, not-quite-working code in the handling of operator overloading. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
fa047648b2a5502d7eef117adb4777eb9a63baa6 |
|
04-Feb-2009 |
Douglas Gregor <dgregor@apple.com> |
Initial implementation of argument dependent lookup (a.k.a. ADL, a.k.a. Koenig lookup) in C++. Most of the pieces are in place, but for two: - In an unqualified call g(x), even if the name does not refer to anything in the current scope, we can still find functions named "g" based on ADL. We don't yet have this ability. - ADL will need updating for friend functions and templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
518fda1d121dcba3ad7276f5e9a94f733f6e5ecd |
|
13-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Fix argument-passing bugs in a call to object git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
e63ef48b76b84e7ffb0a38fbf475ddea5c48adb4 |
|
13-Jan-2009 |
Douglas Gregor <dgregor@apple.com> |
Make sure we don't name a constructor or destructor with a qualified type. It leads to very weird errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
e4c452c4c7b9124fe94a96f559ff077d59cdf996 |
|
22-Nov-2008 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Implement a %plural modifier for complex plural forms in diagnostics. Use it in the overload diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
1ca50c3f541dd637063b9d186a7ea193e3440a48 |
|
21-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Fix overloading of non-static member functions that differ in their cv-qualifiers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
621b3933e570792810386b891264c78e3bd7b169 |
|
21-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Don't print canonical types in overloading-related diagnostics git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
8ba10745f525467e91bbaec21044bf4d9017a988 |
|
20-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Add support for overloaded operator-> when used in a member access expression (smart_ptr->mem). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
9ebae31a97f862771dc5f6bd4923dd97131fed71 |
|
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Beef up the test for function call operators slightly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
106c6eb3f1380bfe243a62d8f0f8bce6a7c8d5c6 |
|
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Implement the rest of C++ [over.call.object], which permits the object being called to be converted to a reference-to-function, pointer-to-function, or reference-to-pointer-to-function. This is done through "surrogate" candidate functions that model the conversions from the object to the function (reference/pointer) and the conversions in the arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
f9eb905197e44ed5634205512074993f6f40470d |
|
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Support for calling overloaded function call operators (operator()) with function call syntax, e.g., Functor f; f(x, y); This is the easy part of handling calls to objects of class type (C++ [over.call.object]). The hard part (coping with conversions from f to function pointer or reference types) will come later. Nobody uses that stuff anyway, right? :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
337c6b9f5d502dc1c5acea628bf7bf9e828efc0e |
|
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Support overloading of the subscript operator[], including support for built-in operator candidates. Test overloading of '&' and ','. In C++, a comma expression is an lvalue if its right-hand subexpression is an lvalue. Update Expr::isLvalue accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
74253736184c0717a0649922551bf9d8b6815651 |
|
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Added operator overloading for unary operators, post-increment, and post-decrement, including support for generating all of the built-in operator candidates for these operators. C++ and C have different rules for the arguments to the builtin unary '+' and '-'. Implemented both variants in Sema::ActOnUnaryOp. In C++, pre-increment and pre-decrement return lvalues. Update Expr::isLvalue accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
447b69e55e1098d8df46dd99f171bfaace9ff8a0 |
|
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Built-in equality and relational operators have return type "bool" in C++, not "int". Fix a typo in the promotion of enumeration types that was causing some integral promotions to look like integral conversions (leading to extra ambiguities in overload resolution). Check for "acceptable" overloaded operators based on the types of the arguments. This is a somewhat odd check that is specified by the standard, but I can't see why it actually matters: the overload candidates it suppresses don't seem like they would ever be picked as the best candidates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
96176b3575823ea996c6140380dd17d9240c9766 |
|
19-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Partial expansion of C++ operator overloading (for binary operators) to support operators defined as member functions, e.g., struct X { bool operator==(X&); }; Overloading with non-member operators is supported, and the special rules for the implicit object parameter (e.g., the ability for a non-const *this to bind to an rvalue) are implemented. This change also refactors and generalizes the code for adding overload candidates for overloaded operator calls (C++ [over.match.expr]), both to match the rules more exactly (name lookup of non-member operators actually ignores member operators) and to make this routine more reusable for the other overloaded operators. Testing for the initialization of the implicit object parameter is very light. More tests will come when we get support for calling member functions directly (e.g., o.m(a1, a2)). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|
eaebc75ef6ff21fbc9f25ab4175cba465e4e0e43 |
|
07-Nov-2008 |
Douglas Gregor <dgregor@apple.com> |
Initial, rudimentary implementation of operator overloading for binary operators. For example, one can now write "x + y" where x or y is a class or enumeration type, and Clang will perform overload resolution for "+" based on the overloaded operators it finds. The other kinds of overloadable operators in C++ will follow this same approach. Three major issues remain: 1) We don't find member operators 2) Since we don't have user-defined conversion operators, we can't call any of the built-in overloaded operators in C++ [over.built]. 3) Once we've done the semantic checks, we drop the overloaded operator on the floor; it doesn't get into the AST at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/SemaCXX/overloaded-operator.cpp
|