Skip to content

Commit

Permalink
Add -Wno-strict-prototypes to C tests; NFC
Browse files Browse the repository at this point in the history
This patch adds -Wno-strict-prototypes to all of the test cases that
use functions without prototypes, but not as the primary concern of the
test. e.g., attributes testing whether they can/cannot be applied to a
function without a prototype, etc.

This is done in preparation for enabling -Wstrict-prototypes by
default.
  • Loading branch information
AaronBallman committed Feb 24, 2022
1 parent 1c25580 commit 2ceee2f
Show file tree
Hide file tree
Showing 94 changed files with 295 additions and 297 deletions.
16 changes: 8 additions & 8 deletions clang/test/AST/ast-dump-decl-json.c
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump=json -ast-dump-filter Test %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-strict-prototypes -ast-dump=json -ast-dump-filter Test %s | FileCheck %s

#include "Inputs/json-dump-include.h"

Expand All @@ -16,7 +16,7 @@ struct TestChildren {
};
};

void testLabelDecl() {
void testLabelDecl(void) {
__label__ TestLabelDecl;
TestLabelDecl: goto TestLabelDecl;
}
Expand Down Expand Up @@ -74,8 +74,8 @@ int TestFunctionDecl(int x, enum { e } y) {
int TestFunctionDecl2(enum Enum { e } x) { return x; }
int TestFunctionDeclProto(int x);
void TestFunctionDeclNoProto();
extern int TestFunctionDeclSC();
inline int TestFunctionDeclInline();
extern int TestFunctionDeclSC(void);
inline int TestFunctionDeclInline(void);

struct testFieldDecl {
int TestFieldDecl;
Expand Down Expand Up @@ -1574,14 +1574,14 @@ void testParmVarDecl(int TestParmVarDecl);
// CHECK-NEXT: },
// CHECK-NEXT: "end": {
// CHECK-NEXT: "offset": {{[0-9]+}},
// CHECK-NEXT: "col": 31,
// CHECK-NEXT: "col": 35,
// CHECK-NEXT: "tokLen": 1
// CHECK-NEXT: }
// CHECK-NEXT: },
// CHECK-NEXT: "name": "TestFunctionDeclSC",
// CHECK-NEXT: "mangledName": "TestFunctionDeclSC",
// CHECK-NEXT: "type": {
// CHECK-NEXT: "qualType": "int ()"
// CHECK-NEXT: "qualType": "int (void)"
// CHECK-NEXT: },
// CHECK-NEXT: "storageClass": "extern"
// CHECK-NEXT: }
Expand All @@ -1604,14 +1604,14 @@ void testParmVarDecl(int TestParmVarDecl);
// CHECK-NEXT: },
// CHECK-NEXT: "end": {
// CHECK-NEXT: "offset": {{[0-9]+}},
// CHECK-NEXT: "col": 35,
// CHECK-NEXT: "col": 39,
// CHECK-NEXT: "tokLen": 1
// CHECK-NEXT: }
// CHECK-NEXT: },
// CHECK-NEXT: "name": "TestFunctionDeclInline",
// CHECK-NEXT: "mangledName": "TestFunctionDeclInline",
// CHECK-NEXT: "type": {
// CHECK-NEXT: "qualType": "int ()"
// CHECK-NEXT: "qualType": "int (void)"
// CHECK-NEXT: },
// CHECK-NEXT: "inline": true
// CHECK-NEXT: }
Expand Down
20 changes: 10 additions & 10 deletions clang/test/AST/ast-dump-decl.c
@@ -1,19 +1,19 @@
// Test without serialization:
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump -ast-dump-filter Test %s \
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-strict-prototypes -ast-dump -ast-dump-filter Test %s \
// RUN: | FileCheck --strict-whitespace %s
//
// Test with serialization:
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t %s
// RUN: %clang_cc1 -x c -triple x86_64-unknown-unknown -include-pch %t \
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-strict-prototypes -emit-pch -o %t %s
// RUN: %clang_cc1 -x c -triple x86_64-unknown-unknown -Wno-strict-prototypes -include-pch %t \
// RUN: -ast-dump-all -ast-dump-filter Test /dev/null \
// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
// RUN: | FileCheck --strict-whitespace %s
//
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s \
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-strict-prototypes -ast-dump %s \
// RUN: | FileCheck -check-prefix CHECK-TU --strict-whitespace %s
//
// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -fmodule-name=X \
// RUN: -triple x86_64-unknown-unknown -fmodule-map-file=%S/Inputs/module.modulemap \
// RUN: -triple x86_64-unknown-unknown -Wno-strict-prototypes -fmodule-map-file=%S/Inputs/module.modulemap \
// RUN: -ast-dump -ast-dump-filter Test %s -DMODULES \
// RUN: | FileCheck -check-prefix CHECK -check-prefix CHECK-MODULES --strict-whitespace %s

Expand Down Expand Up @@ -43,7 +43,7 @@ struct TestChildren {

// CHECK-TU: TranslationUnitDecl

void testLabelDecl() {
void testLabelDecl(void) {
__label__ TestLabelDecl;
TestLabelDecl: goto TestLabelDecl;
}
Expand Down Expand Up @@ -147,11 +147,11 @@ int TestFunctionDeclProto(int x);
void TestFunctionDeclNoProto();
// CHECK: FunctionDecl{{.*}} TestFunctionDeclNoProto 'void ()'

extern int TestFunctionDeclSC();
// CHECK: FunctionDecl{{.*}} TestFunctionDeclSC 'int ()' extern
extern int TestFunctionDeclSC(void);
// CHECK: FunctionDecl{{.*}} TestFunctionDeclSC 'int (void)' extern

inline int TestFunctionDeclInline();
// CHECK: FunctionDecl{{.*}} TestFunctionDeclInline 'int ()' inline
inline int TestFunctionDeclInline(void);
// CHECK: FunctionDecl{{.*}} TestFunctionDeclInline 'int (void)' inline

struct testFieldDecl {
int TestFieldDecl;
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Analysis/blocks.m
@@ -1,4 +1,4 @@
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core -analyzer-store=region -fblocks -analyzer-opt-analyze-nested-blocks -verify %s
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core -analyzer-store=region -fblocks -analyzer-opt-analyze-nested-blocks -verify -Wno-strict-prototypes %s
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core -analyzer-store=region -fblocks -analyzer-opt-analyze-nested-blocks -verify -x objective-c++ %s

//===----------------------------------------------------------------------===//
Expand Down
8 changes: 4 additions & 4 deletions clang/test/Analysis/casts.c
@@ -1,7 +1,7 @@
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9 -fenable-matrix -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -Wno-pointer-to-int-cast -verify -analyzer-config eagerly-assume=false %s
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin9 -fenable-matrix -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -Wno-pointer-to-int-cast -verify -analyzer-config eagerly-assume=false %s
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9 -fenable-matrix -analyzer-checker=core,alpha.core,debug.ExprInspection -Wno-pointer-to-int-cast -verify -DEAGERLY_ASSUME=1 -w %s
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin9 -fenable-matrix -analyzer-checker=core,alpha.core,debug.ExprInspection -Wno-pointer-to-int-cast -verify -DEAGERLY_ASSUME=1 -DBIT32=1 -w %s
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9 -fenable-matrix -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -Wno-pointer-to-int-cast -Wno-strict-prototypes -verify -analyzer-config eagerly-assume=false %s
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin9 -fenable-matrix -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -Wno-pointer-to-int-cast -Wno-strict-prototypes -verify -analyzer-config eagerly-assume=false %s
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9 -fenable-matrix -analyzer-checker=core,alpha.core,debug.ExprInspection -Wno-pointer-to-int-cast -Wno-strict-prototypes -verify -DEAGERLY_ASSUME=1 -w %s
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin9 -fenable-matrix -analyzer-checker=core,alpha.core,debug.ExprInspection -Wno-pointer-to-int-cast -Wno-strict-prototypes -verify -DEAGERLY_ASSUME=1 -DBIT32=1 -w %s

extern void clang_analyzer_eval(_Bool);

Expand Down
2 changes: 1 addition & 1 deletion clang/test/Analysis/inline.c
@@ -1,4 +1,4 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -Wno-strict-prototypes -verify %s

void clang_analyzer_eval(int);
void clang_analyzer_checkInlined(int);
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Analysis/malloc.c
@@ -1,4 +1,4 @@
// RUN: %clang_analyze_cc1 -analyzer-store=region -verify %s \
// RUN: %clang_analyze_cc1 -Wno-strict-prototypes -analyzer-store=region -verify %s \
// RUN: -analyzer-checker=core \
// RUN: -analyzer-checker=alpha.deadcode.UnreachableCode \
// RUN: -analyzer-checker=alpha.core.CastSize \
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Analysis/misc-ps-region-store.m
@@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin9 -analyzer-checker=core,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyzer-checker=core,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin9 -analyzer-checker=core,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class -Wno-strict-prototypes %s
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyzer-checker=core,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class -Wno-strict-prototypes %s

typedef long unsigned int size_t;
void *memcpy(void *, const void *, size_t);
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Analysis/misc-ps.m
@@ -1,6 +1,6 @@
// NOTE: Use '-fobjc-gc' to test the analysis being run twice, and multiple reports are not issued.
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -analyzer-checker=core,alpha.core,osx.cocoa.AtSync -analyzer-store=region -Wno-pointer-to-int-cast -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,alpha.core,osx.cocoa.AtSync -analyzer-store=region -Wno-pointer-to-int-cast -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -analyzer-checker=core,alpha.core,osx.cocoa.AtSync -analyzer-store=region -Wno-strict-prototypes -Wno-pointer-to-int-cast -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,alpha.core,osx.cocoa.AtSync -analyzer-store=region -Wno-strict-prototypes -Wno-pointer-to-int-cast -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s

#ifndef __clang_analyzer__
#error __clang_analyzer__ not defined
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Analysis/null-deref-ps.c
@@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -Wno-tautological-constant-compare -Wtautological-unsigned-zero-compare -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-store=region -analyzer-purge=none -verify %s -Wno-error=return-type
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -Wno-tautological-constant-compare -Wtautological-unsigned-zero-compare -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-store=region -verify %s -Wno-error=return-type
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -Wno-strict-prototypes -Wno-tautological-constant-compare -Wtautological-unsigned-zero-compare -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-store=region -analyzer-purge=none -verify %s -Wno-error=return-type
// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -Wno-strict-prototypes -Wno-tautological-constant-compare -Wtautological-unsigned-zero-compare -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-store=region -verify %s -Wno-error=return-type

typedef unsigned uintptr_t;

Expand Down
6 changes: 3 additions & 3 deletions clang/test/CodeGen/X86/x86_64-arguments.c
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -debug-info-kind=limited -o - %s | \
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -debug-info-kind=limited -Wno-strict-prototypes -o - %s | \
// RUN: FileCheck %s -check-prefix=CHECK -check-prefix=SSE -check-prefix=NO-AVX512
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -debug-info-kind=limited -o - %s -target-feature +avx | \
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -debug-info-kind=limited -Wno-strict-prototypes -o - %s -target-feature +avx | \
// RUN: FileCheck %s -check-prefix=CHECK -check-prefix=AVX -check-prefix=NO-AVX512
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -debug-info-kind=limited -o - %s -target-feature +avx512f | \
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -debug-info-kind=limited -Wno-strict-prototypes -o - %s -target-feature +avx512f | \
// RUN: FileCheck %s -check-prefix=CHECK -check-prefix=AVX -check-prefix=AVX512
#include <stdarg.h>

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/attributes.c
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -emit-llvm -fcf-protection=branch -triple i386-linux-gnu %s -o - | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -Wno-strict-prototypes -fcf-protection=branch -triple i386-linux-gnu %s -o - | FileCheck %s

// CHECK: @t5 = weak{{.*}} global i32 2
int t5 __attribute__((weak)) = 2;
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/blocks.c
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - -fblocks | FileCheck %s
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -Wno-strict-prototypes -o - -fblocks | FileCheck %s

// CHECK: %[[STRUCT_BLOCK_DESCRIPTOR:.*]] = type { i32, i32 }

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/call.c
@@ -1,4 +1,4 @@
// RUN: %clang %s -O0 -emit-llvm -S -o - | FileCheck %s
// RUN: %clang %s -O0 -Wno-strict-prototypes -emit-llvm -S -o - | FileCheck %s

// This should call rb_define_global_function, not rb_f_chop.
void rb_define_global_function (const char*,void(*)(void),int);
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/exceptions-strictfp.c
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple armv7-apple-unknown -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s -fexceptions -exception-model=sjlj -fblocks | FileCheck %s
// RUN: %clang_cc1 -triple armv7-apple-unknown -Wno-strict-prototypes -ffp-exception-behavior=strict -fexperimental-strict-floating-point -emit-llvm -o - %s -fexceptions -exception-model=sjlj -fblocks | FileCheck %s

// Verify strictfp attributes on invoke calls (and therefore also on
// function definitions).
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CodeGen/exceptions.c
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fexceptions -fblocks | FileCheck %s
// RUN: %clang_cc1 -triple armv7-apple-unknown -emit-llvm -o - %s -fexceptions -exception-model=sjlj -fblocks | FileCheck %s -check-prefix=CHECK-ARM
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -Wno-strict-prototypes -emit-llvm -o - %s -fexceptions -fblocks | FileCheck %s
// RUN: %clang_cc1 -triple armv7-apple-unknown -Wno-strict-prototypes -emit-llvm -o - %s -fexceptions -exception-model=sjlj -fblocks | FileCheck %s -check-prefix=CHECK-ARM

// rdar://problem/8621849
void test1(void) {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/exprs.c
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -Wno-strict-prototypes -emit-llvm -o - | FileCheck %s

// PR1895
// sizeof function
Expand Down
10 changes: 5 additions & 5 deletions clang/test/CodeGen/extend-arg-64.c
@@ -1,24 +1,24 @@
// RUN: %clang_cc1 -DD128 -triple x86_64-apple-darwin -fextend-arguments=64 \
// RUN: %s -emit-llvm -o - | FileCheck %s -check-prefix=CHECKEXT
// RUN: -Wno-strict-prototypes %s -emit-llvm -o - | FileCheck %s -check-prefix=CHECKEXT

// When the option isn't selected, no effect
// RUN: %clang_cc1 -DD128 -triple x86_64-apple-darwin \
// RUN: %s -emit-llvm -o - | FileCheck %s \
// RUN: -Wno-strict-prototypes %s -emit-llvm -o - | FileCheck %s \
// RUN: --implicit-check-not "ext {{.*}}to i64"

// The option isn't supported on x86, no effect
// RUN: %clang_cc1 -triple i386-pc-linux-gnu -fextend-arguments=64 \
// RUN: %s -emit-llvm -o - | FileCheck %s \
// RUN: -Wno-strict-prototypes %s -emit-llvm -o - | FileCheck %s \
// RUN: --implicit-check-not "ext {{.*}}to i64"

// The option isn't supported on ppc, no effect
// RUN: %clang_cc1 -triple ppc64le -fextend-arguments=64 \
// RUN: %s -emit-llvm -o - | FileCheck %s \
// RUN: -Wno-strict-prototypes %s -emit-llvm -o - | FileCheck %s \
// RUN: --implicit-check-not "ext {{.*}}to i64"

// The option isn't supported on ppc, no effect
// RUN: %clang_cc1 -DD128 -triple powerpc64-ibm-aix-xcoff -fextend-arguments=64 \
// RUN: %s -emit-llvm -o - | FileCheck %s \
// RUN: -Wno-strict-prototypes %s -emit-llvm -o - | FileCheck %s \
// RUN: --implicit-check-not "ext {{.*}}to i64"


Expand Down
12 changes: 6 additions & 6 deletions clang/test/CodeGen/functions.c
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - -verify | FileCheck %s
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -Wno-strict-prototypes -emit-llvm -o - -verify | FileCheck %s

int g();

Expand All @@ -19,7 +19,7 @@ void test3(T f) {
int a(int);
int a() {return 1;}

void f0() {}
void f0(void) {}
// CHECK-LABEL: define{{.*}} void @f0()

void f1();
Expand All @@ -31,13 +31,13 @@ void f2(void) {
void f1() {}

// CHECK: define {{.*}} @f3{{\(\)|\(.*sret.*\)}}
struct foo { int X, Y, Z; } f3() {
struct foo { int X, Y, Z; } f3(void) {
while (1) {}
}

// PR4423 - This shouldn't crash in codegen
void f4() {}
void f5() { f4(42); } //expected-warning {{too many arguments}}
void f5(void) { f4(42); } //expected-warning {{too many arguments}}

// Qualifiers on parameter types shouldn't make a difference.
static void f6(const float f, const float g) {
Expand All @@ -52,7 +52,7 @@ void f7(float f, float g) {
struct Incomplete;
void f8_callback(struct Incomplete);
void f8_user(void (*callback)(struct Incomplete));
void f8_test() {
void f8_test(void) {
f8_user(&f8_callback);
// CHECK-LABEL: define{{.*}} void @f8_test()
// CHECK: call void @f8_user({{.*}}* noundef bitcast (void ()* @f8_callback to {{.*}}*))
Expand All @@ -62,6 +62,6 @@ void f8_test() {

// PR10204: don't crash
static void test9_helper(void) {}
void test9() {
void test9(void) {
(void) test9_helper;
}
4 changes: 2 additions & 2 deletions clang/test/CodeGen/incomplete-function-type.c
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-apple-darwin -Wno-strict-prototypes -emit-llvm -o - %s | FileCheck %s
// CHECK: ModuleID
// CHECK: target triple = "
// CHECK-NOT: opaque
Expand All @@ -12,4 +12,4 @@ enum teste1 { TEST1 };
struct tests2 { int x,y,z,a,b,c,d,e,f,g; };
struct tests3 { float x; };

void f0() {}
void f0(void) {}
12 changes: 6 additions & 6 deletions clang/test/CodeGen/inline.c
@@ -1,8 +1,8 @@
// REQUIRES: x86-registered-target
//
// RUN: echo "GNU89 tests:"
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu89 | FileCheck %s --check-prefix=CHECK1
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -fexperimental-new-pass-manager -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu89 | FileCheck %s --check-prefix=CHECK1
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -Wno-strict-prototypes -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu89 | FileCheck %s --check-prefix=CHECK1
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -Wno-strict-prototypes -fexperimental-new-pass-manager -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu89 | FileCheck %s --check-prefix=CHECK1
// CHECK1-LABEL: define{{.*}} i32 @foo()
// CHECK1-LABEL: define{{.*}} i32 @bar()
// CHECK1-LABEL: define{{.*}} void @unreferenced1()
Expand All @@ -24,8 +24,8 @@
// CHECK1-LABEL: define available_externally void @gnu_ei_inline()

// RUN: echo "C99 tests:"
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu99 | FileCheck %s --check-prefix=CHECK2
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -fexperimental-new-pass-manager -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu99 | FileCheck %s --check-prefix=CHECK2
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -Wno-strict-prototypes -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu99 | FileCheck %s --check-prefix=CHECK2
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -Wno-strict-prototypes -fexperimental-new-pass-manager -O1 -disable-llvm-passes -emit-llvm -o - -std=gnu99 | FileCheck %s --check-prefix=CHECK2
// CHECK2-LABEL: define{{.*}} i32 @ei()
// CHECK2-LABEL: define{{.*}} i32 @bar()
// CHECK2-NOT: unreferenced1
Expand Down Expand Up @@ -58,8 +58,8 @@
// CHECK3-LABEL: define linkonce_odr noundef i32 @_Z2eiv()

// RUN: echo "MS C Mode tests:"
// RUN: %clang_cc1 %s -triple i386-pc-win32 -O1 -disable-llvm-passes -emit-llvm -o - -std=c99 | FileCheck %s --check-prefix=CHECK4
// RUN: %clang_cc1 %s -triple i386-pc-win32 -fexperimental-new-pass-manager -O1 -disable-llvm-passes -emit-llvm -o - -std=c99 | FileCheck %s --check-prefix=CHECK4
// RUN: %clang_cc1 %s -triple i386-pc-win32 -Wno-strict-prototypes -O1 -disable-llvm-passes -emit-llvm -o - -std=c99 | FileCheck %s --check-prefix=CHECK4
// RUN: %clang_cc1 %s -triple i386-pc-win32 -Wno-strict-prototypes -fexperimental-new-pass-manager -O1 -disable-llvm-passes -emit-llvm -o - -std=c99 | FileCheck %s --check-prefix=CHECK4
// CHECK4-NOT: define weak_odr void @_Exit(
// CHECK4-LABEL: define weak_odr dso_local i32 @ei()
// CHECK4-LABEL: define dso_local i32 @bar()
Expand Down

0 comments on commit 2ceee2f

Please sign in to comment.