diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaTemplate/instantiation-depth-subst-2.cpp | |
parent | bb67ca86b31f67faee50bd10c3b036d65751745a (diff) | |
download | FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz |
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/SemaTemplate/instantiation-depth-subst-2.cpp')
-rw-r--r-- | test/SemaTemplate/instantiation-depth-subst-2.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiation-depth-subst-2.cpp b/test/SemaTemplate/instantiation-depth-subst-2.cpp new file mode 100644 index 0000000..a29d6b5 --- /dev/null +++ b/test/SemaTemplate/instantiation-depth-subst-2.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -verify %s -ftemplate-depth 2 + +template<int N> struct S { }; +// FIXME: We produce the same 'instantiation depth' error here many times +// (2^(depth+1) in total), due to additional lookups performed as part of +// error recovery in DiagnoseTwoPhaseOperatorLookup. +template<typename T> S<T() + T()> operator+(T, T); // expected-error 8{{}} expected-note 10{{}} +S<0> s; +int k = s + s; // expected-error {{invalid operands to binary expression}} |