ColNo = Comment.find(ExpectedStr, ColNo);
if (ColNo == std::string::npos) break;
- size_type OpenDiag = Comment.find_first_of("{{", ColNo);
+ size_type OpenDiag = Comment.find("{{", ColNo);
if (OpenDiag == std::string::npos) {
fprintf(stderr,
}
OpenDiag += 2;
- size_type CloseDiag = Comment.find_first_of("}}", OpenDiag);
+ size_type CloseDiag = Comment.find("}}", OpenDiag);
if (CloseDiag == std::string::npos) {
fprintf(stderr,
int f1() {
int x;
- return x; // expected-warning{use of uninitialized variable}
+ return x; // expected-warning {{use of uninitialized variable}}
}
int f2(int x) {
int y;
- int z = x + y; // expected-warning {use of uninitialized variable}
+ int z = x + y; // expected-warning {{use of uninitialized variable}}
return z;
}
int f3(int x) {
int y;
- return x ? 1 : y; // expected-warning {use of uninitialized variable}
+ return x ? 1 : y; // expected-warning {{use of uninitialized variable}}
}
int f4(int x) {
void f6(int i) {
int x;
for (i = 0 ; i < 10; i++)
- printf("%d",x++); // expected-warning {use of uninitialized variable}
+ printf("%d",x++); // expected-warning {{use of uninitialized variable}}
}
void f7(int i) {
int y;
for (i = 0; i < 10; i++ ) {
printf("%d",x++); // no-warning
- x += y; // expected-warning {use of uninitialized variable}
+ x += y; // expected-warning {{use of uninitialized variable}}
}
-}
\ No newline at end of file
+}
// RUN: clang -fsyntax-only -verify -std=c++0x %s 2>&1
-int static_assert; /* expected-error {{expected identifier or '('}}} */
+int static_assert; /* expected-error {{expected identifier or '('}} */
// RUN: clang %s -fsyntax-only -verify
void f() {
- CFSTR("\242"); // expected-warning { CFString literal contains non-ASCII character }
- CFSTR("\0"); // expected-warning { CFString literal contains NUL character }
- CFSTR(242); // expected-error { error: CFString literal is not a string constant } \
- expected-warning { incompatible types }
- CFSTR("foo", "bar"); // expected-error { error: too many arguments to function }
+ CFSTR("\242"); // expected-warning {{ CFString literal contains non-ASCII character }}
+ CFSTR("\0"); // expected-warning {{ CFString literal contains NUL character }}
+ CFSTR(242); // expected-error {{ CFString literal is not a string constant }} \
+ expected-warning {{incompatible types}}
+ CFSTR("foo", "bar"); // expected-error {{ error: too many arguments to function }}
}
@interface INTF1 : OBJECT @end
-@interface INTF1 : OBJECT @end // expected-error {{duplicate interface declaration for class 'INTF1'}
+@interface INTF1 : OBJECT @end // expected-error {{duplicate interface declaration for class 'INTF1'}}
typedef int OBJECT; // expected-error {{previous definition is here}} \
expected-error {{redefinition of 'OBJECT' as different kind of symbol}}