Commit 3e663fb9 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Revert "[NaCl SDK] Fix SDK build breakage due to [[clang::fallthrough]]"

This reverts commit 4180e560.

Reason for revert: Speculative; might've broken win-msvc-rel builds: https://logs.chromium.org/v/?s=chromium%2Fbb%2Ftryserver.chromium.win%2Fwin-msvc-rel%2F48085%2F%2B%2Frecipes%2Fsteps%2Fcompile__with_patch_%2F0%2Fstdout Will reland if it's unrelated.

Original change's description:
> [NaCl SDK] Fix SDK build breakage due to [[clang::fallthrough]]
> 
> This was broken by: https://chromium-review.googlesource.com/891900
> but went unnoticed because the bots were all red anyway.
> 
> Turns out we acutally compile this code with many different
> compilers, including the PNaCl version of clang which
> doesn't seem to have this attribute :(
> 
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_nacl_sdk
> BUG=177475
> 
> Change-Id: Iac06aa0ba1c63a758c666d207c2495edd3352abc
> Reviewed-on: https://chromium-review.googlesource.com/900314
> Commit-Queue: Derek Schuff <dschuff@chromium.org>
> Reviewed-by: Derek Schuff <dschuff@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#534534}

TBR=dschuff@chromium.org,sbc@chromium.org,thakis@google.com

Change-Id: I1617a0fc5b8b0e20ccdea9ff94e0a8211d9e8f2f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 177475
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_nacl_sdk
Reviewed-on: https://chromium-review.googlesource.com/902845Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534552}
parent fd536c24
......@@ -20,19 +20,6 @@
#define snprintf _snprintf
#endif
#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) 0
#endif
// Macro for telling -Wimplicit-fallthrough that a fallthrough is intentional.
#if !defined(FALLTHROUGH) // https://crbug.com/805946
#if defined(__clang__) && __has_cpp_attribute(fallthrough)
#define FALLTHROUGH [[clang::fallthrough]]
#else
#define FALLTHROUGH
#endif
#endif
namespace nacl_io {
namespace {
......@@ -76,7 +63,7 @@ StringMap_t ParseHeaders(const char* headers, int32_t headers_length) {
start = &headers[i];
state = FINDING_VALUE;
// Fallthrough to start processing value without incrementing i.
FALLTHROUGH;
[[clang::fallthrough]];
case FINDING_VALUE:
if (headers[i] == '\n') {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment