| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
realize that CXXConstructExpr is always implicit, so we should just
return its argument (if there is only one) rather than directly
invoking the constructor.
llvm-svn: 95192
|
| |
|
|
|
|
| |
appropriately. Call out a few missing cases in the expression mangler.
llvm-svn: 95176
|
| |
|
|
| |
llvm-svn: 94925
|
| |
|
|
| |
llvm-svn: 94920
|
| |
|
|
| |
llvm-svn: 94791
|
| |
|
|
|
|
| |
general refactoring in operator resolution.
llvm-svn: 94498
|
| |
|
|
| |
llvm-svn: 94361
|
| |
|
|
|
|
| |
type which was syntactically written. Fixes PR 6080.
llvm-svn: 93933
|
| |
|
|
|
|
| |
Patch by Enea Zaffanella!
llvm-svn: 93752
|
| |
|
|
|
|
| |
Zaffanella (with a couple of my tweaks).
llvm-svn: 93733
|
| |
|
|
|
|
| |
instantiation.
llvm-svn: 93533
|
| |
|
|
|
|
| |
Also we don't need to recheck for altivec initializers, I think.
llvm-svn: 93529
|
| |
|
|
|
|
| |
Patch by Enea Zaffanella.
llvm-svn: 93522
|
| |
|
|
|
|
|
|
|
|
| |
Adjust BuildMemberReferenceExpr to perform the inheritance check on implicit
member accesses, which can arise from unqualified lookups and therefore may
reference decls from enclosing class scopes.
Fixes PR 5838.
llvm-svn: 93510
|
| |
|
|
|
|
| |
Patch by Enea Zaffanella.
llvm-svn: 93344
|
| |
|
|
|
|
|
| |
implicitness without losing track of the (logical or actual) location
where "this" would occur in the source.
llvm-svn: 92958
|
| |
|
|
| |
llvm-svn: 92246
|
| |
|
|
|
|
| |
implicit "this" expressions
llvm-svn: 92141
|
| |
|
|
|
|
|
| |
sure to perform derived-to-base conversions on the base
expression. Fixes PR5868. Proper testcase is coming soon.
llvm-svn: 92139
|
| |
|
|
|
|
|
|
|
| |
expressions (e.g., for template instantiation), just transform the
subexpressions and return those, since the temporary-related nodes
will be implicitly regenerated. Fixes PR5867, but I said that
before...
llvm-svn: 92135
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
a size, check whether the transformed type is itself an array type. If
so, take the major array bound as the size to allocate. Fixes PR5833.
llvm-svn: 91907
|
| |
|
|
|
|
| |
must also mark the member decl as referenced.
llvm-svn: 91887
|
| |
|
|
|
|
| |
Action::FullExpr to Action::MakeFullExpr to avoid name clashes.
llvm-svn: 91494
|
| |
|
|
| |
llvm-svn: 91450
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- During instantiation, drop default arguments from constructor and
call expressions; they'll be recomputed anyway, and we don't want
to instantiate them twice.
- Rewrote the instantiation of variable initializers to cope with
non-dependent forms properly.
Together, these fix a handful of problems I introduced with the switch
to always rebuild expressions from the source code "as written."
llvm-svn: 91315
|
| |
|
|
|
|
| |
CompleteConstructorCall to perform type-checking.
llvm-svn: 91279
|
| |
|
|
|
|
| |
operators. Fixes PR5266.
llvm-svn: 91252
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implicitly-generated AST nodes. We previously built instantiated nodes
for each of these AST nodes, then passed them on to Sema, which was
not prepared to see already-type-checked nodes (see PR5755). In some
places, we had ugly workarounds to try to avoid re-type-checking
(e.g., in VarDecl initializer instantiation).
Now, we skip implicitly-generated nodes when performing instantiation,
preferring instead to build just the AST nodes that directly reflect
what was written in the source code. This has several advantages:
- We don't need to instantiate anything that doesn't have a direct
correlation to the source code, so we can have better location
information.
- Semantic analysis sees the same thing at template instantiation
time that it would see for a non-template.
- At least one ugly hack (VarDecl initializers) goes away.
Fixes PR5755.
llvm-svn: 91218
|
| |
|
|
|
|
| |
no extra safety anyway.
llvm-svn: 91207
|
| |
|
|
|
|
|
|
|
|
|
| |
declarations. There
are a couple of O(n^2) operations in this, some analogous to the usual O(n^2)
redeclaration problem and some not. In particular, retroactively removing
shadow declarations when they're hidden by later decls is pretty unfortunate.
I'm not yet convinced it's worse than the alternative, though.
llvm-svn: 91045
|
| |
|
|
|
|
|
|
|
| |
horrible isAddressOfOperand hack in TreeTransform, since that syntactic
information is managed by the initial parser callbacks now.
That's enough insomniac commits for one night.
llvm-svn: 90849
|
| |
|
|
|
|
| |
Template instantiation can re-use DeclRefExprs.
llvm-svn: 90848
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variables,
but the results are imperfect.
For posterity, I did:
cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF
find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;
llvm-svn: 90743
|
| |
|
|
|
|
| |
This time with a fix to bail out when in a dependent context.
llvm-svn: 90730
|
| |
|
|
|
|
| |
to fix it ATM.
llvm-svn: 90717
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
intended. On the first testcase in the bug, we now produce:
cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier
y:a a2;
^
::
instead of:
t.cc:8:1: error: C++ requires a type specifier for all declarations
x:a a2;
^
t.cc:8:2: error: invalid token after top level declarator
x:a a2;
^
;
t.cc:9:11: error: use of undeclared identifier 'a2'
x::a a3 = a2;
^
llvm-svn: 90713
|
| |
|
|
| |
llvm-svn: 90614
|
| |
|
|
| |
llvm-svn: 90549
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
function names outside of templates - they'll probably cause some damage there as
they're largely untested.
llvm-svn: 90064
|
| |
|
|
|
|
| |
to build casted expression-list AST to Sema.
llvm-svn: 89827
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).
Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting
Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.
llvm-svn: 89817
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cleanups for while loops:
1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g.,
while (shared_ptr<WorkInt> p = getWorkItem()) {
// ...
}
2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g.,
while (blah)
RAIIObject raii(blah+1);
llvm-svn: 89800
|
| |
|
|
|
|
|
|
|
|
|
|
| |
DependentScopeDeclRefExpr support storing templateids. Unite the common
code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr.
This gets us to a point where we don't need to store function templates in
the AST using TemplateNames, which is critical to ripping out OverloadedFunction.
Also resolves a few FIXMEs.
llvm-svn: 89785
|
| |
|
|
|
|
|
| |
make sure that this variable is destroyed when we exit the switch
statement.
llvm-svn: 89776
|
| |
|
|
|
|
|
|
|
| |
rather than burying it in a CXXConditionDeclExpr (that occassionally
hides behind implicit conversions). Similar changes for
switch, while, and do-while will follow, then the removal of
CXXConditionDeclExpr. This commit is the canary.
llvm-svn: 89717
|
| |
|
|
|
|
| |
DeclRefExprs
llvm-svn: 89649
|
| |
|
|
|
|
|
|
|
|
| |
locations" into
a new class. Use it pervasively throughout Sema.
My fingers hurt.
llvm-svn: 89638
|