From f4fac7f3411c4afad4a6d33424bf8007822e1ee6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 27 Jan 2017 11:50:07 +0100 Subject: getExceptionSpecSourceRange is new in Clang 5 Change-Id: Ifa9223fadeeb1fde54afc99874a1b3d855073dce --- compilerplugins/clang/dynexcspec.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compilerplugins') 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(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)")) { -- cgit