- Oct 05, 2010
-
-
Argyrios Kyrtzidis authored
llvm-svn: 115590
-
- Sep 05, 2010
-
-
Chris Lattner authored
which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. llvm-svn: 113090
-
- Jul 01, 2010
-
-
Douglas Gregor authored
pointer" diagnostic to handle references, too. llvm-svn: 107372
-
Douglas Gregor authored
require a base-to-derived pointer conversion. llvm-svn: 107349
-
- Jun 23, 2010
-
-
Douglas Gregor authored
literals. Fixes PR7488. llvm-svn: 106607
-
- Jun 09, 2010
-
-
Douglas Gregor authored
being a subsequence of another standard conversion sequence. Instead of requiring exact type equality for the second conversion step, require type *similarity*, which is type equality with cv-qualifiers removed at all levels. This appears to match the behavior of EDG and VC++ (albeit not GCC), and feels more intuitive. Big thanks to John for the line of reasoning that supports this change: since cv-qualifiers are orthogonal to the second conversion step, we should ignore them in the type comparison. llvm-svn: 105678
-
- May 25, 2010
-
-
Douglas Gregor authored
derived-to-base conversion on a pointer. Fixes PR7224. llvm-svn: 104607
-
- May 24, 2010
-
-
Douglas Gregor authored
conversion. Fixes PR7095. llvm-svn: 104476
-
- Apr 24, 2010
-
-
Douglas Gregor authored
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. llvm-svn: 102269
-
- Apr 22, 2010
-
-
Douglas Gregor authored
method parameter, provide a note pointing at the parameter itself so the user does not have to manually look for the function/method being called and match up parameters to arguments. For example, we now get: t.c:4:5: warning: incompatible pointer types passing 'long *' to parameter of type 'int *' [-pedantic] f(long_ptr); ^~~~~~~~ t.c:1:13: note: passing argument to parameter 'x' here void f(int *x); ^ llvm-svn: 102038
-
- Apr 18, 2010
-
-
Douglas Gregor authored
resolution ([over.ics.ref]), we take some shortcuts required by the standard that effectively permit binding of a const volatile reference to an rvalue. We have to treat lightly here to avoid infinite recursion. Fixes PR6177. llvm-svn: 101712
-
- Apr 13, 2010
-
-
Douglas Gregor authored
return a NULL expression; return either an error or a proper expression. Fixes PR6078. llvm-svn: 101133
-
- Mar 08, 2010
-
-
Douglas Gregor authored
that is not reference-related (because it requires another implicit conversion to which we can find). Fixes PR6483. llvm-svn: 97922
-
- Feb 28, 2010
-
-
Douglas Gregor authored
llvm-svn: 97404
-
- Feb 25, 2010
-
-
Douglas Gregor authored
binding and a copy-construction. Fixes an overloading problem in the Clang-on-Clang build. llvm-svn: 97161
-
John McCall authored
skip the object argument conversion if either of the candidates didn't initialize it. Fixes PR6421, which is such a very straightforward extension of PR6398 that I should have worked it into the last test case (and therefore caught it then). Ah well. llvm-svn: 97135
-
John McCall authored
When diagnosing bad conversions, skip the conversion for ignored object arguments. Fixes PR 6398. llvm-svn: 97090
-
- Jan 27, 2010
-
-
Douglas Gregor authored
sequences, where we would occasionally determine (incorrectly) that one standard conversion sequence was a proper subset of another when, in fact, they contained completely incomparable conversions. This change records the types in each step within a standard conversion sequence, so that we can check the specific comparison types to determine when one sequence is a proper subset of the other. Fixes this testcase (thanks, Anders!), which was distilled from PR6095 (also thanks to Anders). llvm-svn: 94660
-
- Jan 23, 2010
-
-
John McCall authored
incomplete type (or a pointer/reference to such). The causes of this problem are different enough to justify a different "design" for the diagnostic. Most notably, it doesn't give an operand index: it's usually pretty obvious which operand is the problem, it adds a lot of clutter to mention it, and the fix is usually in a different part of the file anyway. This is yet another diagnostic that should really have an analogue in the non-overloaded case --- which should be much easier to write because of the weaker space constraints. llvm-svn: 94303
-
- Jan 14, 2010
-
-
John McCall authored
about 'object argument' vs. 'nth argument'. llvm-svn: 93395
-
- Jan 13, 2010
-
-
John McCall authored
to be considering user-defined conversions in the first place. Doug, please review; I'm not sure what we should be doing if we see a real ambiguity in selecting a copy constructor when otherwise suppressing user-defined conversions. Fixes PR6014. llvm-svn: 93365
-
John McCall authored
information to feed diagnostics instead of regenerating it. Much room for improvement here, but fixes some unfortunate problems reporting on method calls. llvm-svn: 93316
-
John McCall authored
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. llvm-svn: 93277
-
- Jan 12, 2010
-
-
John McCall authored
fidelity with which we note them as functions/constructors and templates thereof. Also will be helpful when reporting bad conversions (next). llvm-svn: 93224
-
- Dec 15, 2009
-
-
Daniel Dunbar authored
- This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
-
- Dec 13, 2009
-
-
Douglas Gregor authored
from a PointerType. Fixes PR5756. llvm-svn: 91253
-
- Dec 09, 2009
-
-
John McCall authored
"integer promotion" type associated with an enum decl, and use this type to determine which type to promote to. This type obeys C++ [conv.prom]p2 and is therefore generally signed unless the range of the enumerators forces it to be unsigned. Kills off a lot of false positives from -Wsign-compare in C++, addressing rdar://7455616 llvm-svn: 90965
-
- Nov 06, 2009
-
-
Douglas Gregor authored
implicit conversion sequence, check the validity of this conversion and then perform it. llvm-svn: 86210
-
- Mar 24, 2009
-
-
Daniel Dunbar authored
Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
-
- Dec 12, 2008
-
-
Douglas Gregor authored
the type of the enumeration once the enumeration has been defined. Fix the overloading test-case to properly create enums that promote the way we want them to. Implement C++0x promotions from enumeration types to long long/unsigned long long. We're using these promotions in Carbon.h (since long long is a common extension). Fixes PR clang/2954: http://llvm.org/bugs/show_bug.cgi?id=2954 llvm-svn: 60917
-
- Nov 27, 2008
-
-
Douglas Gregor authored
llvm-svn: 60131
-
- Oct 29, 2008
-
-
Douglas Gregor authored
- Allows definitions of overloaded functions :) - Eliminates extraneous error messages when we have a definition of a function that isn't an overload but doesn't have exactly the same type as the original. llvm-svn: 58382
-
Douglas Gregor authored
llvm-svn: 58381
-
Douglas Gregor authored
ImplicitConversionSequence and, when doing so, following the specific rules of [over.best.ics]. The computation of the implicit conversion sequences implements C++ [over.ics.ref], but we do not (yet) have ranking for implicit conversion sequences that use reference binding. llvm-svn: 58357
-
Douglas Gregor authored
of copy initialization. Other pieces of the puzzle: - Try/Perform-ImplicitConversion now handles implicit conversions that don't involve references. - Try/Perform-CopyInitialization uses CheckSingleAssignmentConstraints for C. PerformCopyInitialization is now used for all argument passing and returning values from a function. - Diagnose errors with declaring references and const values without an initializer. (Uses a new Action callback, ActOnUninitializedDecl). We do not yet have implicit conversion sequences for reference binding, which means that we don't have any overloading support for reference parameters yet. llvm-svn: 58353
-
- Oct 23, 2008
-
-
Douglas Gregor authored
pointer-to-base. Also, add overload ranking for pointer conversions (for both pointer-to-void and derived-to-base pointer conversions). Note that we do not yet diagnose derived-to-base pointer conversion errors that stem from ambiguous or inacessible base classes. These aren't handled during overload resolution; rather, when the conversion is actually used we go ahead and diagnose the error. llvm-svn: 58017
-
- Oct 22, 2008
-
-
Douglas Gregor authored
conversions (e.g., comparing int* -> const int* against int* -> const volatile int*); see C++ 13.3.3.2p3 bullet 3. Add Sema::UnwrapSimilarPointerTypes to simplify the control flow of IsQualificationConversion and CompareQualificationConversion (and fix the handling of the int* -> volatile int* conversion in the former). llvm-svn: 57978
-
Douglas Gregor authored
Fix a thinko in the qualification-conversion check when the qualificaitons are disjoint, and add some overloading-based tests of qualification conversions llvm-svn: 57942
-
- Oct 21, 2008
-
-
Douglas Gregor authored
llvm-svn: 57909
-