diff options
author | danakj <danakj@chromium.org> | 2024-05-13 09:07:06 -0700 |
---|---|---|
committer | chromeos-ci-prod <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com> | 2024-05-14 04:20:21 -0700 |
commit | 7179f55e466fd706889a7a091c788f7d5931c11c (patch) | |
tree | d79de303666ceb523427a147cf792c034323f620 | |
parent | 3dd14147ffefea632f62ffd21e917f22c5def5a5 (diff) | |
download | libchrome-7179f55e466fd706889a7a091c788f7d5931c11c.tar.gz |
Guard the unsafe-buffers nocompile test with UNSAFE_BUFFERS_BUILD
This define is present only when the plugin is in use. Previously
it was using a buildflags header, but that header was not being
set with the same value, so it would claim the plugin was in use
when it was not. Remove the buildflags header now, as
UNSAFE_BUFFERS_BUILD has replaced it.
R=hans@chromium.org
Bug: 41497066
Change-Id: Ibca1f98ef5ea82a31965e84d05cb8c4747e316fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5527381
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1300054}
CrOS-Libchrome-Original-Commit: dc1a4a4798d443e98a8f256a1a76d029e6ab6977
-rw-r--r-- | base/unsafe_buffers_nocompile.nc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/base/unsafe_buffers_nocompile.nc b/base/unsafe_buffers_nocompile.nc index f58e025bcf..1b0c3faf78 100644 --- a/base/unsafe_buffers_nocompile.nc +++ b/base/unsafe_buffers_nocompile.nc @@ -6,7 +6,6 @@ // http://dev.chromium.org/developers/testing/no-compile-tests #include "base/compiler_specific.h" -#include "build/config/clang/unsafe_buffers_buildflags.h" namespace base { @@ -16,7 +15,7 @@ UNSAFE_BUFFER_USAGE int uses_pointer_as_array(int* i) { void CallToUnsafeBufferFunctionDisallowed() { int arr[] = {1, 2}; -#if BUILDFLAG(UNSAFE_BUFFERS_WARNING_ENABLED) +#ifdef UNSAFE_BUFFERS_BUILD uses_pointer_as_array(arr); // expected-error {{function introduces unsafe buffer manipulation}} #else uses_pointer_as_array(arr); // expected-no-diagnostics: No error when not enabled. |