Fix part of #2070: Correctly handle promotion for <unary-op>(int).
This still only handles a scalar correctly, and some vector cases need additional fixes.
This commit is contained in:
parent
113d07a6eb
commit
abfc4c2ceb
6 changed files with 413 additions and 64 deletions
|
|
@ -7572,7 +7572,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction
|
|||
|
||||
if (args->getAsAggregate()) {
|
||||
// Handle aggregates: put all args into the new function call
|
||||
for (int arg=0; arg<int(args->getAsAggregate()->getSequence().size()); ++arg) {
|
||||
for (int arg = 0; arg < int(args->getAsAggregate()->getSequence().size()); ++arg) {
|
||||
// TODO: But for constness, we could avoid the new & shallowCopy, and use the pointer directly.
|
||||
TParameter param = { 0, new TType, nullptr };
|
||||
param.type->shallowCopy(args->getAsAggregate()->getSequence()[arg]->getAsTyped()->getType());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue