Fix -Wunreachable-code-return with newer clang version.
When the emit_continuing lambda always returns true, clang is able to detect it and finds that some code is unreachable. This commit changes places that use the lambdas directly to instead use the stored emit_continuing_ member. Bud: dawn:824 Change-Id: Idfd804a6ec53ac793e8988dce79991c659fbbc36 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/75060 Auto-Submit: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
7913982f87
commit
09c49b34d9
|
@ -2110,7 +2110,7 @@ bool GeneratorImpl::EmitLoop(const ast::LoopStatement* stmt) {
|
|||
if (!EmitStatements(stmt->body->statements)) {
|
||||
return false;
|
||||
}
|
||||
if (!emit_continuing()) {
|
||||
if (!emit_continuing_()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -2190,7 +2190,7 @@ bool GeneratorImpl::EmitForLoop(const ast::ForLoopStatement* stmt) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!emit_continuing()) {
|
||||
if (!emit_continuing_()) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -3203,7 +3203,7 @@ bool GeneratorImpl::EmitLoop(const ast::LoopStatement* stmt) {
|
|||
if (!EmitStatements(stmt->body->statements)) {
|
||||
return false;
|
||||
}
|
||||
if (!emit_continuing()) {
|
||||
if (!emit_continuing_()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -3283,7 +3283,7 @@ bool GeneratorImpl::EmitForLoop(const ast::ForLoopStatement* stmt) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!emit_continuing()) {
|
||||
if (!emit_continuing_()) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1827,7 +1827,7 @@ bool GeneratorImpl::EmitLoop(const ast::LoopStatement* stmt) {
|
|||
if (!EmitStatements(stmt->body->statements)) {
|
||||
return false;
|
||||
}
|
||||
if (!emit_continuing()) {
|
||||
if (!emit_continuing_()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1908,7 +1908,7 @@ bool GeneratorImpl::EmitForLoop(const ast::ForLoopStatement* stmt) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!emit_continuing()) {
|
||||
if (!emit_continuing_()) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue