summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/noexceptmove.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/noexceptmove.cxx')
-rw-r--r--compilerplugins/clang/noexceptmove.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/compilerplugins/clang/noexceptmove.cxx b/compilerplugins/clang/noexceptmove.cxx
index c2cbdcf0c2a3..4f242848a3c4 100644
--- a/compilerplugins/clang/noexceptmove.cxx
+++ b/compilerplugins/clang/noexceptmove.cxx
@@ -8,12 +8,10 @@
*/
// versions before 9.0 didn't have getExceptionSpecType
+#include "check.hxx"
#include "plugin.hxx"
-// clang before V9 does not have API to report exception spec type
-#if CLANG_VERSION >= 90000
-
-#include "check.hxx"
+#include "config_clang.h"
#include <string>
#include <set>
@@ -120,7 +118,7 @@ bool NoExceptMove::TraverseCXXMethodDecl(CXXMethodDecl* methodDecl)
if (isMove)
{
StringRef fn = getFilenameOfLocation(
- compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(methodDecl)));
+ compiler.getSourceManager().getSpellingLoc(methodDecl->getBeginLoc()));
// SfxObjectShellLock::operator= calls SotObject::OwnerLock which in turn calls stuff which cannot be noexcept
if (loplugin::isSamePathname(fn, SRCDIR "/include/sfx2/objsh.hxx"))
isMove = false;
@@ -330,5 +328,4 @@ llvm::Optional<bool> NoExceptMove::IsCallThrows(const CallExpr* callExpr)
loplugin::Plugin::Registration<NoExceptMove> noexceptmove("noexceptmove");
}
-#endif // CLANG_VERSION
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */