summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-27 21:38:03 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-27 21:38:03 +0000
commitb49a29f7e4413a7a014a2b28c5c25fe54e005cf3 (patch)
tree334041315c1ad98f8d1250b44d021770c581bf72 /tools
parent55947042d86773b7e16aec12070e1ffe62bff4a6 (diff)
[libclang] Introduce indexing option CXIndexOpt_SuppressWarnings, which
disables all compiler warnings. rdar://11059556 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/libclang/Indexing.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp
index aad6e02fe9..85b638530f 100644
--- a/tools/libclang/Indexing.cpp
+++ b/tools/libclang/Indexing.cpp
@@ -346,6 +346,9 @@ static void clang_indexSourceFile_Impl(void *UserData) {
if (!requestedToGetTU)
CInvok->getPreprocessorOpts().DetailedRecord = false;
+ if (index_options & CXIndexOpt_SuppressWarnings)
+ CInvok->getDiagnosticOpts().IgnoreWarnings = true;
+
ASTUnit *Unit = ASTUnit::create(CInvok.getPtr(), Diags,
/*CaptureDiagnostics=*/true);
OwningPtr<CXTUOwner> CXTU(new CXTUOwner(MakeCXTranslationUnit(Unit)));