[libclang] For c-index-test disable caching of code completion results if

the CINDEXTEST_COMPLETION_NO_CACHING environment variable is present.

llvm-svn: 143604
This commit is contained in:
Argyrios Kyrtzidis 2011-11-03 02:20:25 +00:00
parent bf5f4bec1a
commit cb373e3f31
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,8 @@ static unsigned getDefaultParsingOptions() {
options |= CXTranslationUnit_CacheCompletionResults;
if (getenv("CINDEXTEST_NESTED_MACROS"))
options |= CXTranslationUnit_NestedMacroExpansions;
if (getenv("CINDEXTEST_COMPLETION_NO_CACHING"))
options &= ~CXTranslationUnit_CacheCompletionResults;
return options;
}