- enhancement: Deduce type info for "auto" in some simple cases.

- fix: crash when no semicolon or left brace after the keyword "namespace"
This commit is contained in:
Roy Qu 2022-11-28 08:22:48 +08:00
parent adb3d79b60
commit de23833992
3 changed files with 6 additions and 1 deletions

View File

@ -11,6 +11,7 @@ Red Panda C++ Version 2.5
- enhancement: show completion suggest for "namespace" after "using" - enhancement: show completion suggest for "namespace" after "using"
- fix: MinGW-w64 gcc displayed as "MinGW GCC" - fix: MinGW-w64 gcc displayed as "MinGW GCC"
- enhancement: Deduce type info for "auto" in some simple cases. - enhancement: Deduce type info for "auto" in some simple cases.
- fix: crash when no semicolon or left brace after the keyword "namespace"
Red Panda C++ Version 2.4 Red Panda C++ Version 2.4

View File

@ -2814,7 +2814,7 @@ void CppParser::handleNamespace(KeywordType skipType)
// find next '{' or ';' // find next '{' or ';'
mIndex = indexOfNextSemicolonOrLeftBrace(mIndex); mIndex = indexOfNextSemicolonOrLeftBrace(mIndex);
if (mTokenizer[mIndex]->text=='{') if (mIndex<mTokenizer.tokenCount() && mTokenizer[mIndex]->text=='{')
addSoloScopeLevel(namespaceStatement,startLine); addSoloScopeLevel(namespaceStatement,startLine);
//skip it //skip it
mIndex++; mIndex++;

View File

@ -2640,6 +2640,10 @@ static void setDebugOptions(Settings::PCompilerSet pSet) {
} }
bool Settings::CompilerSets::addSets(const QString &folder, const QString& cc_prog) { bool Settings::CompilerSets::addSets(const QString &folder, const QString& cc_prog) {
foreach (const PCompilerSet& set, mList) {
if (set->binDirs().contains(folder))
return false;
}
// Default, release profile // Default, release profile
PCompilerSet baseSet = addSet(folder,cc_prog); PCompilerSet baseSet = addSet(folder,cc_prog);
if (!baseSet) if (!baseSet)