https://github.com/mkovacevic99 created 
https://github.com/llvm/llvm-project/pull/206749

Follow-up to #197874. The codegen test was missing FileCheck lines, making it a 
no-op. Add checks that verify both __auto_type _Atomic and _Atomic __auto_type 
produce correct allocas and stores.


Follow up to comment from: 
https://github.com/llvm/llvm-project/pull/197874#discussion_r3496368126

>From 3182c27b3ef5e894c948b0a968596c214dd8e814 Mon Sep 17 00:00:00 2001
From: Milica Kovacevic <[email protected]>
Date: Tue, 30 Jun 2026 17:15:16 +0200
Subject: [PATCH] [Clang] Add FileCheck lines to atomic-auto-type codegen test

Follow-up to #197874. The codegen test was missing FileCheck
lines, making it a no-op. Add checks that verify both __auto_type
_Atomic and _Atomic __auto_type produce correct allocas and stores.
---
 clang/test/CodeGen/atomic-auto-type.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/clang/test/CodeGen/atomic-auto-type.c 
b/clang/test/CodeGen/atomic-auto-type.c
index 0969f22596421..dd9f587b92b71 100644
--- a/clang/test/CodeGen/atomic-auto-type.c
+++ b/clang/test/CodeGen/atomic-auto-type.c
@@ -1,9 +1,15 @@
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s > /dev/null
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck 
%s
 
 // This is a regression test for handling of __auto_type inside _Atomic.
 // Previously this could lead to an undeduced AutoType escaping into
 // ASTContext::getTypeInfoImpl and causing an assertion failure.
 
+// CHECK-LABEL: define {{.*}} @f(
+// CHECK: %xa = alloca double
+// CHECK: %ax = alloca double
+// CHECK: store double {{.*}}, ptr %xa
+// CHECK: store double {{.*}}, ptr %ax
+
 void f(double x) {
   __auto_type _Atomic xa = x;
   _Atomic __auto_type ax = x;

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to