diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index b3bfd2c9..42ba1fc0 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -156,7 +156,7 @@ QList CppParser::getListOfFunctions(const QString &fileName, const Q QStringList expression = splitExpression(phrase); PStatement scopeStatement = doFindScopeStatement(fileName,line); int pos = 0; - PEvalStatement evalStatement = doEvalExpression(fileName, expression, pos, scopeStatement, PEvalStatement(), false, true); + PEvalStatement evalStatement = doEvalExpression(fileName, expression, pos, scopeStatement, PEvalStatement(), true, true); if (!evalStatement) return result; PStatement statement = evalStatement->baseStatement; diff --git a/RedPandaIDE/parser/cpppreprocessor.cpp b/RedPandaIDE/parser/cpppreprocessor.cpp index 35b85746..8e2ad7a1 100644 --- a/RedPandaIDE/parser/cpppreprocessor.cpp +++ b/RedPandaIDE/parser/cpppreprocessor.cpp @@ -803,18 +803,17 @@ void CppPreprocessor::removeGCCAttribute(const QString &line, QString &newLine, void CppPreprocessor::openInclude(QString fileName) { - fileName.squeeze(); - PFileIncludes fileIncludes = getFileIncludesEntry(fileName); if (fileIncludes) { fileName = fileIncludes->baseFile; } else { fileName.squeeze(); } - if (mIncludes.size()>0) { PParsedFile topFile = mIncludes.front(); if (topFile->fileIncludes->includeFiles.contains(fileName)) { + PParsedFile innerMostFile = mIncludes.back(); + innerMostFile->fileIncludes->includeFiles.insert(fileName, false); return; //already included } for (PParsedFile& parsedFile:mIncludes) {