aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-03-31 12:04:37 +0000
committerDaniel Jasper <djasper@google.com>2017-03-31 12:04:37 +0000
commit72b3357f2d39adb0cf88fef992cd2570452d90ac (patch)
treea61cce20923f3f423c5c8212458d86d9146cc53d /clang/lib/Format/UnwrappedLineParser.cpp
parentf698a69107e39727d81d2ed1dd51445981adede7 (diff)
downloadllvm-72b3357f2d39adb0cf88fef992cd2570452d90ac.zip
llvm-72b3357f2d39adb0cf88fef992cd2570452d90ac.tar.gz
llvm-72b3357f2d39adb0cf88fef992cd2570452d90ac.tar.bz2
clang-format: [JavaScript] Ignore QT keywords.
llvm-svn: 299204
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 25bc991..a0354a3 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -916,7 +916,9 @@ void UnwrappedLineParser::parseStructuralElement() {
return;
}
}
- if (FormatTok->isOneOf(Keywords.kw_signals, Keywords.kw_qsignals,
+ if ((Style.Language == FormatStyle::LK_Cpp ||
+ Style.Language == FormatStyle::LK_ObjC) &&
+ FormatTok->isOneOf(Keywords.kw_signals, Keywords.kw_qsignals,
Keywords.kw_slots, Keywords.kw_qslots)) {
nextToken();
if (FormatTok->is(tok::colon)) {