summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/stringbuffer.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-11-25 13:04:02 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-11-26 07:12:38 +0100
commit95d8b368d11eeccc276c0c6ac225144566a1206d (patch)
tree4d287bb64dbc21a09803594e9f0a103658b6f255 /compilerplugins/clang/stringbuffer.cxx
parent28f8a26fa12c2f78696864189356db46c1cae30c (diff)
Adapt to clang::MaterializeTemporaryExpr::GetTemparyExpr rename
...in <https://github.com/llvm/llvm-project/commit/ b0561b3346e7bf0ae974995ca95b917eebde18e1> "[NFC] Refactor representation of materialized temporaries" Change-Id: I02fbf6765f9713e4d457f07521129cc9d8db5751 Reviewed-on: https://gerrit.libreoffice.org/83669 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/stringbuffer.cxx')
-rw-r--r--compilerplugins/clang/stringbuffer.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/compilerplugins/clang/stringbuffer.cxx b/compilerplugins/clang/stringbuffer.cxx
index b68a8ba32700..61df3069a51c 100644
--- a/compilerplugins/clang/stringbuffer.cxx
+++ b/compilerplugins/clang/stringbuffer.cxx
@@ -9,6 +9,7 @@
#ifndef LO_CLANG_SHARED_PLUGINS
#include "check.hxx"
+#include "compat.hxx"
#include "plugin.hxx"
#include <vector>
@@ -57,7 +58,7 @@ bool StringBuffer::VisitCXXMemberCallExpr(CXXMemberCallExpr const* memberCallExp
auto matTemp = dyn_cast<MaterializeTemporaryExpr>(memberCallExpr->getArg(0));
if (!matTemp)
return true;
- if (!isa<CXXOperatorCallExpr>(matTemp->GetTemporaryExpr()))
+ if (!isa<CXXOperatorCallExpr>(compat::getSubExpr(matTemp)))
return true;
report(DiagnosticsEngine::Warning,
"appending added result of OUString to OUStringBuffer, rather do .append(x).append(y)",