|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| | since we aren't going to be calling them ever.
llvm-svn: 109377 | 
| | 
| 
| 
| | llvm-svn: 108807 | 
| | 
| 
| 
| 
| 
| 
| | arguments only resolves to a single specialization, make sure to look
through using declarations. Fixes PR7641.
llvm-svn: 108376 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | (e.g., a call, cast, etc.), immediately adjust the expression's type
to strip cv-qualifiers off of all non-class types (in C++) or all
types (in C). This effectively extends my previous fix for PR7463,
which was restricted to calls, to other kinds of expressions within
similar characteristics. I've audited every use of
getNonReferenceType() in the code base, switching to the newly-renamed
getNonLValueExprType() where necessary. 
Big thanks to Eli for pointing out just how incomplete my original fix
for PR7463 actually was. We've been handling cv-qualifiers on rvalues
wrong for a very, very long time. Fixes PR7463.
llvm-svn: 108253 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types. 
Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().
Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).
llvm-svn: 108234 | 
| | 
| 
| 
| 
| 
| | constructor-name lookup.
llvm-svn: 107536 | 
| | 
| 
| 
| 
| 
| | pointer" diagnostic to handle references, too.
llvm-svn: 107372 | 
| | 
| 
| 
| 
| 
| | require a base-to-derived pointer conversion.
llvm-svn: 107349 | 
| | 
| 
| 
| 
| 
| 
| | would work.
Sebastian: figure out which one you want :)
llvm-svn: 107305 | 
| | 
| 
| 
| 
| 
| | classification functions, and updated them for N3092.
llvm-svn: 107301 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | type to an integral or enumeration type in the size of an array new
expression, e.g.,
  new int[ConvertibleToInt(10)];
This is a GNU and C++0x extension.
llvm-svn: 107229 | 
| | 
| 
| 
| 
| 
| 
| 
| | have integral or enumeration type, so that we still check the contents
of the switch body. My previous patch made this worse; now we're back
to where we were previously.
llvm-svn: 107223 | 
| | 
| 
| 
| 
| 
| 
| 
| | enumeration type out into a separate, reusable routine. The only
functionality change here is that we recover a little more
aggressively from ill-formed switch conditions.
llvm-svn: 107222 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | __real myvec and __imag myvec, since they aren't all that useful (it's
just an identity function) but we might want to use them in more
restricted cases in the future (e.g., "__real mycomplexvec" could
extract the real parts of a vector of complex numbers).
llvm-svn: 106601 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | types, updating callers of both isFloatingType() and
isRealFloatingType() accordingly. Caught at least one issue where we
allowed one to declare a vector of vectors (!), along with cleaning up
the standard-conversion logic for C++.
llvm-svn: 106595 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | "floating type" in C, which does not include vector types. Introduce
Type::hasFloatingRepresentation() for the places where we want to know
whether the underlying representation is one or more floating-point
values. Remove some hacks we had where the former behavior of
Type::isFloatingType() was at odds with the language definition of the
term.
llvm-svn: 106584 | 
| | 
| 
| 
| 
| 
| 
| 
| | floating-point conversions or floating-integral conversions. We
really, really, really need to make isFloatingType() and friends not
apply to vector types.
llvm-svn: 106551 | 
| | 
| 
| 
| 
| 
| 
| | no overloaded operators were found in scope, mirroring what we already
do for BinaryOperator.
llvm-svn: 106222 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | introduced by using decls are hidden even if their template parameter lists
or return types differ from the "overriding" declaration.
Propagate using shadow declarations around more effectively when looking up
template-ids.  Reperform lookup for template-ids in member expressions so that
access control is properly set up.
Fix some number of latent bugs involving template-ids with totally invalid
base types.  You can only actually get these with a scope specifier, since
otherwise the template-id won't parse as a template-id.
Fixes PR7384.
llvm-svn: 106093 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | provides C "integer type" semantics in C and C++ "integral type"
semantics in C++. 
Note that I still need to update isIntegerType (and possibly other
predicates) using the same approach I've taken for
isIntegralType(). The two should have the same meaning, but currently
don't (!).
llvm-svn: 106074 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | in C++ that involve both integral and enumeration types. Convert all
of the callers to Type::isIntegralType() that are meant to work with
both integral and enumeration types over to
Type::isIntegralOrEnumerationType(), to prepare to eliminate
enumeration types as integral types.
llvm-svn: 106071 | 
| | 
| 
| 
| 
| 
| | to bool" in the sense of C++ [over.ics.rank]p4 bullet 1.  I have decreed it.
llvm-svn: 105817 | 
| | 
| 
| 
| 
| 
| 
| | ptrdiff_t (long on 64-bit, apparently) is ambiguous between the int and
unsigned int overloads.
llvm-svn: 105816 | 
| | 
| 
| 
| 
| 
| 
| | candidates printed.  We default to 'all'.  At the moment, 'best' prints only
the first 4 overloads, but we'll improve that over time.
llvm-svn: 105815 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| | determining whether one overload candidate is better than
another. Fixes PR7319.
llvm-svn: 105642 | 
| | 
| 
| 
| 
| 
| | pointer. Original patch by Troy D. Straszheim; fixes PR7283.
llvm-svn: 105621 | 
| | 
| 
| 
| 
| 
| | derived-to-base conversion on a pointer. Fixes PR7224.
llvm-svn: 104607 | 
| | 
| 
| 
| 
| 
| | conversion. Fixes PR7095.
llvm-svn: 104476 | 
| | 
| 
| 
| 
| 
| 
| | UnresolvedMemberExpr in their constructors, rather than adding them
after the fact. No functionality change.
llvm-svn: 104468 | 
| | 
| 
| 
| | llvm-svn: 104105 | 
| | 
| 
| 
| 
| 
| 
| | gc attributes to be inline with Objective-C
(for radar 7925141).
llvm-svn: 104084 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | involves extending implicit conversion sequences to model vector
conversions and vector splats, along with teaching the C++ conditional
operator-checking code about vector types.
Fixes <rdar://problem/7983501>.
llvm-svn: 104081 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | consider "super" as a candidate whenever we're parsing an expression
within an Objective-C method in an interface that has a superclass. At
some point, we'd like to give "super" a little edge over non-local
names; that will come later.
llvm-svn: 104022 | 
| | 
| 
| 
| 
| 
| | passed to va_start, it doesn't actually pass it.
llvm-svn: 103899 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | ObjCObjectType, which is basically just a pair of
  one of {primitive-id, primitive-Class, user-defined @class}
with
  a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared).  ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.
Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType.  Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet.  Remove some number of methods that are no
longer used, at least after this patch.
By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.
llvm-svn: 103870 | 
| | 
| 
| 
| 
| 
| 
| | class object used as a receiver to an objective-c
pointer via a converwsion function. wip.
llvm-svn: 103672 | 
| | 
| 
| 
| 
| 
| | unused, since the operation has side effects.
llvm-svn: 103360 | 
| | 
| 
| 
| 
| 
| | it's ASTContext-allocated now
llvm-svn: 103350 | 
| | 
| 
| 
| 
| 
| | templates and conversion function templates. 
llvm-svn: 103349 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | specific message that includes the template arguments, e.g.,
test/SemaTemplate/overload-candidates.cpp:27:20: note: candidate template
      ignored: substitution failure [with T = int *]
  typename T::type get_type(const T&); // expected-note{{candidate ...
                   ^
llvm-svn: 103348 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | failed because the explicitly-specified template arguments did not
match its template parameters, e.g.,
test/SemaTemplate/overload-candidates.cpp:18:8: note: candidate
template
      ignored: invalid explicitly-specified argument for template
      parameter 'I'
  void get(const T&);
       ^
test/SemaTemplate/overload-candidates.cpp:20:8: note: candidate
template
      ignored: invalid explicitly-specified argument for 1st template
      parameter
  void get(const T&);
       ^
llvm-svn: 103344 | 
| | 
| 
| 
| 
| 
| | this issue.
llvm-svn: 103343 | 
| | 
| 
| 
| 
| 
| | functionality change. 
llvm-svn: 103342 | 
| | 
| 
| 
| 
| 
| 
| | many/too few arguments, use the same diagnostic we use for arity
mismatches in non-templates (but note that it's a function template).
llvm-svn: 103341 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | conflicting deduced template argument values, give a more specific
reason along with those values, e.g.,
test/SemaTemplate/overload-candidates.cpp:4:10: note: candidate template
      ignored: deduced conflicting types for parameter 'T' ('int' vs. 'long')
const T& min(const T&, const T&); 
         ^
llvm-svn: 103339 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | ensure that we complete the type when we need to look at constructors
during reference binding.
When determining whether the two types involved in reference binding
are reference-compatible, reference-related, etc., do not complete the
type of the reference itself because it is not necessary to determine
well-formedness of the program. Complete the type that we are binding
to, since that can affect whether we know about a derived-to-base
conversion. 
Re-fixes PR7080.
llvm-svn: 103283 | 
| | 
| 
| 
| | llvm-svn: 103259 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | are reference-compatible, reference-related, etc., do not complete the
type of the reference itself because it is not necessary to determine
well-formedness of the program. Complete the type that we are binding
to, since that can affect whether we know about a derived-to-base
conversion. 
Fixes PR7080.
llvm-svn: 103220 | 
| | 
| 
| 
| 
| 
| | Fixes rdar://problem/4232969, or at least the clang parts of it.
llvm-svn: 103191 |