summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2014-03-27 19:00:52 +0000
committerManuel Klimek <klimek@google.com>2014-03-27 19:00:52 +0000
commit1f9d80ac666e3e96540871070fbe20758a73c708 (patch)
tree6831dc6eae1a82d172b0c621dc0c0a53123c2cfa /clang/unittests/Format/FormatTest.cpp
parent8018e414bbc497c1b5c7ab0ea7b4699cbe647cfc (diff)
downloadbcm5719-llvm-1f9d80ac666e3e96540871070fbe20758a73c708.tar.gz
bcm5719-llvm-1f9d80ac666e3e96540871070fbe20758a73c708.zip
Improve handling of bool expressions in template arguments.
Now correctly formats: foo<true && false>(); llvm-svn: 204950
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index b5a70760a41..3d1e5a5d8e2 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4537,6 +4537,12 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
verifyFormat("vector<int *const **const *> v;");
verifyFormat("vector<int *volatile> v;");
verifyFormat("vector<a * b> v;");
+ verifyFormat("foo<b && false>();");
+ verifyFormat("foo<b & 1>();");
+
+ // FIXME: We cannot handle this case yet; we might be able to figure out that
+ // foo<x> d > v; doesn't make sense.
+ verifyFormat("foo<a < b && c> d > v;");
}
TEST_F(FormatTest, UnderstandsAttributes) {
OpenPOWER on IntegriCloud