summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiation-depth-subst-2.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-09-22 00:53:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-09-22 00:53:56 +0000
commit5d99a252c63a7745bcd71231ca5240d2a65e4f1d (patch)
treed269bdf7cf546130a033bb63d388179378996606 /test/SemaTemplate/instantiation-depth-subst-2.cpp
parent3d442196134d18ed8ee17576638b758362b60742 (diff)
downloadclang-5d99a252c63a7745bcd71231ca5240d2a65e4f1d.tar.gz
Fix bug which sometimes resulted in further diagnostics being produced after a
fatal error. Previously, if a fatal error was followed by a diagnostic which was suppressed due to a SFINAETrap, we'd forget that we'd seen a fatal error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiation-depth-subst-2.cpp')
-rw-r--r--test/SemaTemplate/instantiation-depth-subst-2.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/SemaTemplate/instantiation-depth-subst-2.cpp b/test/SemaTemplate/instantiation-depth-subst-2.cpp
index a29d6b5a1b..ef2a5c765d 100644
--- a/test/SemaTemplate/instantiation-depth-subst-2.cpp
+++ b/test/SemaTemplate/instantiation-depth-subst-2.cpp
@@ -1,9 +1,6 @@
// 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{{}}
+template<typename T> S<T() + T()> operator+(T, T); // expected-error {{instantiation exceeded maximum depth}} expected-note 3{{while substituting}}
S<0> s;
-int k = s + s; // expected-error {{invalid operands to binary expression}}
+int k = s + s;