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;
|
break;
|
||||||
case EatConstantId:
|
case EatConstantId:
|
||||||
// specialization constant
|
// specialization constant
|
||||||
|
if (type.getQualifier().storage != EvqConst) {
|
||||||
|
error(loc, "needs a const type", "constant_id", "");
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (it->getInt(value)) {
|
if (it->getInt(value)) {
|
||||||
TSourceLoc loc;
|
TSourceLoc loc;
|
||||||
loc.init();
|
loc.init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user