forked from OSchip/llvm-project
PR45267: Don't reject pure-specifiers with escaped newlines in their '0' token.
This commit is contained in:
parent
09c8845adf
commit
ced7617c38
|
@ -2670,7 +2670,7 @@ Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
|
|||
|
||||
auto &Zero = NextToken();
|
||||
SmallString<8> Buffer;
|
||||
if (Zero.isNot(tok::numeric_constant) || Zero.getLength() != 1 ||
|
||||
if (Zero.isNot(tok::numeric_constant) ||
|
||||
PP.getSpelling(Zero, Buffer) != "0")
|
||||
return false;
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ public:
|
|||
virtual int vf5a(){0;}; // function definition, expected-warning {{unused}}
|
||||
virtual int vf6()(0); // expected-error +{{}} expected-note +{{}}
|
||||
virtual int vf7() = { 0 }; // expected-error {{does not look like a pure-specifier}}
|
||||
virtual int PR45267() = \
|
||||
0; // ok, despite escaped newline
|
||||
|
||||
private:
|
||||
int x,f(),y,g();
|
||||
|
|
Loading…
Reference in New Issue