| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 89657
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into pretty much everything about overload resolution in order to wean
BuildDeclarationNameExpr off LookupResult::getAsSingleDecl(). Replace
UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the
idea of a non-member lookup that we haven't totally resolved yet, whether by
overloading, argument-dependent lookup, or (eventually) the presence of
a function template in the lookup results.
Incidentally fixes a problem with argument-dependent lookup where we were
still performing ADL even when the lookup results contained something from
a block scope.
Incidentally improves a diagnostic when using an ObjC ivar from a class method.
This just fell out from rewriting BuildDeclarationNameExpr's interaction with
lookup, and I'm too apathetic to break it out.
The only remaining uses of OverloadedFunctionDecl that I know of are in
TemplateName and MemberExpr.
llvm-svn: 89544
|
|
|
|
|
|
|
|
|
|
| |
two classes, one for typenames and one for values; this seems to have some
support from Doug if not necessarily from the extremely-vague-on-this-point
standard. Track the location of the 'typename' keyword in a using-typename
decl. Make a new lookup result for unresolved values and deal with it in
most places.
llvm-svn: 89184
|
|
|
|
|
|
|
| |
decl, create shadow declarations and put them in scope like normal.
Work in progress.
llvm-svn: 89048
|
|
|
|
|
|
| |
destructors. Also fix PR5529.
llvm-svn: 89034
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:
typedef const int CInt;
typedef CInt Self;
Self.isConstQualified() currently returns false!
Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions:
- the "local" version only returns qualifiers on this particular
QualType instance
- the "normal" version that will eventually combine qualifiers from this
QualType instance with the qualifiers on the canonical type to
produce the full set of qualifiers.
This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of
Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()
expressions over to
Context.hasSameUnqualifiedType(T1, T2)
llvm-svn: 88969
|
|
|
|
|
|
|
|
|
|
|
|
| |
like a copy constructor to the overload set, just ignore it. This
ensures that we don't try to use such a constructor as a copy
constructor *without* triggering diagnostics at the point of
declaration.
Note that we *do* diagnose such copy constructors when explicitly
written by the user (e.g., as an explicit specialization).
llvm-svn: 88733
|
|
|
|
|
|
| |
constructor-template-as-copy-constructor issue. Big thanks to John for finding this
llvm-svn: 88724
|
|
|
|
|
|
| |
constructor. Make sure that such declarations can never be formed.
llvm-svn: 88718
|
|
|
|
|
|
|
|
| |
instead of all assignment operators. The mistake messes up IRGen because
it ends up assuming that the assignment operator is actually the implicit
copy assignment operator, and therefore tries to emit the RHS as an lvalue.
llvm-svn: 86307
|
|
|
|
|
|
| |
on its argument type, ignore assignment operator templates
llvm-svn: 85629
|
|
|
|
|
|
| |
refers to a RecordType. Add assertions or conditions as appropriate. This fixes another crash in the Apache stdlib vector.
llvm-svn: 85055
|
|
|
|
|
|
| |
are never copy constructors or copy assignment operators.
llvm-svn: 84057
|
|
|
|
|
|
|
| |
instantiation has already been required. To do so, keep track of the
point of instantiation for anything that can be instantiated.
llvm-svn: 83890
|
|
|
|
|
|
| |
canonical conversion types.
llvm-svn: 83869
|
|
|
|
|
|
| |
functions.
llvm-svn: 83552
|
|
|
|
|
|
|
|
|
|
|
| |
templates, and keep track of how those member classes were
instantiated or specialized.
Make sure that we don't try to instantiate an explicitly-specialized
member class of a class template, when that explicit specialization
was a declaration rather than a definition.
llvm-svn: 83547
|
|
|
|
|
|
|
|
| |
where matching conversion types in base classes were still visible.
Plus refactoring and cleanup.
Added a test case.
llvm-svn: 83485
|
|
|
|
|
|
|
|
|
|
|
| |
"usual deallocation function" with two arguments. CodeGen will have to
handle this case specifically, since the value for the second argument
(the size of the allocated object) may have to be computed at run
time.
Fixes the Sema part of PR4782.
llvm-svn: 83080
|
|
|
|
|
|
|
|
| |
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.
llvm-svn: 82705
|
|
|
|
|
|
|
|
|
|
|
| |
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501
|
|
|
|
|
|
| |
result type of template convesion functions.
llvm-svn: 81943
|
|
|
|
|
|
|
|
| |
to pointer function for delete expression. 2)
Treat type conversion function and its 'const' version
as identical in building the visible conversion list.
llvm-svn: 81930
|
|
|
|
|
|
|
|
|
| |
whether a constructor is a copy constructor.
Sadly, I wasn't able to get down to a test case smaller than libstdc++'s
<string>.
llvm-svn: 81913
|
|
|
|
|
|
| |
functions for a class when needed.
llvm-svn: 81624
|
|
|
|
|
|
| |
need them.
llvm-svn: 81621
|
|
|
|
|
|
| |
conversion functions.
llvm-svn: 81618
|
|
|
|
| |
llvm-svn: 81583
|
|
|
|
|
|
| |
first use in calling the conversion function on delete statements.
llvm-svn: 81576
|
|
|
|
|
|
|
|
|
|
| |
instantiation of a member function template or member function of a
class template to be out-of-line if the definition of that function
template or member function was defined out-of-line. This ensures that
we get the correct linkage for explicit instantiations of out-of-line
definitions.
llvm-svn: 81562
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
|
|
| |
constructor templates
llvm-svn: 81002
|
|
|
|
|
|
| |
base and data members when they are needed.
llvm-svn: 80967
|
|
|
|
|
|
|
|
| |
reference/const data members when user has declared
the constructor. This necessitated some non-minor
refactoring.
llvm-svn: 80934
|
|
|
|
|
|
| |
where we build the constructor's initializer list.
llvm-svn: 80735
|
|
|
|
|
|
| |
AnonUnionMember. Fixes PR4826.
llvm-svn: 80721
|
|
|
|
|
|
|
| |
expressions making use of an overloaded operator. Thanks for the test
case, Anders!
llvm-svn: 80679
|
|
|
|
| |
llvm-svn: 80606
|
|
|
|
|
|
|
|
|
| |
work correctly.
The change in lib/AST/DeclCXX.cpp is mostly a large reindentation; I
couldn't figure out a good way to avoid it.
llvm-svn: 80446
|
|
|
|
|
|
| |
by Anders Johnsen!
llvm-svn: 80416
|
|
|
|
| |
llvm-svn: 80377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not. Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.
Refactor the Sema methods specific to friends for cleaner flow and less nesting.
Incidentally solve a few bugs, but I remain confident that we can put them back.
llvm-svn: 80353
|
|
|
|
| |
llvm-svn: 80336
|
|
|
|
|
|
| |
Fixes pr4771.
llvm-svn: 79999
|
|
|
|
| |
llvm-svn: 79975
|
|
|
|
| |
llvm-svn: 79923
|
|
|
|
|
|
|
| |
template argument deduction from a conversion function (C++
[temp.deduct.conv]) with implicit conversions.
llvm-svn: 79693
|
|
|
|
|
|
|
|
| |
and will participate in overload resolution. Unify the instantiation
of CXXMethodDecls and CXXConstructorDecls, which had already gotten
out-of-sync.
llvm-svn: 79658
|
|
|
|
| |
llvm-svn: 79587
|
|
|
|
|
|
|
|
|
|
|
|
| |
interfaces.
DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.
Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.
llvm-svn: 79392
|