diff options
Diffstat (limited to 'AST/Type.cpp')
-rw-r--r-- | AST/Type.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/AST/Type.cpp b/AST/Type.cpp index 15f0968b81..63a681a52c 100644 --- a/AST/Type.cpp +++ b/AST/Type.cpp @@ -18,6 +18,8 @@ #include "clang/Basic/TargetInfo.h" #include "llvm/Support/Streams.h" #include "llvm/ADT/StringExtras.h" +#include <sstream> + using namespace clang; Type::~Type() {} @@ -652,9 +654,9 @@ void OCUVectorType::getAsStringInternal(std::string &S) const { } void TypeOfExpr::getAsStringInternal(std::string &InnerString) const { - // FIXME: output expression, getUnderlyingExpr()->print(). - // At the moment, Stmt::print(std::ostream) doesn't work for us here. - InnerString = "typeof(<expr>) " + InnerString; + std::ostringstream s; + getUnderlyingExpr()->print(s); + InnerString = "typeof(" + s.str() + ") " + InnerString; } void TypeOfType::getAsStringInternal(std::string &S) const { |