getExceptionSpecSourceRange is new in Clang 5

Change-Id: Ifa9223fadeeb1fde54afc99874a1b3d855073dce
This commit is contained in:
Stephan Bergmann
2017-01-27 11:50:07 +01:00
parent 0f0164d647
commit f4fac7f341

View File

@@ -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)")) {