[PATCH] D54111: [clang-format] Do not threat the asm clobber [ as ObjCExpr

Ben Hamilton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 5 09:20:26 PST 2018


benhamilton accepted this revision.
benhamilton added a comment.
This revision is now accepted and ready to land.

In the diff description, please fix the typo: `Do not threat the asm clobber` -> `Do not treat the asm clobber`



================
Comment at: unittests/Format/FormatTest.cpp:12756-12763
+TEST_F(FormatTest, GuessedLanguageWithInlineAsmClobbers) {
+  EXPECT_EQ(FormatStyle::LK_Cpp, guessLanguage("foo.h",
+                                               "void f() {\n"
+                                               "  asm (\"mov %[e], %[d]\"\n"
+                                               "     : [d] \"=rm\" (d)\n"
+                                               "       [e] \"rm\" (*e));\n"
+                                               "}"));
----------------
Worth a second test with `asm volatile (...)` ?



Repository:
  rC Clang

https://reviews.llvm.org/D54111





More information about the cfe-commits mailing list