• Daniel Bevenius's avatar
    [test] Suppress subobject-linkage warnings · 3705048d
    Daniel Bevenius authored
    Currently there are a number of -Wsubobject-linkage warnings when
    compiling with gcc (formatted to fit 72 character lines):
    
    In file included from
    ...
    from ../../testing/gtest/include/gtest/gtest.h:10,
    from ../../testing/gtest-support.h:8,
    from ../../test/unittests/test-utils.h:20,
    from ../../test/unittests/compiler/backend/
      instruction-selector-unittest.h:15,
    from ../../test/unittests/compiler/x64/
      instruction-selector-x64-unittest.cc:9:
    ../../third_party/googletest/src/googletest/include/gtest/internal/
    gtest-param-util.h:
    In instantiation of ‘class
    testing::internal::ParameterizedTestFactory<v8::internal::compiler::
    InstructionSelectorChangeInt32ToInt64Test_ \
    ChangeInt32ToInt64WithLoad_Test>’:
    ../../third_party/googletest/src/googletest/include/gtest/internal/
    gtest-param-util.h:439:12:   required from
    ‘testing::internal::TestFactoryBase*
    testing::internal::TestMetaFactory<TestSuite>::CreateTestFactory(
      testing::internal::TestMetaFactory<TestSuite>::ParamType)
    [with
    TestSuite = v8::internal::compiler::
    InstructionSelectorChangeInt32ToInt64Test_ \
    ChangeInt32ToInt64WithLoad_Test;
    testing::internal::TestMetaFactory<TestSuite>::ParamType =
      v8::internal::compiler::{anonymous}::LoadWithToInt64Extension]’
    ../../third_party/googletest/src/googletest/include/gtest/internal/
      gtest-param-util.h:438:20:   required from here
    ../../third_party/googletest/src/googletest/include/gtest/internal/
      gtest-param-util.h:394:7: warning:
    ‘testing::internal::ParameterizedTestFactory<
    v8::internal::compiler::
    InstructionSelectorChangeInt32ToInt64Test_ \
    ChangeInt32ToInt64WithLoad_Test >’ has a field
    ‘testing::internal::ParameterizedTestFactory<
    v8::internal::compiler::
    InstructionSelectorChangeInt32ToInt64Test_ \
    ChangeInt32ToInt64WithLoad_Test>::parameter_’ whose type uses the
    anonymous namespace [-Wsubobject-linkage]
      394 | class ParameterizedTestFactory : public TestFactoryBase {
          |       ^~~~~~~~~~~~~~~~~~~~~~~~
    
    This commit moves the parameterized tests in question into the
    anonymous namespace to avoid the warnings.
    
    Change-Id: I9c4a8bd9f4e225ed14ab64f5433d5f5c102e01a1
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2418723Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70482}
    3705048d
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
backend Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
regalloc Loading commit data...
s390 Loading commit data...
x64 Loading commit data...
branch-elimination-unittest.cc Loading commit data...
bytecode-analysis-unittest.cc Loading commit data...
checkpoint-elimination-unittest.cc Loading commit data...
common-operator-reducer-unittest.cc Loading commit data...
common-operator-unittest.cc Loading commit data...
compiler-test-utils.h Loading commit data...
constant-folding-reducer-unittest.cc Loading commit data...
control-equivalence-unittest.cc Loading commit data...
control-flow-optimizer-unittest.cc Loading commit data...
dead-code-elimination-unittest.cc Loading commit data...
decompression-optimizer-unittest.cc Loading commit data...
diamond-unittest.cc Loading commit data...
effect-control-linearizer-unittest.cc Loading commit data...
graph-reducer-unittest.cc Loading commit data...
graph-reducer-unittest.h Loading commit data...
graph-trimmer-unittest.cc Loading commit data...
graph-unittest.cc Loading commit data...
graph-unittest.h Loading commit data...
int64-lowering-unittest.cc Loading commit data...
js-call-reducer-unittest.cc Loading commit data...
js-create-lowering-unittest.cc Loading commit data...
js-intrinsic-lowering-unittest.cc Loading commit data...
js-native-context-specialization-unittest.cc Loading commit data...
js-operator-unittest.cc Loading commit data...
js-typed-lowering-unittest.cc Loading commit data...
linkage-tail-call-unittest.cc Loading commit data...
load-elimination-unittest.cc Loading commit data...
loop-peeling-unittest.cc Loading commit data...
machine-operator-reducer-unittest.cc Loading commit data...
machine-operator-unittest.cc Loading commit data...
node-cache-unittest.cc Loading commit data...
node-matchers-unittest.cc Loading commit data...
node-properties-unittest.cc Loading commit data...
node-test-utils.cc Loading commit data...
node-test-utils.h Loading commit data...
node-unittest.cc Loading commit data...
opcodes-unittest.cc Loading commit data...
persistent-unittest.cc Loading commit data...
redundancy-elimination-unittest.cc Loading commit data...
schedule-unittest.cc Loading commit data...
scheduler-rpo-unittest.cc Loading commit data...
scheduler-unittest.cc Loading commit data...
simplified-lowering-unittest.cc Loading commit data...
simplified-operator-reducer-unittest.cc Loading commit data...
simplified-operator-unittest.cc Loading commit data...
state-values-utils-unittest.cc Loading commit data...
typed-optimization-unittest.cc Loading commit data...
typer-unittest.cc Loading commit data...
value-numbering-reducer-unittest.cc Loading commit data...
zone-stats-unittest.cc Loading commit data...