Skip to content

Commit 2b01663

Browse files
committed
[FOLD] additional test
1 parent 52d18a6 commit 2b01663

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

clang/test/SemaTemplate/ms-function-specialization-class-scope.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ namespace UsesThis {
104104
+x;
105105
+A::x;
106106
}
107+
108+
template<typename U>
109+
static auto h() -> A*;
110+
111+
template<>
112+
auto h<int>() -> decltype(this); // expected-error {{'this' cannot be used in a static member function declaration}}
107113
};
108114

109-
template struct A<int>; // expected-note {{in instantiation of function template specialization}}
115+
template struct A<int>; // expected-note 2{{in instantiation of}}
110116
}

0 commit comments

Comments
 (0)