summaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/PR8755.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/PR8755.cpp')
-rw-r--r--clang/test/SemaCXX/PR8755.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/PR8755.cpp b/clang/test/SemaCXX/PR8755.cpp
new file mode 100644
index 0000000..07778dd
--- /dev/null
+++ b/clang/test/SemaCXX/PR8755.cpp
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+template <typename T>
+struct A {
+ typedef int iterator; // expected-note{{declared here}}
+};
+
+template <typename T>
+void f() {
+ class A <T> ::iterator foo; // expected-error{{elaborated type refers to a typedef}}
+}
+
+void g() {
+ f<int>(); // expected-note{{in instantiation of function template}}
+}
+