summaryrefslogtreecommitdiff
path: root/test/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser')
-rw-r--r--test/Parser/cxx-parse-member-pointer-op.cpp13
-rw-r--r--test/Parser/cxx-template-decl.cpp6
2 files changed, 18 insertions, 1 deletions
diff --git a/test/Parser/cxx-parse-member-pointer-op.cpp b/test/Parser/cxx-parse-member-pointer-op.cpp
new file mode 100644
index 0000000000000..cc2e8b142fcb8
--- /dev/null
+++ b/test/Parser/cxx-parse-member-pointer-op.cpp
@@ -0,0 +1,13 @@
+// RUN: clang-cc -fsyntax-only -pedantic -verify %s
+
+struct C {};
+
+typedef void (C::*pmfc)();
+
+void g(pmfc) {
+ C *c;
+ c->*pmfc(); // expected-error {{invalid use of pointer to member type after '->*'}}
+ C c1;
+ c1.*pmfc(); // expected-error {{invalid use of pointer to member type after '.*'}}
+}
+
diff --git a/test/Parser/cxx-template-decl.cpp b/test/Parser/cxx-template-decl.cpp
index 9309b72a556e3..2b2d3de50497c 100644
--- a/test/Parser/cxx-template-decl.cpp
+++ b/test/Parser/cxx-template-decl.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify %s
+// RUN: clang-cc -fsyntax-only -verify -fms-extensions=0 %s
// Errors
export class foo { }; // expected-error {{expected template}}
@@ -92,3 +92,7 @@ void f2() {
int x;
A< typeof(x>1) > a;
}
+
+
+// PR3844
+template <> struct S<int> { }; // expected-error{{explicit specialization of non-template struct 'S'}}