From: Nico Weber Date: Wed, 24 Jul 2019 17:01:57 +0000 (+0000) Subject: clang-format: Add a test that shows that some code I thought was dead is not dead. X-Git-Tag: llvmorg-11-init~13664 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a659de77e727d9743fe3faff1286856f598a6911;p=platform%2Fupstream%2Fllvm.git clang-format: Add a test that shows that some code I thought was dead is not dead. llvm-svn: 366926 --- diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 614e81e..dba8dbc 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -6913,6 +6913,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyIndependentOfContext("if (int *a = &b)"); verifyIndependentOfContext("if (int &a = *b)"); verifyIndependentOfContext("if (a & b[i])"); + verifyIndependentOfContext("if (a * (b * c))"); verifyIndependentOfContext("if (a::b::c::d & b[i])"); verifyIndependentOfContext("if (*b[i])"); verifyIndependentOfContext("if (int *a = (&b))");