Issue #39: Prevent problem of inserting a zero-length symbol after cascading errors.
This commit is contained in:
@@ -1626,12 +1626,13 @@ void TParseContext::variableCheck(TIntermTyped*& nodePtr)
|
||||
error(symbol->getLoc(), "undeclared identifier", symbol->getName().c_str(), "");
|
||||
|
||||
// Add to symbol table to prevent future error messages on the same name
|
||||
|
||||
if (symbol->getName().size() > 0) {
|
||||
TVariable* fakeVariable = new TVariable(&symbol->getName(), TType(EbtFloat));
|
||||
symbolTable.insert(*fakeVariable);
|
||||
|
||||
// substitute a symbol node for this new variable
|
||||
nodePtr = intermediate.addSymbol(*fakeVariable, symbol->getLoc());
|
||||
}
|
||||
} else {
|
||||
switch (symbol->getQualifier().storage) {
|
||||
case EvqPointCoord:
|
||||
|
||||
Reference in New Issue
Block a user