| Index: tools/clang/plugins/FindBadConstructsConsumer.cpp
|
| diff --git a/tools/clang/plugins/FindBadConstructsConsumer.cpp b/tools/clang/plugins/FindBadConstructsConsumer.cpp
|
| index fe868c01de6cab10389a46321e50f0f328bd0e0a..770e2551d6e7c92f12032f850251ba5b8af738d1 100644
|
| --- a/tools/clang/plugins/FindBadConstructsConsumer.cpp
|
| +++ b/tools/clang/plugins/FindBadConstructsConsumer.cpp
|
| @@ -296,8 +296,9 @@ void FindBadConstructsConsumer::CheckCtorDtorWeight(
|
| emitWarning(it->getInnerLocStart(),
|
| "Complex constructor has an inlined body.");
|
| }
|
| - } else if (it->isInlined() && (!it->isCopyOrMoveConstructor() ||
|
| - it->isExplicitlyDefaulted())) {
|
| + } else if (it->isInlined() && !it->isInlineSpecified() &&
|
| + !it->isDeleted() && (!it->isCopyOrMoveConstructor() ||
|
| + it->isExplicitlyDefaulted())) {
|
| // isInlined() is a more reliable check than hasInlineBody(), but
|
| // unfortunately, it results in warnings for implicit copy/move
|
| // constructors in the previously mentioned situation. To preserve
|
| @@ -318,7 +319,8 @@ void FindBadConstructsConsumer::CheckCtorDtorWeight(
|
| "Complex class/struct needs an explicit out-of-line "
|
| "destructor.");
|
| } else if (CXXDestructorDecl* dtor = record->getDestructor()) {
|
| - if (dtor->isInlined()) {
|
| + if (dtor->isInlined() && !dtor->isInlineSpecified() &&
|
| + !dtor->isDeleted()) {
|
| emitWarning(dtor->getInnerLocStart(),
|
| "Complex destructor has an inline body.");
|
| }
|
|
|