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

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

Issue 6901095: clang: Mention that the ctor/dtor needs "out of line" implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update test expectations Created 9 years, 8 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 | « no previous file | tools/clang/plugins/tests/missing_ctor.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/FindBadConstructs.cpp
diff --git a/tools/clang/plugins/FindBadConstructs.cpp b/tools/clang/plugins/FindBadConstructs.cpp
index d7bcdaee02de27ed557cb3bc6b153c070d076211..4c3c8ef0c42340e7e69be0b0f321540670410eca 100644
--- a/tools/clang/plugins/FindBadConstructs.cpp
+++ b/tools/clang/plugins/FindBadConstructs.cpp
@@ -104,7 +104,8 @@ class FindBadConstructsConsumer : public ChromeClassTester {
if (ctor_score >= 10) {
if (!record->hasUserDeclaredConstructor()) {
emitWarning(record_location,
- "Complex class/struct needs a declared constructor.");
+ "Complex class/struct needs an explicit out-of-line "
+ "constructor.");
} else {
// Iterate across all the constructors in this file and yell if we
// find one that tries to be inline.
@@ -122,8 +123,10 @@ class FindBadConstructsConsumer : public ChromeClassTester {
// trivial members; 20 ints don't need a destructor.
if (dtor_score >= 10 && !record->hasTrivialDestructor()) {
if (!record->hasUserDeclaredDestructor()) {
- emitWarning(record_location,
- "Complex class/struct needs a declared destructor.");
+ emitWarning(
+ record_location,
+ "Complex class/struct needs a needs an explicit out-of-line "
+ "destructor.");
} else if (CXXDestructorDecl* dtor = record->getDestructor()) {
if (dtor->hasInlineBody()) {
emitWarning(dtor->getInnerLocStart(),
« no previous file with comments | « no previous file | tools/clang/plugins/tests/missing_ctor.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698