void TranslationUnit::createTranslationUnitIfNeeded() const { if (!d->translationUnit) { d->translationUnit = CXTranslationUnit(); const auto args = commandLineArguments(); if (isVerboseModeEnabled()) args.print(); CXErrorCode errorCode = clang_parseTranslationUnit2(index(), NULL, args.data(), args.count(), unsavedFiles().cxUnsavedFiles(), unsavedFiles().count(), defaultOptions(), &d->translationUnit); checkTranslationUnitErrorCode(errorCode); updateIncludeFilePaths(); updateLastProjectPartChangeTimePoint(); } }
void TranslationUnit::createTranslationUnitIfNeeded() const { if (!d->translationUnit) { d->translationUnit = CXTranslationUnit(); CXErrorCode errorCode = clang_parseTranslationUnit2(index(), d->filePath.constData(), d->projectPart.cxArguments(), d->projectPart.argumentCount(), unsavedFiles().cxUnsavedFiles(), unsavedFiles().count(), defaultOptions(), &d->translationUnit); checkTranslationUnitErrorCode(errorCode); updateIncludeFilePaths(); updateLastProjectPartChangeTimePoint(); } }