Mercurial > hg > CbC > CbC_llvm
comparison clang/test/SemaObjC/format-arg-attribute.m @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
1 // RUN: %clang_cc1 -verify -fsyntax-only %s | 1 // RUN: %clang_cc1 -verify -fsyntax-only %s |
2 | 2 |
3 @class NSString; | 3 @class NSString; |
4 @class NSAttributedString; | |
4 | 5 |
5 extern NSString *fa2 (const NSString *) __attribute__((format_arg(1))); | 6 extern NSString *fa2 (const NSString *) __attribute__((format_arg(1))); |
6 extern NSString *fa3 (NSString *) __attribute__((format_arg(1))); | 7 extern NSString *fa3 (NSString *) __attribute__((format_arg(1))); |
7 | 8 |
8 extern void fc1 (const NSString *) __attribute__((format_arg)); // expected-error {{'format_arg' attribute takes one argument}} | 9 extern void fc1 (const NSString *) __attribute__((format_arg)); // expected-error {{'format_arg' attribute takes one argument}} |
23 extern NSString *fi2 (NSString *) __attribute__((format_arg(1))); | 24 extern NSString *fi2 (NSString *) __attribute__((format_arg(1))); |
24 | 25 |
25 extern int fi3 (const NSString *) __attribute__((format_arg(1))); // expected-error {{function does not return NSString}} | 26 extern int fi3 (const NSString *) __attribute__((format_arg(1))); // expected-error {{function does not return NSString}} |
26 extern NSString *fi4 (const NSString *) __attribute__((format_arg(1))); | 27 extern NSString *fi4 (const NSString *) __attribute__((format_arg(1))); |
27 extern NSString *fi5 (const NSString *) __attribute__((format_arg(1))); | 28 extern NSString *fi5 (const NSString *) __attribute__((format_arg(1))); |
29 | |
30 extern NSAttributedString *fattrs (const NSString *) __attribute__((format_arg(1))); |