Skip to content

Commit

Permalink
Merge pull request #3242 from hs-apotell/Issue#3239
Browse files Browse the repository at this point in the history
Issue #3239: Remove erroneous error reporting
  • Loading branch information
alaindargelas committed Sep 25, 2022
2 parents b310b70 + 1041c9b commit b964937
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions src/Design/FileContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,18 +677,23 @@ void FileContent::populateCoreMembers(NodeId startIndex, NodeId endIndex,
}

PathId fileId;
if (startIndex && endIndex) {
const VObject& startObject = m_objects[startIndex];
const VObject& endObject = m_objects[endIndex];
if (startObject.m_fileId == endObject.m_fileId) {
fileId = startObject.m_fileId;
} else {
Location loc(m_fileId);
Error err(ErrorDefinition::COMP_INTERNAL_ERROR_OUT_OF_BOUND, loc);
m_errors->addError(err);
std::cerr << "\nFILE INDEX MISMATCH\n\n";
}
} else if (startIndex) {
// Issue #3239: Apparently, it's possible that startIndex.m_fileId
// & endIndex.m_fileId are differently (for example, including a file
// in the middle of a module declaration).
//
// if (startIndex && endIndex) {
// const VObject& startObject = m_objects[startIndex];
// const VObject& endObject = m_objects[endIndex];
// if (startObject.m_fileId == endObject.m_fileId) {
// fileId = startObject.m_fileId;
// } else {
// Location loc(m_fileId);
// Error err(ErrorDefinition::COMP_INTERNAL_ERROR_OUT_OF_BOUND, loc);
// m_errors->addError(err);
// std::cerr << "\nFILE INDEX MISMATCH\n\n";
// }
// } else
if (startIndex) {
const VObject& object = m_objects[startIndex];
fileId = object.m_fileId;
} else if (endIndex) {
Expand Down

0 comments on commit b964937

Please sign in to comment.