diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-05-22 14:21:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-22 11:21:37 -0700 |
| commit | 076a4c06767cca12c5205d950e9cd37451f91488 (patch) | |
| tree | dc3bcc376e18e5233f61b2cedfa3419717798a01 /source/slang/slang-check-shader.cpp | |
| parent | daf53bb2708982a2bcc6d6cc08fe88790ccf0bc2 (diff) | |
Tidy up around AST nodes (#1353)
* Fields from upper to lower case in slang-ast-decl.h
* Lower camel field names in slang-ast-stmt.h
* Fix fields in slang-ast-expr.h
* slang-ast-type.h make fields lowerCamel.
* slang-ast-base.h members functions lowerCamel.
* Method names in slang-ast-type.h to lowerCamel.
* GetCanonicalType -> getCanonicalType
* Substitute -> substitute
* Equals -> equals
ToString -> toString
* ParentDecl -> parentDecl
Members -> members
Diffstat (limited to 'source/slang/slang-check-shader.cpp')
| -rw-r--r-- | source/slang/slang-check-shader.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/slang/slang-check-shader.cpp b/source/slang/slang-check-shader.cpp index ad5b1332e..ec0c5137e 100644 --- a/source/slang/slang-check-shader.cpp +++ b/source/slang/slang-check-shader.cpp @@ -136,13 +136,13 @@ namespace Slang if(!decl) return; - _collectGenericSpecializationParamsRec(decl->ParentDecl); + _collectGenericSpecializationParamsRec(decl->parentDecl); auto genericDecl = as<GenericDecl>(decl); if(!genericDecl) return; - for(auto m : genericDecl->Members) + for(auto m : genericDecl->members) { if(auto genericTypeParam = as<GenericTypeParamDecl>(m)) { @@ -342,7 +342,7 @@ namespace Slang // TODO: We could consider *always* checking any `[patchconsantfunc("...")]` // attributes, so that they need to resolve to a function. - auto attr = entryPointFuncDecl->FindModifier<PatchConstantFuncAttribute>(); + auto attr = entryPointFuncDecl->findModifier<PatchConstantFuncAttribute>(); if (attr) { @@ -390,9 +390,9 @@ namespace Slang } else if(stage == Stage::Compute) { - for(const auto& param : entryPointFuncDecl->GetParameters()) + for(const auto& param : entryPointFuncDecl->getParameters()) { - if(auto semantic = param->FindModifier<HLSLSimpleSemantic>()) + if(auto semantic = param->findModifier<HLSLSimpleSemantic>()) { const auto& semanticToken = semantic->name; @@ -404,7 +404,7 @@ namespace Slang if(!isValidThreadDispatchIDType(paramType)) { - String typeString = paramType->ToString(); + String typeString = paramType->toString(); sink->diagnose(param->loc, Diagnostics::invalidDispatchThreadIDType, typeString); return; } @@ -534,7 +534,7 @@ namespace Slang // it didn't have one, *or* issue a diagnostic if there is a mismatch. // auto entryPointProfile = entryPointReq->getProfile(); - if( auto entryPointAttribute = entryPointFuncDecl->FindModifier<EntryPointAttribute>() ) + if( auto entryPointAttribute = entryPointFuncDecl->findModifier<EntryPointAttribute>() ) { auto entryPointStage = entryPointProfile.GetStage(); if( entryPointStage == Stage::Unknown ) @@ -569,7 +569,7 @@ namespace Slang /// Get the name a variable will use for reflection purposes Name* getReflectionName(VarDeclBase* varDecl) { - if (auto reflectionNameModifier = varDecl->FindModifier<ParameterGroupReflectionName>()) + if (auto reflectionNameModifier = varDecl->findModifier<ParameterGroupReflectionName>()) return reflectionNameModifier->nameAndLoc.name; return varDecl->getName(); @@ -594,7 +594,7 @@ namespace Slang // HashSet<Module*> requiredModuleSet; - for( auto globalDecl : moduleDecl->Members ) + for( auto globalDecl : moduleDecl->members ) { if(auto globalVar = globalDecl.as<VarDecl>()) { @@ -857,7 +857,7 @@ namespace Slang for(Index tt = 0; tt < translationUnitCount; ++tt) { auto translationUnit = compileRequest->translationUnits[tt]; - for( auto globalDecl : translationUnit->getModuleDecl()->Members ) + for( auto globalDecl : translationUnit->getModuleDecl()->members ) { auto maybeFuncDecl = globalDecl; if( auto genericDecl = as<GenericDecl>(maybeFuncDecl) ) @@ -869,7 +869,7 @@ namespace Slang if(!funcDecl) continue; - auto entryPointAttr = funcDecl->FindModifier<EntryPointAttribute>(); + auto entryPointAttr = funcDecl->findModifier<EntryPointAttribute>(); if(!entryPointAttr) continue; |
