diff options
author | Daniel Jasper <djasper@google.com> | 2013-08-13 09:09:09 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-08-13 09:09:09 +0000 |
commit | 29a98cfca07228406a000967b8e9291869b07e1f (patch) | |
tree | dff12df7b4f76a37521b5eb7e5dfe3be2ab15aa7 /clang/unittests | |
parent | 70dc91aaf15ac676101eab5eb3dba1a0eda6bf2d (diff) | |
download | bcm5719-llvm-29a98cfca07228406a000967b8e9291869b07e1f.tar.gz bcm5719-llvm-29a98cfca07228406a000967b8e9291869b07e1f.zip |
clang-format: Improve boolean expression formatting in macros.
Before:
#define IF(a, b, c) if (a&&(b == c))
After:
#define IF(a, b, c) if (a && (b == c))
llvm-svn: 188256
Diffstat (limited to 'clang/unittests')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 6cea8a332ad..79e0186a81d 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -3712,6 +3712,8 @@ TEST_F(FormatTest, UnderstandsRvalueReferences) { verifyFormat("template <bool B, bool C> class A {\n" " static_assert(B && C, \"Something is wrong\");\n" "};"); + verifyGoogleFormat("#define IF(a, b, c) if (a && (b == c))"); + verifyGoogleFormat("#define WHILE(a, b, c) while (a && (b == c))"); } TEST_F(FormatTest, FormatsBinaryOperatorsPrecedingEquals) { |