[PATCH] D90140: [clang][RecoveryExpr] Add tests for ObjectiveC.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 27 01:43:31 PDT 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2c2dc7c392a3: [clang][RecoveryExpr] Add tests for ObjectiveC. (authored by hokein).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90140/new/

https://reviews.llvm.org/D90140

Files:
  clang/test/AST/ast-dump-recovery.m


Index: clang/test/AST/ast-dump-recovery.m
===================================================================
--- /dev/null
+++ clang/test/AST/ast-dump-recovery.m
@@ -0,0 +1,18 @@
+// RUN: not %clang_cc1 -triple x86_64-unknown-unknown -frecovery-ast -frecovery-ast-type -ast-dump %s | FileCheck -strict-whitespace %s
+
+ at interface Foo
+- (void)method:(int)n;
+ at end
+
+void k(Foo *foo) {
+  // CHECK:       ObjCMessageExpr {{.*}} 'void' contains-errors
+  // CHECK-CHECK:  |-ImplicitCastExpr {{.*}} 'Foo *' <LValueToRValue>
+  // CHECK-CHECK:  | `-DeclRefExpr {{.*}} 'foo'
+  // CHECK-CHECK:  `-RecoveryExpr {{.*}}
+  [foo method:undef];
+
+  // CHECK:      ImplicitCastExpr {{.*}} '<dependent type>' contains-errors
+  // CHECK-NEXT: `-RecoveryExpr {{.*}} '<dependent type>' contains-errors
+  // CHECK-NEXT:   `-DeclRefExpr {{.*}} 'foo'
+  foo.undef;
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90140.300914.patch
Type: text/x-patch
Size: 855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201027/232f7fde/attachment.bin>


More information about the cfe-commits mailing list