diff options
author | Daniel Jasper <djasper@google.com> | 2017-03-31 13:30:24 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2017-03-31 13:30:24 +0000 |
commit | 1dbc2105dca5612096d47b10e4cfe3711ac23cec (patch) | |
tree | 5d82a5261b699e950ee49ba95b1bdbbaa8e93b6f /clang/lib/Format/UnwrappedLineParser.cpp | |
parent | 56bb0857e92c9f578916e83adf692e85f04ee428 (diff) | |
download | bcm5719-llvm-1dbc2105dca5612096d47b10e4cfe3711ac23cec.tar.gz bcm5719-llvm-1dbc2105dca5612096d47b10e4cfe3711ac23cec.zip |
clang-format: Fix post-commit review comment of r299204, use Style.isCpp().
Also, while at it, s/IsCpp/isCpp/ so that it follows LLVM style.
llvm-svn: 299214
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index a0354a32a89..5be68ad5c6b 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -916,8 +916,7 @@ void UnwrappedLineParser::parseStructuralElement() { return; } } - if ((Style.Language == FormatStyle::LK_Cpp || - Style.Language == FormatStyle::LK_ObjC) && + if (Style.isCpp() && FormatTok->isOneOf(Keywords.kw_signals, Keywords.kw_qsignals, Keywords.kw_slots, Keywords.kw_qslots)) { nextToken(); @@ -952,7 +951,7 @@ void UnwrappedLineParser::parseStructuralElement() { if (!parseEnum()) break; // This only applies for C++. - if (!Style.IsCpp()) { + if (!Style.isCpp()) { addUnwrappedLine(); return; } @@ -1133,7 +1132,7 @@ void UnwrappedLineParser::parseStructuralElement() { } bool UnwrappedLineParser::tryToParseLambda() { - if (!Style.IsCpp()) { + if (!Style.isCpp()) { nextToken(); return false; } @@ -1743,7 +1742,7 @@ bool UnwrappedLineParser::parseEnum() { nextToken(); // If there are two identifiers in a row, this is likely an elaborate // return type. In Java, this can be "implements", etc. - if (Style.IsCpp() && FormatTok->is(tok::identifier)) + if (Style.isCpp() && FormatTok->is(tok::identifier)) return false; } } |