| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
(transforming each in turn) into calls into one central routine
(TransformExprs) that transforms a list of expressions. This
refactoring is preparatory work for pack expansions whose in an
expression-list.
No functionality change.
llvm-svn: 122761
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
template argument (described by an expression, of course). For
example:
template<int...> struct int_tuple { };
template<int ...Values>
struct square {
typedef int_tuple<(Values*Values)...> type;
};
It also lays the foundation for pack expansions in an initializer-list.
llvm-svn: 122751
|
|
|
|
|
|
| |
also adds a method in ASTContext which encodes FunctionDecls using the same encoding format that is used for Objective-C methods.
llvm-svn: 122639
|
|
|
|
|
|
|
|
| |
The problem was that we were asserting the we never added an empty class
to the same offset twice. This is not true for unions, where two members, empty
or not, can have the some offset.
llvm-svn: 122633
|
|
|
|
| |
llvm-svn: 122564
|
|
|
|
|
|
|
| |
16-bits in size. Implement this by splitting WChar into two enums, like we have
for char. This fixes a miscompmilation of XULRunner, PR8856.
llvm-svn: 122558
|
|
|
|
|
|
|
| |
on array and function declarators. This is pretty far from complete, and I'll
revisit it later if someone doesn't beat me to it.
llvm-svn: 122535
|
|
|
|
|
|
|
|
| |
extract the appropriate argument from the argument pack (based on the
current substitution index, of course). Simple instantiation of pack
expansions involving non-type template parameter packs now works.
llvm-svn: 122532
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
packs, e.g.,
template<typename T, unsigned ...Dims> struct multi_array;
along with semantic analysis support for finding unexpanded non-type
template parameter packs in types, expressions, and so on.
Template instantiation involving non-type template parameter packs
probably doesn't work yet. That'll come soon.
llvm-svn: 122527
|
|
|
|
|
|
|
|
|
| |
template argument corresponding to a template parameter pack is an
argument pack of a pack expansion of that template parameter
pack. Implements C++0x [temp.dep.type]p2 (at least, as much of it as
we can).
llvm-svn: 122498
|
|
|
|
|
|
|
|
|
| |
new gcc warning that complains on self-assignments and
self-initializations. Fix one bug found by the warning, in which one
clang::OverloadCandidate constructor failed to initialize its
FunctionTemplate member.
llvm-svn: 122459
|
|
|
|
|
|
|
|
|
|
|
| |
pattern is a template argument, which involves repeatedly deducing
template arguments using the pattern of the pack expansion, then
bundling the resulting deductions into an argument pack.
We can now handle a variety of simple list-handling metaprograms using
variadic templates. See, e.g., the new "count" metaprogram.
llvm-svn: 122439
|
|
|
|
|
|
|
| |
if property-dot expression is decidedly
an rvalue. // rdar://8155806.
llvm-svn: 122430
|
|
|
|
|
|
| |
Previously designated anonymous fields were found via name lookup. This redesign uses the fact that an IndirectFieldDecl declaration will always follow an anonymous implicit field to remove the special case of name lookup.
llvm-svn: 122387
|
|
|
|
|
|
| |
expansion TypeLoc
llvm-svn: 122367
|
|
|
|
|
|
|
| |
information caused token-annotation to fail in funny ways. Fixes
<rdar://problem/8595386>.
llvm-svn: 122338
|
|
|
|
|
|
|
| |
Apply the noreturn attribute while creating a builtin function's type.
Remove the getNoReturnType() API.
llvm-svn: 122295
|
|
|
|
|
|
| |
getting extra "<>" delimiters around template argument packs.
llvm-svn: 122280
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
whose patterns are template arguments. We can now instantiate, e.g.,
typedef tuple<pair<OuterTypes, InnerTypes>...> type;
where OuterTypes and InnerTypes are template type parameter packs.
There is a horrible inefficiency in
TemplateArgumentLoc::getPackExpansionPattern(), where we need to
create copies of TypeLoc data because our interfaces traffic in
TypeSourceInfo pointers where they should traffic in TypeLocs
instead. I've isolated in efficiency in this one routine; once we
refactor our interfaces to traffic in TypeLocs, we can eliminate it.
llvm-svn: 122278
|
|
|
|
|
|
|
| |
area of printing template arguments. The functionality changes here
are limited to cases of variadic templates that aren't yet enabled.
llvm-svn: 122250
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pack expansions, e.g. given
template<typename... Types> struct tuple;
template<typename... Types>
struct tuple_of_refs {
typedef tuple<Types&...> types;
};
the type of the "types" typedef is a PackExpansionType whose pattern
is Types&.
This commit introduces support for creating pack expansions for
template type arguments, as above, but not for any other kind of pack
expansion, nor for any form of instantiation.
llvm-svn: 122223
|
|
|
|
| |
llvm-svn: 122162
|
|
|
|
|
|
|
| |
don't provide their own explicit visibility attributes should get them
from the template. Fixes rdar://problem/8778497.
llvm-svn: 122136
|
|
|
|
| |
llvm-svn: 122021
|
|
|
|
|
|
|
|
| |
declarations. This is a work in progress, as I go through the C++
declaration grammar to identify where unexpanded parameter packs can
occur.
llvm-svn: 121912
|
|
|
|
|
|
| |
explicitly mark that all cases are handled.
llvm-svn: 121855
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
whether the expression contains an unexpanded parameter pack, in the
same vein as the changes to the Type hierarchy. Compute this bit
within all of the Expr subclasses.
This change required a bunch of reshuffling of dependency
calculations, mainly to consolidate them inside the constructors and
to fuse multiple loops that iterate over arguments to determine type
dependence, value dependence, and (now) containment of unexpanded
parameter packs.
Again, testing is painfully sparse, because all of the diagnostics
will change and it is more important to test the to-be-written visitor
that collects unexpanded parameter packs.
llvm-svn: 121831
|
|
|
|
| |
llvm-svn: 121821
|
|
|
|
| |
llvm-svn: 121795
|
|
|
|
|
|
|
| |
the basic casting logic to insert intermediate casts and preserve the
exact complex-cast design. Fixes a crash in the test suite.
llvm-svn: 121776
|
|
|
|
| |
llvm-svn: 121763
|
|
|
|
| |
llvm-svn: 121759
|
|
|
|
|
|
|
| |
class to be passed around. The line between argument and return types and
everything else is kindof vague, but I think it's justifiable.
llvm-svn: 121752
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and TemplateArgument with an operation that determines whether there
are any unexpanded parameter packs within that construct. Use this
information to diagnose the appearance of the names of parameter packs
that have not been expanded (C++ [temp.variadic]p5). Since this
property is checked often (every declaration, ever expression
statement, etc.), we extend Type and Expr with a bit storing the
result of this computation, rather than walking the AST each time to
determine whether any unexpanded parameter packs occur.
This commit is deficient in several ways, which will be remedied with
future commits:
- Expr has a bit to store the presence of an unexpanded parameter
pack, but it is never set.
- The error messages don't point out where the unexpanded parameter
packs were named in the type/expression, but they should.
- We don't check for unexpanded parameter packs in all of the places
where we should.
- Testing is sparse, pending the resolution of the above three
issues.
llvm-svn: 121724
|
|
|
|
| |
llvm-svn: 121720
|
|
|
|
| |
llvm-svn: 121616
|
|
|
|
|
|
| |
receiver.
llvm-svn: 121517
|
|
|
|
| |
llvm-svn: 121516
|
|
|
|
| |
llvm-svn: 121488
|
|
|
|
|
|
|
|
|
|
| |
space better. Remove this reference. To make that work, change some APIs
(most importantly, getDesugaredType()) to take an ASTContext& if they
need to return a QualType. Simultaneously, diminish the need to return a
QualType by introducing some useful APIs on SplitQualType, which is
just a std::pair<const Type *, Qualifiers>.
llvm-svn: 121478
|
|
|
|
|
|
|
|
| |
increasing the required type alignment from 8 to 16. This provides a
2.5% speedup for -fsyntax-only on a token-cached Cocoa.h, while only
increasing memory consumption in the ASTContext by 0.8%.
llvm-svn: 121474
|
|
|
|
|
|
|
|
|
|
|
| |
visibility. Fixes PR8713.
I've disabled a test which was testing that you can #pragma pop visibility
to get out of a namespace's visibility attribute. We should probably just
diagnose that as an error unless it's instrumental to someone's system
headers.
llvm-svn: 121459
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"inline", we weren't giving the definition weak linkage because the
"inline" bit wasn't propagated. This was a longstanding FIXME that,
somehow, hadn't triggered a bug in the wild. Fix this problem by
tracking whether any declaration was marked "inline", and clean up the
semantics of GNU's "extern inline" semantics calculation based on this
change.
Fixes <rdar://problem/8740363>.
llvm-svn: 121373
|
|
|
|
| |
llvm-svn: 121352
|
|
|
|
|
|
|
|
|
|
| |
aligment of the sub-struct,
take into account if the sub-struct is packed and its maximum field alignment.
Fixes rdar://8745206
llvm-svn: 121335
|
|
|
|
|
|
| |
BinaryTypeTraitExpr.
llvm-svn: 121298
|
|
|
|
|
|
| |
implementation.
llvm-svn: 121263
|
|
|
|
|
|
| |
(@synthesize and @dynamic).
llvm-svn: 121159
|
|
|
|
|
|
| |
unsigned integer" warnings.
llvm-svn: 121143
|
|
|
|
| |
llvm-svn: 121139
|