See https://codereview.chromium.org/2399433002/.
The following code should be compiled, but it's not.
class X : public GarbageCollectedMixin {
public:
DEFINE_INLINE_VIRTUAL_TRACE() {}
};
template <typename T>
class Y : public T {
public:
DEFINE_INLINE_TRACE() { T::trace(visitor); }
};
class Z final : public GarbageCollectedFinalized<Z>, public Y<X> {
USING_GARBAGE_COLLECTED_MIXIN(Z);
public:
~Z() {}
DEFINE_INLINE_TRACE() { Y<X>::trace(visitor); }
};
/b/c/cipd/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/WebKit/Source/modules/unit_tests/BodyStreamBufferTest.o.d -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PDF=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DDCHECK_ALWAYS_ON=1 -DNO_TCMALLOC -DUSE_EXTERNAL_POPUP_MENU=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DUSE_PROPRIETARY_CODECS -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=282487-1 -DCR_XCODE_VERSION=0511 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBLINK_IMPLEMENTATION=1 -DINSIDE_BLINK -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_MAC -DUNIT_TEST -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DENABLE_OILPAN=1 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DWTF_USE_ICCJPEG=1 -DWTF_USE_QCMSLIB=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DANGLE_ENABLE_RELEASE_ASSERTS -DLIBXSLT_STATIC -DENABLE_WEBSOCKETS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DUSE_LIBJPEG_TURBO=1 -I../.. -Igen -I../../third_party/WebKit/Source -I../../third_party/WebKit -Igen/blink -Igen/third_party/WebKit -I../../third_party/khronos -I../../gpu -I../../third_party/libwebp -I../../testing/gtest/include -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../testing/gmock_custom -I../../testing/gmock/include -I../../third_party/WebKit/Source -Igen/blink -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/angle/include -I../../third_party/angle/src/common/third_party/numerics -Igen/angle -I../../third_party/iccjpeg -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libxml/src/include -I../../third_party/libxml/mac/include -I../../third_party/libxslt -I../../third_party/ots/include -I../../third_party/qcms/src -I../../third_party/snappy/src -I../../third_party/snappy/mac -I../../v8/include -Igen/v8/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../third_party/libjpeg_turbo -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -arch x86_64 -Wall -Werror -Wextra -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -O2 -g1 -isysroot /b/c/b/mac/src/build/mac_files/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib -Xclang -add-plugin -Xclang blink-gc-plugin -DLIBXML_STATIC= -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -include obj/third_party/WebKit/Source/modules/unit_tests/Prefix.h-cc -c ../../third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp -o obj/third_party/WebKit/Source/modules/unit_tests/BodyStreamBufferTest.o
../../third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp:78:3: error: [blink-gc] Base class 'X' of derived class 'Y<blink::(anonymous namespace)::X>' requires tracing.
DEFINE_INLINE_TRACE() { T::trace(visitor); }
^
../../third_party/WebKit/Source/platform/heap/Visitor.h:129:31: note: expanded from macro 'DEFINE_INLINE_TRACE'
#define DEFINE_INLINE_TRACE() DEFINE_INLINE_TRACE_IMPL(EMPTY_MACRO_ARGUMENT)
^
../../third_party/WebKit/Source/platform/heap/Visitor.h:92:3: note: expanded from macro 'DEFINE_INLINE_TRACE_IMPL'
inline void traceImpl(VisitorDispatcher visitor)
^
Comment 1 by bugdroid1@chromium.org
, Dec 7 2017