summaryrefslogtreecommitdiffstats
path: root/clang/tools
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/libclang/CIndex.cpp10
-rw-r--r--clang/tools/libclang/CXCursor.cpp3
2 files changed, 6 insertions, 7 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 910f4498943..7f00f9982c8 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -1530,22 +1530,22 @@ class LabelRefVisit : public VisitorJob {
public:
LabelRefVisit(LabelStmt *LS, SourceLocation labelLoc, CXCursor parent)
: VisitorJob(parent, VisitorJob::LabelRefVisitKind, LS,
- (void*) labelLoc.getRawEncoding()) {}
+ labelLoc.getPtrEncoding()) {}
static bool classof(const VisitorJob *VJ) {
return VJ->getKind() == VisitorJob::LabelRefVisitKind;
}
LabelStmt *get() const { return static_cast<LabelStmt*>(data[0]); }
SourceLocation getLoc() const {
- return SourceLocation::getFromRawEncoding((unsigned)(uintptr_t) data[1]); }
+ return SourceLocation::getFromPtrEncoding(data[1]); }
};
class NestedNameSpecifierVisit : public VisitorJob {
public:
NestedNameSpecifierVisit(NestedNameSpecifier *NS, SourceRange R,
CXCursor parent)
: VisitorJob(parent, VisitorJob::NestedNameSpecifierVisitKind,
- NS, (void*) R.getBegin().getRawEncoding(),
- (void*) R.getEnd().getRawEncoding()) {}
+ NS, R.getBegin().getPtrEncoding(),
+ R.getEnd().getPtrEncoding()) {}
static bool classof(const VisitorJob *VJ) {
return VJ->getKind() == VisitorJob::NestedNameSpecifierVisitKind;
}
@@ -1583,7 +1583,7 @@ class MemberRefVisit : public VisitorJob {
public:
MemberRefVisit(FieldDecl *D, SourceLocation L, CXCursor parent)
: VisitorJob(parent, VisitorJob::MemberRefVisitKind, D,
- (void*) L.getRawEncoding()) {}
+ L.getPtrEncoding()) {}
static bool classof(const VisitorJob *VJ) {
return VJ->getKind() == VisitorJob::MemberRefVisitKind;
}
diff --git a/clang/tools/libclang/CXCursor.cpp b/clang/tools/libclang/CXCursor.cpp
index 7bcd1597baf..7ae9f7dbbdd 100644
--- a/clang/tools/libclang/CXCursor.cpp
+++ b/clang/tools/libclang/CXCursor.cpp
@@ -57,7 +57,7 @@ CXCursor cxcursor::MakeCXCursor(Decl *D, CXTranslationUnit TU,
bool FirstInDeclGroup) {
assert(D && TU && "Invalid arguments!");
CXCursor C = { getCursorKindForDecl(D),
- { D, (void*) (FirstInDeclGroup ? 1 : 0), TU }
+ { D, (void*)(intptr_t) (FirstInDeclGroup ? 1 : 0), TU }
};
return C;
}
@@ -560,4 +560,3 @@ unsigned clang_CXCursorSet_insert(CXCursorSet set, CXCursor cursor) {
return flag;
}
} // end: extern "C"
-
OpenPOWER on IntegriCloud