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:
@@ -9,5 +9,5 @@
|
||||
// source have to figure out how to create revision.h just to get a build
|
||||
// going. However, if it is not updated, it can be a version behind.
|
||||
|
||||
#define GLSLANG_REVISION "25220"
|
||||
#define GLSLANG_DATE "2014/02/03 09:28:23"
|
||||
#define GLSLANG_REVISION "25314"
|
||||
#define GLSLANG_DATE "2014/02/11 22:15:49"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user