зеркало из https://github.com/microsoft/clang-1.git
Use const_cast to make it obvious that it's just removing constness (and silence warnings).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143193 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
aa9807a859
Коммит
854625f734
|
@ -817,7 +817,7 @@ bool cxcursor::getDeclCursorUSR(const Decl *D, SmallVectorImpl<char> &Buf) {
|
||||||
|
|
||||||
{
|
{
|
||||||
USRGenerator UG(&D->getASTContext(), &Buf);
|
USRGenerator UG(&D->getASTContext(), &Buf);
|
||||||
UG->Visit((Decl*)D);
|
UG->Visit(const_cast<Decl*>(D));
|
||||||
|
|
||||||
if (UG->ignoreResults())
|
if (UG->ignoreResults())
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -397,9 +397,11 @@ void IndexingContext::handleReference(const NamedDecl *D, SourceLocation Loc,
|
||||||
if (isNotFromSourceFile(D->getLocation()))
|
if (isNotFromSourceFile(D->getLocation()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CXIdxEntityRefInfo Info = { E ? MakeCXCursor((Stmt*)E,
|
CXCursor Cursor = E ? MakeCXCursor(const_cast<Expr*>(E),
|
||||||
(Decl*)cast<Decl>(DC), CXTU)
|
const_cast<Decl*>(cast<Decl>(DC)), CXTU)
|
||||||
: getRefCursor(D, Loc),
|
: getRefCursor(D, Loc);
|
||||||
|
|
||||||
|
CXIdxEntityRefInfo Info = { Cursor,
|
||||||
getIndexLoc(Loc),
|
getIndexLoc(Loc),
|
||||||
getIndexEntity(D),
|
getIndexEntity(D),
|
||||||
getIndexEntity(Parent),
|
getIndexEntity(Parent),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче