When instantiating the definition of a member function of a class
template, introduce that member function into the template
instantiation stack. Also, add diagnostics showing the member function
within the instantiation stack and clean up the qualified-name
printing so that we get something like:
note: in instantiation of member function 'Switch1<int, 2, 2>::f'
requested here
in the template instantiation backtrace.
llvm-svn: 72015
diff --git a/clang/test/SemaTemplate/temp_explicit.cpp b/clang/test/SemaTemplate/temp_explicit.cpp
index 6394f1d..0292964 100644
--- a/clang/test/SemaTemplate/temp_explicit.cpp
+++ b/clang/test/SemaTemplate/temp_explicit.cpp
@@ -49,7 +49,7 @@
// Check that explicit instantiations instantiate member classes.
template<typename T> struct X3 {
- struct Inner { // expected-note{{here}}
+ struct Inner {
void f(T*); // expected-error{{pointer to a reference}}
};
};
@@ -59,8 +59,8 @@
template struct X3<int&>; // expected-note{{instantiation}}
template<typename T> struct X4 {
- struct Inner { // expected-note 2{{here}}
- struct VeryInner { // expected-note 2{{here}}
+ struct Inner {
+ struct VeryInner {
void f(T*); // expected-error 2{{pointer to a reference}}
};
};
@@ -82,7 +82,7 @@
};
struct Inner2 {
- struct VeryInner { // expected-note 2{{instantiation}}
+ struct VeryInner {
void g(T*); // expected-error 2{{pointer to a reference}}
};
};