diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-11 08:01:18 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-11 08:01:18 +0000 |
commit | 2b4c924f85e156d66c01b3f16c850892c47dcc7a (patch) | |
tree | 4fc13dc9ce2a2ae4c0778effd34e104cf241cfa3 /unittests/Format/FormatTest.cpp | |
parent | 06b247f0ffb69854e32150c80f347a9376d3709b (diff) |
Fix formatting of overloaded operator definitions.
Before:
operatorvoid*();
operator vector< A< A>>();
After:
operator void *();
operator vector<A<A> >();
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 12a37159f4..1865b5059c 100644 --- a/unittests/Format/FormatTest.cpp +++ b/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) { |