diff options
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 86b98b3152..af580ddce7 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -776,6 +776,16 @@ TEST_F(FormatTest, FormatsNamespaces) { TEST_F(FormatTest, FormatsExternC) { verifyFormat("extern \"C\" {\nint a;"); } +TEST_F(FormatTest, FormatsInlineASM) { + verifyFormat("asm(\"xyz\" : \"=a\"(a), \"=d\"(b) : \"a\"(data));"); + verifyFormat( + "asm(\"movq\\t%%rbx, %%rsi\\n\\t\"\n" + " \"cpuid\\n\\t\"\n" + " \"xchgq\\t%%rbx, %%rsi\\n\\t\"\n" + " : \"=a\" (*rEAX), \"=S\" (*rEBX), \"=c\" (*rECX), \"=d\" (*rEDX)\n" + " : \"a\"(value));"); +} + TEST_F(FormatTest, FormatTryCatch) { // FIXME: Handle try-catch explicitly in the UnwrappedLineParser, then we'll // also not create single-line-blocks. |