Consistent formatting for Dawn/Tint.
This CL updates the clang format files to have a single shared format
between Dawn and Tint. The major changes are tabs are 4 spaces, lines
are 100 columns and namespaces are not indented.
Bug: dawn:1339
Change-Id: I4208742c95643998d9fd14e77a9cc558071ded39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87603
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/tint/sem/switch_statement.h b/src/tint/sem/switch_statement.h
index b56bc85..a5ef659 100644
--- a/src/tint/sem/switch_statement.h
+++ b/src/tint/sem/switch_statement.h
@@ -26,49 +26,48 @@
namespace tint::sem {
/// Holds semantic information about an switch statement
-class SwitchStatement final
- : public Castable<SwitchStatement, CompoundStatement> {
- public:
- /// Constructor
- /// @param declaration the AST node for this switch statement
- /// @param parent the owning statement
- /// @param function the owning function
- SwitchStatement(const ast::SwitchStatement* declaration,
- const CompoundStatement* parent,
- const sem::Function* function);
+class SwitchStatement final : public Castable<SwitchStatement, CompoundStatement> {
+ public:
+ /// Constructor
+ /// @param declaration the AST node for this switch statement
+ /// @param parent the owning statement
+ /// @param function the owning function
+ SwitchStatement(const ast::SwitchStatement* declaration,
+ const CompoundStatement* parent,
+ const sem::Function* function);
- /// Destructor
- ~SwitchStatement() override;
+ /// Destructor
+ ~SwitchStatement() override;
- /// @return the AST node for this statement
- const ast::SwitchStatement* Declaration() const;
+ /// @return the AST node for this statement
+ const ast::SwitchStatement* Declaration() const;
};
/// Holds semantic information about a switch case statement
class CaseStatement final : public Castable<CaseStatement, CompoundStatement> {
- public:
- /// Constructor
- /// @param declaration the AST node for this case statement
- /// @param parent the owning statement
- /// @param function the owning function
- CaseStatement(const ast::CaseStatement* declaration,
- const CompoundStatement* parent,
- const sem::Function* function);
+ public:
+ /// Constructor
+ /// @param declaration the AST node for this case statement
+ /// @param parent the owning statement
+ /// @param function the owning function
+ CaseStatement(const ast::CaseStatement* declaration,
+ const CompoundStatement* parent,
+ const sem::Function* function);
- /// Destructor
- ~CaseStatement() override;
+ /// Destructor
+ ~CaseStatement() override;
- /// @return the AST node for this statement
- const ast::CaseStatement* Declaration() const;
+ /// @return the AST node for this statement
+ const ast::CaseStatement* Declaration() const;
- /// @param body the case body block statement
- void SetBlock(const BlockStatement* body) { body_ = body; }
+ /// @param body the case body block statement
+ void SetBlock(const BlockStatement* body) { body_ = body; }
- /// @returns the case body block statement
- const BlockStatement* Body() const { return body_; }
+ /// @returns the case body block statement
+ const BlockStatement* Body() const { return body_; }
- private:
- const BlockStatement* body_ = nullptr;
+ private:
+ const BlockStatement* body_ = nullptr;
};
} // namespace tint::sem