Hello commit 7a6d7f7c2de984 added a compile failure. This is a fix.
$ git diff diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index e8cc4d82f936..abe39df3b9bf 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -2605,7 +2605,8 @@ static Analyzer::Result valueFlowForward(Token top, const std::list<valueflow::value>& values, TokenList</valueflow::value> const tokenlist, const Settings settings) -// INDENT-ON { +// INDENT-ON +{ Analyzer::Result result{}; for (const ValueFlow::Value& v : values) { @@ -6246,7 +6247,8 @@ static Analyzer::Result valueFlowContainerForwardRecursive(Token top, const Token exprTok, const ValueFlow::Value& value, TokenList tokenlist) -// INDENT-ON { +// INDENT-ON +{ ContainerExpressionAnalyzer a(exprTok, value, tokenlist); return valueFlowGenericForward(top, a, tokenlist->getSettings()); }
This bug was found by cppcheck :)
Checking lib/valueflow.cpp ... lib/valueflow.cpp:2615:1: error: Unmatched '}'. Configuration: ''. [syntaxError] lib/valueflow.cpp:6253:1: error: Unmatched '}'. Configuration: ''. [syntaxError]
The commit was reverted. Thanks!
Log in to post a comment.
Hello
commit 7a6d7f7c2de984 added a compile failure.
This is a fix.
$ git diff
diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp
index e8cc4d82f936..abe39df3b9bf 100644
--- a/lib/valueflow.cpp
+++ b/lib/valueflow.cpp
@@ -2605,7 +2605,8 @@ static Analyzer::Result valueFlowForward(Token top,
const std::list<valueflow::value>& values,
TokenList</valueflow::value> const tokenlist,
const Settings settings)
-// INDENT-ON {
+// INDENT-ON
+{
Analyzer::Result result{};
for (const ValueFlow::Value& v : values)
{
@@ -6246,7 +6247,8 @@ static Analyzer::Result valueFlowContainerForwardRecursive(Token top,
const Token exprTok,
const ValueFlow::Value& value,
TokenList tokenlist)
-// INDENT-ON {
+// INDENT-ON
+{
ContainerExpressionAnalyzer a(exprTok, value, tokenlist);
return valueFlowGenericForward(top, a, tokenlist->getSettings());
}
This bug was found by cppcheck :)
Checking lib/valueflow.cpp ...
lib/valueflow.cpp:2615:1: error: Unmatched '}'. Configuration: ''. [syntaxError]
lib/valueflow.cpp:6253:1: error: Unmatched '}'. Configuration: ''. [syntaxError]
The commit was reverted. Thanks!