aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scanner/cpp/Lexer.cpp
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2021-11-20 18:04:35 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2021-11-22 17:56:20 +0000
commit7c1f8137257e28299c5ec0fe030d9b9ba9ff55bf (patch)
tree0ea2ad91452c92c9ee882d695dbbef90a67281a9 /src/plugins/scanner/cpp/Lexer.cpp
parent55d0e01789f9b197ecb45413644873aea806e1ae (diff)
Fix Clang-Tidy & Clazy 'llvm-else-after-return' warnings
Change-Id: I16649525d797c980c0ba1357b3671b683c4fde25 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/scanner/cpp/Lexer.cpp')
-rw-r--r--src/plugins/scanner/cpp/Lexer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/scanner/cpp/Lexer.cpp b/src/plugins/scanner/cpp/Lexer.cpp
index 16556ac73..6bad85c5c 100644
--- a/src/plugins/scanner/cpp/Lexer.cpp
+++ b/src/plugins/scanner/cpp/Lexer.cpp
@@ -232,7 +232,7 @@ void Lexer::scan_helper(Token *tok)
while (_yychar && _yychar != quote) {
if (_yychar == '\n')
break;
- else if (_yychar != '\\')
+ if (_yychar != '\\')
yyinp();
else {
yyinp(); // skip `\\'
@@ -573,7 +573,8 @@ void Lexer::scan_helper(Token *tok)
// const int yylen = _currentChar - yytext;
//tok->f.kind = classifyObjCAtKeyword(yytext, yylen); /// ### FIXME
break;
- } else if (ch == '@' && _yychar == '"') {
+ }
+ if (ch == '@' && _yychar == '"') {
// objc @string literals
ch = _yychar;
yyinp();