Changeset View
Changeset View
Standalone View
Standalone View
languages/clang/duchain/parsesession.cpp
Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Line(s) | |||||
178 | 178 | | |||
179 | } | 179 | } | ||
180 | 180 | | |||
181 | ParseSessionData::ParseSessionData(const QVector<UnsavedFile>& unsavedFiles, ClangIndex* index, | 181 | ParseSessionData::ParseSessionData(const QVector<UnsavedFile>& unsavedFiles, ClangIndex* index, | ||
182 | const ClangParsingEnvironment& environment, Options options) | 182 | const ClangParsingEnvironment& environment, Options options) | ||
183 | : m_file(nullptr) | 183 | : m_file(nullptr) | ||
184 | , m_unit(nullptr) | 184 | , m_unit(nullptr) | ||
185 | { | 185 | { | ||
186 | unsigned int flags = CXTranslationUnit_CXXChainedPCH | 186 | unsigned int flags = CXTranslationUnit_DetailedPreprocessingRecord | ||
kfunk: Looks good to me. CXXChainPCH seems deprecated anyway:
```
CXTranslationUnit_CXXChainedPCH … | |||||
any idea why we added this in the first place? can you also add something to your commit message saying why you remove this now? it seems somewhat unrelated to the rest (?) mwolff: any idea why we added this in the first place? can you also add something to your commit… | |||||
It was supposed to tackle a similar problem but is now deprecated, according to documentation. I assume it does nothing right now anyways, so I removed it while touching that code. brauch: It was supposed to tackle a similar problem but is now deprecated, according to documentation. | |||||
187 | | CXTranslationUnit_DetailedPreprocessingRecord | | |||
188 | #if CINDEX_VERSION_MINOR >= 34 | 187 | #if CINDEX_VERSION_MINOR >= 34 | ||
189 | | CXTranslationUnit_KeepGoing | 188 | | CXTranslationUnit_KeepGoing | ||
190 | #endif | 189 | #endif | ||
191 | ; | 190 | ; | ||
192 | if (options.testFlag(SkipFunctionBodies)) { | 191 | if (options.testFlag(SkipFunctionBodies)) { | ||
193 | flags |= CXTranslationUnit_SkipFunctionBodies; | 192 | flags |= CXTranslationUnit_SkipFunctionBodies; | ||
194 | } | 193 | } | ||
195 | if (options.testFlag(PrecompiledHeader)) { | 194 | if (options.testFlag(PrecompiledHeader)) { | ||
196 | flags |= CXTranslationUnit_ForSerialization; | 195 | flags |= CXTranslationUnit_ForSerialization; | ||
197 | } else { | 196 | } else { | ||
198 | flags |= CXTranslationUnit_CacheCompletionResults | 197 | flags |= CXTranslationUnit_CacheCompletionResults | ||
198 | #if CINDEX_VERSION_MINOR >= 32 | ||||
Good find. That needs libclang 3.9 though, if I understand correctly. I'm fine with bumping the dependency in master though. kfunk: Good find.
That needs libclang 3.9 though, if I understand correctly. I'm fine with bumping… | |||||
mwolff: yeah, better add the ifdef? | |||||
brauch: Yes, I'll ifdef that | |||||
199 | | CXTranslationUnit_CreatePreambleOnFirstParse | ||||
200 | #endif | ||||
199 | | CXTranslationUnit_PrecompiledPreamble; | 201 | | CXTranslationUnit_PrecompiledPreamble; | ||
200 | if (environment.quality() == ClangParsingEnvironment::Unknown) { | 202 | if (environment.quality() == ClangParsingEnvironment::Unknown) { | ||
201 | flags |= CXTranslationUnit_Incomplete; | 203 | flags |= CXTranslationUnit_Incomplete; | ||
202 | } | 204 | } | ||
203 | } | 205 | } | ||
204 | 206 | | |||
205 | const auto tuUrl = environment.translationUnitUrl(); | 207 | const auto tuUrl = environment.translationUnitUrl(); | ||
206 | Q_ASSERT(!tuUrl.isEmpty()); | 208 | Q_ASSERT(!tuUrl.isEmpty()); | ||
▲ Show 20 Lines • Show All 284 Lines • Show Last 20 Lines |
Looks good to me. CXXChainPCH seems deprecated anyway: