summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-10-28 18:11:52 +0000
committerDaniel Jasper <djasper@google.com>2014-10-28 18:11:52 +0000
commit13a7f469be4db05f13bf6636aedf223f7a4f307a (patch)
treee727ebe4fc84b1688690319e90f4722eb857d3d0 /clang/unittests/Format
parentd6b46b46b6d3aa3fb45158b275390d0e3f15e5c1 (diff)
downloadbcm5719-llvm-13a7f469be4db05f13bf6636aedf223f7a4f307a.tar.gz
bcm5719-llvm-13a7f469be4db05f13bf6636aedf223f7a4f307a.zip
clang-format: Improve && detection as binary operators.
Before: template <class T, class = typename std::enable_if<std::is_integral< T>::value &&(sizeof(T) > 1 || sizeof(T) < 8)>::type> void F(); After: template <class T, class = typename std::enable_if< std::is_integral<T>::value && (sizeof(T) > 1 || sizeof(T) < 8)>::type> void F(); llvm-svn: 220805
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r--clang/unittests/Format/FormatTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 37bd5178674..163f0838c9e 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5030,6 +5030,11 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
verifyFormat("foo<b && false>();");
verifyFormat("foo<b & 1>();");
verifyFormat("decltype(*::std::declval<const T &>()) void F();");
+ verifyFormat(
+ "template <class T, class = typename std::enable_if<\n"
+ " std::is_integral<T>::value &&\n"
+ " (sizeof(T) > 1 || sizeof(T) < 8)>::type>\n"
+ "void F();");
verifyIndependentOfContext("MACRO(int *i);");
verifyIndependentOfContext("MACRO(auto *a);");
OpenPOWER on IntegriCloud