diff options
Diffstat (limited to 'AST/Type.cpp')
-rw-r--r-- | AST/Type.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/AST/Type.cpp b/AST/Type.cpp index 214dbea488..ecade56706 100644 --- a/AST/Type.cpp +++ b/AST/Type.cpp @@ -638,6 +638,18 @@ void OCUVectorType::getAsStringInternal(std::string &S) const { ElementType.getAsStringInternal(S); } +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; +} + +void TypeOfType::getAsStringInternal(std::string &S) const { + std::string Tmp; + getUnderlyingType().getAsStringInternal(Tmp); + S += "typeof(" + Tmp + ")"; +} + void FunctionTypeNoProto::getAsStringInternal(std::string &S) const { // If needed for precedence reasons, wrap the inner part in grouping parens. if (!S.empty()) |