insert simplified types for implicit template type deduction (#2952)

Co-authored-by: Robert Reif <reif@FX6840>
This commit is contained in:
IOBYTE 2020-12-15 16:28:58 -05:00 committed by GitHub
parent c6f8ca447e
commit 2a05bc565d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -915,20 +915,20 @@ void TemplateSimplifier::getTemplateInstantiations()
tok->insertToken("float");
else if (suffix == 'l' || suffix == 'L') {
tok->insertToken("double");
tok->insertToken("long");
tok->next()->isLong(true);
} else
tok->insertToken("double");
} else if (num.isInt()) {
std::string suffix = MathLib::getSuffix(tok->strAt(3));
if (suffix.find("LL") != std::string::npos) {
tok->insertToken("long");
tok->insertToken("long");
tok->next()->isLong(true);
} else if (suffix.find('L') != std::string::npos)
tok->insertToken("long");
else
tok->insertToken("int");
if (suffix.find('U') != std::string::npos)
tok->insertToken("unsigned");
tok->next()->isUnsigned(true);
}
break;
}