| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Once we have deduced template arguments for a class template partial
specialization, we use exactly those template arguments for instantiating
the definition of the class template partial specialization.
- Added template argument deduction for non-type template parameters.
- Added template argument deduction for dependently-sized array types.
With these changes, we can now implement, e.g., the remove_reference
type trait. Also, Daniel's Ackermann template metaprogram now compiles
properly.
llvm-svn: 72909
|
| |
|
|
| |
llvm-svn: 72901
|
| |
|
|
| |
llvm-svn: 72871
|
| |
|
|
|
|
| |
please review.
llvm-svn: 72844
|
| |
|
|
| |
llvm-svn: 72834
|
| |
|
|
| |
llvm-svn: 72822
|
| |
|
|
|
|
|
|
|
|
| |
deductions of the same template parameter are equivalent. This allows
us to implement the is_same type trait (!).
Also, move template argument deduction into its own file and update a
few build systems with this change (grrrr).
llvm-svn: 72819
|
| |
|
|
| |
llvm-svn: 72770
|
| |
|
|
|
|
| |
type for C++.
llvm-svn: 72747
|
| |
|
|
| |
llvm-svn: 72726
|
| |
|
|
|
|
|
|
| |
definition variadic. I'm not completely sure it's legal, but the
standard can be interpreted as making it legal, and gcc seems to think
it's legal, so I didn't add an extension warning.
llvm-svn: 72689
|
| |
|
|
|
|
| |
FindAllocationOverload. This fixes placement new. (Sebastian, please review).
llvm-svn: 72673
|
| |
|
|
|
|
| |
operator new and operator delete arguments. Sebastian, please review.
llvm-svn: 72670
|
| |
|
|
|
|
|
|
| |
an error to being a warning that defaults to error. If you want this to
be a warning, you have to explicitly pass -Winvalid-noreturn to clang to
map it back to a warning.
llvm-svn: 72669
|
| |
|
|
| |
llvm-svn: 72664
|
| |
|
|
|
|
| |
string.
llvm-svn: 72663
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
we have the basics of declaring and storing class template partial
specializations, matching class template partial specializations at
instantiation time via (limited) template argument deduction, and
using the class template partial specialization's pattern for
instantiation.
This patch is enough to make a simple is_pointer type trait work, but
not much else.
llvm-svn: 72662
|
| |
|
|
| |
llvm-svn: 72647
|
| |
|
|
| |
llvm-svn: 72644
|
| |
|
|
| |
llvm-svn: 72643
|
| |
|
|
| |
llvm-svn: 72642
|
| |
|
|
| |
llvm-svn: 72641
|
| |
|
|
| |
llvm-svn: 72640
|
| |
|
|
| |
llvm-svn: 72638
|
| |
|
|
| |
llvm-svn: 72634
|
| |
|
|
| |
llvm-svn: 72633
|
| |
|
|
| |
llvm-svn: 72632
|
| |
|
|
|
|
| |
need to take a VarDecl anymore. (It still does, but it won't for long)
llvm-svn: 72630
|
| |
|
|
|
|
| |
wraps it in a CXXBindTemporaryExpr. Use this when creating CXXTemporaryObjectExprs.
llvm-svn: 72629
|
| |
|
|
| |
llvm-svn: 72627
|
| |
|
|
| |
llvm-svn: 72624
|
| |
|
|
| |
llvm-svn: 72616
|
| |
|
|
|
|
|
|
|
| |
using namespace std::debug;
Extended UsingDirectiveDecl to store the nested-name-specifier that
precedes the nominated namespace.
llvm-svn: 72614
|
| |
|
|
|
|
| |
virtual member functions. Use this instead of regular name lookup when checking for overriding functions so we will see declarations that would otherwise be hidden. Fixes 6902298.
llvm-svn: 72601
|
| |
|
|
|
|
|
|
|
| |
walks through DeclContexts properly, and prints more of the
information available in the AST. The functionality is still available
via -ast-print, -ast-dump, etc., and also via the new member functions
Decl::dump() and Decl::print().
llvm-svn: 72597
|
| |
|
|
| |
llvm-svn: 72594
|
| |
|
|
|
|
|
|
|
| |
printing logic to help customize the output. For now, we use this
rather than a special flag to suppress the "struct" when printing
"struct X" and to print the Boolean type as "bool" in C++ but "_Bool"
in C.
llvm-svn: 72590
|
| |
|
|
|
|
|
| |
hadError (suppressing future diagnostics) if we didn't print an
error.
llvm-svn: 72588
|
| |
|
|
|
|
| |
VLAs.
llvm-svn: 72587
|
| |
|
|
|
|
|
| |
template instantiation. This helps reduce our stack footprint when
performing deep template instantiations.
llvm-svn: 72582
|
| |
|
|
|
|
| |
handle the construct in question correctly.
llvm-svn: 72581
|
| |
|
|
| |
llvm-svn: 72580
|
| |
|
|
|
|
| |
a vla is used.
llvm-svn: 72575
|
| |
|
|
| |
llvm-svn: 72571
|
| |
|
|
| |
llvm-svn: 72570
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
instantiation of tags local to member functions of class templates
(and, eventually, function templates) works when the tag is defined as
part of the decl-specifier-seq, e.g.,
struct S { T x, y; } s1;
Also, make sure that we don't try to default-initialize a dependent
type.
llvm-svn: 72568
|
| |
|
|
|
|
| |
to the DeclGroup.
llvm-svn: 72559
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specifier resulted in the creation of a new TagDecl node, which
happens either when the tag specifier was a definition or when the tag
specifier was the first declaration of that tag type. This information
has several uses, the first of which is implemented in this commit:
1) In C++, one is not allowed to define tag types within a type
specifier (e.g., static_cast<struct S { int x; } *>(0) is
ill-formed) or within the result or parameter types of a
function. We now diagnose this.
2) We can extend DeclGroups to contain information about any tags
that are declared/defined within the declaration specifiers of a
variable, e.g.,
struct Point { int x, y, z; } p;
This will help improve AST printing and template instantiation,
among other things.
3) For C99, we can keep track of whether a tag type is defined
within the type of a parameter, to properly cope with cases like,
e.g.,
int bar(struct T2 { int x; } y) {
struct T2 z;
}
We can also do similar things wherever there is a type specifier,
e.g., to keep track of where the definition of S occurs in this
legal C99 code:
(struct S { int x, y; } *)0
llvm-svn: 72555
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
given DeclContext is dependent on type parameters. Use this to
properly determine whether a TagDecl is dependent; previously, we were
missing the case where the TagDecl is a local class of a member
function of a class template (phew!).
Also, make sure that, when we instantiate declarations within a member
function of a class template (or a function template, eventually),
that we add those declarations to the "instantiated locals" map so
that they can be found when instantiating declaration references.
Unfortunately, I was not able to write a useful test for this change,
although the assert() that fires when uncommenting the FIXME'd line in
test/SemaTemplate/instantiate-declref.cpp tells the "experienced user"
that we're now doing the right thing.
llvm-svn: 72526
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
parser. Rather than placing all of the delayed member function
declarations and inline definitions into a single bucket corresponding
to the top-level class, we instead mirror the nesting structure of the
nested classes and place the delayed member functions into their
appropriate place. Then, when we actually parse the delayed member
function declarations, set up the scope stack the same way as it was
when we originally saw the declaration, so that we can find, e.g.,
template parameters that are in scope.
llvm-svn: 72502
|