From f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 14:49:26 +0800 Subject: format * format * Minor test fixes * enable checking cpp format in ci --- source/slang/slang-ast-decl.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'source/slang/slang-ast-decl.cpp') 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 -#include "slang-generated-ast-macro.h" -#include "slang-ast-decl.h" +#include -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(decl); - if(!varDecl) + if (!varDecl) return false; const Decl* pp = varDecl->parentDecl; - if(as(pp)) + if (as(pp)) return true; - while(auto genericDecl = as(pp)) + while (auto genericDecl = as(pp)) pp = genericDecl->inner; - if(as(pp)) + if (as(pp)) return true; return false; -- cgit v1.2.3