Commit f8a5602c by johnkslang

Fix #2385: guard against constant_id on non-const.

parent 759ae5ae
...@@ -1953,6 +1953,10 @@ void HlslParseContext::transferTypeAttributes(const TSourceLoc& loc, const TAttr ...@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment