Clang format the entire tint codebase
Change-Id: I8e6ae93d0d4449e38cd32672e714ef07e1075d75 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77441 Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
01e4b6fc18
commit
198417097f
|
@ -54,8 +54,7 @@ fn f() { return 1 & >; }
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, AliasDeclInvalidDeco) {
|
||||
EXPECT(
|
||||
"@override type e=u32;",
|
||||
EXPECT("@override type e=u32;",
|
||||
R"(test.wgsl:1:2 error: unexpected decorations
|
||||
@override type e=u32;
|
||||
^^^^^^^^
|
||||
|
@ -324,8 +323,7 @@ fn f() { for (var i : i32 = 0; i < 8; i=i+1) {
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, FunctionDeclDecoStageMissingLParen) {
|
||||
EXPECT(
|
||||
"@stage vertex) fn f() {}",
|
||||
EXPECT("@stage vertex) fn f() {}",
|
||||
R"(test.wgsl:1:8 error: expected '(' for stage decoration
|
||||
@stage vertex) fn f() {}
|
||||
^^^^^^
|
||||
|
@ -333,8 +331,7 @@ TEST_F(ParserImplErrorTest, FunctionDeclDecoStageMissingLParen) {
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, FunctionDeclDecoStageMissingRParen) {
|
||||
EXPECT(
|
||||
"@stage(vertex fn f() {}",
|
||||
EXPECT("@stage(vertex fn f() {}",
|
||||
R"(test.wgsl:1:15 error: expected ')' for stage decoration
|
||||
@stage(vertex fn f() {}
|
||||
^^
|
||||
|
@ -1135,8 +1132,7 @@ test.wgsl:1:15 error: expected ']]' for decoration list
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, GlobalDeclVarDecoLocationMissingLParen) {
|
||||
EXPECT(
|
||||
"@location 1) var i : i32;",
|
||||
EXPECT("@location 1) var i : i32;",
|
||||
R"(test.wgsl:1:11 error: expected '(' for location decoration
|
||||
@location 1) var i : i32;
|
||||
^
|
||||
|
@ -1144,8 +1140,7 @@ TEST_F(ParserImplErrorTest, GlobalDeclVarDecoLocationMissingLParen) {
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, GlobalDeclVarDecoLocationMissingRParen) {
|
||||
EXPECT(
|
||||
"@location (1 var i : i32;",
|
||||
EXPECT("@location (1 var i : i32;",
|
||||
R"(test.wgsl:1:14 error: expected ')' for location decoration
|
||||
@location (1 var i : i32;
|
||||
^^^
|
||||
|
@ -1190,8 +1185,7 @@ TEST_F(ParserImplErrorTest, GlobalDeclVarDecoLocationInvalidValue) {
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBuiltinMissingLParen) {
|
||||
EXPECT(
|
||||
"@builtin position) var i : i32;",
|
||||
EXPECT("@builtin position) var i : i32;",
|
||||
R"(test.wgsl:1:10 error: expected '(' for builtin decoration
|
||||
@builtin position) var i : i32;
|
||||
^^^^^^^^
|
||||
|
@ -1199,8 +1193,7 @@ TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBuiltinMissingLParen) {
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBuiltinMissingRParen) {
|
||||
EXPECT(
|
||||
"@builtin(position var i : i32;",
|
||||
EXPECT("@builtin(position var i : i32;",
|
||||
R"(test.wgsl:1:19 error: expected ')' for builtin decoration
|
||||
@builtin(position var i : i32;
|
||||
^^^
|
||||
|
@ -1252,8 +1245,7 @@ TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBuiltinInvalidValue) {
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBindingMissingLParen) {
|
||||
EXPECT(
|
||||
"@binding 1) var i : i32;",
|
||||
EXPECT("@binding 1) var i : i32;",
|
||||
R"(test.wgsl:1:10 error: expected '(' for binding decoration
|
||||
@binding 1) var i : i32;
|
||||
^
|
||||
|
@ -1261,8 +1253,7 @@ TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBindingMissingLParen) {
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBindingMissingRParen) {
|
||||
EXPECT(
|
||||
"@binding(1 var i : i32;",
|
||||
EXPECT("@binding(1 var i : i32;",
|
||||
R"(test.wgsl:1:12 error: expected ')' for binding decoration
|
||||
@binding(1 var i : i32;
|
||||
^^^
|
||||
|
@ -1307,8 +1298,7 @@ TEST_F(ParserImplErrorTest, GlobalDeclVarDecoBindingInvalidValue) {
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, GlobalDeclVarDecoGroupMissingLParen) {
|
||||
EXPECT(
|
||||
"@group 1) var i : i32;",
|
||||
EXPECT("@group 1) var i : i32;",
|
||||
R"(test.wgsl:1:8 error: expected '(' for group decoration
|
||||
@group 1) var i : i32;
|
||||
^
|
||||
|
@ -1316,8 +1306,7 @@ TEST_F(ParserImplErrorTest, GlobalDeclVarDecoGroupMissingLParen) {
|
|||
}
|
||||
|
||||
TEST_F(ParserImplErrorTest, GlobalDeclVarDecoGroupMissingRParen) {
|
||||
EXPECT(
|
||||
"@group(1 var i : i32;",
|
||||
EXPECT("@group(1 var i : i32;",
|
||||
R"(test.wgsl:1:10 error: expected ')' for group decoration
|
||||
@group(1 var i : i32;
|
||||
^^^
|
||||
|
|
|
@ -38,8 +38,7 @@ TEST_F(ParserImplTest, DecorationDecl_MissingParenLeft) {
|
|||
EXPECT_TRUE(decos.errored);
|
||||
EXPECT_FALSE(decos.matched);
|
||||
EXPECT_TRUE(decos.value.empty());
|
||||
EXPECT_EQ(p->error(),
|
||||
"1:11: expected '(' for location decoration");
|
||||
EXPECT_EQ(p->error(), "1:11: expected '(' for location decoration");
|
||||
}
|
||||
|
||||
TEST_F(ParserImplTest, DecorationDecl_MissingValue) {
|
||||
|
@ -60,8 +59,7 @@ TEST_F(ParserImplTest, DecorationDecl_MissingParenRight) {
|
|||
EXPECT_TRUE(decos.errored);
|
||||
EXPECT_FALSE(decos.matched);
|
||||
EXPECT_TRUE(decos.value.empty());
|
||||
EXPECT_EQ(p->error(),
|
||||
"1:12: expected ')' for location decoration");
|
||||
EXPECT_EQ(p->error(), "1:12: expected ')' for location decoration");
|
||||
}
|
||||
|
||||
TEST_F(ParserImplTest, DecorationDecl_InvalidDecoration) {
|
||||
|
|
|
@ -36,7 +36,9 @@ TEST_F(ParserImplTest, DEPRECATED_DecorationDecl_EmptyBlock) {
|
|||
EXPECT_TRUE(decos.errored);
|
||||
EXPECT_FALSE(decos.matched);
|
||||
EXPECT_EQ(decos.value.size(), 0u);
|
||||
EXPECT_EQ(p->error(), R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style
|
||||
EXPECT_EQ(
|
||||
p->error(),
|
||||
R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style
|
||||
1:3: empty decoration list)");
|
||||
}
|
||||
|
||||
|
@ -68,7 +70,9 @@ TEST_F(ParserImplTest, DecorationDecl_MissingClose) {
|
|||
EXPECT_TRUE(p->has_error()) << p->error();
|
||||
EXPECT_TRUE(decos.errored);
|
||||
EXPECT_FALSE(decos.matched);
|
||||
EXPECT_EQ(p->error(), R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style
|
||||
EXPECT_EQ(
|
||||
p->error(),
|
||||
R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style
|
||||
1:10: expected ']]' for decoration list)");
|
||||
}
|
||||
|
||||
|
@ -78,7 +82,9 @@ TEST_F(ParserImplTest, StructMemberDecorationDecl_SizeMissingClose) {
|
|||
EXPECT_TRUE(p->has_error()) << p->error();
|
||||
EXPECT_TRUE(decos.errored);
|
||||
EXPECT_FALSE(decos.matched);
|
||||
EXPECT_EQ(p->error(), R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style
|
||||
EXPECT_EQ(
|
||||
p->error(),
|
||||
R"(1:1: use of deprecated language feature: [[decoration]] style decorations have been replaced with @decoration style
|
||||
1:10: expected ']]' for decoration list)");
|
||||
}
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
#ifndef SRC_SEM_INTRINSIC_TYPE_H_
|
||||
#define SRC_SEM_INTRINSIC_TYPE_H_
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
namespace tint {
|
||||
namespace sem {
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#include "src/sem/statement.h"
|
||||
#include "src/sem/struct.h"
|
||||
#include "src/sem/variable.h"
|
||||
#include "src/utils/map.h"
|
||||
#include "src/utils/hash.h"
|
||||
#include "src/utils/map.h"
|
||||
|
||||
TINT_INSTANTIATE_TYPEINFO(tint::transform::DecomposeMemoryAccess);
|
||||
TINT_INSTANTIATE_TYPEINFO(tint::transform::DecomposeMemoryAccess::Intrinsic);
|
||||
|
|
Loading…
Reference in New Issue