aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-class.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-19 16:41:58 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-19 16:41:58 +0000
commit9ea416e598fa3cb09d67d514c4519c99abb81321 (patch)
tree1cb5e060b2ab76c14340c0ac0e475b4b7baf1399 /test/Parser/cxx-class.cpp
parent2998d6b0e6d5476c473f68012a851fe4a0f609c8 (diff)
Parse the optional semicolon after a C++ in-class member function
definition, rather than complaining about it. Problem reported by Marshall Clow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-class.cpp')
-rw-r--r--test/Parser/cxx-class.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/Parser/cxx-class.cpp b/test/Parser/cxx-class.cpp
index 57831a463b..f863bd198e 100644
--- a/test/Parser/cxx-class.cpp
+++ b/test/Parser/cxx-class.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
class C;
class C {
public:
@@ -14,7 +14,11 @@ protected:
public:
void m() {
int l = 2;
- }
+ };
+
+ template<typename T> void mt(T) { };
+ ; // expected-warning{{extra ';' inside a class}}
+
virtual int vf() const volatile = 0;
private: