aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/default-expr-arguments.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-11 23:32:50 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-11 23:32:50 +0000
commit4fcf5b2f816347ba7a3f16557d5e2b293634d4d6 (patch)
tree233bf8945619ee9c88e2e6038975d561c7c5e898 /test/SemaTemplate/default-expr-arguments.cpp
parent8023030f76d334355b73d9c675d3870858aaf4fd (diff)
Teach the EvaluatedExprVisitor and its client, which marks
declarations in potentially-evaluated subexpressions, about recursion. Fixes the release-mode self-host failure I introduced in r113700. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113708 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/default-expr-arguments.cpp')
-rw-r--r--test/SemaTemplate/default-expr-arguments.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp
index c898e102bc..8fc241d5b2 100644
--- a/test/SemaTemplate/default-expr-arguments.cpp
+++ b/test/SemaTemplate/default-expr-arguments.cpp
@@ -218,6 +218,24 @@ namespace PR5810b {
void g() { f(17); }
}
+namespace PR5810c {
+ template<typename T>
+ struct X {
+ X() {
+ T t;
+ double *****p = t; // expected-error{{cannot initialize a variable of type 'double *****' with an lvalue of type 'int'}}
+ }
+ X(const X&) { }
+ };
+
+ struct Y : X<int> { // expected-note{{instantiation of}}
+ };
+
+ void f(Y y = Y());
+
+ void g() { f(); }
+}
+
namespace PR8127 {
template< typename T > class PointerClass {
public: