Index: lib/Parse/ParseStmtAsm.cpp =================================================================== --- lib/Parse/ParseStmtAsm.cpp +++ lib/Parse/ParseStmtAsm.cpp @@ -417,9 +417,10 @@ // If this is a single-line __asm, we're done, except if the next // line begins with an __asm too, in which case we finish a comment // if needed and then keep processing the next line as a single - // line __asm. + // line __asm. Also break if the next __asm is followed by an '(' - + // GCC-style asm. bool isAsm = Tok.is(tok::kw_asm); - if (SingleLineMode && !isAsm) + if (SingleLineMode && (!isAsm || NextToken().is(tok::l_paren))) break; // We're no longer in a comment. InAsmComment = false; Index: test/CodeGen/inline-asm-mixed-style.c =================================================================== --- test/CodeGen/inline-asm-mixed-style.c +++ test/CodeGen/inline-asm-mixed-style.c @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple i386-unknown-unknown -fasm-blocks -fsyntax-only -verify %s +// expected-no-diagnostics +// RUN: %clang_cc1 -triple i386-unknown-unknown -fasm-blocks -emit-llvm -S %s -o - | FileCheck %s + +void f() { + __asm mov eax, ebx + __asm mov ebx, ecx + __asm__("movl %ecx, %edx"); + + // CHECK: movl %ebx, %eax + // CHECK: movl %ecx, %ebx + // CHECK: movl %ecx, %edx +}