From 076a4c06767cca12c5205d950e9cd37451f91488 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 22 May 2020 14:21:37 -0400 Subject: 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 --- source/slang/slang-check-shader.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source/slang/slang-check-shader.cpp') 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(decl); if(!genericDecl) return; - for(auto m : genericDecl->Members) + for(auto m : genericDecl->members) { if(auto genericTypeParam = as(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(); + auto attr = entryPointFuncDecl->findModifier(); 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()) + if(auto semantic = param->findModifier()) { 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() ) + if( auto entryPointAttribute = entryPointFuncDecl->findModifier() ) { 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()) + if (auto reflectionNameModifier = varDecl->findModifier()) return reflectionNameModifier->nameAndLoc.name; return varDecl->getName(); @@ -594,7 +594,7 @@ namespace Slang // HashSet requiredModuleSet; - for( auto globalDecl : moduleDecl->Members ) + for( auto globalDecl : moduleDecl->members ) { if(auto globalVar = globalDecl.as()) { @@ -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(maybeFuncDecl) ) @@ -869,7 +869,7 @@ namespace Slang if(!funcDecl) continue; - auto entryPointAttr = funcDecl->FindModifier(); + auto entryPointAttr = funcDecl->findModifier(); if(!entryPointAttr) continue; -- cgit v1.2.3