certain receiver types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200953
91177308-0d34-0410-b5e6-
96231b3b80d8
void StmtPrinter::VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *Node) {
if (Node->isSuperReceiver())
OS << "super.";
- else if (Node->getBase()) {
+ else if (Node->isObjectReceiver() && Node->getBase()) {
PrintExpr(Node->getBase());
OS << ".";
+ } else if (Node->isClassReceiver() && Node->getClassReceiver()) {
+ OS << Node->getClassReceiver()->getName() << ".";
}
if (Node->isImplicitProperty())
// CHECK-NEXT: ...
// CHECK-NEXT: capture ParmVar{{.*}} 'x' 'int'
// CHECK-NEXT: CompoundStmt
+
+@interface B
++ (int) foo;
+@end
+
+void f() {
+ __typeof__(B.foo) Test;
+}
+// CHECK: VarDecl{{.*}}Test 'typeof (B.foo)':'int'