[clang] [clang][test] Use `FileCheck` in `Rewriter/objc-modern-getclass-proto.mm` (PR #204272)

Fady Farag via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 16 19:09:30 PDT 2026


https://github.com/iidmsa created https://github.com/llvm/llvm-project/pull/204272

The test had `CHECK` directives that were never executed because no `RUN` line invoked `FileCheck` on the output.

The test also used a fragile runtime, which invoked the fragile rewriter instead of the modern one the test was written for.

Switch to a non-fragile runtime so the modern rewriter runs as the test intended.

>From fef53d4d0c9c8e4a68e45cb4d06e80ef50e0282a Mon Sep 17 00:00:00 2001
From: Fady Farag <com.webkit.iidmsa at gmail.com>
Date: Tue, 16 Jun 2026 20:56:37 -0500
Subject: [PATCH] [clang][test] Use `FileCheck` in
 `Rewriter/objc-modern-getclass-proto.mm`

The test had `CHECK` directives that were never executed because no `RUN` line invoked `FileCheck` on the output.

The test also used a fragile runtime, which invoked the fragile rewriter instead of the modern one the test was written for.

Switch to a non-fragile runtime so the modern rewriter runs as the test intended.
---
 clang/test/Rewriter/objc-modern-getclass-proto.mm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/test/Rewriter/objc-modern-getclass-proto.mm b/clang/test/Rewriter/objc-modern-getclass-proto.mm
index da417477aa12b..81947460b4cfb 100644
--- a/clang/test/Rewriter/objc-modern-getclass-proto.mm
+++ b/clang/test/Rewriter/objc-modern-getclass-proto.mm
@@ -1,5 +1,6 @@
 // RUN: %clang_cc1 -E %s -o %t.mm
-// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %t.mm -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-10.7 %t.mm -o %t-rw.cpp
+// RUN: FileCheck --input-file=%t-rw.cpp %s
 
 @interface I @end
 @implementation I @end



More information about the cfe-commits mailing list