AST: Rename VarDecl::getType() to VarDecl::getTypeInContext()

This is a futile attempt to discourage future use of getType() by
giving it a "scary" name.

We want people to use getInterfaceType() like with the other decl kinds.
This commit is contained in:
Slava Pestov
2023-08-04 10:07:11 -04:00
parent f674e56a0a
commit 9ebb5f2e03
67 changed files with 244 additions and 251 deletions

View File

@@ -452,7 +452,7 @@ extractEnumCases(NominalTypeDecl *Decl) {
: llvm::Optional<std::string>(
Parameter->getParameterName().str().str());
Parameters.push_back({Label, Parameter->getType()});
Parameters.push_back({Label, Parameter->getInterfaceType()});
}
}
@@ -883,7 +883,8 @@ void writeProperties(llvm::json::OStream &JSON,
JSON.object([&] {
const auto *decl = PropertyInfo.VarDecl;
JSON.attribute("label", decl->getName().str().str());
JSON.attribute("type", toFullyQualifiedTypeNameString(decl->getType()));
JSON.attribute("type", toFullyQualifiedTypeNameString(
decl->getInterfaceType()));
JSON.attribute("mangledTypeName", "n/a - deprecated");
JSON.attribute("isStatic", decl->isStatic() ? "true" : "false");
JSON.attribute("isComputed", !decl->hasStorage() ? "true" : "false");