Update some forward declarations.

This CL removes some forward declarations which are no longer needed
and adds one missing declaration which was pulled in from other headers.

These were found by the clang-tidy bugprone-forward-declaration-namespace
check.

Bug: dawn:1414
Change-Id: I8906861e472f2d64a1547c8c6de348cd4151ffb5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91742
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
dan sinclair 2022-05-30 18:00:58 +00:00 committed by Dawn LUCI CQ
parent 8b09bc97c0
commit 61d76ebb5c
11 changed files with 5 additions and 29 deletions

View File

@ -7,7 +7,6 @@ Checks: "-*,\
-bugprone-branch-clone,\ -bugprone-branch-clone,\
-bugprone-copy-constructor-init,\ -bugprone-copy-constructor-init,\
-bugprone-easily-swappable-parameters,\ -bugprone-easily-swappable-parameters,\
-bugprone-forward-declaration-namespace,\
-bugprone-forwarding-reference-overload,\ -bugprone-forwarding-reference-overload,\
-bugprone-implicit-widening-of-multiplication-result,\ -bugprone-implicit-widening-of-multiplication-result,\
-bugprone-lambda-function-name,\ -bugprone-lambda-function-name,\

View File

@ -20,8 +20,6 @@
namespace dawn::native::opengl { namespace dawn::native::opengl {
class Device;
struct GLFormat { struct GLFormat {
GLenum internalFormat = 0; GLenum internalFormat = 0;
GLenum format = 0; GLenum format = 0;

View File

@ -19,15 +19,6 @@
#include "src/tint/clone_context.h" #include "src/tint/clone_context.h"
// Forward declarations
namespace tint {
class CloneContext;
} // namespace tint
namespace tint::sem {
class Type;
class Info;
} // namespace tint::sem
namespace tint::ast { namespace tint::ast {
/// AST base class node /// AST base class node

View File

@ -20,6 +20,11 @@
#include "src/tint/ast/storage_texture.h" #include "src/tint/ast/storage_texture.h"
#include "src/tint/ast/texture.h" #include "src/tint/ast/texture.h"
// Forward declarations
namespace tint::sem {
class Type;
} // namespace tint::sem
namespace tint::inspector { namespace tint::inspector {
/// Container for information about how a resource is bound /// Container for information about how a resource is bound

View File

@ -21,11 +21,6 @@
#include "src/tint/sem/node.h" #include "src/tint/sem/node.h"
#include "src/tint/sem/type.h" #include "src/tint/sem/type.h"
// Forward declarations
namespace tint::ast {
class Array;
} // namespace tint::ast
namespace tint::sem { namespace tint::sem {
/// Array holds the semantic information for Array nodes. /// Array holds the semantic information for Array nodes.

View File

@ -24,7 +24,6 @@
namespace tint::ast { namespace tint::ast {
class BlockStatement; class BlockStatement;
class ContinueStatement; class ContinueStatement;
class Function;
class Variable; class Variable;
} // namespace tint::ast } // namespace tint::ast

View File

@ -23,7 +23,6 @@
// Forward declarations // Forward declarations
namespace tint::ast { namespace tint::ast {
class Node; class Node;
class Module;
} // namespace tint::ast } // namespace tint::ast
namespace tint::sem { namespace tint::sem {

View File

@ -20,7 +20,6 @@
// Forward declarations // Forward declarations
namespace tint::ast { namespace tint::ast {
class Function;
class Statement; class Statement;
} // namespace tint::ast } // namespace tint::ast
namespace tint::sem { namespace tint::sem {

View File

@ -32,9 +32,6 @@
namespace tint { namespace tint {
class Program; class Program;
} // namespace tint } // namespace tint
namespace tint::writer::glsl {
class GeneratorImpl;
} // namespace tint::writer::glsl
namespace tint::writer::glsl { namespace tint::writer::glsl {

View File

@ -30,9 +30,6 @@
namespace tint { namespace tint {
class Program; class Program;
} // namespace tint } // namespace tint
namespace tint::writer::hlsl {
class GeneratorImpl;
} // namespace tint::writer::hlsl
namespace tint::writer::hlsl { namespace tint::writer::hlsl {

View File

@ -28,9 +28,6 @@
namespace tint { namespace tint {
class Program; class Program;
} // namespace tint } // namespace tint
namespace tint::writer::msl {
class GeneratorImpl;
} // namespace tint::writer::msl
namespace tint::writer::msl { namespace tint::writer::msl {