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

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

Issue 1703713002: clang-plugin: Enable RecursiveASTVisitor approach by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: tools/clang/plugins/FindBadConstructsConsumer.cpp
diff --git a/tools/clang/plugins/FindBadConstructsConsumer.cpp b/tools/clang/plugins/FindBadConstructsConsumer.cpp
index c79a764eb953be319cb5e83fe766cee2bbaa8a3c..b7e1886776fcda0d8fa2bd3cb63de1853262a231 100644
--- a/tools/clang/plugins/FindBadConstructsConsumer.cpp
+++ b/tools/clang/plugins/FindBadConstructsConsumer.cpp
@@ -288,7 +288,7 @@ void FindBadConstructsConsumer::CheckCtorDtorWeight(
// The current check is buggy. An implicit copy constructor does not
// have an inline body, so this check never fires for classes with a
// user-declared out-of-line constructor.
- if (it->hasInlineBody()) {
+ if (it->hasInlineBody() && options_.check_implicit_copy_ctors) {
if (it->isCopyConstructor() &&
!record->hasUserDeclaredCopyConstructor()) {
// In general, implicit constructors are generated on demand. But

Powered by Google App Engine
This is Rietveld 408576698