summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-11 08:01:18 +0000
committerDaniel Jasper <djasper@google.com>2013-02-11 08:01:18 +0000
commit35d2dc765e8e69f6710104f5fd6109a1f49c085e (patch)
tree1b92741ac6727865e0b4ac33898e43011b429171 /clang/unittests
parentca846ae6221787b01dc4f6592a32966094ea3d65 (diff)
downloadbcm5719-llvm-35d2dc765e8e69f6710104f5fd6109a1f49c085e.tar.gz
bcm5719-llvm-35d2dc765e8e69f6710104f5fd6109a1f49c085e.zip
Fix formatting of overloaded operator definitions.
Before: operatorvoid*(); operator vector< A< A>>(); After: operator void *(); operator vector<A<A> >(); llvm-svn: 174863
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/Format/FormatTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 12a37159f41..1865b5059c4 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -1541,11 +1541,18 @@ TEST_F(FormatTest, UndestandsOverloadedOperators) {
verifyFormat("bool operator()();");
verifyFormat("bool operator[]();");
verifyFormat("operator bool();");
+ verifyFormat("operator int();");
+ verifyFormat("operator void *();");
verifyFormat("operator SomeType<int>();");
+ verifyFormat("operator SomeType<int, int>();");
+ verifyFormat("operator SomeType<SomeType<int> >();");
verifyFormat("void *operator new(std::size_t size);");
verifyFormat("void *operator new[](std::size_t size);");
verifyFormat("void operator delete(void *ptr);");
verifyFormat("void operator delete[](void *ptr);");
+
+ verifyGoogleFormat("operator void*();");
+ verifyGoogleFormat("operator SomeType<SomeType<int>>();");
}
TEST_F(FormatTest, UnderstandsNewAndDelete) {
OpenPOWER on IntegriCloud