From 873ec2981d25ff269f8a39c7a03c3367869551b6 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Sun, 8 Dec 2013 22:22:31 +0000 Subject: [PATCH] Fix three tests that weren't checking anything Add -verify and update the test directives to match current expectations. Also add a FIXME to an ObjC test that has expected-* directives but no -verify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196737 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/2009-03-09-WeakDeclarations-1.c | 6 +++--- test/Sema/2009-04-22-UnknownSize.c | 2 +- test/Sema/2009-07-17-VoidParameter.c | 4 ++-- test/SemaObjC/selector-overload.m | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/Sema/2009-03-09-WeakDeclarations-1.c b/test/Sema/2009-03-09-WeakDeclarations-1.c index f219de6b84..c0035a49b8 100644 --- a/test/Sema/2009-03-09-WeakDeclarations-1.c +++ b/test/Sema/2009-03-09-WeakDeclarations-1.c @@ -1,12 +1,12 @@ -// RUN: %clang_cc1 %s -triple i686-apple-darwin +// RUN: %clang_cc1 -verify %s -triple i686-apple-darwin // Insist upon warnings for inappropriate weak attributes. // O.K. extern int ext_weak_import __attribute__ ((__weak_import__)); // These are inappropriate, and should generate warnings: -int decl_weak_import __attribute__ ((__weak_import__)); // expected-warning {'weak_import' attribute cannot be specified on a definition} -int decl_initialized_weak_import __attribute__ ((__weak_import__)) = 13; // expected-warning {'weak_import' attribute cannot be specified on a definition} +int decl_weak_import __attribute__ ((__weak_import__)); // expected-warning {{'weak_import' attribute cannot be specified on a definition}} +int decl_initialized_weak_import __attribute__ ((__weak_import__)) = 13; // expected-warning {{'weak_import' attribute cannot be specified on a definition}} // O.K. extern int ext_f(void) __attribute__ ((__weak_import__)); diff --git a/test/Sema/2009-04-22-UnknownSize.c b/test/Sema/2009-04-22-UnknownSize.c index 9f717408b5..60bd8d2d77 100644 --- a/test/Sema/2009-04-22-UnknownSize.c +++ b/test/Sema/2009-04-22-UnknownSize.c @@ -1,4 +1,4 @@ -// RUN: not %clang_cc1 %s -emit-llvm -o - +// RUN: not %clang_cc1 -fsyntax-only -verify %s // PR2958 static struct foo s; // expected-error { tentative definition has type 'struct foo' that is never completed } struct foo *p = &s; diff --git a/test/Sema/2009-07-17-VoidParameter.c b/test/Sema/2009-07-17-VoidParameter.c index 68d1b1ec33..b838b02ab5 100644 --- a/test/Sema/2009-07-17-VoidParameter.c +++ b/test/Sema/2009-07-17-VoidParameter.c @@ -1,4 +1,4 @@ -// RUN: not %clang_cc1 -emit-llvm %s -o - +// RUN: %clang_cc1 -verify -fsyntax-only %s // PR4214 typedef void vt; -void (*func_ptr)(vt my_vt); // expected-error {argument may not have 'void' type} +void (*func_ptr)(vt my_vt); // expected-error {{argument may not have 'void' type}} diff --git a/test/SemaObjC/selector-overload.m b/test/SemaObjC/selector-overload.m index 53ba6f7e7e..447607a1f7 100644 --- a/test/SemaObjC/selector-overload.m +++ b/test/SemaObjC/selector-overload.m @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -fsyntax-only +// FIXME: This test needs needs to be run with -verify @interface NSObject + alloc; -- 2.40.0