[libclang] For c-index-test disable caching of code completion results if
the CINDEXTEST_COMPLETION_NO_CACHING environment variable is present.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143604 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index 80068b6..b46e384 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -39,6 +39,8 @@
options |= CXTranslationUnit_CacheCompletionResults;
if (getenv("CINDEXTEST_NESTED_MACROS"))
options |= CXTranslationUnit_NestedMacroExpansions;
+ if (getenv("CINDEXTEST_COMPLETION_NO_CACHING"))
+ options &= ~CXTranslationUnit_CacheCompletionResults;
return options;
}