Fix missing semantic check: Disallow layout qualifiers when augmenting an already declared variable with a qualifier.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25351 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
782aa830b6
commit
56876dcfe7
7 changed files with 23 additions and 7 deletions
|
|
@ -4187,10 +4187,10 @@ void TParseContext::addQualifierToExisting(TSourceLoc loc, TQualifier qualifier,
|
|||
if (qualifier.isAuxiliary() ||
|
||||
qualifier.isMemory() ||
|
||||
qualifier.isInterpolation() ||
|
||||
qualifier.hasLayout() ||
|
||||
qualifier.storage != EvqTemporary ||
|
||||
qualifier.precision != EpqNone) {
|
||||
error(loc, "cannot add storage, auxiliary, memory, interpolation, or precision qualifier to an existing variable", identifier.c_str(), "");
|
||||
|
||||
error(loc, "cannot add storage, auxiliary, memory, interpolation, layout, or precision qualifier to an existing variable", identifier.c_str(), "");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -4204,7 +4204,8 @@ void TParseContext::addQualifierToExisting(TSourceLoc loc, TQualifier qualifier,
|
|||
error(loc, "cannot change qualification after use", "invariant", "");
|
||||
symbol->getWritableType().getQualifier().invariant = true;
|
||||
invariantCheck(loc, symbol->getType(), identifier);
|
||||
}
|
||||
} else
|
||||
warn(loc, "unknown requalification", "", "");
|
||||
}
|
||||
|
||||
void TParseContext::addQualifierToExisting(TSourceLoc loc, TQualifier qualifier, TIdentifierList& identifiers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue