| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
store it on the expression node. Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.
Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.
llvm-svn: 119685
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in more situations. In particular, for code like
template<class T> void Fn() { T* x; delete x; }
getDestroyedType() will now return T rather than T*, as it would
before this change. On the other hand, for code like this:
template<class T> void Fn() { T x; delete x; }
getDestroyedType() will return an empty QualType(), since it doesn't
know what the actual destroyed type would be. Previously, it would
return T.
OKed by rjmccall
llvm-svn: 119334
|
|
|
|
|
|
|
|
|
| |
ensuring that they cover all of their child nodes. There's still a
clang_getCursor()-related issue with CXXFunctionalCastExprs with
CXXConstructExprs as children (see FIXME in the test case); I'll look
at that separately.
llvm-svn: 118132
|
|
|
|
|
|
|
| |
expression is a dependent expression.
// rdar: // 8620524 and PR7851
llvm-svn: 118066
|
|
|
|
|
|
| |
PR8423
llvm-svn: 117775
|
|
|
|
|
|
|
| |
a member call expression. This has proved to be a common pattern for users of
RecursiveASTVisitor.
llvm-svn: 117439
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds them where missing, and traces them through PCH. We fix at least one
bug in the extents found by the Index library, and make a lot of refactoring
tools which care about the exact formulation of a constructor call easier to
write. Also some minor cleanups to more consistently follow the friend pattern
instead of the setter pattern when rebuilding a serialized AST.
Patch originally by Samuel Benzaquen.
llvm-svn: 117254
|
|
|
|
| |
llvm-svn: 116893
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here's example code:
---
template<class T> class MyClass {
struct S { };
S* NewS() { return new S; }
void DeleteS() { delete NewS(); }
};
---
CXXDeleteExpr::getDestroyedType() on the 'delete NewS()' expression
would crash before this change. Now it returns a dependent type
object. Solution suggested by dgregor.
llvm-svn: 116891
|
|
|
|
|
|
|
|
|
| |
"used", at the time that the default argument itself is used, also
mark destructors that will be called by this expression. This fixes a
regression that I introduced in r113700, which broke WebKit, and fixes
<rdar://problem/8427926>.
llvm-svn: 113883
|
|
|
|
|
|
| |
need Sema access to be correct, fixes coming up.
llvm-svn: 113782
|
|
|
|
| |
llvm-svn: 113623
|
|
|
|
|
|
| |
libclang visitation.
llvm-svn: 113492
|
|
|
|
| |
llvm-svn: 113356
|
|
|
|
|
|
|
|
| |
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
|