Skip to content

Commit 06eee5e

Browse files
committed
Set target triple in test
1 parent 83892e3 commit 06eee5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/test/Sema/warn-alloc-size.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsyntax-only -verify -Walloc-size %s
1+
// RUN: %clang_cc1 -triple x86_64-linux -fsyntax-only -verify -Walloc-size %s
22
struct Foo { int x[10]; };
33

44
struct ZeroSize {
@@ -42,7 +42,7 @@ void alloc_foo(void) {
4242
// expected-warning@-1 {{allocation of insufficient size '1' for type 'int' with size '4'}}
4343
(void)(int *)my_malloc(1); // expected-warning {{allocation of insufficient size '1' for type 'int' with size '4'}}
4444

45-
struct ZeroSize *ptr18 = my_malloc(0); // okay becuase sizeof(struct ZeroSize) = 0
45+
struct ZeroSize *ptr18 = my_malloc(0); // okay because sizeof(struct ZeroSize) = 0
4646

4747
void *funcptr_1 = (void (*)(int))my_malloc(0); // expected-warning {{allocation of insufficient size '0' for type 'void (int)' with size '1'}}
4848
void *funcptr_2 = (void (*)(int))my_malloc(1);

0 commit comments

Comments
 (0)