diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2019-12-11 17:55:11 -0800 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2019-12-16 15:39:34 -0500 |
commit | 5ff697b4d9d173f1c131811b0c30b4eeb3dbc26d (patch) | |
tree | c9ffa38e39d7a0734ce9e5a6a588e7fc5c0c7c4c /clang-plugin/plugin.cpp | |
parent | 737bbd25665b7993604d0ceda35184aea6a264ac (diff) |
clang-plugin: Support LLVM 8.0
The main API difference between Clang 7 and 8 that is relevant to us is
the rename of Expr::getLocStart() and Decl::getLocStart() to
getBeginLoc().
Diffstat (limited to 'clang-plugin/plugin.cpp')
-rw-r--r-- | clang-plugin/plugin.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang-plugin/plugin.cpp b/clang-plugin/plugin.cpp index 8e8b5b8..1a94e0f 100644 --- a/clang-plugin/plugin.cpp +++ b/clang-plugin/plugin.cpp @@ -23,7 +23,11 @@ #include "config.h" #include <clang/Frontend/FrontendPluginRegistry.h> +#ifdef HAVE_LLVM_8_0 +#include <clang/StaticAnalyzer/Frontend/CheckerRegistry.h> +#else #include <clang/StaticAnalyzer/Core/CheckerRegistry.h> +#endif #include <clang/AST/AST.h> #include <clang/AST/ASTConsumer.h> #include <clang/Frontend/CompilerInstance.h> @@ -341,7 +345,11 @@ void clang_registerCheckers (ento::CheckerRegistry ®istry); extern "C" void clang_registerCheckers (ento::CheckerRegistry ®istry) { registry.addChecker<GErrorChecker> ("tartan.GErrorChecker", - "Check GError API usage"); + "Check GError API usage" +#ifdef HAVE_LLVM_8_0 + , "http://www.freedesktop.org/software/tartan/" +#endif + ); } extern "C" |