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 | fe2cf6673a2b126409439c617cba7811dc75f7ba (patch) | |
tree | 8e02132b7cd007e4d0beb9bba0ac2f23cc9d3aec /clang/unittests/Format/FormatTestJava.cpp | |
parent | ffeed44190d8ff5c04f4bd0735589ab00fd70f8c (diff) | |
download | llvm-fe2cf6673a2b126409439c617cba7811dc75f7ba.zip llvm-fe2cf6673a2b126409439c617cba7811dc75f7ba.tar.gz llvm-fe2cf6673a2b126409439c617cba7811dc75f7ba.tar.bz2 |
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!
llvm-svn: 222357
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestJava.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJava.cpp b/clang/unittests/Format/FormatTestJava.cpp index 57a0d51..c47cfa9 100644 --- a/clang/unittests/Format/FormatTestJava.cpp +++ b/clang/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 |