Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor 5c7e281d36 Test template instantiation for member functions of class templates defined
out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 15:45:39 +00:00
Douglas Gregor d7f37bf8b9 Implement implicit instantiation of the member functions of a class template
specialization. At present, all implicit instantiations occur at the
end of the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73915 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 23:06:13 +00:00
Anders Carlsson a53f93be98 After spending 15 minutes trying to figure out why this was crashing, I realized it was a bug in the test case :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01 00:40:08 +00:00
Sebastian Redl e47590e177 Fix usage of placement new. Placement new is not actually declared implicitly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72576 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-29 16:43:59 +00:00
Douglas Gregor c177aa2516 Add the missing public: thanks, Fariborz
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-28 16:41:44 +00:00
Douglas Gregor 2bba76b0ec Improve name lookup for and template instantiation of declaration
references. There are several smallish fixes here:

  - Make sure we look through template parameter scope when
    determining whether we're parsing a nested class (or nested class
    *template*). This makes sure that we delay parsing the bodies of
    inline member functions until after we're out of the outermost
    class (template) scope.
  - Since the bodies of member functions are always parsed
    "out-of-line", even when they were declared in-line, teach
    unqualified name lookup to look into the (semantic) parents.
  - Use the new InstantiateDeclRef to handle the instantiation of a
    reference to a declaration (in DeclRefExpr), which drastically
    simplifies template instantiation for DeclRefExprs.
  - When we're instantiating a ParmVarDecl, it must be in the current
    instantiation scope, so only look there.

Also, remove the #if 0's and FIXME's from the dynarray example, which
now compiles and executes thanks to Anders and Eli.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27 17:07:49 +00:00
Douglas Gregor 815215daf8 Initial stab at a generalized operation for determining the
instantiation of a declaration from the template version (or version
that lives in a template) and a given set of template arguments. This
needs much, much more testing, but it suffices for simple examples
like

  typedef T* iterator;
  iterator begin();




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72461 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27 05:35:12 +00:00
Douglas Gregor 2f1735c643 A simple dynamic array class template, to be used as a test-bed for template instantiation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72437 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-26 21:27:04 +00:00