Kaydet (Commit) 09031ef2 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid getQualifiedNameAsString

Change-Id: I448bfd63f1a2fb9cac3366146b10ff6a465e6db7
üst c724093e
......@@ -88,6 +88,9 @@ public:
template<std::size_t N> inline ContextCheck Struct(char const (& id)[N])
const;
template<std::size_t N> inline ContextCheck Union(char const (& id)[N])
const;
template<std::size_t N> inline ContextCheck Function(char const (& id)[N])
const;
......@@ -215,6 +218,12 @@ template<std::size_t N> ContextCheck DeclCheck::Struct(char const (& id)[N])
return detail::checkRecordDecl(decl_, clang::TTK_Struct, id);
}
template<std::size_t N> ContextCheck DeclCheck::Union(char const (& id)[N])
const
{
return detail::checkRecordDecl(decl_, clang::TTK_Union, id);
}
template<std::size_t N> ContextCheck DeclCheck::Function(char const (& id)[N])
const
{
......
......@@ -7,13 +7,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <sal/config.h>
#include <memory>
#include <boost/intrusive_ptr.hpp>
#include <com/sun/star/uno/XInterface.hpp>
struct Foo
{
std::unique_ptr<css::uno::XInterface> m_foo1; // expected-error {{XInterface subclass 'com::sun::star::uno::XInterface' being managed via smart pointer, should be managed via uno::Reference, parent is 'Foo' [loplugin:refcounting]}}
std::shared_ptr<css::uno::XInterface> m_foo2; // expected-error {{XInterface subclass 'com::sun::star::uno::XInterface' being managed via smart pointer, should be managed via uno::Reference, parent is 'Foo' [loplugin:refcounting]}}
boost::intrusive_ptr<css::uno::XInterface> m_foo3; // expected-error {{XInterface subclass 'com::sun::star::uno::XInterface' being managed via smart pointer, should be managed via uno::Reference, parent is 'Foo' [loplugin:refcounting]}}
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment