summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-27 09:48:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-27 13:47:30 +0200
commit49f2d7cd98cefdbe9e179a8558cf89e09d8019e5 (patch)
tree1670c1e471d37e4819dd0fb073873ea56da694ac /compilerplugins
parenta4da4cc6602263dc2c14e885ec3a1d72d099253a (diff)
loplugin:stylepolice: adapt to libc++
Change-Id: I8a471d0fb7a206f1a235c3019ae9d07b44056e01
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/stylepolice.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/compilerplugins/clang/stylepolice.cxx b/compilerplugins/clang/stylepolice.cxx
index 93b1fcea5a57..3ae718c54712 100644
--- a/compilerplugins/clang/stylepolice.cxx
+++ b/compilerplugins/clang/stylepolice.cxx
@@ -108,11 +108,15 @@ bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
&& !startswith(typeName, "rtl::Reference")
&& !startswith(typeName, "ScopedVclPtr")
&& !startswith(typeName, "std::mem_fun")
+ && !startswith(typeName, "std::__1::mem_fun")
&& !startswith(typeName, "std::shared_ptr")
+ && !startswith(typeName, "std::__1::shared_ptr")
&& !startswith(typeName, "shared_ptr") // weird issue in slideshow
&& !startswith(typeName, "std::unique_ptr")
+ && !startswith(typeName, "std::__1::unique_ptr")
&& !startswith(typeName, "unique_ptr") // weird issue in include/vcl/threadex.hxx
&& !startswith(typeName, "std::weak_ptr")
+ && !startswith(typeName, "std::__1::weak_ptr")
&& !startswith(typeName, "struct _LOKDocViewPrivate")
&& !startswith(typeName, "sw::UnoCursorPointer")
&& !startswith(typeName, "tools::SvRef")
@@ -120,6 +124,8 @@ bool StylePolice::VisitVarDecl(const VarDecl * varDecl)
&& !startswith(typeName, "vcl::ScopedBitmapAccess")
// lots of the code seems to regard iterator objects as being "pointer-like"
&& typeName.find("iterator<") == std::string::npos
+ && typeName.find("iter<") == std::string::npos
+ // libc++ std::__1::__wrap_iter<...>
&& aOriginalTypeName != "sal_IntPtr" )
{
if (aFileName.startswith(SRCDIR "/bridges/") ) {