Commit cb891cb0 authored by hablich's avatar hablich Committed by Commit bot

Revert of [inspector] removed ArrayLengthHelperFunction specialization for...

Revert of [inspector] removed ArrayLengthHelperFunction specialization for empty array (patchset #2 id:20001 of https://codereview.chromium.org/2340623002/ )

Reason for revert:
needed to revert https://codereview.chromium.org/2339173004/

Original issue's description:
> [inspector] removed ArrayLengthHelperFunction specialization for empty array
>
> There is no zero length array usage in inspector codebase. We can safely remove template specialization.
>
> BUG=chromium:635948
> R=dgozman@chromium.org,alph@chromium.org
>
> Committed: https://crrev.com/b249ffc1915d8c35ff66eae3d51d3878d588dfbf
> Cr-Commit-Position: refs/heads/master@{#39428}

TBR=jochen@chromium.org,alph@chromium.org,dgozman@chromium.org,kozyatinskiy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2334163006
Cr-Commit-Position: refs/heads/master@{#39431}
parent 7b9d6bbc
......@@ -27,6 +27,11 @@ enum NotNullTagEnum { NotNullLiteral };
// gives an error if passed a non-array.
template <typename T, std::size_t Size>
char (&ArrayLengthHelperFunction(T (&)[Size]))[Size];
// GCC needs some help to deduce a 0 length array.
#if defined(__GNUC__)
template <typename T>
char (&ArrayLengthHelperFunction(T (&)[0]))[0];
#endif
#define V8_INSPECTOR_ARRAY_LENGTH(array) \
sizeof(::ArrayLengthHelperFunction(array))
......
......@@ -1755,6 +1755,7 @@
4996, # Deprecated function call.
],
'cflags': [
'-Wno-zero-length-array',
'-Wno-deprecated-declarations',
],
}],
......
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