Change QualType::getTypePtr() to return a const pointer, then change a
thousand other things which were (generally inadvertantly) relying on that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 1774870..1f46b07 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -1172,7 +1172,7 @@
// If the type has a form where we know that the beginning of the source
// range matches up with a reference cursor. Visit the appropriate reference
// cursor.
- Type *T = NNS->getAsType();
+ const Type *T = NNS->getAsType();
if (const TypedefType *Typedef = dyn_cast<TypedefType>(T))
return Visit(MakeCursorTypeRef(Typedef->getDecl(), Range.getBegin(), TU));
if (const TagType *Tag = dyn_cast<TagType>(T))
diff --git a/tools/libclang/CXType.cpp b/tools/libclang/CXType.cpp
index a72b02f..7cb4492 100644
--- a/tools/libclang/CXType.cpp
+++ b/tools/libclang/CXType.cpp
@@ -64,7 +64,7 @@
}
static CXTypeKind GetTypeKind(QualType T) {
- Type *TP = T.getTypePtrOrNull();
+ const Type *TP = T.getTypePtrOrNull();
if (!TP)
return CXType_Invalid;
@@ -187,7 +187,7 @@
CXType clang_getPointeeType(CXType CT) {
QualType T = GetQualType(CT);
- Type *TP = T.getTypePtrOrNull();
+ const Type *TP = T.getTypePtrOrNull();
if (!TP)
return MakeCXType(QualType(), GetTU(CT));
@@ -218,7 +218,7 @@
return cxcursor::MakeCXCursorInvalid(CXCursor_NoDeclFound);
QualType T = GetQualType(CT);
- Type *TP = T.getTypePtrOrNull();
+ const Type *TP = T.getTypePtrOrNull();
if (!TP)
return cxcursor::MakeCXCursorInvalid(CXCursor_NoDeclFound);