disables all compiler warnings.
rdar://
11059556
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153539
91177308-0d34-0410-b5e6-
96231b3b80d8
* \brief Implicit function/class template instantiations should be indexed.
* If this is not set, implicit instantiations will be ignored.
*/
- CXIndexOpt_IndexImplicitTemplateInstantiations = 0x4
+ CXIndexOpt_IndexImplicitTemplateInstantiations = 0x4,
+
+ /**
+ * \brief Suppress all compiler warnings when parsing for indexing.
+ */
+ CXIndexOpt_SuppressWarnings = 0x8
} CXIndexOptFlags;
/**
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)));