Merge pull request #1090 from tafuri/#1084-fix-segfault

Only track variables in the global scope
This commit is contained in:
John Kessenich
2017-10-07 07:19:21 +03:00
committed by GitHub
4 changed files with 72 additions and 2 deletions

View File

@@ -8318,8 +8318,9 @@ void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TS
return;
}
// Save it in the AST for linker use.
trackLinkage(variable);
// Save it in the AST for linker use.
if (symbolTable.atGlobalLevel())
trackLinkage(variable);
}
//