[cfe-commits] r173590 - libclang: type safety for CXTranslationUnitImpl::CIdx
Dmitri Gribenko
gribozavr at gmail.com
Sat Jan 26 13:49:51 PST 2013
Author: gribozavr
Date: Sat Jan 26 15:49:50 2013
New Revision: 173590
URL: http://llvm.org/viewvc/llvm-project?rev=173590&view=rev
Log:
libclang: type safety for CXTranslationUnitImpl::CIdx
Modified:
cfe/trunk/tools/libclang/CIndex.cpp
cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
cfe/trunk/tools/libclang/CXTranslationUnit.h
cfe/trunk/tools/libclang/Indexing.cpp
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=173590&r1=173589&r2=173590&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Sat Jan 26 15:49:50 2013
@@ -2758,7 +2758,7 @@ static void clang_saveTranslationUnit_Im
SaveTranslationUnitInfo *STUI =
static_cast<SaveTranslationUnitInfo*>(UserData);
- CIndexer *CXXIdx = (CIndexer*)STUI->TU->CIdx;
+ CIndexer *CXXIdx = STUI->TU->CIdx;
if (CXXIdx->isOptEnabled(CXGlobalOpt_ThreadBackgroundPriorityForIndexing))
setThreadBackgroundPriority();
@@ -2857,7 +2857,7 @@ static void clang_reparseTranslationUnit
(void) options;
RTUI->result = 1;
- CIndexer *CXXIdx = (CIndexer*)TU->CIdx;
+ CIndexer *CXXIdx = TU->CIdx;
if (CXXIdx->isOptEnabled(CXGlobalOpt_ThreadBackgroundPriorityForEditing))
setThreadBackgroundPriority();
@@ -5475,7 +5475,7 @@ static void clang_annotateTokensImpl(voi
const unsigned NumTokens = ((clang_annotateTokens_Data*)UserData)->NumTokens;
CXCursor *Cursors = ((clang_annotateTokens_Data*)UserData)->Cursors;
- CIndexer *CXXIdx = (CIndexer*)TU->CIdx;
+ CIndexer *CXXIdx = TU->CIdx;
if (CXXIdx->isOptEnabled(CXGlobalOpt_ThreadBackgroundPriorityForEditing))
setThreadBackgroundPriority();
Modified: cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp?rev=173590&r1=173589&r2=173590&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp Sat Jan 26 15:49:50 2013
@@ -692,7 +692,7 @@ void clang_codeCompleteAt_Impl(void *Use
if (!AST)
return;
- CIndexer *CXXIdx = (CIndexer*)TU->CIdx;
+ CIndexer *CXXIdx = TU->CIdx;
if (CXXIdx->isOptEnabled(CXGlobalOpt_ThreadBackgroundPriorityForEditing))
setThreadBackgroundPriority();
Modified: cfe/trunk/tools/libclang/CXTranslationUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CXTranslationUnit.h?rev=173590&r1=173589&r2=173590&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CXTranslationUnit.h (original)
+++ cfe/trunk/tools/libclang/CXTranslationUnit.h Sat Jan 26 15:49:50 2013
@@ -23,7 +23,7 @@ namespace clang {
} // namespace clang
struct CXTranslationUnitImpl {
- void *CIdx;
+ clang::CIndexer *CIdx;
clang::ASTUnit *TheASTUnit;
void *StringPool;
void *Diagnostics;
Modified: cfe/trunk/tools/libclang/Indexing.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/Indexing.cpp?rev=173590&r1=173589&r2=173590&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/Indexing.cpp (original)
+++ cfe/trunk/tools/libclang/Indexing.cpp Sat Jan 26 15:49:50 2013
@@ -759,7 +759,7 @@ static void clang_indexTranslationUnit_I
if (!client_index_callbacks || index_callbacks_size == 0)
return;
- CIndexer *CXXIdx = (CIndexer*)TU->CIdx;
+ CIndexer *CXXIdx = TU->CIdx;
if (CXXIdx->isOptEnabled(CXGlobalOpt_ThreadBackgroundPriorityForIndexing))
setThreadBackgroundPriority();
More information about the cfe-commits
mailing list