forked from OSchip/llvm-project
GCC fails if there is a trailing colon but no clobbers.
llvm-svn: 44265
This commit is contained in:
parent
738fa17c4e
commit
091a059c55
|
@ -957,14 +957,12 @@ Parser::StmtResult Parser::ParseAsmStatement() {
|
|||
if (Tok.is(tok::colon)) {
|
||||
ConsumeToken();
|
||||
|
||||
if (isTokenStringLiteral()) {
|
||||
// Parse the asm-string list for clobbers.
|
||||
while (1) {
|
||||
ParseAsmStringLiteral();
|
||||
// Parse the asm-string list for clobbers.
|
||||
while (1) {
|
||||
ParseAsmStringLiteral();
|
||||
|
||||
if (Tok.isNot(tok::comma)) break;
|
||||
ConsumeToken();
|
||||
}
|
||||
if (Tok.isNot(tok::comma)) break;
|
||||
ConsumeToken();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
// RUN: clang -fsyntax-only -verify %s
|
||||
|
||||
void f1() {
|
||||
asm ("ret" : : :); // expected-error {{expected string literal}}
|
||||
}
|
Loading…
Reference in New Issue