Infrastructure: Generalize and broaden per-variable extension checking.

This commit is contained in:
John Kessenich
2018-12-11 17:42:35 -07:00
parent 69932ab47f
commit 28be4543cd
6 changed files with 135 additions and 73 deletions

View File

@@ -653,10 +653,6 @@ TIntermTyped* HlslParseContext::handleVariable(const TSourceLoc& loc, const TStr
return nullptr;
}
// Error check for requiring specific extensions present.
if (symbol && symbol->getNumExtensions())
requireExtensions(loc, symbol->getNumExtensions(), symbol->getExtensions(), symbol->getName().c_str());
const TVariable* variable = nullptr;
const TAnonMember* anon = symbol ? symbol->getAsAnonMember() : nullptr;
TIntermTyped* node = nullptr;
@@ -5321,11 +5317,6 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct
// - a built-in function not mapped to an operator, or
// - a user function.
// Error check for a function requiring specific extensions present.
if (builtIn && fnCandidate->getNumExtensions())
requireExtensions(loc, fnCandidate->getNumExtensions(), fnCandidate->getExtensions(),
fnCandidate->getName().c_str());
// turn an implicit member-function resolution into an explicit call
TString callerName;
if (thisDepth == 0)