Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: tools/clang/plugins/FindBadConstructsConsumer.cpp

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/yasm/yasm.gyp ('k') | tools/clang/plugins/tests/inline_ctor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.");
}
« no previous file with comments | « third_party/yasm/yasm.gyp ('k') | tools/clang/plugins/tests/inline_ctor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698