diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-26 18:53:38 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-26 18:53:38 +0000 |
commit | 5694feb5ccd6eb862cb600b55753cecc13794471 (patch) | |
tree | 5cf7d509aaa9e65a41709c9cdc686bbf2a2ce205 /tools/libclang/IndexingContext.cpp | |
parent | 404628caa53a3f898047d73b38647d6fbb827e00 (diff) |
libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)
into a getter cxtu::getASTUnit(TU)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173585 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/IndexingContext.cpp')
-rw-r--r-- | tools/libclang/IndexingContext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp index 2dea75714b..9129e92fd7 100644 --- a/tools/libclang/IndexingContext.cpp +++ b/tools/libclang/IndexingContext.cpp @@ -196,11 +196,11 @@ const char *ScratchAlloc::copyCStr(StringRef Str) { void IndexingContext::setASTContext(ASTContext &ctx) { Ctx = &ctx; - static_cast<ASTUnit*>(CXTU->TUData)->setASTContext(&ctx); + cxtu::getASTUnit(CXTU)->setASTContext(&ctx); } void IndexingContext::setPreprocessor(Preprocessor &PP) { - static_cast<ASTUnit*>(CXTU->TUData)->setPreprocessor(&PP); + cxtu::getASTUnit(CXTU)->setPreprocessor(&PP); } bool IndexingContext::isFunctionLocalDecl(const Decl *D) { |