Extend the use of QualifiedNameType to the creation of class template
specialization names. This way, we keep track of sugared types like
std::vector<Real>
I believe we are now using QualifiedNameTypes everywhere we can. Next
step: QualifiedDeclRefExprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67268 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/qualified-names-diag.cpp b/test/SemaTemplate/qualified-names-diag.cpp
new file mode 100644
index 0000000..02bdf16
--- /dev/null
+++ b/test/SemaTemplate/qualified-names-diag.cpp
@@ -0,0 +1,16 @@
+// RUN: clang -fsyntax-only -verify %s
+
+namespace std {
+ template<typename T> class vector { };
+}
+
+typedef int INT;
+typedef float Real;
+
+void test() {
+ using namespace std;
+
+ std::vector<INT> v1;
+ vector<Real> v2;
+ v1 = v2; // expected-error{{incompatible type assigning 'vector<Real>' (aka 'class vector<float>'), expected 'std::vector<INT>' (aka 'class vector<int>')}}
+}