Files
clang-p2996/clang/test/CodeGen/mrtd.c
Nikita Popov 532dc62b90 [OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC)
This adds -no-opaque-pointers to clang tests whose output will
change when opaque pointers are enabled by default. This is
intended to be part of the migration approach described in
https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9.

The patch has been produced by replacing %clang_cc1 with
%clang_cc1 -no-opaque-pointers for tests that fail with opaque
pointers enabled. Worth noting that this doesn't cover all tests,
there's a remaining ~40 tests not using %clang_cc1 that will need
a followup change.

Differential Revision: https://reviews.llvm.org/D123115
2022-04-07 12:09:47 +02:00

29 lines
884 B
C

// RUN: %clang_cc1 -no-opaque-pointers -mrtd -triple i386-unknown-unknown -std=c89 -emit-llvm -o - %s 2>&1 | FileCheck %s
// CHECK: mrtd.c:10:3: warning: function with no prototype cannot use the stdcall calling convention
void baz(int arg);
// CHECK: define{{.*}} x86_stdcallcc void @foo(i32 noundef %arg) [[NUW:#[0-9]+]]
void foo(int arg) {
// CHECK: call x86_stdcallcc i32 bitcast (i32 (...)* @bar to i32 (i32)*)(
bar(arg);
// CHECK: call x86_stdcallcc void @baz(i32
baz(arg);
}
// CHECK: declare x86_stdcallcc i32 @bar(...)
// CHECK: declare x86_stdcallcc void @baz(i32 noundef)
void qux(int arg, ...) { }
// CHECK: define{{.*}} void @qux(i32 noundef %arg, ...)
void quux(int a1, int a2, int a3) {
qux(a1, a2, a3);
}
// CHECK-LABEL: define{{.*}} x86_stdcallcc void @quux
// CHECK: call void (i32, ...) @qux
// CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} }