diff options
author | Daniel Jasper <djasper@google.com> | 2014-08-26 23:15:12 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-08-26 23:15:12 +0000 |
commit | 8f46365481a4cbb97a80a0bbde1531d3228065aa (patch) | |
tree | 44643f975bc2bef5ac687b96b9cecf098ae21f7e /clang/unittests/Format/FormatTest.cpp | |
parent | 7d4f2cebdf069778e2873c9f90357e336876bc10 (diff) | |
download | bcm5719-llvm-8f46365481a4cbb97a80a0bbde1531d3228065aa.tar.gz bcm5719-llvm-8f46365481a4cbb97a80a0bbde1531d3228065aa.zip |
clang-format: Don't butcher __asm blocks.
Instead completely cop out of formatting them for now.
This fixes llvm.org/PR20618.
llvm-svn: 216501
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 411282a69da..bf69d8b55ed 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -2070,6 +2070,21 @@ TEST_F(FormatTest, FormatsInlineASM) { " \"xchgq\\t%%rbx, %%rsi\\n\\t\"\n" " : \"=a\"(*rEAX), \"=S\"(*rEBX), \"=c\"(*rECX), \"=d\"(*rEDX)\n" " : \"a\"(value));"); + EXPECT_EQ( + "void NS_InvokeByIndex(void *that, unsigned int methodIndex) {\n" + " __asm {\n" + " mov edx,[that] // vtable in edx\n" + " mov eax,methodIndex\n" + " call [edx][eax*4] // stdcall\n" + " }\n" + "}", + format("void NS_InvokeByIndex(void *that, unsigned int methodIndex) {\n" + " __asm {\n" + " mov edx,[that] // vtable in edx\n" + " mov eax,methodIndex\n" + " call [edx][eax*4] // stdcall\n" + " }\n" + "}")); } TEST_F(FormatTest, FormatTryCatch) { |