From 1dbc2105dca5612096d47b10e4cfe3711ac23cec Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Fri, 31 Mar 2017 13:30:24 +0000 Subject: 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 --- clang/lib/Format/UnwrappedLineParser.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'clang/lib/Format/UnwrappedLineParser.cpp') 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; } } -- cgit v1.2.3