diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-30 17:20:14 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-30 17:20:14 +0000 |
commit | dda7ced32ed79f4d60e89d2b64cd2ee041b66616 (patch) | |
tree | 32e37d6a4b2d613fe7a8f07f4647c2b50a133158 /clang/test/SemaTemplate/recursive-template-instantiation.cpp | |
parent | b2b37c62d0dc22089889321a5cd1676e4f70f78c (diff) | |
download | bcm5719-llvm-dda7ced32ed79f4d60e89d2b64cd2ee041b66616.tar.gz bcm5719-llvm-dda7ced32ed79f4d60e89d2b64cd2ee041b66616.zip |
When recursively instantiating function templates, keep track of the
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
Diffstat (limited to 'clang/test/SemaTemplate/recursive-template-instantiation.cpp')
-rw-r--r-- | clang/test/SemaTemplate/recursive-template-instantiation.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/recursive-template-instantiation.cpp b/clang/test/SemaTemplate/recursive-template-instantiation.cpp new file mode 100644 index 00000000000..7c88d5019fd --- /dev/null +++ b/clang/test/SemaTemplate/recursive-template-instantiation.cpp @@ -0,0 +1,10 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +template<typename T> void f(T* t) { + f(*t); // expected-error{{no matching function}}\ + // expected-note 3{{requested here}} +} + +void test_f(int ****p) { + f(p); // expected-note{{requested here}} +} |