Skip to content

Commit

Permalink
Override the actual implementation function instead of the wrapper. F…
Browse files Browse the repository at this point in the history
…ixes #110.
  • Loading branch information
swatanabe committed Aug 22, 2014
1 parent 9c032ab commit 1e8e6c5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,12 +466,11 @@ namespace {
typedef TreeTransform<SubstituteType> TreeTransformS;
public:
SubstituteType(Sema &S, QualType F, QualType T) : TreeTransformS(S), From(F), To(T) {}
TypeSourceInfo * TransformType(TypeSourceInfo *TI) {
if(SemaRef.Context.hasSameType(TI->getType(), From)) {
return SemaRef.Context.getTrivialTypeSourceInfo(To);
} else {
return TreeTransformS::TransformType(TI);
QualType TransformType(TypeLocBuilder& TLB, TypeLoc Ty) {
if(SemaRef.Context.hasSameType(Ty.getType(), From)) {
Ty = SemaRef.Context.getTrivialTypeSourceInfo(To)->getTypeLoc();
}
return TreeTransformS::TransformType(TLB, Ty);
}
using TreeTransformS::TransformType;
private:
Expand Down

0 comments on commit 1e8e6c5

Please sign in to comment.