diff options
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index 8f00253f5..e2b14f1e3 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -7641,15 +7641,15 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> // Constructors aren't really member functions, insofar // as they aren't called with a `this` parameter. - // - // TODO: We may also want to exclude `static` functions - // here for the same reason, but this routine is only - // used for the stdlib, where we don't currently have - // any `static` member functions to worry about. - // if(as<ConstructorDecl>(decl)) return false; + // Exclude `static` functions for same reason. + if (decl->findModifier<HLSLStaticModifier>()) + { + return false; + } + auto dd = decl->parentDecl; for(;;) { |
