Support fuzzy parsing MS line-oriented __asm's that originate from a macro (a case where we can't obtain source line info). As the test case indicates, we don't currently support line-oriented asm statements that mix file/macro body tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46878 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/ms-fuzzy-asm.c b/test/Sema/ms-fuzzy-asm.c
new file mode 100644
index 0000000..7c24985
--- /dev/null
+++ b/test/Sema/ms-fuzzy-asm.c
@@ -0,0 +1,10 @@
+// RUN: clang %s -verify -fms-extensions
+
+#define M __asm int 0x2c
+#define M2 int
+
+void t1(void) { M }
+void t2(void) { __asm int 0x2c }
+// FIXME? We don't support fuzzy parsing line-oriented __asm's where the body is partially defined in a macro.
+void t3(void) { __asm M2 0x2c } // expected-error{{expected ';' after expression}} expected-warning{{expression result unused}}
+