| Index: tools/clang/plugins/FindBadConstructsConsumer.cpp
|
| diff --git a/tools/clang/plugins/FindBadConstructsConsumer.cpp b/tools/clang/plugins/FindBadConstructsConsumer.cpp
|
| index 2b8719326714a0ea24508c8ee24a24f35ccb8865..83a18b0206f7d1ac6371a5fead21a7ba05f91aa9 100644
|
| --- a/tools/clang/plugins/FindBadConstructsConsumer.cpp
|
| +++ b/tools/clang/plugins/FindBadConstructsConsumer.cpp
|
| @@ -306,8 +306,15 @@ void FindBadConstructsConsumer::CheckCtorDtorWeight(
|
| "Complex class/struct needs an explicit out-of-line "
|
| "copy constructor.");
|
| } else {
|
| - emitWarning(it->getInnerLocStart(),
|
| - "Complex constructor has an inlined body.");
|
| + // See the comment in the previous branch about copy constructors.
|
| + // This does the same for implicit move constructors.
|
| + bool is_likely_compiler_generated_dllexport_move_ctor =
|
| + it->isMoveConstructor() &&
|
| + !record->hasUserDeclaredMoveConstructor() &&
|
| + record->hasAttr<DLLExportAttr>();
|
| + if (!is_likely_compiler_generated_dllexport_move_ctor)
|
| + emitWarning(it->getInnerLocStart(),
|
| + "Complex constructor has an inlined body.");
|
| }
|
| } else if (it->isInlined() && !it->isInlineSpecified() &&
|
| !it->isDeleted() && (!it->isCopyOrMoveConstructor() ||
|
|
|