ctu: fixed error locations
This commit is contained in:
parent
4e076e1854
commit
fc25fe83bd
10
lib/ctu.cpp
10
lib/ctu.cpp
|
@ -546,18 +546,12 @@ std::list<ErrorLogger::ErrorMessage::FileLocation> CTU::FileInfo::getErrorPath(I
|
||||||
std::copy(functionCall->callValuePath.cbegin(), functionCall->callValuePath.cend(), std::back_inserter(locationList));
|
std::copy(functionCall->callValuePath.cbegin(), functionCall->callValuePath.cend(), std::back_inserter(locationList));
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::FileLocation fileLoc;
|
ErrorLogger::ErrorMessage::FileLocation fileLoc(path[index]->location.fileName, path[index]->location.lineNumber, path[index]->location.column);
|
||||||
fileLoc.setfile(path[index]->location.fileName);
|
|
||||||
fileLoc.line = path[index]->location.lineNumber;
|
|
||||||
fileLoc.column = path[index]->location.column;
|
|
||||||
fileLoc.setinfo("Calling function " + path[index]->callFunctionName + ", " + MathLib::toString(path[index]->callArgNr) + getOrdinalText(path[index]->callArgNr) + " argument is " + value1);
|
fileLoc.setinfo("Calling function " + path[index]->callFunctionName + ", " + MathLib::toString(path[index]->callArgNr) + getOrdinalText(path[index]->callArgNr) + " argument is " + value1);
|
||||||
locationList.push_back(fileLoc);
|
locationList.push_back(fileLoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorLogger::ErrorMessage::FileLocation fileLoc2;
|
ErrorLogger::ErrorMessage::FileLocation fileLoc2(unsafeUsage.location.fileName, unsafeUsage.location.lineNumber, unsafeUsage.location.column);
|
||||||
fileLoc2.setfile(unsafeUsage.location.fileName);
|
|
||||||
fileLoc2.line = unsafeUsage.location.lineNumber;
|
|
||||||
fileLoc2.column = unsafeUsage.location.column;
|
|
||||||
fileLoc2.setinfo(replaceStr(info, "ARG", unsafeUsage.myArgumentName));
|
fileLoc2.setinfo(replaceStr(info, "ARG", unsafeUsage.myArgumentName));
|
||||||
locationList.push_back(fileLoc2);
|
locationList.push_back(fileLoc2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue