| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
since we aren't going to be calling them ever.
llvm-svn: 109377
|
| |
|
|
|
|
| |
to block context when first instantiating them.
llvm-svn: 108266
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types.
Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().
Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).
llvm-svn: 108234
|
| |
|
|
| |
llvm-svn: 108195
|
| |
|
|
| |
llvm-svn: 108051
|
| |
|
|
|
|
| |
block literal expression.
llvm-svn: 108019
|
| |
|
|
| |
llvm-svn: 108000
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
with several tweaks by me.
llvm-svn: 106619
|
| |
|
|
|
|
| |
PR7405, patch by Kyle Lippincott!
llvm-svn: 106523
|
| |
|
|
|
|
| |
<rdar://problem/8108088>.
llvm-svn: 106328
|
| |
|
|
|
|
|
| |
template specialization type, copy the location information but use
the new type. Fixes PR7385.
llvm-svn: 106224
|
| |
|
|
|
|
|
|
|
|
|
| |
(or operator-function-id) as a template, but the context is actually
non-dependent or the current instantiation, allow us to use knowledge
of what kind of template it is, e.g., type template vs. function
template, for further syntactic disambiguation. This allows us to
parse properly in the presence of stray "template" keywords, which is
necessary in C++0x and it's good recovery in C++98/03.
llvm-svn: 106167
|
| |
|
|
|
|
|
|
|
| |
disambiguation keywords outside of templates in C++98/03. Previously,
the warning would fire when the associated nested-name-specifier was
not dependent, but that was a misreading of the C++98/03 standard:
now, we complain only when we're outside of any template.
llvm-svn: 106161
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
introduced by using decls are hidden even if their template parameter lists
or return types differ from the "overriding" declaration.
Propagate using shadow declarations around more effectively when looking up
template-ids. Reperform lookup for template-ids in member expressions so that
access control is properly set up.
Fix some number of latent bugs involving template-ids with totally invalid
base types. You can only actually get these with a scope specifier, since
otherwise the template-id won't parse as a template-id.
Fixes PR7384.
llvm-svn: 106093
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
case of an elaborated-type-specifier like 'typename A<T>::foo', and
DependentTemplateSpecializationType represents the case of an
elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc
representation of a DependentTST conveniently exactly matches that of an
ElaboratedType wrapping a TST.
Kill off the explicit rebuild methods for RebuildInCurrentInstantiation;
the standard implementations work fine because the nested name specifier
is computable in the newly-entered context.
llvm-svn: 105801
|
| |
|
|
|
|
|
| |
or block-pointer type by removing the qualifiers parameter. Introduce a
method to perform semantic checking when adding qualifiers to a type.
llvm-svn: 105526
|
| |
|
|
|
|
| |
instantiation of a dependent elaborated type specifier. Fixes PR 7199.
llvm-svn: 104822
|
| |
|
|
|
|
|
|
|
| |
any arguments that are default-argument expressions. The can show up
when we have a new expression whose constructor arguments are not
type-dependent and whose allocated type is not dependent and has a
constructor with default arguments. Fixes PR7202.
llvm-svn: 104690
|
| |
|
|
|
|
| |
suggested modification.
llvm-svn: 104188
|
| |
|
|
| |
llvm-svn: 104169
|
| |
|
|
|
|
| |
welcome for one.
llvm-svn: 104101
|
| |
|
|
|
|
|
| |
Also rename ABSTRACT to ABSTRACT_STMT, in keeping with the other .def
files
llvm-svn: 104017
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.
Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.
By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.
llvm-svn: 103870
|
| |
|
|
|
|
| |
types.", it is breaking Clang bootstrap.
llvm-svn: 103775
|
| |
|
|
| |
llvm-svn: 103770
|
| |
|
|
|
|
| |
magic type that 'id' is a pointer to.
llvm-svn: 103708
|
| |
|
|
| |
llvm-svn: 103517
|
| |
|
|
|
|
|
| |
non-existent condition expressions to boolean values during template
instantiation.
llvm-svn: 103364
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
for, and switch), be careful to construct the full expressions as soon
as we perform template instantation, so we don't either forget to call
temporary destructors or destroy temporaries at the wrong time. This
is the template-instantiation analogue to r103187, during which I
hadn't realized that the issue would affect the handling of these
constructs differently inside and outside of templates.
Fixes a regression in Boost.Function.
llvm-svn: 103357
|
| |
|
|
| |
llvm-svn: 103198
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if/switch/while/do/for statements. Previously, we would end up either:
(1) Forgetting to destroy temporaries created in the condition (!),
(2) Destroying the temporaries created in the condition *before*
converting the condition to a boolean value (or, in the case of a
switch statement, to an integral or enumeral value), or
(3) In a for statement, destroying the condition's temporaries at
the end of the increment expression (!).
We now destroy temporaries in conditions at the right times. This
required some tweaking of the Parse/Sema interaction, since the parser
was building full expressions too early in many places.
Fixes PR7067.
llvm-svn: 103187
|
| |
|
|
|
|
|
| |
with no whitespace. This will allow statements to be referred to in
attribute TableGen files.
llvm-svn: 103087
|
| |
|
|
|
|
|
| |
whitespace which makes this patch unreadable. Will recommit without the
whitespace.
llvm-svn: 103086
|
| |
|
|
| |
llvm-svn: 103072
|
| |
|
|
|
|
| |
constant expression in C.
llvm-svn: 102762
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the mapping from local declarations to their instantiated
counterparts during template instantiation. Previously, we tried to do
some unholy merging of local instantiation scopes that involved
storing a single hash table along with an "undo" list on the
side... which was ugly, and never handled function parameters
properly.
Now, we just keep separate hash tables for each local instantiation
scope, and "combining" two scopes means that we'll look in each of the
combined hash tables. The combined scope stack is rarely deep, and
this makes it easy to avoid the "undo" issues we were hitting. Also,
I've simplified the logic for function parameters: if we're declaring
a function and we need the function parameters to live longer, we just
push them back into the local instantiation scope where we need them.
Fixes PR6990.
llvm-svn: 102732
|
| |
|
|
|
|
|
|
| |
classes, since we only warn (not error) on offsetof() for non-POD
types. We store the base path within the OffsetOfExpr itself, then
evaluate the offsets within the constant evaluator.
llvm-svn: 102571
|
| |
|
|
|
|
| |
members of anonymous structs/unions
llvm-svn: 102551
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Amadini.
This change introduces a new expression node type, OffsetOfExpr, that
describes __builtin_offsetof. Previously, __builtin_offsetof was
implemented using a unary operator whose subexpression involved
various synthesized array-subscript and member-reference expressions,
which was ugly and made it very hard to instantiate as a
template. OffsetOfExpr represents the AST more faithfully, with proper
type source information and a more compact representation.
OffsetOfExpr also has support for dependent __builtin_offsetof
expressions; it can be value-dependent, but will never be
type-dependent (like sizeof or alignof). This commit introduces
template instantiation for __builtin_offsetof as well.
There are two major caveats to this patch:
1) CodeGen cannot handle the case where __builtin_offsetof is not a
constant expression, so it produces an error. So, to avoid
regressing in C, we retain the old UnaryOperator-based
__builtin_offsetof implementation in C while using the shiny new
OffsetOfExpr implementation in C++. The old implementation can go
away once we have proper CodeGen support for this case, which we
expect won't cause much trouble in C++.
2) __builtin_offsetof doesn't work well with non-POD class types,
particularly when the designated field is found within a base
class. I will address this in a subsequent patch.
Fixes PR5880 and a bunch of assertions when building Boost.Python
tests.
llvm-svn: 102542
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
expressions, be sure to set the naming class of the LookupResult
structure. Fixes PR6947.
llvm-svn: 102434
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Objective-C++. This is the last bit of (non-blocks-related) template
instantiation logic for Objective-C++. Yay!
llvm-svn: 102382
|
| |
|
|
| |
llvm-svn: 102379
|
| |
|
|
|
|
|
|
| |
references and isa expressions. Also, test template instantiation of
unresolved member references to Objective-C ivar references and isa
expressions.
llvm-svn: 102374
|
| |
|
|
|
|
| |
statements. This is the last of the Objective-C statements.
llvm-svn: 102356
|