summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 00:54:38 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 00:54:38 +0000
commitcce922faf3c5ed978be3c19fc3719a5635d431ce (patch)
tree1057806d4686886e4d783c06f6f136fcaba293f7 /tools
parentdc3d1a3caa6c35f846d4f18c5521ca684698e51b (diff)
downloadchromium_src-cce922faf3c5ed978be3c19fc3719a5635d431ce.zip
chromium_src-cce922faf3c5ed978be3c19fc3719a5635d431ce.tar.gz
chromium_src-cce922faf3c5ed978be3c19fc3719a5635d431ce.tar.bz2
One more OVERRIDE test that the code should already pass.
BUG=104314 TEST=green builds Review URL: http://codereview.chromium.org/8823013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113308 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/clang/plugins/tests/overridden_methods.h3
-rw-r--r--tools/clang/plugins/tests/overridden_methods.txt9
2 files changed, 9 insertions, 3 deletions
diff --git a/tools/clang/plugins/tests/overridden_methods.h b/tools/clang/plugins/tests/overridden_methods.h
index 08ef0a5..150c799 100644
--- a/tools/clang/plugins/tests/overridden_methods.h
+++ b/tools/clang/plugins/tests/overridden_methods.h
@@ -12,6 +12,7 @@ class BaseClass {
virtual void SomeMethod() = 0;
virtual void SomeOtherMethod() = 0;
virtual void SomeInlineMethod() = 0;
+ virtual void SomeNonPureBaseMethod() {}
};
class InterimClass : public BaseClass {
@@ -46,6 +47,8 @@ class DerivedClass : public InterimClass,
virtual void SomeInlineMethod() {}
// Should not warn if overriding a method whose origin is WebKit.
virtual void WebKitModifiedSomething();
+ // Should warn if overridden method isn't pure.
+ virtual void SomeNonPureBaseMethod() {}
};
#endif // OVERRIDDEN_METHODS_H_
diff --git a/tools/clang/plugins/tests/overridden_methods.txt b/tools/clang/plugins/tests/overridden_methods.txt
index da3c58f..a405d31 100644
--- a/tools/clang/plugins/tests/overridden_methods.txt
+++ b/tools/clang/plugins/tests/overridden_methods.txt
@@ -1,8 +1,11 @@
In file included from overridden_methods.cpp:5:
-./overridden_methods.h:42:11: warning: [chromium-style] Overriding method must be marked with OVERRIDE.
+./overridden_methods.h:43:11: warning: [chromium-style] Overriding method must be marked with OVERRIDE.
virtual void SomeMethod();
^
-./overridden_methods.h:46:11: warning: [chromium-style] Overriding method must be marked with OVERRIDE.
+./overridden_methods.h:47:11: warning: [chromium-style] Overriding method must be marked with OVERRIDE.
virtual void SomeInlineMethod() {}
^
-2 warnings generated.
+./overridden_methods.h:51:11: warning: [chromium-style] Overriding method must be marked with OVERRIDE.
+ virtual void SomeNonPureBaseMethod() {}
+ ^
+3 warnings generated.