summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-27 11:50:07 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-27 11:50:36 +0100
commitf4fac7f3411c4afad4a6d33424bf8007822e1ee6 (patch)
tree764fa6d9479523f4c685d776d753c010d448f9cd /compilerplugins
parent0f0164d647e01c2e7d2a42a0dd9d58d5e7b765d4 (diff)
getExceptionSpecSourceRange is new in Clang 5
Change-Id: Ifa9223fadeeb1fde54afc99874a1b3d855073dce
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/dynexcspec.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/compilerplugins/clang/dynexcspec.cxx b/compilerplugins/clang/dynexcspec.cxx
index b5db5df894a2..6c7ff52cff7d 100644
--- a/compilerplugins/clang/dynexcspec.cxx
+++ b/compilerplugins/clang/dynexcspec.cxx
@@ -76,7 +76,10 @@ public:
}
}
bool dtor = isa<CXXDestructorDecl>(decl);
- auto source = decl->getExceptionSpecSourceRange();
+ SourceRange source;
+#if CLANG_VERSION >= 50000
+ source = decl->getExceptionSpecSourceRange();
+#endif
if (rewriter != nullptr && source.isValid()) {
if (dtor) {
if (replaceText(source, "noexcept(false)")) {