Use canonical type when making type based decision

This commit is contained in:
Philippe Canal 2015-09-24 03:54:10 -05:00 committed by sftnight
parent 569ef839cb
commit df44a9d01d

View File

@ -162,9 +162,9 @@ static std::string executePrintValue(const Value &V, const T &val) {
static std::string invokePrintValueOverload(const Value &V) {
clang::ASTContext &C = V.getASTContext();
clang::QualType Ty = V.getType().getDesugaredType(C);
clang::QualType Ty = V.getType().getDesugaredType(C).getCanonicalType();
if (const clang::BuiltinType *BT
= llvm::dyn_cast<clang::BuiltinType>(Ty.getCanonicalType())) {
= llvm::dyn_cast<clang::BuiltinType>(Ty.getTypePtr())) {
switch (BT->getKind()) {
case clang::BuiltinType::Bool:
return executePrintValue<bool>(V, V.getLL());