Merge pull request 'fixed load and save blocks insert' (#42) from CP_blocks_insert into master

This commit was merged in pull request #42.
This commit is contained in:
2024-04-16 14:36:47 +00:00

View File

@@ -825,7 +825,7 @@ void createCheckpoints(SgFile* file, const map<string, CommonBlock*>& commonBloc
{
func = file->functions(z);
point = func->lexNext();
while (point && point->lineNumber() < cpLine && point != func->lastNodeOfStmt() && point->variant() != CONTAINS_STMT)
while (point && ((point->fileName() != file->filename()) || (point->lineNumber() < cpLine)) && point != func->lastNodeOfStmt() && point->variant() != CONTAINS_STMT)
point = point->lexNext();
//cp place was found