parent
051a18b120
commit
2a6fbe2e3c
|
@ -96,7 +96,7 @@ static void bailoutInternal(TokenList *tokenlist, ErrorLogger *errorLogger, cons
|
||||||
std::list<ErrorLogger::ErrorMessage::FileLocation> callstack;
|
std::list<ErrorLogger::ErrorMessage::FileLocation> callstack;
|
||||||
callstack.push_back(ErrorLogger::ErrorMessage::FileLocation(tok, tokenlist));
|
callstack.push_back(ErrorLogger::ErrorMessage::FileLocation(tok, tokenlist));
|
||||||
ErrorLogger::ErrorMessage errmsg(callstack, tokenlist->getSourceFilePath(), Severity::debug,
|
ErrorLogger::ErrorMessage errmsg(callstack, tokenlist->getSourceFilePath(), Severity::debug,
|
||||||
Path::stripDirectoryPart(file) + ":" + MathLib::toString(line) + ":" + function + " bailout: " + what, "valueFlowBailout", false);
|
Path::stripDirectoryPart(file) + ":" + MathLib::toString(line) + ":" + function + " bailout: " + what, "valueFlowBailout", false);
|
||||||
errorLogger->reportErr(errmsg);
|
errorLogger->reportErr(errmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ std::string TestFixture::deleteLineNumber(const std::string &message) const
|
||||||
// get number
|
// get number
|
||||||
if (pos + 1 == result.find_first_of("0123456789", pos + 1)) {
|
if (pos + 1 == result.find_first_of("0123456789", pos + 1)) {
|
||||||
if ((after = result.find_first_not_of("0123456789", pos + 1)) != std::string::npos
|
if ((after = result.find_first_not_of("0123456789", pos + 1)) != std::string::npos
|
||||||
&& result.at(after) == ':') {
|
&& result.at(after) == ':') {
|
||||||
// erase NUMBER
|
// erase NUMBER
|
||||||
result.erase(pos + 1, after - pos - 1);
|
result.erase(pos + 1, after - pos - 1);
|
||||||
pos = after;
|
pos = after;
|
||||||
|
|
|
@ -1021,8 +1021,8 @@ private:
|
||||||
" if (x==123){}\n"
|
" if (x==123){}\n"
|
||||||
"}");
|
"}");
|
||||||
ASSERT_EQUALS_WITHOUT_LINENUMBERS("[test.cpp:4]: (debug) valueflow.cpp:1131:valueFlowReverse bailout: variable x stopping on goto label\n"
|
ASSERT_EQUALS_WITHOUT_LINENUMBERS("[test.cpp:4]: (debug) valueflow.cpp:1131:valueFlowReverse bailout: variable x stopping on goto label\n"
|
||||||
"[test.cpp:2]: (debug) valueflow.cpp:1813:valueFlowForward bailout: variable x. noreturn conditional scope.\n"
|
"[test.cpp:2]: (debug) valueflow.cpp:1813:valueFlowForward bailout: variable x. noreturn conditional scope.\n"
|
||||||
, errout.str());
|
, errout.str());
|
||||||
|
|
||||||
// #5721 - FP
|
// #5721 - FP
|
||||||
bailout("static void f(int rc) {\n"
|
bailout("static void f(int rc) {\n"
|
||||||
|
@ -1036,9 +1036,9 @@ private:
|
||||||
" if (abc) {}\n"
|
" if (abc) {}\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS_WITHOUT_LINENUMBERS("[test.cpp:2]: (debug) valueflow.cpp:1035:valueFlowReverse bailout: assignment of abc\n"
|
ASSERT_EQUALS_WITHOUT_LINENUMBERS("[test.cpp:2]: (debug) valueflow.cpp:1035:valueFlowReverse bailout: assignment of abc\n"
|
||||||
"[test.cpp:8]: (debug) valueflow.cpp:1131:valueFlowReverse bailout: variable abc stopping on goto label\n"
|
"[test.cpp:8]: (debug) valueflow.cpp:1131:valueFlowReverse bailout: variable abc stopping on goto label\n"
|
||||||
"[test.cpp:3]: (debug) valueflow.cpp:1813:valueFlowForward bailout: variable abc. noreturn conditional scope.\n",
|
"[test.cpp:3]: (debug) valueflow.cpp:1813:valueFlowForward bailout: variable abc. noreturn conditional scope.\n",
|
||||||
errout.str());
|
errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void valueFlowAfterAssign() {
|
void valueFlowAfterAssign() {
|
||||||
|
|
Loading…
Reference in New Issue