fix: Crash when has source line like "std::cout << (3+4*4>5*(4+3)-1 && (4-3>5)) <<std::endl;".
This commit is contained in:
parent
49049b0884
commit
ce97272fc0
1
NEWS.md
1
NEWS.md
|
@ -159,6 +159,7 @@ Red Panda C++ Version 2.27
|
||||||
- fix: In options -> code format -> Program, Choose astyle path button doesn't work.
|
- fix: In options -> code format -> Program, Choose astyle path button doesn't work.
|
||||||
- fix: project not correctly reparsed after rename unit.
|
- fix: project not correctly reparsed after rename unit.
|
||||||
- enhancement: support C++ 17 structured binding in stl map containers foreach loop.
|
- enhancement: support C++ 17 structured binding in stl map containers foreach loop.
|
||||||
|
- fix: Crash when has source line like "std::cout << (3+4*4>5*(4+3)-1 && (4-3>5)) <<std::endl;";
|
||||||
|
|
||||||
Red Panda C++ Version 2.26
|
Red Panda C++ Version 2.26
|
||||||
- enhancement: Code suggestion for embedded std::vectors.
|
- enhancement: Code suggestion for embedded std::vectors.
|
||||||
|
|
|
@ -4240,6 +4240,10 @@ void CppParser::handleVar(const QString& typePrefix,bool isExtern,bool isStatic,
|
||||||
tempType+=mTokenizer[mIndex]->text;
|
tempType+=mTokenizer[mIndex]->text;
|
||||||
mIndex++;
|
mIndex++;
|
||||||
break;
|
break;
|
||||||
|
case ',':
|
||||||
|
tempType="";
|
||||||
|
mIndex++;
|
||||||
|
break;
|
||||||
case '(':
|
case '(':
|
||||||
if (mTokenizer[mIndex]->matchIndex+1<maxIndex
|
if (mTokenizer[mIndex]->matchIndex+1<maxIndex
|
||||||
&& mTokenizer[mTokenizer[mIndex]->matchIndex+1]->text=='(') {
|
&& mTokenizer[mTokenizer[mIndex]->matchIndex+1]->text=='(') {
|
||||||
|
@ -4361,8 +4365,8 @@ void CppParser::handleVar(const QString& typePrefix,bool isExtern,bool isStatic,
|
||||||
}
|
}
|
||||||
mIndex++;
|
mIndex++;
|
||||||
} else {
|
} else {
|
||||||
tempType="";
|
mIndex = indexOfNextPeriodOrSemicolon(mIndex, maxIndex);
|
||||||
mIndex++;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue