diff options
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; |
