fix: Correctly parsing array defines.
This commit is contained in:
parent
ebeea19794
commit
4bd3829484
|
@ -2299,7 +2299,7 @@ void CppParser::checkAndHandleMethodOrVar(KeywordType keywordType, int maxIndex)
|
||||||
mIndex,
|
mIndex,
|
||||||
isStatic, maxIndex);
|
isStatic, maxIndex);
|
||||||
return;
|
return;
|
||||||
} else if (mTokenizer[mIndex]->text.startsWith("[")) {
|
} else if (mTokenizer[mIndex]->text.startsWith("[") && AutoTypes.contains(sType)) {
|
||||||
handleStructredBinding(sType,maxIndex);
|
handleStructredBinding(sType,maxIndex);
|
||||||
return;
|
return;
|
||||||
} else if (mTokenizer[mIndex + 1]->text == '(') {
|
} else if (mTokenizer[mIndex + 1]->text == '(') {
|
||||||
|
@ -3924,7 +3924,6 @@ void CppParser::handleStructs(bool isTypedef, int maxIndex)
|
||||||
void CppParser::handleStructredBinding(const QString &sType, int maxIndex)
|
void CppParser::handleStructredBinding(const QString &sType, int maxIndex)
|
||||||
{
|
{
|
||||||
if (mIndex+1 < maxIndex
|
if (mIndex+1 < maxIndex
|
||||||
&& AutoTypes.contains(sType)
|
|
||||||
&& ((mTokenizer[mIndex+1]->text == ":")
|
&& ((mTokenizer[mIndex+1]->text == ":")
|
||||||
|| (mTokenizer[mIndex+1]->text == "="))) {
|
|| (mTokenizer[mIndex+1]->text == "="))) {
|
||||||
QString typeName;
|
QString typeName;
|
||||||
|
|
Loading…
Reference in New Issue