| 93 | } |
| 94 | |
| 95 | std::shared_ptr<Type> |
| 96 | Type::createPointerType(const clang::QualType &T, |
| 97 | const clang::ASTContext &ASTCtx, llvm::Argument *A, |
| 98 | const TypeAnalysisReport *Report) { |
| 99 | auto Result = std::make_shared<Type>(Type::TypeID_Pointer); |
| 100 | if (!Result) |
| 101 | return nullptr; |
| 102 | |
| 103 | Result->setPtrKind(Type::PtrKind::PtrKind_Normal); |
| 104 | clang::QualType PointeeT = util::getPointeeTy(T); |
| 105 | Result->setPointeeType(Type::createType(PointeeT, ASTCtx, A, Report)); |
| 106 | Result->updateArrayInfoFromAST(T); |
| 107 | return Result; |
| 108 | } |
| 109 | |
| 110 | void Type::updateArrayInfoFromAST(const clang::QualType &QT) { |
| 111 | assert(PtrInfo && "Unexpected Program State"); |
nothing calls this directly
no test coverage detected