Fix #2385: guard against constant_id on non-const.
This commit is contained in:
parent
759ae5aec0
commit
f8a5602c55
@ -1953,6 +1953,10 @@ void HlslParseContext::transferTypeAttributes(const TSourceLoc& loc, const TAttr
|
||||
break;
|
||||
case EatConstantId:
|
||||
// specialization constant
|
||||
if (type.getQualifier().storage != EvqConst) {
|
||||
error(loc, "needs a const type", "constant_id", "");
|
||||
break;
|
||||
}
|
||||
if (it->getInt(value)) {
|
||||
TSourceLoc loc;
|
||||
loc.init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user