|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| ... |  | 
| | 
| 
| 
| | llvm-svn: 103141 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | typedef int functype(int, int);
    functype func;
also instantiate the synthesized function parameters for the resulting
function declaration. 
With this change, Boost.Wave builds and passes all of its regression
tests.
llvm-svn: 103025 | 
| | 
| 
| 
| 
| 
| 
| 
| | treat argument types of objective-c pointer types
which only differ in their protocol qualifiers as
the same type (radar 7925668).
llvm-svn: 102955 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | address of an overloaded function (or function template), perform that
resolution prior to determining the implicit conversion
sequence. This resolution is not part of the implicit conversion
sequence itself.
Previously, we would always consider this resolution to be a
function pointer decay, which was a lie: there might be an explicit &
in the expression, in which case decay should not occur. This caused
the CodeGen assertion in PR6973 (where we created a 
pointer to a pointer to a function when we should have had a pointer
to a function), but it's likely that there are corner cases of
overload resolution where this would have failed.
Cleaned up the code involved in determining the type that will
produced afer resolving the overloaded function reference, and added
an assertion to make sure the result is correct. Fixes PR6973.
llvm-svn: 102650 | 
| | 
| 
| 
| 
| 
| 
| | temporary needs to be bound, bind the copy object. Otherwise, we won't
end up calling the destructor for the copy. Fixes Boost.Optional.
llvm-svn: 102290 | 
| | 
| 
| 
| | llvm-svn: 102261 | 
| | 
| 
| 
| | llvm-svn: 102259 | 
| | 
| 
| 
| 
| 
| | functionality change yet.
llvm-svn: 102250 | 
| | 
| 
| 
| | llvm-svn: 102249 | 
| | 
| 
| 
| | llvm-svn: 102218 | 
| | 
| 
| 
| | llvm-svn: 101920 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | different kinds (aka garbage). This happens if we're comparing a standard
conversion sequence to an ambiguous one which have the same KindRank.
Found by valgrind.
llvm-svn: 101717 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| | in C++03.
llvm-svn: 101707 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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.
llvm-svn: 101680 | 
| | 
| 
| 
| 
| 
| 
| 
| | users of getNameAsString on a stream.
The next step is to print the name directly into the stream, avoiding a temporary std::string copy.
llvm-svn: 101632 | 
| | 
| 
| 
| 
| 
| | Sema::TryImplicitConversion is, for my own sanity. No functionality change
llvm-svn: 101554 | 
| | 
| 
| 
| | llvm-svn: 101502 | 
| | 
| 
| 
| | llvm-svn: 101498 | 
| | 
| 
| 
| 
| 
| | SemaOverload.cpp; no functionality change.
llvm-svn: 101497 | 
| | 
| 
| 
| 
| 
| | that we aren't using ForceRValue any more? 
llvm-svn: 101496 | 
| | 
| 
| 
| | llvm-svn: 101494 | 
| | 
| 
| 
| 
| 
| | functions.
llvm-svn: 101492 | 
| | 
| 
| 
| 
| 
| | not the way we're going to handle this.
llvm-svn: 101483 | 
| | 
| 
| 
| 
| 
| | Sema::IsUserDefinedConversion. No functionality change
llvm-svn: 101482 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | ResolveAddressOfOverloadedFunction when asked to complain. Previously,
we had some weird handshake where ResolveAddressOfOverloadedFunction
expected its caller to handle some of the diagnostics but not others,
and yet there was no way for the caller to know which case we were
in. Eliminate this madness, fixing <rdar://problem/7765884>.
llvm-svn: 101312 | 
| | 
| 
| 
| 
| 
| 
| | correction find names when a call failed. Fixes
<rdar://problem/7853795>.
llvm-svn: 101278 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | for reference binding. The code attempted to handle both the
computation of the ICS and the actual conversion, but the latter is an
anachronism: we now use InitializationSequence for that. 
Sema::CheckReferenceInit is now a static function TryReferenceInit
that's only use within overload resolution, and has been simplified
slightly. It still needs to be updated per C++ [over.ics.ref], by
eliminating more of the lvalue/rvalue checks.
llvm-svn: 101136 | 
| | 
| 
| 
| 
| 
| 
| | return a NULL expression; return either an error or a proper
expression. Fixes PR6078.
llvm-svn: 101133 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | from a conversion function template specialization to one of exact
match rank. We only know how to test this in C++0x with default
function template arguments, but it's also in the C++03 spec. Fixes
PR6285.
llvm-svn: 101089 | 
| | 
| 
| 
| | llvm-svn: 100732 | 
| | 
| 
| 
| 
| 
| 
| 
| | that protected members be used on objects of types which derive from the
naming class of the lookup.  My first N attempts at this were poorly-founded,
largely because the standard is very badly worded here.
llvm-svn: 100562 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | an object or function. Our previous checking was too lax, and ended up
allowing missing or extraneous address-of operators, among other
evils. The new checking provides better diagnostics and adheres more
closely to the standard.
Fixes PR6563 and PR6749.
llvm-svn: 100125 | 
| | 
| 
| 
| | llvm-svn: 99979 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | the underlying/instantiated decl) through a lot of API, including "intermediate"
MemberExprs required for (e.g.) template instantiation.  This is necessary
because of the access semantics of member accesses to using declarations:
only the base class *containing the using decl* need be accessible from the
naming class.
This allows us to complete an access-controlled selfhost, if there are no
recent regressions.
llvm-svn: 99936 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | cache of PartialDiagnostic::Storage objects into an allocator within
the ASTContext. This eliminates a significant amount of malloc
traffic, for a 10% performance improvement in -fsyntax-only wall-clock
time with 403.gcc's combine.c.
Also, eliminate the RequireNonAbstractType hack I put in earlier,
which was but a symptom of this larger problem.
Fixes <rdar://problem/7806091>.
llvm-svn: 99849 | 
| | 
| 
| 
| 
| 
| 
| 
| | re-route its only caller to the newer
PerformCopyInitialization(). We're down to one remaining caller of
Sema::CheckReferenceInit.
llvm-svn: 99650 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | entity (if applicable) which was actually looked up.  If a candidate was found
via a using declaration, this is the UsingShadowDecl;  otherwise, if
the candidate is template specialization, this is the template;  otherwise,
this is the function.
The point of this exercise is that "found declarations" are the entities
we do access control for, not their underlying declarations.  Broadly speaking,
this patch fixes access control for using declarations.
There is a *lot* of redundant code calling into the overload-resolution APIs;
we really ought to clean that up.
llvm-svn: 98945 | 
| | 
| 
| 
| 
| 
| | required when emitting a destructor definition.
llvm-svn: 98609 | 
| | 
| 
| 
| 
| 
| | considering valid objc pointer converions.
llvm-svn: 98557 | 
| | 
| 
| 
| | llvm-svn: 97686 | 
| | 
| 
| 
| | llvm-svn: 97677 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | nested-name-specifier. For example, this allows member access in
diamond-shaped hierarchies like:
  struct Base {
    void Foo();
    int Member;
  };
  struct D1 : public Base {};
  struct D2 : public Base {};
  struct Derived : public D1, public D2 { }
  void Test(Derived d) {
    d.Member = 17; // error: ambiguous cast from Derived to Base
    d.D1::Member = 17; // error: okay, modify D1's Base's Member
  }
Fixes PR5820 and <rdar://problem/7535045>. Also, eliminate some
redundancy between Sema::PerformObjectMemberConversion() and
Sema::PerformObjectArgumentInitialization() -- the latter now calls
the former.
llvm-svn: 97674 | 
| | 
| 
| 
| | llvm-svn: 97404 | 
| | 
| 
| 
| 
| 
| 
| | binding and a copy-construction. Fixes an overloading problem in the
Clang-on-Clang build.
llvm-svn: 97161 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| 
| 
| | types. Rank these conversions below other conversions. This allows overload
resolution when the only distinction is between a complex and scalar type. It
also brings the complex overload resolutin in line with GCC's.
llvm-svn: 97128 | 
| | 
| 
| 
| 
| 
| 
| | When diagnosing bad conversions, skip the conversion for ignored object
arguments.  Fixes PR 6398.
llvm-svn: 97090 | 
| | 
| 
| 
| 
| 
| | between cv1 T* and cv2 T*.
llvm-svn: 96787 | 
| | 
| 
| 
| 
| 
| | type (per C++ [class.copy]p3). Make sure that includes copies that involve a derived-to-base conversion. Fixes PR6141.
llvm-svn: 96742 |