| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
(e.g., no typename, enum, class, etc.), e.g., because the context is
one that is known to refer to a type. Patch from Enea Zaffanella!
llvm-svn: 102243
|
|
|
|
| |
llvm-svn: 102218
|
|
|
|
|
|
| |
if the type isn't exactly the same as the container class. Fixes PR6783.
llvm-svn: 102186
|
|
|
|
|
|
|
|
|
| |
in a throw expression. Use EmitAnyExprToMem to emit the throw expression,
which magically elides the final copy-constructor call (which raises a new
strict-compliance bug, but baby steps). Give __cxa_throw a destructor pointer
if the exception type has a non-trivial destructor.
llvm-svn: 102039
|
|
|
|
|
|
| |
actual delete expressions, not just new expressions.
llvm-svn: 101861
|
|
|
|
| |
llvm-svn: 101859
|
|
|
|
|
|
| |
associated with a new expression if -fno-exceptions is set.
llvm-svn: 101841
|
|
|
|
|
|
|
|
| |
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.
llvm-svn: 101826
|
|
|
|
|
|
|
| |
This is the last of the uses of TryImplicitConversion outside of
overload resolution and InitializationSequence itself.
llvm-svn: 101569
|
|
|
|
|
|
| |
Sema::TryImplicitConversion is, for my own sanity. No functionality change
llvm-svn: 101554
|
|
|
|
|
|
| |
functionality change
llvm-svn: 101550
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TryStaticImplicitCast (for references, class types, and everything
else, respectively) into a single invocation of
InitializationSequence.
One of the paths (for class types) was the only client of
Sema::TryInitializationByConstructor, which I have eliminated. This
also simplified the interface for much of the cast-checking logic,
eliminating yet more code.
I've kept the representation of C++ functional casts with <> 1
arguments the same, despite the fact that I hate it. That fix will
come soon. To satisfy my paranoia, I've bootstrapped + tested Clang
with these changes.
llvm-svn: 101549
|
|
|
|
| |
llvm-svn: 101502
|
|
|
|
|
|
| |
don't need it.
llvm-svn: 101481
|
|
|
|
| |
llvm-svn: 101381
|
|
|
|
|
|
| |
complete. Enforce this.
llvm-svn: 100925
|
|
|
|
|
|
|
| |
Declarator that depends on it. This fixes several redundant errors and bad
recoveries.
llvm-svn: 100779
|
|
|
|
|
|
|
|
| |
have a temporary object in C++.
Also fix a tag mismatch that Doug noticed.
llvm-svn: 100593
|
|
|
|
| |
llvm-svn: 100144
|
|
|
|
|
|
| |
the C-only "optimization".
llvm-svn: 100022
|
|
|
|
| |
llvm-svn: 100018
|
|
|
|
|
|
|
| |
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.
llvm-svn: 100008
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.
llvm-svn: 99920
|
|
|
|
| |
llvm-svn: 99666
|
|
|
|
|
|
|
|
|
| |
expression can be converted to the type of another, only apply the
lvalue-to-rvalue conversion to the type of the expression we're
converting, *not* the array-to-pointer or function-to-pointer
conversions. Fixes PR6595.
llvm-svn: 99652
|
|
|
|
|
|
|
|
| |
re-route its only caller to the newer
PerformCopyInitialization(). We're down to one remaining caller of
Sema::CheckReferenceInit.
llvm-svn: 99650
|
|
|
|
|
|
| |
CheckReferenceInit to using the new initialization sequence code.
llvm-svn: 99647
|
|
|
|
|
|
|
|
| |
initialization code. Exposed a bug where we were not marking an
implicit conversion as an lvalue when we were forming a call to a
conversion function whose return type is a reference.
llvm-svn: 99459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
non-placement news when selecting the corresponding operator delete; this is
fixed.
Access and ambiguity control for calls to operator new and delete. Also AFAICT
llvm-svn: 98818
|
|
|
|
|
|
| |
Patch by mikem!
llvm-svn: 98279
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
injected class name of a class template or class template partial specialization.
This is a non-canonical type; the canonical type is still a template
specialization type. This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).
Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.
llvm-svn: 98134
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
we need to synthesize has been marked as used by Sema.
Change Sema to avoid these asserts.
llvm-svn: 97589
|
|
|
|
| |
llvm-svn: 97404
|
|
|
|
|
|
|
|
|
|
| |
how we find the operator delete that matches withe operator new we
found in a C++ new-expression.
This will also need CodeGen support. On a happy note, we're now a
"nans" away from building tramp3d-v4.
llvm-svn: 97209
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
equality comparisons, and conditional operators, produce a composite
pointer type with the appropriate additional "const" qualifiers if the
pointer types would otherwise be incompatible. This is a small
extension (also present in GCC and EDG in a slightly different form)
that permits code like:
void** i; void const** j;
i == j;
with the following extwarn:
t.cpp:5:5: warning: comparison of distinct pointer types ('void **' and
'void const **') uses non-standard composite pointer type
'void const *const *' [-pedantic]
i == j;
~ ^ ~
Fixes PR6346, and I'll be filing a core issue about this with the C++
committee.
llvm-svn: 97177
|
|
|
|
|
|
|
|
|
| |
class types, dependent types, and namespaces. I had previously
weakened this invariant while working on parsing pseudo-destructor
expressions, but recent work in that area has made these changes
unnecessary.
llvm-svn: 97112
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expressions that look like pseudo-destructors, e.g.,
p->T::~T()
where p has dependent type.
At template instantiate time, we determine whether we actually have a
pseudo-destructor or a member access, and funnel down to the
appropriate routine in Sema.
Fixes PR6380.
llvm-svn: 97092
|
|
|
|
|
|
|
| |
When diagnosing bad conversions, skip the conversion for ignored object
arguments. Fixes PR 6398.
llvm-svn: 97090
|
|
|
|
| |
llvm-svn: 97080
|
|
|
|
|
|
|
|
|
|
|
| |
CXXPseudoDestructorExpr.
Update template instantiation for pseudo-destructor expressions to use
this source information and to make use of
Sema::BuildPseudoDestructorExpr when the base expression is dependent
or refers to a scalar type.
llvm-svn: 97079
|
|
|
|
|
|
| |
pseudo-destructor expression. Attempt #1 at fixing the MSVC buildbot.
llvm-svn: 97076
|
|
|
|
|
|
|
|
| |
parser's data structures and the part that performs semantic analysis
and AST building, in preparation for improved template instantiation
of pseudo-destructor expressions.
llvm-svn: 97070
|
|
|
|
|
|
|
|
| |
pseudo-destructor expression such as
p->T::~T()
llvm-svn: 97060
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pseudo-destructor expressions, and builds the CXXPseudoDestructorExpr
node directly. Currently, this only affects pseudo-destructor
expressions when they are parsed, but not after template
instantiation. That's coming next...
Improve parsing of pseudo-destructor-names. When parsing the
nested-name-specifier and we hit the sequence of tokens X :: ~, query
the actual module to determine whether X is a type-name (in which case
the X :: is part of the pseudo-destructor-name but not the
nested-name-specifier) or not (in which case the X :: is part of the
nested-name-specifier).
llvm-svn: 97058
|