summaryrefslogtreecommitdiffstats
path: root/tools/clang/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'tools/clang/plugins')
-rw-r--r--tools/clang/plugins/ChromeClassTester.cpp2
-rw-r--r--tools/clang/plugins/tests/virtual_methods.h13
2 files changed, 14 insertions, 1 deletions
diff --git a/tools/clang/plugins/ChromeClassTester.cpp b/tools/clang/plugins/ChromeClassTester.cpp
index 3bcbf58..f7b9e02 100644
--- a/tools/clang/plugins/ChromeClassTester.cpp
+++ b/tools/clang/plugins/ChromeClassTester.cpp
@@ -177,7 +177,7 @@ std::string ChromeClassTester::GetNamespaceImpl(const DeclContext* context,
if (decl->isAnonymousNamespace())
OS << "<anonymous namespace>";
else
- OS << decl;
+ OS << *decl;
return GetNamespaceImpl(context->getParent(),
OS.str());
}
diff --git a/tools/clang/plugins/tests/virtual_methods.h b/tools/clang/plugins/tests/virtual_methods.h
index cb1846e..d256f07 100644
--- a/tools/clang/plugins/tests/virtual_methods.h
+++ b/tools/clang/plugins/tests/virtual_methods.h
@@ -23,4 +23,17 @@ class WarnOnMissingVirtual : public VirtualMethodsInHeaders {
void MethodHasNoArguments();
};
+// Don't complain about things in a 'testing' namespace.
+namespace testing {
+struct TestStruct {};
+} // namespace testing
+
+class VirtualMethodsInHeadersTesting : public VirtualMethodsInHeaders {
+ public:
+ // Don't complain about no virtual testing methods.
+ void MethodHasNoArguments();
+ private:
+ testing::TestStruct tester_;
+};
+
#endif // VIRTUAL_METHODS_H_