summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-04-03 09:00:49 +0000
committerDaniel Jasper <djasper@google.com>2014-04-03 09:00:49 +0000
commitcc7bf7fda1303f2b9bbbaf1f5d79a885af25ff97 (patch)
tree14027ad0bccf3795862a6a3c1b761d0432f331db /clang/unittests/Format/FormatTest.cpp
parent92e0fc0484440984358b048b8f05177509ce629a (diff)
downloadbcm5719-llvm-cc7bf7fda1303f2b9bbbaf1f5d79a885af25ff97.tar.gz
bcm5719-llvm-cc7bf7fda1303f2b9bbbaf1f5d79a885af25ff97.zip
clang-format: Understand that "auto" is a type.
Before: MACRO(auto * a); After: MACRO(auto *a); llvm-svn: 205517
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 62ca9ffcc39..5395fd98923 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4554,6 +4554,12 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
verifyFormat("foo<b && false>();");
verifyFormat("foo<b & 1>();");
+ verifyIndependentOfContext("MACRO(int *i);");
+ verifyIndependentOfContext("MACRO(auto *a);");
+ verifyIndependentOfContext("MACRO(const A *a);");
+ // FIXME: Is there a way to make this work?
+ // verifyIndependentOfContext("MACRO(A *a);");
+
// 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;");
OpenPOWER on IntegriCloud