diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-06-08 15:15:17 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-06-08 15:15:17 +0000 |
commit | af9cddfda10802f948e9d4b44ebded1ec749de21 (patch) | |
tree | d3495ae1a914c970234cf2a146e3d8c978d575d2 /lib/Sema/SemaExpr.cpp | |
parent | 361d380eef53bd2ac3d5efbfea1636e1f8fbdd8d (diff) |
Modify a diagnostic introduced in r132612 to emit QualTypes directly
This fixes a memory error on FreeBSD (and is the right thing to do
in any case).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 1914a6a6ba..6d8e8c6311 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -5009,8 +5009,8 @@ ExprResult Sema::ActOnAsTypeExpr(Expr *expr, ParsedType destty, if (Context.getTypeSize(DstTy) != Context.getTypeSize(SrcTy)) return ExprError(Diag(BuiltinLoc, diag::err_invalid_astype_of_different_size) - << DstTy.getAsString().c_str() - << SrcTy.getAsString().c_str() + << DstTy + << SrcTy << expr->getSourceRange()); return Owned(new (Context) AsTypeExpr(expr, DstTy, VK, OK, BuiltinLoc, RParenLoc)); } |