Commit Graph

13 Commits

Author SHA1 Message Date
Daniel Dunbar 8452ef0798 tests: Use %clangxx when using driver for C++, in case C++ support is disabled.
llvm-svn: 107153
2010-06-29 16:52:24 +00:00
Daniel Dunbar 5618e98f33 Update tests to use %clang instead of 'clang', and forcibly disable use of '
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).

llvm-svn: 91460
2009-12-15 22:01:24 +00:00
Daniel Dunbar 633d5b3ee2 Use clang to run tests which include headers from the system.
llvm-svn: 89085
2009-11-17 10:14:55 +00:00
John Thompson f174268a1f Fixed for running on Windows.
llvm-svn: 86053
2009-11-04 21:52:17 +00:00
Douglas Gregor d94105a1c2 Don't generate any code for an explicit call to a trivial destructor.
Now that parsing, semantic analysis, and (I think) code generation of
pseudo-destructor expressions and explicit destructor calls works,
update the example-dynarray.cpp test to destroy the objects it
allocates and update the test to actually compile + link.
The code seems correct, but the Clang-compiled version dies with a
malloc error. Time to debug!

llvm-svn: 81025
2009-09-04 19:04:08 +00:00
Douglas Gregor a3a4dd5d03 Test template instantiation for member functions of class templates defined
out of line.

llvm-svn: 76740
2009-07-22 15:45:39 +00:00
Douglas Gregor 77b50e1126 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.

llvm-svn: 73915
2009-06-22 23:06:13 +00:00
Anders Carlsson 6f6f6005ab After spending 15 minutes trying to figure out why this was crashing, I realized it was a bug in the test case :)
llvm-svn: 72680
2009-06-01 00:40:08 +00:00
Sebastian Redl eed0ec5fdb Fix usage of placement new. Placement new is not actually declared implicitly.
llvm-svn: 72576
2009-05-29 16:43:59 +00:00
Douglas Gregor 019d3750cb Add the missing public: thanks, Fariborz
llvm-svn: 72528
2009-05-28 16:41:44 +00:00
Douglas Gregor f98d9b60db 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.

llvm-svn: 72481
2009-05-27 17:07:49 +00:00
Douglas Gregor 5178331379 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();

llvm-svn: 72461
2009-05-27 05:35:12 +00:00
Douglas Gregor c44ba89397 A simple dynamic array class template, to be used as a test-bed for template instantiation
llvm-svn: 72437
2009-05-26 21:27:04 +00:00