diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-10 08:42:04 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-10 08:42:04 +0000 |
commit | c6366077ed8dafe40fbd04315bdec0450e84e087 (patch) | |
tree | 17c617a6e8915c37199d85f4cda0eff4e999c092 /clang/unittests/Format/FormatTest.cpp | |
parent | 4cc8d202d0f2d0c16bd748c0a0f675002957b172 (diff) | |
download | bcm5719-llvm-c6366077ed8dafe40fbd04315bdec0450e84e087.tar.gz bcm5719-llvm-c6366077ed8dafe40fbd04315bdec0450e84e087.zip |
clang-format: Preserve line break before } in __asm { ... }.
Some compilers ignore everything after a semicolon in such inline asm
blocks and thus, the closing brace must not be moved to the previous
line.
llvm-svn: 236946
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 6569badd035..ce14165bc88 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -2316,6 +2316,14 @@ TEST_F(FormatTest, FormatsInlineASM) { " call [edx][eax*4] // stdcall\n" " }\n" "}")); + EXPECT_EQ("_asm {\n" + " xor eax, eax;\n" + " cpuid;\n" + "}", + format("_asm {\n" + " xor eax, eax;\n" + " cpuid;\n" + "}")); verifyFormat("void function() {\n" " // comment\n" " asm(\"\");\n" |