aboutsummaryrefslogtreecommitdiff
path: root/include-fixer
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-01-13 10:14:07 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-01-13 10:14:07 +0000
commit1a15ce4331f4692e7931f07cb3eaf49355ce2c1e (patch)
treede0d0daa6e9d40e58d50429789dd5375145c8fbb /include-fixer
parent74dbdfd7efbf26c3e6ab99deec81a923f72f8507 (diff)
downloadclang-tools-extra-1a15ce4331f4692e7931f07cb3eaf49355ce2c1e.tar.gz
Fix the build of the include-fixer plugin for some shared cmake builds and MSVC.
- The include fixer plugin does not directly depend on pthread, but can pick up pthread references transitively through inlining. Just add pthreads to the linked libs unconditionally. - MSVC emits bogus warnings when including <future> and building without exceptions. Blacklist the warnings explicitly. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@291892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include-fixer')
-rw-r--r--include-fixer/SymbolIndexManager.h11
-rw-r--r--include-fixer/plugin/CMakeLists.txt1
2 files changed, 12 insertions, 0 deletions
diff --git a/include-fixer/SymbolIndexManager.h b/include-fixer/SymbolIndexManager.h
index e1e52879..feb5de3b 100644
--- a/include-fixer/SymbolIndexManager.h
+++ b/include-fixer/SymbolIndexManager.h
@@ -13,8 +13,19 @@
#include "SymbolIndex.h"
#include "find-all-symbols/SymbolInfo.h"
#include "llvm/ADT/StringRef.h"
+
+#ifdef _MSC_VER
+// Disable warnings from ppltasks.h transitively included by <future>.
+#pragma warning(push)
+#pragma warning(disable:4530)
+#endif
+
#include <future>
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
namespace clang {
namespace include_fixer {
diff --git a/include-fixer/plugin/CMakeLists.txt b/include-fixer/plugin/CMakeLists.txt
index fb05e844..2799fd4a 100644
--- a/include-fixer/plugin/CMakeLists.txt
+++ b/include-fixer/plugin/CMakeLists.txt
@@ -9,4 +9,5 @@ add_clang_library(clangIncludeFixerPlugin
clangParse
clangSema
clangTooling
+ ${PTHREAD_LIB}
)