diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-10-29 14:49:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 14:49:26 +0800 |
| commit | f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch) | |
| tree | ea1d61342cd29368e19135000ec2948813096205 /source/slang/slang-ast-decl.cpp | |
| parent | a729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff) | |
format
* format
* Minor test fixes
* enable checking cpp format in ci
Diffstat (limited to 'source/slang/slang-ast-decl.cpp')
| -rw-r--r-- | source/slang/slang-ast-decl.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/slang/slang-ast-decl.cpp b/source/slang/slang-ast-decl.cpp index cd9c43410..c0d0e9242 100644 --- a/source/slang/slang-ast-decl.cpp +++ b/source/slang/slang-ast-decl.cpp @@ -1,12 +1,14 @@ // slang-ast-decl.cpp +#include "slang-ast-decl.h" + #include "slang-ast-builder.h" +#include "slang-generated-ast-macro.h" #include "slang-syntax.h" -#include <assert.h> -#include "slang-generated-ast-macro.h" -#include "slang-ast-decl.h" +#include <assert.h> -namespace Slang { +namespace Slang +{ const TypeExp& TypeConstraintDecl::getSup() const { @@ -16,7 +18,7 @@ const TypeExp& TypeConstraintDecl::getSup() const const TypeExp& TypeConstraintDecl::_getSupOverride() const { SLANG_UNEXPECTED("TypeConstraintDecl::_getSupOverride not overridden"); - //return TypeExp::empty; + // return TypeExp::empty; } InterfaceDecl* findParentInterfaceDecl(Decl* decl) @@ -106,14 +108,14 @@ void ContainerDecl::buildMemberDictionary() bool isLocalVar(const Decl* decl) { const auto varDecl = as<VarDecl>(decl); - if(!varDecl) + if (!varDecl) return false; const Decl* pp = varDecl->parentDecl; - if(as<ScopeDecl>(pp)) + if (as<ScopeDecl>(pp)) return true; - while(auto genericDecl = as<GenericDecl>(pp)) + while (auto genericDecl = as<GenericDecl>(pp)) pp = genericDecl->inner; - if(as<FunctionDeclBase>(pp)) + if (as<FunctionDeclBase>(pp)) return true; return false; |
