| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.
llvm-svn: 113319
|
|
|
|
|
|
| |
the TypeSourceInfo for the allocated type. Fixes PR7501.
llvm-svn: 113291
|
|
|
|
| |
llvm-svn: 112905
|
|
|
|
|
|
| |
well-intentioned but completely unused code.
llvm-svn: 112868
|
|
|
|
| |
llvm-svn: 112577
|
|
|
|
| |
llvm-svn: 111584
|
|
|
|
| |
llvm-svn: 110860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).
Also, smoosh the CastKind into the bitfield from Expr.
Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths. Avoids a separate allocation and
another word of overhead in cases needing inheritance paths. Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.
llvm-svn: 110507
|
|
|
|
| |
llvm-svn: 109382
|
|
|
|
|
|
| |
since we aren't going to be calling them ever.
llvm-svn: 109377
|
|
|
|
|
|
|
|
|
|
|
|
| |
size" error for code like
new (int [size])
to a warning, add a Fix-It to remove the parentheses, and make this
diagnostic work properly when it occurs in a template
instantiation. <rdar://problem/8018245>.
llvm-svn: 108242
|
|
|
|
| |
llvm-svn: 108042
|
|
|
|
|
|
| |
suppressing copies of objects with trivial copy constructors.
llvm-svn: 107857
|
|
|
|
|
|
| |
breaking bootstrap on Linux.
llvm-svn: 107837
|
|
|
|
|
|
| |
newly-narrowed scope. No functionality change.
llvm-svn: 107828
|
|
|
|
| |
llvm-svn: 106998
|
|
|
|
| |
llvm-svn: 106832
|
|
|
|
| |
llvm-svn: 106831
|
|
|
|
| |
llvm-svn: 106727
|
|
|
|
|
|
| |
storage, rather than an UnresolvedSet.
llvm-svn: 104469
|
|
|
|
|
|
|
| |
UnresolvedMemberExpr in their constructors, rather than adding them
after the fact. No functionality change.
llvm-svn: 104468
|
|
|
|
|
|
| |
getFullSourceRange -> getSourceRange for TypeLoc.
llvm-svn: 104220
|
|
|
|
|
|
| |
ASTContext's allocator. Fixes <rdar://problem/7961605>.
llvm-svn: 103421
|
|
|
|
| |
llvm-svn: 103406
|
|
|
|
| |
llvm-svn: 103390
|
|
|
|
| |
llvm-svn: 103388
|
|
|
|
|
|
| |
CXXExprWithTemporaries.
llvm-svn: 103387
|
|
|
|
| |
llvm-svn: 102884
|
|
|
|
|
|
| |
expression constructs a non-virtual or virtual base.
llvm-svn: 102879
|
|
|
|
|
|
|
|
|
|
|
| |
keep track of whether we need to zero-initialize storage prior to
calling its constructor. Previously, we were only tracking this when
implicitly constructing the object (a CXXConstructExpr).
Fixes Boost's value-initialization tests, which means that the
Boost.Config library now passes all of its tests.
llvm-svn: 102461
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
UnresolvedLookupExpr and UnresolvedMemberExpr by substituting the
naming class we computed when building the expression in the
template...
... which we didn't always do correctly. Teach
UnresolvedMemberExpr::getNamingClass() all about the new
representation of injected-class-names in templates, so that it can
return a naming class that is the current instantiation.
Also, when decomposing a template-id into its template name and its
arguments, be sure to set the naming class on the LookupResult
structure.
Fixes PR6947 the right way.
llvm-svn: 102448
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by using TypeSourceInfo, cleaning up the representation
somewhat. Teach getTypeOperand() to strip references and
cv-qualifiers, providing the semantic view of the type without
requiring any extra storage (the unmodified type remains within the
TypeSourceInfo). This fixes a bug found by Boost's call_traits test.
Finally, clean up semantic analysis, by splitting the ActOnCXXTypeid
routine into ActOnCXXTypeId (the parser action) and two BuildCXXTypeId
functions, which perform the semantic analysis for typeid(type) and
typeid(expression), respectively. We now perform less work at template
instantiation time (we don't look for std::type_info again) and can
give better diagnostics.
llvm-svn: 102393
|
|
|
|
|
|
|
|
|
|
| |
address of overloaded function, instead of assuming that a nested name
specifier was used. A nested name specifier is not required for static
functions.
Fixes PR6886.
llvm-svn: 102107
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
using 'new[]' instead of the allocator associated with ASTContext.
llvm-svn: 95933
|
|
|
|
|
|
| |
UnresolvedMemberExpr and employ it in a few places where it's useful.
llvm-svn: 95072
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(necessarily simultaneous) changes:
- CXXBaseOrMemberInitializer now contains only a single initializer
rather than a set of initialiation arguments + a constructor. The
single initializer covers all aspects of initialization, including
constructor calls as necessary but also cleanup of temporaries
created by the initializer (which we never handled
before!).
- Rework + simplify code generation for CXXBaseOrMemberInitializers,
since we can now just emit the initializer as an initializer.
- Switched base and member initialization over to the new
initialization code (InitializationSequence), so that it
- Improved diagnostics for the new initialization code when
initializing bases and members, to match the diagnostics produced
by the previous (special-purpose) code.
- Simplify the representation of type-checked constructor initializers in
templates; instead of keeping the fully-type-checked AST, which is
rather hard to undo at template instantiation time, throw away the
type-checked AST and store the raw expressions in the AST. This
simplifies instantiation, but loses a little but of information in
the AST.
- When type-checking implicit base or member initializers within a
dependent context, don't add the generated initializers into the
AST, because they'll look like they were explicit.
- Record in CXXConstructExpr when the constructor call is to
initialize a base class, so that CodeGen does not have to infer it
from context. This ensures that we call the right kind of
constructor.
There are also a few "opportunity" fixes here that were needed to not
regress, for example:
- Diagnose default-initialization of a const-qualified class that
does not have a user-declared default constructor. We had this
diagnostic specifically for bases and members, but missed it for
variables. That's fixed now.
- When defining the implicit constructors, destructor, and
copy-assignment operator, set the CurContext to that constructor
when we're defining the body.
llvm-svn: 94952
|
|
|
|
| |
llvm-svn: 94791
|
|
|
|
|
|
|
| |
diagnostics in "early" lookups, such as during typename checks and when building
unresolved lookup expressions.
llvm-svn: 94647
|
|
|
|
|
|
|
| |
Change LookupResult to use UnresolvedSet. Also extract UnresolvedSet into its
own header and make it templated over an inline capacity.
llvm-svn: 93959
|
|
|
|
|
|
|
|
| |
the default argument so that we're sure to mark any referenced
declarations. This gets us another little step closer to fixing
PR5810.
llvm-svn: 92078
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
member function thereof), perform the template instantiation each time
the default argument is needed. This ensures that
(1) We get different CXXTemporary objects for each instantiation, and
(2) Any other instantiations or definitions triggered by the
instantiation of the default argument expression are guaranteed to
happen; previously, they might have been suppressed, e.g., because
they happened in an unevaluated context.
This fixes the majority of PR5810. However, it does not address the
problem where we may have multiple uses of the same CXXTemporary
within an expression when the temporary came from a non-instantiated
default argument expression.
llvm-svn: 92015
|
|
|
|
|
|
| |
CXXDefaultArgExprs when computing its range (since these expressions have no source range, and using them will make the encompassing range invalid).
llvm-svn: 91984
|
|
|
|
|
|
|
| |
with a non-trivial default constructor, zero-initialize the storage
and then call the default constructor. Fixes PR5800.
llvm-svn: 91548
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
than using its own partial implementation of initialization.
Switched CheckInitializerTypes over to
InitializedEntity/InitializationKind, to help move us closer to
InitializationSequence.
Added InitializedEntity::getName() to retrieve the name of the entity,
for diagnostics that care about such things.
Implemented support for default initialization in
InitializationSequence.
Clean up the determination of the "source expressions" for an
initialization sequence in InitializationSequence::Perform.
Taught CXXConstructExpr to store more location information.
llvm-svn: 91492
|
|
|
|
| |
llvm-svn: 91450
|
|
|
|
| |
llvm-svn: 90361
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implicit member access to a specific declaration, go ahead and create
it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as
appropriate. Otherwise, create an UnresolvedMemberExpr or
DependentScopeMemberExpr with a null base expression.
By representing implicit accesses directly in the AST, we get the ability
to correctly delay the decision about whether it's actually an instance
member access or not until resolution is complete. This permits us
to correctly avoid diagnosing the 'problem' of 'MyType::foo()'
where the relationship to the type isn't really known until instantiation.
llvm-svn: 90266
|
|
|
|
|
|
|
|
| |
Create a new UnresolvedMemberExpr for these lookups. Assorted hackery
around qualified member expressions; this will all go away when we
implement the correct (i.e. extremely delayed) implicit-member semantics.
llvm-svn: 90161
|