Changeset View
Changeset View
Standalone View
Standalone View
lib/Frontend/ASTUnit.cpp
Show First 20 Lines • Show All 269 Lines • ▼ Show 20 Lines | ASTUnit::~ASTUnit() { | ||||
if (getenv("LIBCLANG_OBJTRACKING")) | if (getenv("LIBCLANG_OBJTRACKING")) | ||||
fprintf(stderr, "--- %u translation units\n", --ActiveASTUnitObjects); | fprintf(stderr, "--- %u translation units\n", --ActiveASTUnitObjects); | ||||
} | } | ||||
void ASTUnit::setPreprocessor(std::shared_ptr<Preprocessor> PP) { | void ASTUnit::setPreprocessor(std::shared_ptr<Preprocessor> PP) { | ||||
this->PP = std::move(PP); | this->PP = std::move(PP); | ||||
} | } | ||||
void ASTUnit::enableSourceFileDiagnostics() { | |||||
assert(getDiagnostics().getClient() && Ctx && | |||||
"Bad context for source file"); | |||||
getDiagnostics().getClient()->BeginSourceFile(Ctx->getLangOpts(), PP.get()); | |||||
} | |||||
/// Determine the set of code-completion contexts in which this | /// Determine the set of code-completion contexts in which this | ||||
/// declaration should be shown. | /// declaration should be shown. | ||||
static unsigned getDeclShowContexts(const NamedDecl *ND, | static unsigned getDeclShowContexts(const NamedDecl *ND, | ||||
const LangOptions &LangOpts, | const LangOptions &LangOpts, | ||||
bool &IsNestedNameSpecifier) { | bool &IsNestedNameSpecifier) { | ||||
IsNestedNameSpecifier = false; | IsNestedNameSpecifier = false; | ||||
if (isa<UsingShadowDecl>(ND)) | if (isa<UsingShadowDecl>(ND)) | ||||
▲ Show 20 Lines • Show All 2,395 Lines • Show Last 20 Lines |