summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-12-22 15:47:56 +0000
committerDaniel Jasper <djasper@google.com>2015-12-22 15:47:56 +0000
commit72a1b6a5f245509e45fa9e01e1fbc4a917c51fd4 (patch)
tree789fe55d47bcac2f7765c97329b60fb0ba137111 /clang/lib/Format/Format.cpp
parentcfcdbde3ce1ef6ccd97e2fdc45ad074b7f63de0d (diff)
downloadbcm5719-llvm-72a1b6a5f245509e45fa9e01e1fbc4a917c51fd4.tar.gz
bcm5719-llvm-72a1b6a5f245509e45fa9e01e1fbc4a917c51fd4.zip
clang-format: [JS] "operator" is not a keyword in Java/JavaScript.
llvm-svn: 256245
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index d86fccf416e..c7d1abd2b24 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -1274,11 +1274,13 @@ private:
FormatTok->Tok.setIdentifierInfo(&Info);
FormatTok->Tok.setKind(Info.getTokenID());
if (Style.Language == FormatStyle::LK_Java &&
- FormatTok->isOneOf(tok::kw_struct, tok::kw_union, tok::kw_delete)) {
+ FormatTok->isOneOf(tok::kw_struct, tok::kw_union, tok::kw_delete,
+ tok::kw_operator)) {
FormatTok->Tok.setKind(tok::identifier);
FormatTok->Tok.setIdentifierInfo(nullptr);
} else if (Style.Language == FormatStyle::LK_JavaScript &&
- FormatTok->isOneOf(tok::kw_struct, tok::kw_union)) {
+ FormatTok->isOneOf(tok::kw_struct, tok::kw_union,
+ tok::kw_operator)) {
FormatTok->Tok.setKind(tok::identifier);
FormatTok->Tok.setIdentifierInfo(nullptr);
}
OpenPOWER on IntegriCloud