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
Diag(Tok, diag::err_func_def_no_params);
ConsumeBrace();
SkipUntil(tok::r_brace, true);
+
+ // Consume the optional ';'
+ if (Tok.is(tok::semi))
+ ConsumeToken();
return;
}
// assumes the declarator represents a function, not a typedef.
ConsumeBrace();
SkipUntil(tok::r_brace, true);
+
+ // Consume the optional ';'
+ if (Tok.is(tok::semi))
+ ConsumeToken();
return;
}
ParseCXXInlineMethodDef(AS, DeclaratorInfo, TemplateInfo);
+ // Consume the optional ';'
+ if (Tok.is(tok::semi))
+ ConsumeToken();
+
return;
}
}
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
class C;
class C {
public:
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: