summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-parser.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-07-07 03:52:00 +0800
committerGitHub <noreply@github.com>2023-07-06 15:52:00 -0400
commitcdfea42f1b28c6ec7b13500a64be823f67bf8e0a (patch)
tree4444c21ac369ce8f4c99370fcd47153eeb35581f /source/slang/slang-parser.cpp
parent4a88139a86596fd1a546af84ab3210ea3013c58d (diff)
Fix erroneous error claiming variable is being used before its declaration (#2958)
* Simplify type of diagnoseImpl * Show source line for Note diagnostics, opting out of this where appropriate * Make declared after use diagnostic clearer * Fix erroneous error claiming variable is being used before its declaration Closes https://github.com/shader-slang/slang/issues/2936 * Fix build on msvc --------- Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
Diffstat (limited to 'source/slang/slang-parser.cpp')
-rw-r--r--source/slang/slang-parser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp
index 5f9d5fbc4..b8310451c 100644
--- a/source/slang/slang-parser.cpp
+++ b/source/slang/slang-parser.cpp
@@ -1021,7 +1021,9 @@ namespace Slang
parser->astBuilder,
nullptr, // no semantics visitor available yet
name,
- parser->currentScope);
+ parser->currentScope,
+ LookupMask::Default,
+ true);
// If we didn't find anything, or the result was overloaded,
// then we aren't going to be able to extract a single decl.