diff options
author | Daniel Jasper <djasper@google.com> | 2014-11-19 14:11:11 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-11-19 14:11:11 +0000 |
commit | 200069865f427e9dd336148b3847d2541fdc875b (patch) | |
tree | 374c2dc0418b754cc7352a7d9a1cd3f6af0b1bb9 /unittests | |
parent | b0f3f426d1d5f09472566bc8f62133dff59b119b (diff) |
clang-format: [Java] Ignore C++-specific keywords
Before:
public void union
(Object o);
public void struct
(Object o);
public void delete (Object o);
After:
public void union(Object o);
public void struct(Object o);
public void delete(Object o);
Patch by Harry Terkelsen, thank you!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Format/FormatTestJava.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestJava.cpp b/unittests/Format/FormatTestJava.cpp index 57a0d51542..c47cfa9214 100644 --- a/unittests/Format/FormatTestJava.cpp +++ b/unittests/Format/FormatTestJava.cpp @@ -275,5 +275,11 @@ TEST_F(FormatTestJava, MethodDeclarations) { getStyleWithColumns(40)); } +TEST_F(FormatTestJava, CppKeywords) { + verifyFormat("public void union(Type a, Type b);"); + verifyFormat("public void struct(Object o);"); + verifyFormat("public void delete(Object o);"); +} + } // end namespace tooling } // end namespace clang |