- Aug 29, 2009
-
-
Douglas Gregor authored
llvm-svn: 80397
-
- Aug 28, 2009
-
-
Douglas Gregor authored
llvm-svn: 80394
-
Douglas Gregor authored
When performing template instantiation of the definitions of member templates (or members thereof), we build a data structure containing the template arguments from each "level" of template instantiation. During template instantiation, we substitute all levels of template arguments simultaneously. llvm-svn: 80389
-
Anders Carlsson authored
llvm-svn: 80366
-
John McCall authored
declarations of same, introduce a single AST class and add appropriate bits (encoded in the namespace) for whether a decl is "real" or not. Much hackery about previously-declared / not-previously-declared, but it's essentially mandated by the standard that friends alter lookup, and this is at least fairly non-intrusive. Refactor the Sema methods specific to friends for cleaner flow and less nesting. Incidentally solve a few bugs, but I remain confident that we can put them back. llvm-svn: 80353
-
- Aug 27, 2009
-
-
Eli Friedman authored
cause any regressions. llvm-svn: 80277
-
Eli Friedman authored
llvm-svn: 80272
-
Douglas Gregor authored
templates within class templates, producing a member function template of a class template specialization. If you can parse that, I'm sorry. Example: template<typename T> struct X { template<typename U> void f(T, U); }; When we instantiate X<int>, we now instantiate the declaration X<int>::f, which looks like this: template<typename U> void X<int>::f(int, U); The path this takes through TemplateDeclInstantiator::VisitCXXMethodDecl is convoluted and ugly, but I don't know how to improve it yet. I'm resting my hopes on the multi-level substitution required to instantiate definitions of nested templates, which may simplify this code as well. More testing to come... llvm-svn: 80252
-
Douglas Gregor authored
Make sure to bump the reference count of the last element in the ParenListExpr representing the direct initializer of a declaration llvm-svn: 80177
-
- Aug 26, 2009
-
-
Douglas Gregor authored
types or type-dependent expressions. llvm-svn: 80143
-
John McCall authored
functions that don't instantiate definitions. llvm-svn: 80037
-
- Aug 25, 2009
-
-
Anders Carlsson authored
llvm-svn: 79972
-
- Aug 22, 2009
-
-
Douglas Gregor authored
template argument deduction from a conversion function (C++ [temp.deduct.conv]) with implicit conversions. llvm-svn: 79693
-
Douglas Gregor authored
code, fixing a problem where instantiations of out-of-line destructor definitions would had the wrong lexical context. Introduce tests for out-of-line definitions of the constructors, destructors, and conversion functions of a class template partial specialization. llvm-svn: 79682
-
- Aug 21, 2009
-
-
Douglas Gregor authored
and will participate in overload resolution. Unify the instantiation of CXXMethodDecls and CXXConstructorDecls, which had already gotten out-of-sync. llvm-svn: 79658
-
Argyrios Kyrtzidis authored
Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information. llvm-svn: 79584
-
Douglas Gregor authored
- Allowing one to name a member function template within a class template and on the right-hand side of a member access expression. - Template argument deduction for calls to member function templates. - Registering specializations of member function templates (and finding them later). llvm-svn: 79581
-
- Aug 20, 2009
-
-
John McCall authored
llvm-svn: 79504
-
- Aug 19, 2009
-
-
Argyrios Kyrtzidis authored
DeclaratorDecl contains a DeclaratorInfo* to keep type source info. Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl. EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo. Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet. llvm-svn: 79392
-
- Aug 15, 2009
-
-
Eli Friedman authored
llvm-svn: 79143
-
- Aug 14, 2009
-
-
John McCall authored
still works. llvm-svn: 78979
-
- Aug 08, 2009
-
-
Edward O'Callaghan authored
llvm-svn: 78471
-
Douglas Gregor authored
to allow sharing of nodes. Simplifies some aspects of template instantiation, and fixes both PR3444 and <rdar://problem/6757457>. llvm-svn: 78450
-
- Aug 05, 2009
-
-
Douglas Gregor authored
tighten up the static type system. llvm-svn: 78164
-
- Aug 04, 2009
-
-
Mike Stump authored
llvm-svn: 78102
-
- Jul 29, 2009
-
-
Douglas Gregor authored
template arguments, as in template specialization types. This permits matching out-of-line definitions of members for class templates that involve non-type template parameters. llvm-svn: 77462
-
- Jul 27, 2009
-
-
Douglas Gregor authored
ActOnUninitializedDecl. llvm-svn: 77211
-
- Jul 24, 2009
-
-
Douglas Gregor authored
Note that this also fixes a bug that affects non-template code, where we were not treating out-of-line static data members are "file-scope" variables, and therefore not checking their initializers. llvm-svn: 77002
-
- Jul 21, 2009
-
-
Douglas Gregor authored
Zaffanella, with tweaks from Abramo Bagnara. llvm-svn: 76576
-
- Jul 18, 2009
-
-
Argyrios Kyrtzidis authored
llvm-svn: 76274
-
- Jul 17, 2009
-
-
Daniel Dunbar authored
llvm-svn: 76112
-
- Jul 14, 2009
-
-
Steve Naroff authored
Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary). llvm-svn: 75635
-
- Jul 02, 2009
-
-
Douglas Gregor authored
by distinguishing between substitution that occurs for template argument deduction vs. explicitly-specifiad template arguments. This is used both to improve diagnostics and to make sure we only provide SFINAE in those cases where SFINAE should apply. In addition, deal with the sticky issue where SFINAE only considers substitution of template arguments into the *type* of a function template; we need to issue hard errors beyond this point, as test/SemaTemplate/operator-template.cpp illustrates. llvm-svn: 74651
-
- Jun 30, 2009
-
-
Douglas Gregor authored
instantiation stack so that we provide a full instantiation backtrace. Previously, we performed all of the instantiations implied by the recursion, but each looked like a "top-level" instantiation. The included test case tests the previous fix for the instantiation of DeclRefExprs. Note that the "instantiated from" diagnostics still don't tell us which template arguments we're instantiating with. llvm-svn: 74540
-
Douglas Gregor authored
"semantic analysis" part. Use the "semantic analysis" part when performing template instantiation on a DeclRefExpr, rather than an ad hoc list of rules to construct DeclRefExprs from the instantiation. A test case for this change will come in with a large commit, which illustrates what I was actually trying to work on. llvm-svn: 74528
-
Argyrios Kyrtzidis authored
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
-
Argyrios Kyrtzidis authored
Timings showed no significant difference before and after the commit. llvm-svn: 74504
-
- Jun 29, 2009
-
-
Douglas Gregor authored
redundant, implicit instantiations of function templates and provide a place where we can hang function template specializations. llvm-svn: 74454
-
- Jun 26, 2009
-
-
Douglas Gregor authored
For a FunctionDecl that has been instantiated due to template argument deduction, we now store the primary template from which it was instantiated and the deduced template arguments. From this information, we can instantiate the body of the function template. llvm-svn: 74232
-
Douglas Gregor authored
templates. For example, this now type-checks (but does not instantiate the body of deref<int>): template<typename T> T& deref(T* t) { return *t; } void test(int *ip) { int &ir = deref(ip); } Specific changes/additions: * Template argument deduction from a call to a function template. * Instantiation of a function template specializations (just the declarations) from the template arguments deduced from a call. * FunctionTemplateDecls are stored directly in declaration contexts and found via name lookup (all forms), rather than finding the FunctionDecl and then realizing it is a template. This is responsible for most of the churn, since some of the core declaration matching and lookup code assumes that all functions are FunctionDecls. llvm-svn: 74213
-