From 2fe9b7fb07dff15dd15dd8755a9a9e6de0fe46fc Mon Sep 17 00:00:00 2001 From: Richard Trieu <rtrieu@google.com> Date: Thu, 15 Dec 2011 00:38:15 +0000 Subject: [PATCH] Modify how the -verify flag works. Currently, the verification string and diagnostic message are compared. If either is a substring of the other, then no error is given. This gives rise to an unexpected case: // expect-error{{candidate function has different number of parameters}} will match the following error messages from Clang: candidate function has different number of parameters (expected 1 but has 2) candidate function has different number of parameters It will also match these other error messages: candidate function function has different number of parameters number of parameters This patch will change so that the verification string must be a substring of the diagnostic message before accepting. Also, all the failing tests from this change have been corrected. Some stats from this cleanup: 87 - removed extra spaces around verification strings 70 - wording updates to diagnostics 40 - extra leading or trailing characters (typos, unmatched parens or quotes) 35 - diagnostic level was included (error:, warning:, or note:) 18 - flag name put in the warning (-Wprotocol) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146619 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/VerifyDiagnosticConsumer.cpp | 3 +- test/ARCMT/nonobjc-to-objc-cast-2.m | 2 +- test/Analysis/CFDateGC.m | 4 +- test/Analysis/NSString.m | 14 +++--- test/Analysis/method-arg-decay.m | 2 +- test/Analysis/retain-release-path-notes-gc.m | 8 ++-- test/Analysis/retain-release-path-notes.m | 4 +- test/Analysis/retain-release-region-store.m | 2 +- .../basic.lookup/basic.lookup.argdep/p2.cpp | 2 +- .../basic.lookup/basic.lookup.argdep/p4.cpp | 2 +- .../basic.lookup/basic.lookup.classref/p1.cpp | 2 +- .../basic.start/basic.start.main/p2f.cpp | 4 +- test/CXX/class.access/p6.cpp | 2 +- .../class.derived/class.member.lookup/p6.cpp | 2 +- test/CXX/class/class.friend/p1.cpp | 18 +++---- test/CXX/class/class.mem/p13.cpp | 2 +- test/CXX/class/class.nest/p1-cxx0x.cpp | 2 +- test/CXX/class/class.nest/p1.cpp | 4 +- .../basic.namespace/namespace.udecl/p1.cpp | 4 +- .../CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp | 4 +- test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp | 2 +- .../dcl.init.ref/p5-cxx03-extra-copy.cpp | 4 +- test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp | 2 +- .../p2-resolve-single-template-id.cpp | 2 +- .../stmt.stmt/stmt.iter/stmt.ranged/p1.cpp | 2 +- test/FixIt/typo.c | 2 +- test/Lexer/rdr-6096838-2.c | 2 +- test/Lexer/string-literal-encoding.c | 12 ++--- test/Lexer/string_concat.cpp | 48 +++++++++---------- test/Misc/diag-aka-types.cpp | 2 +- test/Misc/diag-verify.cpp | 48 +++++++++++++++++++ test/Modules/macros.c | 2 +- test/Modules/normal-module-map.cpp | 2 +- test/PCH/typo.cpp | 4 +- test/Parser/attr-availability.c | 2 +- test/Parser/check-syntax-1.m | 2 +- test/Parser/cxx-altivec.cpp | 2 +- test/Parser/cxx-typeid.cpp | 2 +- test/Parser/cxx0x-lambda-expressions.cpp | 4 +- test/Parser/objc-category-neg-1.m | 2 +- test/Parser/objc-forcollection-neg-2.m | 2 +- test/Parser/objc-init.m | 2 +- test/Parser/recovery.c | 2 +- test/Sema/attr-unavailable-message.c | 4 +- test/Sema/block-misc.c | 2 +- test/Sema/builtins.c | 2 +- test/Sema/format-strings-size_t.c | 8 ++-- test/Sema/implicit-builtin-redecl.c | 2 +- test/Sema/overloadable-complex.c | 4 +- test/Sema/overloadable.c | 2 +- test/Sema/thread-specifier.c | 4 +- test/SemaCXX/MicrosoftCompatibility.cpp | 4 +- test/SemaCXX/access.cpp | 2 +- test/SemaCXX/addr-of-overloaded-function.cpp | 12 +++-- test/SemaCXX/class.cpp | 24 +++++----- test/SemaCXX/complex-overload.cpp | 2 +- test/SemaCXX/dcl_init_aggr.cpp | 2 +- test/SemaCXX/exceptions.cpp | 24 +++++----- test/SemaCXX/explicit.cpp | 2 +- test/SemaCXX/incomplete-call.cpp | 2 +- ...g-namespace-qualifier-typo-corrections.cpp | 4 +- test/SemaCXX/overload-call.cpp | 26 +++++----- test/SemaCXX/overload-member-call.cpp | 8 ++-- test/SemaCXX/overloaded-operator.cpp | 2 +- test/SemaCXX/reinterpret-fn-obj-pedantic.cpp | 4 +- test/SemaCXX/scope-check.cpp | 2 +- test/SemaCXX/statements.cpp | 2 +- test/SemaCXX/this.cpp | 4 +- test/SemaCXX/typeid.cpp | 2 +- test/SemaCXX/uninit-variables.cpp | 2 +- test/SemaCXX/warn-bool-conversion.cpp | 12 ++--- test/SemaCXX/warn-thread-safety-analysis.cpp | 14 +++--- test/SemaCXX/warn-thread-safety-parsing.cpp | 2 +- test/SemaObjC/arc.m | 8 ++-- test/SemaObjC/attr-deprecated.m | 8 ++-- test/SemaObjC/blocks.m | 8 ++-- test/SemaObjC/call-super-2.m | 4 +- test/SemaObjC/category-1.m | 2 +- test/SemaObjC/class-extension-dup-methods.m | 4 +- test/SemaObjC/compare-qualified-id.m | 2 +- test/SemaObjC/comptypes-1.m | 2 +- test/SemaObjC/comptypes-7.m | 4 +- test/SemaObjC/conditional-expr-3.m | 2 +- test/SemaObjC/conditional-expr.m | 4 +- test/SemaObjC/gcc-cast-ext.m | 4 +- test/SemaObjC/invalid-objc-decls-1.m | 4 +- test/SemaObjC/ivar-lookup.m | 2 +- test/SemaObjC/method-bad-param.m | 12 ++--- test/SemaObjC/method-not-defined.m | 2 +- test/SemaObjC/method-undef-category-warn-1.m | 8 ++-- test/SemaObjC/method-undef-extension-warn-1.m | 2 +- test/SemaObjC/missing-method-return-type.m | 4 +- test/SemaObjC/no-protocol-option-tests.m | 2 +- test/SemaObjC/property-9.m | 4 +- test/SemaObjC/property-lookup-in-id.m | 2 +- test/SemaObjC/scope-check.m | 28 +++++------ test/SemaObjC/special-dep-unavail-warning.m | 2 +- test/SemaObjC/super.m | 2 +- test/SemaObjC/try-catch.m | 2 +- test/SemaObjC/undef-protocol-methods-1.m | 2 +- test/SemaObjC/warn-implicit-atomic-property.m | 4 +- test/SemaObjC/warn-strict-selector-match.m | 6 +-- test/SemaObjCXX/warn-strict-selector-match.mm | 4 +- test/SemaTemplate/explicit-instantiation.cpp | 2 +- test/SemaTemplate/friend.cpp | 2 +- test/SemaTemplate/instantiate-expr-5.cpp | 2 +- 106 files changed, 313 insertions(+), 264 deletions(-) create mode 100644 test/Misc/diag-verify.cpp diff --git a/lib/Frontend/VerifyDiagnosticConsumer.cpp b/lib/Frontend/VerifyDiagnosticConsumer.cpp index cf35c8edc31..5eeb6965820 100644 --- a/lib/Frontend/VerifyDiagnosticConsumer.cpp +++ b/lib/Frontend/VerifyDiagnosticConsumer.cpp @@ -119,8 +119,7 @@ public: } virtual bool Match(const std::string &S) { - return S.find(Text) != std::string::npos || - Text.find(S) != std::string::npos; + return S.find(Text) != std::string::npos; } }; diff --git a/test/ARCMT/nonobjc-to-objc-cast-2.m b/test/ARCMT/nonobjc-to-objc-cast-2.m index 2900b9a1fed..ba4efd3f5a3 100644 --- a/test/ARCMT/nonobjc-to-objc-cast-2.m +++ b/test/ARCMT/nonobjc-to-objc-cast-2.m @@ -20,7 +20,7 @@ void f(BOOL b) { void f2(NSString *s) { CFStringRef ref; ref = [(CFStringRef)[s string] retain]; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFStringRef' (aka 'const struct __CFString *') requires a bridged cast}} \ - // expected-error {{ bad receiver type 'CFStringRef' (aka 'const struct __CFString *')}} \ + // expected-error {{bad receiver type 'CFStringRef' (aka 'const struct __CFString *')}} \ // expected-note{{use __bridge to convert directly (no change in ownership)}} \ // expected-note{{use __bridge_retained to make an ARC object available as a +1 'CFStringRef' (aka 'const struct __CFString *')}} } diff --git a/test/Analysis/CFDateGC.m b/test/Analysis/CFDateGC.m index 69b99f052b0..4884bb9ea88 100644 --- a/test/Analysis/CFDateGC.m +++ b/test/Analysis/CFDateGC.m @@ -42,7 +42,7 @@ CFAbsoluteTime f1_use_after_release() { [NSMakeCollectable(date) release]; CFDateGetAbsoluteTime(date); // no-warning CFRelease(date); - t = CFDateGetAbsoluteTime(date); // expected-warning{{Reference-counted object is used after it is released.}} + t = CFDateGetAbsoluteTime(date); // expected-warning{{Reference-counted object is used after it is released}} return t; } @@ -55,7 +55,7 @@ CFAbsoluteTime f2_use_after_release() { [(id) CFMakeCollectable(date) release]; CFDateGetAbsoluteTime(date); // no-warning CFRelease(date); - t = CFDateGetAbsoluteTime(date); // expected-warning{{Reference-counted object is used after it is released.}} + t = CFDateGetAbsoluteTime(date); // expected-warning{{Reference-counted object is used after it is released}} return t; } diff --git a/test/Analysis/NSString.m b/test/Analysis/NSString.m index 48450daa013..4add37b9754 100644 --- a/test/Analysis/NSString.m +++ b/test/Analysis/NSString.m @@ -97,31 +97,31 @@ extern void *_NSConstantStringClassReference; NSComparisonResult f1(NSString* s) { NSString *aString = 0; - return [s compare:aString]; // expected-warning {{Argument to 'NSString' method 'compare:' cannot be nil.}} + return [s compare:aString]; // expected-warning {{Argument to 'NSString' method 'compare:' cannot be nil}} } NSComparisonResult f2(NSString* s) { NSString *aString = 0; - return [s caseInsensitiveCompare:aString]; // expected-warning {{Argument to 'NSString' method 'caseInsensitiveCompare:' cannot be nil.}} + return [s caseInsensitiveCompare:aString]; // expected-warning {{Argument to 'NSString' method 'caseInsensitiveCompare:' cannot be nil}} } NSComparisonResult f3(NSString* s, NSStringCompareOptions op) { NSString *aString = 0; - return [s compare:aString options:op]; // expected-warning {{Argument to 'NSString' method 'compare:options:' cannot be nil.}} + return [s compare:aString options:op]; // expected-warning {{Argument to 'NSString' method 'compare:options:' cannot be nil}} } NSComparisonResult f4(NSString* s, NSStringCompareOptions op, NSRange R) { NSString *aString = 0; - return [s compare:aString options:op range:R]; // expected-warning {{Argument to 'NSString' method 'compare:options:range:' cannot be nil.}} + return [s compare:aString options:op range:R]; // expected-warning {{Argument to 'NSString' method 'compare:options:range:' cannot be nil}} } NSComparisonResult f5(NSString* s, NSStringCompareOptions op, NSRange R) { NSString *aString = 0; - return [s compare:aString options:op range:R locale:0]; // expected-warning {{Argument to 'NSString' method 'compare:options:range:locale:' cannot be nil.}} + return [s compare:aString options:op range:R locale:0]; // expected-warning {{Argument to 'NSString' method 'compare:options:range:locale:' cannot be nil}} } NSArray *f6(NSString* s) { - return [s componentsSeparatedByCharactersInSet:0]; // expected-warning {{Argument to 'NSString' method 'componentsSeparatedByCharactersInSet:' cannot be nil.}} + return [s componentsSeparatedByCharactersInSet:0]; // expected-warning {{Argument to 'NSString' method 'componentsSeparatedByCharactersInSet:' cannot be nil}} } NSString* f7(NSString* s1, NSString* s2, NSString* s3) { @@ -189,7 +189,7 @@ void f13(void) { @end void f14(MyString *s) { - [s compare:0]; // expected-warning {{Argument to 'MyString' method 'compare:' cannot be nil.}} + [s compare:0]; // expected-warning {{Argument to 'MyString' method 'compare:' cannot be nil}} } // Test regular use of -autorelease diff --git a/test/Analysis/method-arg-decay.m b/test/Analysis/method-arg-decay.m index 9ce88b24232..ffe28afc4d6 100644 --- a/test/Analysis/method-arg-decay.m +++ b/test/Analysis/method-arg-decay.m @@ -73,7 +73,7 @@ extern NSMutableArray *XCFindPossibleKeyModules(PBXModule *module, BOOL useExpos - (PBXModule *) moduleForTab:(NSTabViewItem *)item; // expected-note {{method definition for 'moduleForTab:' not found}} @end @implementation XCPerspectiveModule // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} + (void) openForProjectDocument:(PBXProjectDocument *)projectDocument { } - (PBXModule *) type:(Class)type inPerspective:(id)perspectiveIdentifer matchingFunction:(BOOL (void *, void *))comparator usingData:(void *)data { diff --git a/test/Analysis/retain-release-path-notes-gc.m b/test/Analysis/retain-release-path-notes-gc.m index 19e6d7b8b33..1e74f003e1a 100644 --- a/test/Analysis/retain-release-path-notes-gc.m +++ b/test/Analysis/retain-release-path-notes-gc.m @@ -45,9 +45,9 @@ void creationViaCFCreate () { void makeCollectable () { CFTypeRef leaked = CFCreateSomething(); // expected-warning{{leak}} expected-note{{Call to function 'CFCreateSomething' returns a Core Foundation object with a +1 retain count. Core Foundation objects are not automatically garbage collected}} CFRetain(leaked); // expected-note{{Reference count incremented. The object now has a +2 retain count}} - CFMakeCollectable(leaked); // expected-note{{In GC mode a call to 'CFMakeCollectable' decrements an object's retain count and registers the object with the garbage collector. An object must have a 0 retain count to be garbage collected. After this call its retain count is +1.}} + CFMakeCollectable(leaked); // expected-note{{In GC mode a call to 'CFMakeCollectable' decrements an object's retain count and registers the object with the garbage collector. An object must have a 0 retain count to be garbage collected. After this call its retain count is +1}} NSMakeCollectable(leaked); // expected-note{{In GC mode a call to 'NSMakeCollectable' decrements an object's retain count and registers the object with the garbage collector. Since it now has a 0 retain count the object can be automatically collected by the garbage collector}} - CFRetain(leaked); // expected-note{{Reference count incremented. The object now has a +1 retain count. The object is not eligible for garbage collection until the retain count reaches 0 again.}} + CFRetain(leaked); // expected-note{{Reference count incremented. The object now has a +1 retain count. The object is not eligible for garbage collection until the retain count reaches 0 again}} return; // expected-note{{Object leaked: object allocated and stored into 'leaked' is not referenced later in this execution path and has a retain count of +1}} } @@ -61,12 +61,12 @@ void retainReleaseIgnored () { @implementation Foo (FundamentalRuleUnderGC) - (id)getViolation { - id object = (id) CFCreateSomething(); // expected-warning{{leak}} expected-note{{Call to function 'CFCreateSomething' returns a Core Foundation object with a +1 retain count. Core Foundation objects are not automatically garbage collected.}} + id object = (id) CFCreateSomething(); // expected-warning{{leak}} expected-note{{Call to function 'CFCreateSomething' returns a Core Foundation object with a +1 retain count. Core Foundation objects are not automatically garbage collected}} return object; // expected-note{{Object returned to caller as an owning reference (single retain count transferred to caller)}} expected-note{{Object leaked: object allocated and stored into 'object' and returned from method 'getViolation' is potentially leaked when using garbage collection. Callers of this method do not expect a returned object with a +1 retain count since they expect the object to be managed by the garbage collector}} } - (id)copyViolation { - id object = (id) CFCreateSomething(); // expected-warning{{leak}} expected-note{{Call to function 'CFCreateSomething' returns a Core Foundation object with a +1 retain count. Core Foundation objects are not automatically garbage collected.}} + id object = (id) CFCreateSomething(); // expected-warning{{leak}} expected-note{{Call to function 'CFCreateSomething' returns a Core Foundation object with a +1 retain count. Core Foundation objects are not automatically garbage collected}} return object; // expected-note{{Object returned to caller as an owning reference (single retain count transferred to caller)}} expected-note{{Object leaked: object allocated and stored into 'object' and returned from method 'copyViolation' is potentially leaked when using garbage collection. Callers of this method do not expect a returned object with a +1 retain count since they expect the object to be managed by the garbage collector}} } @end diff --git a/test/Analysis/retain-release-path-notes.m b/test/Analysis/retain-release-path-notes.m index f9676d1abd9..84ddcae90d2 100644 --- a/test/Analysis/retain-release-path-notes.m +++ b/test/Analysis/retain-release-path-notes.m @@ -104,12 +104,12 @@ void makeCollectableIgnored () { } CFTypeRef CFCopyRuleViolation () { - CFTypeRef object = CFGetSomething(); // expected-note{{Call to function 'CFGetSomething' returns a Core Foundation object with a +0 retain counte}} + CFTypeRef object = CFGetSomething(); // expected-note{{Call to function 'CFGetSomething' returns a Core Foundation object with a +0 retain count}} return object; // expected-warning{{Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected}} expected-note{{Object returned to caller with a +0 retain count}} expected-note{{Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected}} } CFTypeRef CFGetRuleViolation () { - CFTypeRef object = CFCreateSomething(); // expected-warning{{leak}} expected-note{{Call to function 'CFCreateSomething' returns a Core Foundation object with a +1 retain counte}} + CFTypeRef object = CFCreateSomething(); // expected-warning{{leak}} expected-note{{Call to function 'CFCreateSomething' returns a Core Foundation object with a +1 retain count}} return object; // expected-note{{Object returned to caller as an owning reference (single retain count transferred to caller)}} expected-note{{Object leaked: object allocated and stored into 'object' is return from a function whose name ('CFGetRuleViolation') does not contain 'Copy' or 'Create'. This violates the naming convention rules given the Memory Management Guide for Core Foundation}} } diff --git a/test/Analysis/retain-release-region-store.m b/test/Analysis/retain-release-region-store.m index 89950ce7cd2..1ff31b710da 100644 --- a/test/Analysis/retain-release-region-store.m +++ b/test/Analysis/retain-release-region-store.m @@ -110,7 +110,7 @@ CFAbsoluteTime f4() { CFDateGetAbsoluteTime(date); // no-warning x.f = (NSDate*) date; [((NSDate*) date) release]; - t = CFDateGetAbsoluteTime(date); // expected-warning{{Reference-counted object is used after it is released.}} + t = CFDateGetAbsoluteTime(date); // expected-warning{{Reference-counted object is used after it is released}} return t; } diff --git a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp index cee7c024203..f5ad68b75bd 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p2.cpp @@ -46,7 +46,7 @@ namespace M { int g(N::X); // expected-note{{candidate function}} void test(N::X x) { - g(x); // expected-error{{call to 'g' is ambiguous; candidates are:}} + g(x); // expected-error{{call to 'g' is ambiguous}} int i = (g)(x); int g(N::X); diff --git a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp index 15d86b7740c..32dd75ad49a 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp @@ -44,7 +44,7 @@ namespace Test { A::A() + A::A(); B::B() + B::B(); C::C() + C::C(); - D::D() + D::D(); // expected-error {{ invalid operands to binary expression ('D::D' and 'D::D') }} + D::D() + D::D(); // expected-error {{invalid operands to binary expression ('D::D' and 'D::D')}} } } diff --git a/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp b/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp index c35af1def20..b57921f6be1 100644 --- a/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp +++ b/test/CXX/basic/basic.lookup/basic.lookup.classref/p1.cpp @@ -36,7 +36,7 @@ void resolves_to_different() { Value v; // The fact that the next line is a warning rather than an error is an // extension. - v.set<double>(3.2); // expected-warning{{lookup of 'set' in member access expression is ambiguous; using member of 'Value' [-Wambiguous-member-template]}} + v.set<double>(3.2); // expected-warning{{lookup of 'set' in member access expression is ambiguous; using member of 'Value'}} } { int set; // Non-template. diff --git a/test/CXX/basic/basic.start/basic.start.main/p2f.cpp b/test/CXX/basic/basic.start/basic.start.main/p2f.cpp index a3d6a79a4fa..ea5a752a191 100644 --- a/test/CXX/basic/basic.start/basic.start.main/p2f.cpp +++ b/test/CXX/basic/basic.start/basic.start.main/p2f.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -void // expected-error {{error: 'main' must return 'int'}} -main( // expected-error {{error: first parameter of 'main' (argument count) must be of type 'int'}} +void // expected-error {{'main' must return 'int'}} +main( // expected-error {{first parameter of 'main' (argument count) must be of type 'int'}} float a ) { } diff --git a/test/CXX/class.access/p6.cpp b/test/CXX/class.access/p6.cpp index 932b4f42f2a..fbdc87b24e2 100644 --- a/test/CXX/class.access/p6.cpp +++ b/test/CXX/class.access/p6.cpp @@ -150,7 +150,7 @@ namespace test6 { class B : A { public_inner a; protected_inner b; - private_inner c; // expected-error {{ 'private_inner' is a private member of 'test6::A'}} + private_inner c; // expected-error {{'private_inner' is a private member of 'test6::A'}} }; } diff --git a/test/CXX/class.derived/class.member.lookup/p6.cpp b/test/CXX/class.derived/class.member.lookup/p6.cpp index 5f4b2a7430e..72398819263 100644 --- a/test/CXX/class.derived/class.member.lookup/p6.cpp +++ b/test/CXX/class.derived/class.member.lookup/p6.cpp @@ -29,7 +29,7 @@ void D::glorp() { x++; f(); y++; // expected-error{{member 'y' found in multiple base classes of different types}} - g(); // expected-error{{error: member 'g' found in multiple base classes of different types}} + g(); // expected-error{{member 'g' found in multiple base classes of different types}} } // PR6462 diff --git a/test/CXX/class/class.friend/p1.cpp b/test/CXX/class/class.friend/p1.cpp index bb1af101d24..56337ec25f4 100644 --- a/test/CXX/class/class.friend/p1.cpp +++ b/test/CXX/class/class.friend/p1.cpp @@ -29,35 +29,35 @@ class A { friend class PreDeclared; friend class Outer::Inner; - friend int Outer::Inner::intfield; // expected-error {{ friends can only be classes or functions }} - friend int Outer::Inner::missing_field; //expected-error {{ friends can only be classes or functions }} + friend int Outer::Inner::intfield; // expected-error {{friends can only be classes or functions}} + friend int Outer::Inner::missing_field; //expected-error {{friends can only be classes or functions}} friend int myoperation(float); // okay - friend int myglobal; // expected-error {{ friends can only be classes or functions }} + friend int myglobal; // expected-error {{friends can only be classes or functions}} friend void global_function(); friend void global_c_function(); friend class UndeclaredSoFar; - UndeclaredSoFar x; // expected-error {{ unknown type name 'UndeclaredSoFar' }} + UndeclaredSoFar x; // expected-error {{unknown type name 'UndeclaredSoFar'}} void a_member(); - friend void A::a_member(); // expected-error {{ friends cannot be members of the declaring class }} + friend void A::a_member(); // expected-error {{friends cannot be members of the declaring class}} friend void a_member(); // okay (because we ignore class scopes when looking up friends) friend class A::AInner; // this is okay as an extension friend class AInner; // okay, refers to ::AInner - friend void Derived::missing_member(); // expected-error {{ no function named 'missing_member' with type 'void ()' was found in the specified scope }} + friend void Derived::missing_member(); // expected-error {{no function named 'missing_member' with type 'void ()' was found in the specified scope}} - friend void Derived::base_member(); // expected-error {{ no function named 'base_member' with type 'void ()' was found in the specified scope }} + friend void Derived::base_member(); // expected-error {{no function named 'base_member' with type 'void ()' was found in the specified scope}} friend int Base::typedeffed_member(); // okay: should look through typedef // These test that the friend is properly not being treated as a // member function. friend A operator|(const A& l, const A& r); // okay - friend A operator|(const A& r); // expected-error {{ overloaded 'operator|' must be a binary operator (has 1 parameter) }} + friend A operator|(const A& r); // expected-error {{overloaded 'operator|' must be a binary operator (has 1 parameter)}} - friend operator bool() const; // expected-error {{ must use a qualified name when declaring a conversion operator as a friend }} \ + friend operator bool() const; // expected-error {{must use a qualified name when declaring a conversion operator as a friend}} \ // expected-error{{type qualifier is not allowed on this function}} typedef void ftypedef(); diff --git a/test/CXX/class/class.mem/p13.cpp b/test/CXX/class/class.mem/p13.cpp index 7cded23878e..84885848870 100644 --- a/test/CXX/class/class.mem/p13.cpp +++ b/test/CXX/class/class.mem/p13.cpp @@ -17,7 +17,7 @@ struct X1 { // expected-note{{previous use is here}} }; struct X2 { - typedef int X2; // expected-error{{member 'X2' has the same name as its class)}} + typedef int X2; // expected-error{{member 'X2' has the same name as its class}} }; // - every enumerator of every member of class T that is an enumerated type; and diff --git a/test/CXX/class/class.nest/p1-cxx0x.cpp b/test/CXX/class/class.nest/p1-cxx0x.cpp index 0f12579ee4f..b7a1a48c64f 100644 --- a/test/CXX/class/class.nest/p1-cxx0x.cpp +++ b/test/CXX/class/class.nest/p1-cxx0x.cpp @@ -9,6 +9,6 @@ class Outer { class Inner { static char a[sizeof(x)]; // okay static char b[sizeof(sx)]; // okay - static char c[sizeof(f)]; // expected-error {{ call to non-static member function without an object argument }} + static char c[sizeof(f)]; // expected-error {{call to non-static member function without an object argument}} }; }; diff --git a/test/CXX/class/class.nest/p1.cpp b/test/CXX/class/class.nest/p1.cpp index 350cc814e9b..9eaeff07345 100644 --- a/test/CXX/class/class.nest/p1.cpp +++ b/test/CXX/class/class.nest/p1.cpp @@ -7,8 +7,8 @@ class Outer { // C++0x does relax this rule (see 5.1.1.10) in the first case, but we need to enforce it in C++03 mode. class Inner { - static char a[sizeof(x)]; // expected-error {{ invalid use of nonstatic data member 'x' }} + static char a[sizeof(x)]; // expected-error {{invalid use of nonstatic data member 'x'}} static char b[sizeof(sx)]; // okay - static char c[sizeof(f)]; // expected-error {{ call to non-static member function without an object argument }} + static char c[sizeof(f)]; // expected-error {{call to non-static member function without an object argument}} }; }; diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp index 634369dd523..bf30ee74a56 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p1.cpp @@ -39,7 +39,7 @@ namespace Test0 { test<2> _1 = (foo)(a); class Test0::foo b; - test<2> _2 = (foo)(b); // expected-error {{no viable conversion from 'class Test0::foo' to 'class ::foo' is possible}} + test<2> _2 = (foo)(b); // expected-error {{no viable conversion from 'class Test0::foo' to 'class ::foo'}} } } } @@ -76,7 +76,7 @@ namespace test2 { class B : private A { protected: - using A::operator int; // expected-note {{'declared protected here'}} + using A::operator int; // expected-note {{declared protected here}} public: using A::operator bool; }; diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp index 9218bcf45bb..6480996af05 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp @@ -37,14 +37,14 @@ struct S { // - the class shall not have any virtual base classes; struct T : virtual S { // expected-note {{here}} - constexpr T(); // expected-error {{constexpr constructor not allowed in struct with virtual base classes}} + constexpr T(); // expected-error {{constexpr constructor not allowed in struct with virtual base class}} }; namespace IndirectVBase { struct A {}; struct B : virtual A {}; // expected-note {{here}} class C : public B { public: - constexpr C(); // expected-error {{constexpr constructor not allowed in class with virtual base classes}} + constexpr C(); // expected-error {{constexpr constructor not allowed in class with virtual base class}} }; } diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp index e32774a2ee0..979da29e1b5 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp @@ -8,7 +8,7 @@ template<typename T> using Y = struct { // expected-error {{can not be defined i class K { virtual ~K(); // FIXME: Diagnostic could use some work - operator struct S {} (); // expected-error{{ 'operator S' cannot be the name of a variable or data member}} \ + operator struct S {} (); // expected-error{{'operator S' cannot be the name of a variable or data member}} \ // expected-error{{expected ';' at end of declaration list}} }; diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp index 8c654110fa2..d58a12953e0 100644 --- a/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp +++ b/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp @@ -30,7 +30,7 @@ template<typename T> T get_value_badly() { double *dp = 0; // The extension doesn't extend far enough to turn this error into a warning. - T *tp = dp; // expected-error{{ cannot initialize a variable of type 'int *' with an lvalue of type 'double *'}} + T *tp = dp; // expected-error{{cannot initialize a variable of type 'int *' with an lvalue of type 'double *'}} return T(); } @@ -54,7 +54,7 @@ void g5(const X5&); void test() { g1(X1()); - g2(X2()); // expected-warning{{C++98 requires an accessible copy constructor for class 'X2' when binding a reference to a temporary; was private [-Wbind-to-temporary-copy]}} + g2(X2()); // expected-warning{{C++98 requires an accessible copy constructor for class 'X2' when binding a reference to a temporary; was private}} g3(X3()); // expected-warning{{no viable constructor copying parameter of type 'X3'}} g4(X4<int>()); g5(X5()); // Generates a warning in the default argument. diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp index aaf74514240..c02105ca76c 100644 --- a/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp +++ b/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p5.cpp @@ -12,7 +12,7 @@ typedef intref &intrefref; template <class T> class RefMem { // expected-warning{{class 'RefMem<int &>' does not declare any constructor to initialize its non-modifiable members}} T & - member; // expected-note{{ reference member 'member' will never be initialized}} + member; // expected-note{{reference member 'member' will never be initialized}} }; struct RefRef { diff --git a/test/CXX/over/over.over/p2-resolve-single-template-id.cpp b/test/CXX/over/over.over/p2-resolve-single-template-id.cpp index 2a156f7b0df..f6674666659 100644 --- a/test/CXX/over/over.over/p2-resolve-single-template-id.cpp +++ b/test/CXX/over/over.over/p2-resolve-single-template-id.cpp @@ -116,7 +116,7 @@ int main() { ptrdiff_t x = (ptrdiff_t) &twoT<int,int>; x = (ptrdiff_t) &twoT<int>; } - { oneT<int>; &oneT<int>; } //expected-warning 2{{ expression result unused }} + { oneT<int>; &oneT<int>; } //expected-warning 2{{expression result unused}} { static_cast<void>(cant_resolve<int>); } // expected-error {{address of overload}} { bool b = cant_resolve<int>; } // expected-error {{address of overload}} { (void) cant_resolve<int>; } // expected-error {{address of overload}} diff --git a/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp b/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp index b157fd4b0f9..a45b35f7159 100644 --- a/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp +++ b/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp @@ -128,7 +128,7 @@ void g() { void *begin(); // expected-note {{selected 'begin' function with iterator type 'void *'}} void *end(); }; - for (auto u : NoIncr()) { // expected-error {{arithmetic on a pointer to void type}} + for (auto u : NoIncr()) { // expected-error {{arithmetic on a pointer to void}} } struct NoNotEq { diff --git a/test/FixIt/typo.c b/test/FixIt/typo.c index 88d9dc62a1f..0bafd1b9903 100644 --- a/test/FixIt/typo.c +++ b/test/FixIt/typo.c @@ -30,7 +30,7 @@ void test() { r1.top_left.x = 0; typedef struct Rectangle Rectangle; // expected-note{{'Rectangle' declared here}} - rectangle *r2 = &r1; // expected-error{{ unknown type name 'rectangle'; did you mean 'Rectangle'?}} + rectangle *r2 = &r1; // expected-error{{unknown type name 'rectangle'; did you mean 'Rectangle'?}} r2->top_left.y = 0; unsinged *ptr = 0; // expected-error{{use of undeclared identifier 'unsinged'; did you mean 'unsigned'?}} *ptr = 17; diff --git a/test/Lexer/rdr-6096838-2.c b/test/Lexer/rdr-6096838-2.c index 68aa5e67945..e64acc9d226 100644 --- a/test/Lexer/rdr-6096838-2.c +++ b/test/Lexer/rdr-6096838-2.c @@ -2,4 +2,4 @@ rdar://6096838 */ -long double d = 0x0.0000003ffffffff00000p-16357L; /* expected-warning {{ hexadecimal floating constants are a C99 feature }} */ +long double d = 0x0.0000003ffffffff00000p-16357L; /* expected-warning {{hexadecimal floating constants are a C99 feature}} */ diff --git a/test/Lexer/string-literal-encoding.c b/test/Lexer/string-literal-encoding.c index de28af2b4c5..c92f7bbe4b6 100644 --- a/test/Lexer/string-literal-encoding.c +++ b/test/Lexer/string-literal-encoding.c @@ -5,11 +5,11 @@ // U+00F5 U+00FC void f() { - wchar_t const *a = L"Àéîõü"; // expected-error {{ illegal sequence in string literal }} + wchar_t const *a = L"Àéîõü"; // expected-error {{illegal sequence in string literal}} - char16_t const *b = u"Àéîõü"; // expected-error {{ illegal sequence in string literal }} - char32_t const *c = U"Àéîõü"; // expected-error {{ illegal sequence in string literal }} - wchar_t const *d = LR"(Àéîõü)"; // expected-error {{ illegal sequence in string literal }} - char16_t const *e = uR"(Àéîõü)"; // expected-error {{ illegal sequence in string literal }} - char32_t const *f = UR"(Àéîõü)"; // expected-error {{ illegal sequence in string literal }} + char16_t const *b = u"Àéîõü"; // expected-error {{illegal sequence in string literal}} + char32_t const *c = U"Àéîõü"; // expected-error {{illegal sequence in string literal}} + wchar_t const *d = LR"(Àéîõü)"; // expected-error {{illegal sequence in string literal}} + char16_t const *e = uR"(Àéîõü)"; // expected-error {{illegal sequence in string literal}} + char32_t const *f = UR"(Àéîõü)"; // expected-error {{illegal sequence in string literal}} } diff --git a/test/Lexer/string_concat.cpp b/test/Lexer/string_concat.cpp index 43782bce8c5..7e78a63e2f9 100644 --- a/test/Lexer/string_concat.cpp +++ b/test/Lexer/string_concat.cpp @@ -2,32 +2,32 @@ void f() { - const char* a = u8"abc" u"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char* b = u8"abc" U"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char* c = u8"abc" L"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char* d = u8"abc" uR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char* e = u8"abc" UR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char* f = u8"abc" LR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char* a = u8"abc" u"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char* b = u8"abc" U"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char* c = u8"abc" L"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char* d = u8"abc" uR"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char* e = u8"abc" UR"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char* f = u8"abc" LR"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} - const char16_t* g = u"abc" u8"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char16_t* h = u"abc" U"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char16_t* i = u"abc" L"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char16_t* j = u"abc" u8R"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char16_t* k = u"abc" UR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char16_t* l = u"abc" LR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char16_t* g = u"abc" u8"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char16_t* h = u"abc" U"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char16_t* i = u"abc" L"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char16_t* j = u"abc" u8R"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char16_t* k = u"abc" UR"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char16_t* l = u"abc" LR"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} - const char32_t* m = U"abc" u8"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char32_t* n = U"abc" u"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char32_t* o = U"abc" L"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char32_t* p = U"abc" u8R"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char32_t* q = U"abc" uR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const char32_t* r = U"abc" LR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char32_t* m = U"abc" u8"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char32_t* n = U"abc" u"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char32_t* o = U"abc" L"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char32_t* p = U"abc" u8R"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char32_t* q = U"abc" uR"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} + const char32_t* r = U"abc" LR"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} - const wchar_t* s = L"abc" u8"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const wchar_t* t = L"abc" u"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const wchar_t* u = L"abc" U"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const wchar_t* v = L"abc" u8R"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const wchar_t* w = L"abc" uR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} - const wchar_t* x = L"abc" UR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const wchar_t* s = L"abc" u8"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const wchar_t* t = L"abc" u"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const wchar_t* u = L"abc" U"abc"; // expected-error {{unsupported non-standard concatenation of string literals}} + const wchar_t* v = L"abc" u8R"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} + const wchar_t* w = L"abc" uR"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} + const wchar_t* x = L"abc" UR"(abc)"; // expected-error {{unsupported non-standard concatenation of string literals}} } diff --git a/test/Misc/diag-aka-types.cpp b/test/Misc/diag-aka-types.cpp index 7459bc5c65c..4c9a7312cda 100644 --- a/test/Misc/diag-aka-types.cpp +++ b/test/Misc/diag-aka-types.cpp @@ -27,7 +27,7 @@ namespace bar { } void test(Foo::foo* x) { - bar::f(x); // expected-error{{cannot initialize a parameter of type 'Foo::foo *' (aka 'bar::Foo::foo *') with an lvalue of type 'Foo::foo *')}} + bar::f(x); // expected-error{{cannot initialize a parameter of type 'Foo::foo *' (aka 'bar::Foo::foo *') with an lvalue of type 'Foo::foo *'}} } // PR9548 - "no known conversion from 'vector<string>' to 'vector<string>'" diff --git a/test/Misc/diag-verify.cpp b/test/Misc/diag-verify.cpp new file mode 100644 index 00000000000..895bc3fe030 --- /dev/null +++ b/test/Misc/diag-verify.cpp @@ -0,0 +1,48 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s 2>&1 | FileCheck %s + +// Test the -verify flag. Each of the "x = y;" lines will produce a +// "use of undeclared identifier 'y'" error message. + +void test() { + int x; + // Proper matches here. + x = y; // expected-error{{use of undeclared identifier 'y'}} + x = y; // expected-error{{use of undeclared identifier}} + x = y; // expected-error{{undeclared identifier 'y'}} + x = y; // expected-error{{use of}} + x = y; // expected-error{{undeclared identifier}} + x = y; // expected-error{{'y'}} + + // Bad matches here. + x = y; // expected-error{{use of undeclared identifier 'y' is fine}} + x = y; // expected-error{{abuse of undeclared identifier 'y'}} + x = y; // expected-error{{good use of undeclared identifier 'y' in code}} + x = y; // expected-error{{ use of undeclared identifier 'y' }} + x = y; // expected-error{{use of undeclared identifier 'y' is disallowed}} + x = y; // expected-error{{please don't use of undeclared identifier 'y'}} + x = y; // expected-error{{use of undeclared identifier 'y'; please declare y before use}} + x = y; // expected-error{{use of use of undeclared identifier 'y'}} + x = y; // expected-error{{use of undeclared identifier 'y' identifier 'y'}} +} + +//CHECK: error: 'error' diagnostics expected but not seen: +//CHECK: Line 17: use of undeclared identifier 'y' is fine +//CHECK: Line 18: abuse of undeclared identifier 'y' +//CHECK: Line 19: good use of undeclared identifier 'y' in code +//CHECK: Line 20: use of undeclared identifier 'y' +//CHECK: Line 21: use of undeclared identifier 'y' is disallowed +//CHECK: Line 22: please don't use of undeclared identifier 'y' +//CHECK: Line 23: use of undeclared identifier 'y'; please declare y before use +//CHECK: Line 24: use of use of undeclared identifier 'y' +//CHECK: Line 25: use of undeclared identifier 'y' identifier 'y' +//CHECK: error: 'error' diagnostics seen but not expected: +//CHECK: Line 17: use of undeclared identifier 'y' +//CHECK: Line 18: use of undeclared identifier 'y' +//CHECK: Line 19: use of undeclared identifier 'y' +//CHECK: Line 20: use of undeclared identifier 'y' +//CHECK: Line 21: use of undeclared identifier 'y' +//CHECK: Line 22: use of undeclared identifier 'y' +//CHECK: Line 23: use of undeclared identifier 'y' +//CHECK: Line 24: use of undeclared identifier 'y' +//CHECK: Line 25: use of undeclared identifier 'y' +//CHECK: 18 errors generated. diff --git a/test/Modules/macros.c b/test/Modules/macros.c index 0b58133dcf7..e7ab48d4ab9 100644 --- a/test/Modules/macros.c +++ b/test/Modules/macros.c @@ -21,7 +21,7 @@ __import_module__ macros; double d; DOUBLE *dp = &d; -#__export_macro__ WIBBLE // expected-error{{no macro named 'WIBBLE' to export}} +#__export_macro__ WIBBLE // expected-error{{no macro named 'WIBBLE'}} void f() { // CHECK-PREPROCESSED: int i = INTEGER; diff --git a/test/Modules/normal-module-map.cpp b/test/Modules/normal-module-map.cpp index 5a7d549053d..6aab1cb9813 100644 --- a/test/Modules/normal-module-map.cpp +++ b/test/Modules/normal-module-map.cpp @@ -1,4 +1,4 @@ -// Note: inside the module. expected-note{{ 'nested_umbrella_a' declared here}} +// Note: inside the module. expected-note{{'nested_umbrella_a' declared here}} // RUN: rm -rf %t // RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fauto-module-import -I %S/Inputs/normal-module-map %s -verify diff --git a/test/PCH/typo.cpp b/test/PCH/typo.cpp index 4c8861454d2..f8161d17df4 100644 --- a/test/PCH/typo.cpp +++ b/test/PCH/typo.cpp @@ -1,8 +1,8 @@ -// In header: expected-note{{ 'boost::function' declared here}} +// In header: expected-note{{'boost::function' declared here}} -// In header: expected-note{{ 'boost::graph::adjacency_list' declared here}} +// In header: expected-note{{'boost::graph::adjacency_list' declared here}} diff --git a/test/Parser/attr-availability.c b/test/Parser/attr-availability.c index 7b00f06ca52..b9ff31c811c 100644 --- a/test/Parser/attr-availability.c +++ b/test/Parser/attr-availability.c @@ -16,7 +16,7 @@ void f4() __attribute__((availability(macosx,introduced=10.5), availability(ios, void f5() __attribute__((availability(macosx,introduced=10.5), availability(ios,unavailable, unavailable))); // expected-error{{redundant 'unavailable' availability change; only the last specified change will be used}} -void f6() __attribute__((availability(macosx,unavailable,introduced=10.5))); // expected-warning{{warning: 'unavailable' availability overrides all other availability information}} +void f6() __attribute__((availability(macosx,unavailable,introduced=10.5))); // expected-warning{{'unavailable' availability overrides all other availability information}} // rdar://10095131 enum E{ diff --git a/test/Parser/check-syntax-1.m b/test/Parser/check-syntax-1.m index db37793c560..0ae0c5dc293 100644 --- a/test/Parser/check-syntax-1.m +++ b/test/Parser/check-syntax-1.m @@ -6,7 +6,7 @@ int @interface bla ; // expected-error {{cannot combine with previous 'int' dec typedef float CGFloat; @interface XNSNumber + (XNSNumber *) numberWithCGFloat : (CGFloat) float; // expected-error {{expected identifier}} \ - // expected-error {{ expected ';' after method prototype}} + // expected-error {{expected ';' after method prototype}} @end // rdar: // 7822196 diff --git a/test/Parser/cxx-altivec.cpp b/test/Parser/cxx-altivec.cpp index 4d924503bbb..9b2b1af22f6 100644 --- a/test/Parser/cxx-altivec.cpp +++ b/test/Parser/cxx-altivec.cpp @@ -67,7 +67,7 @@ __vector double vv_d1; // expected-error {{cannot use 'double' wit vector double v_d2; // expected-error {{cannot use 'double' with '__vector'}} __vector long double vv_ld3; // expected-warning {{Use of 'long' with '__vector' is deprecated}} expected-error {{cannot use 'double' with '__vector'}} vector long double v_ld4; // expected-warning {{Use of 'long' with '__vector' is deprecated}} expected-error {{cannot use 'double' with '__vector'}} -vector bool v_b; // expected-error {{error: C++ requires a type specifier for all declarations}} +vector bool v_b; // expected-error {{C++ requires a type specifier for all declarations}} vector bool float v_bf; // expected-error {{cannot use 'float' with '__vector bool'}} vector bool double v_bd; // expected-error {{cannot use 'double' with '__vector bool'}} vector bool pixel v_bp; // expected-error {{cannot use '__pixel' with '__vector bool'}} diff --git a/test/Parser/cxx-typeid.cpp b/test/Parser/cxx-typeid.cpp index a825dc3cc7a..e726665a36d 100644 --- a/test/Parser/cxx-typeid.cpp +++ b/test/Parser/cxx-typeid.cpp @@ -9,5 +9,5 @@ void f() { (void)typeid(int); (void)typeid(0); - (void)typeid 1; // expected-error {{error: expected '(' after 'typeid'}} + (void)typeid 1; // expected-error {{expected '(' after 'typeid'}} } diff --git a/test/Parser/cxx0x-lambda-expressions.cpp b/test/Parser/cxx0x-lambda-expressions.cpp index b4fe4cca7d1..4fa4e6f1b99 100644 --- a/test/Parser/cxx0x-lambda-expressions.cpp +++ b/test/Parser/cxx0x-lambda-expressions.cpp @@ -10,8 +10,8 @@ class C { [foo+] {}; // expected-error {{expected ',' or ']' in lambda capture list}} [foo,&this] {}; // expected-error {{'this' cannot be captured by reference}} [&this] {}; // expected-error {{'this' cannot be captured by reference}} - [&,] {}; // expected-error {{ expected variable name or 'this' in lambda capture list}} - [=,] {}; // expected-error {{ expected variable name or 'this' in lambda capture list}} + [&,] {}; // expected-error {{expected variable name or 'this' in lambda capture list}} + [=,] {}; // expected-error {{expected variable name or 'this' in lambda capture list}} [] {}; [=] (int i) {}; [&] (int) mutable -> void {}; diff --git a/test/Parser/objc-category-neg-1.m b/test/Parser/objc-category-neg-1.m index 5799db0bd2e..4aa8bae8302 100644 --- a/test/Parser/objc-category-neg-1.m +++ b/test/Parser/objc-category-neg-1.m @@ -3,6 +3,6 @@ void __assert_rtn(const char *, const char *, int, const char *) __attribute__((__noreturn__)); static __inline__ int __inline_isfinitef (float ) __attribute__ ((always_inline)); -@interface NSATSTypesetter (NSPantherCompatibility) // expected-error {{ "cannot find interface declaration for 'NSATSTypesetter'" }} +@interface NSATSTypesetter (NSPantherCompatibility) // expected-error {{cannot find interface declaration for 'NSATSTypesetter'}} - (id)lineFragmentRectForProposedRect:(id)proposedRect remainingRect:(id)remainingRect __attribute__((deprecated)); @end diff --git a/test/Parser/objc-forcollection-neg-2.m b/test/Parser/objc-forcollection-neg-2.m index 6aa74c9c0b4..93118a3c6c6 100644 --- a/test/Parser/objc-forcollection-neg-2.m +++ b/test/Parser/objc-forcollection-neg-2.m @@ -30,7 +30,7 @@ typedef struct objc_object { for (id el in self) ++i; MyList<P> ***p; - for (p in self) // expected-error {{selector element type 'MyList<P> ***' is not a valid object type}} + for (p in self) // expected-error {{selector element type 'MyList<P> ***' is not a valid object}} ++i; } diff --git a/test/Parser/objc-init.m b/test/Parser/objc-init.m index 074820526c9..b2c6fa9eb79 100644 --- a/test/Parser/objc-init.m +++ b/test/Parser/objc-init.m @@ -15,7 +15,7 @@ void test1() { id objects[] = {[NSNumber METH]}; } -void test2(NSNumber x) { // expected-error {{Objective-C interface type 'NSNumber' cannot be passed by value; did you forget * in 'NSNumber'}} +void test2(NSNumber x) { // expected-error {{interface type 'NSNumber' cannot be passed by value; did you forget * in 'NSNumber'}} id objects[] = {[x METH]}; } diff --git a/test/Parser/recovery.c b/test/Parser/recovery.c index 0747aecd6c0..15fd12b715b 100644 --- a/test/Parser/recovery.c +++ b/test/Parser/recovery.c @@ -49,7 +49,7 @@ void test(int a) { char (((( /* expected-note {{to match this '('}} */ *X x ] )))); /* expected-error {{expected ')'}} */ -; // expected-warning {{ISO C does not allow an extra ';' outside of a function}} +; // expected-warning {{extra ';' outside of a function}} diff --git a/test/Sema/attr-unavailable-message.c b/test/Sema/attr-unavailable-message.c index 208e0941b2a..b2956d85534 100644 --- a/test/Sema/attr-unavailable-message.c +++ b/test/Sema/attr-unavailable-message.c @@ -40,8 +40,8 @@ enum fee { // expected-note {{declaration has been explicitly marked unavailable t = 3 }__attribute__((unavailable())); -enum fee f() { // expected-error {{error: 'fee' is unavailable}} - int i = a; // expected-warning {{'a' is deprecated }} +enum fee f() { // expected-error {{'fee' is unavailable}} + int i = a; // expected-warning {{'a' is deprecated}} i = b; // expected-warning {{'b' is deprecated}} diff --git a/test/Sema/block-misc.c b/test/Sema/block-misc.c index ec74a630045..22604582db8 100644 --- a/test/Sema/block-misc.c +++ b/test/Sema/block-misc.c @@ -190,7 +190,7 @@ void test18() { // rdar://7072507 int test19() { - goto L0; // expected-error {{illegal goto into protected scope}} + goto L0; // expected-error {{goto into protected scope}} __block int x; // expected-note {{jump bypasses setup of __block variable}} L0: diff --git a/test/Sema/builtins.c b/test/Sema/builtins.c index 8b3b965a811..17888b0c456 100644 --- a/test/Sema/builtins.c +++ b/test/Sema/builtins.c @@ -28,7 +28,7 @@ void test7() { const void *X; X = CFSTR("\242"); // expected-warning {{input conversion stopped}} X = CFSTR("\0"); // no-warning - X = CFSTR(242); // expected-error {{ CFString literal is not a string constant }} expected-warning {{incompatible integer to pointer conversion}} + X = CFSTR(242); // expected-error {{CFString literal is not a string constant}} expected-warning {{incompatible integer to pointer conversion}} X = CFSTR("foo", "bar"); // expected-error {{too many arguments to function call}} } diff --git a/test/Sema/format-strings-size_t.c b/test/Sema/format-strings-size_t.c index 56b20b1b7b7..2f6a25f66e8 100644 --- a/test/Sema/format-strings-size_t.c +++ b/test/Sema/format-strings-size_t.c @@ -4,12 +4,12 @@ int printf(char const *, ...); void test(void) { // size_t - printf("%zu", (double)42); // expected-warning {{conversion specifies type 'size_t' (aka 'unsigned long') but the argument has type 'double''}} + printf("%zu", (double)42); // expected-warning {{conversion specifies type 'size_t' (aka 'unsigned long') but the argument has type 'double'}} // intmax_t / uintmax_t - printf("%jd", (double)42); // expected-warning {{conversion specifies type 'intmax_t' (aka 'long') but the argument has type 'double''}} - printf("%ju", (double)42); // expected-warning {{conversion specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'double''}} + printf("%jd", (double)42); // expected-warning {{conversion specifies type 'intmax_t' (aka 'long') but the argument has type 'double'}} + printf("%ju", (double)42); // expected-warning {{conversion specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'double'}} // ptrdiff_t - printf("%td", (double)42); // expected-warning {{conversion specifies type 'ptrdiff_t' (aka 'long') but the argument has type 'double''}} + printf("%td", (double)42); // expected-warning {{conversion specifies type 'ptrdiff_t' (aka 'long') but the argument has type 'double'}} } diff --git a/test/Sema/implicit-builtin-redecl.c b/test/Sema/implicit-builtin-redecl.c index 1e520d2ae90..9fb7e62454b 100644 --- a/test/Sema/implicit-builtin-redecl.c +++ b/test/Sema/implicit-builtin-redecl.c @@ -6,7 +6,7 @@ static void* malloc(int size) { return ((void*)0); /*do not use heap in this file*/ } -void *calloc(int, int, int); // expected-warning{{incompatible redeclaration of library function 'calloc' will be ignored}} \ +void *calloc(int, int, int); // expected-warning{{incompatible redeclaration of library function 'calloc'}} \ // expected-note{{'calloc' is a builtin with type 'void *}} void f1(void) { diff --git a/test/Sema/overloadable-complex.c b/test/Sema/overloadable-complex.c index 770a9722326..efdeb8ff37a 100644 --- a/test/Sema/overloadable-complex.c +++ b/test/Sema/overloadable-complex.c @@ -31,8 +31,8 @@ char *promote_or_convert(double _Complex) __attribute__((__overloadable__)); // int *promote_or_convert(long double _Complex) __attribute__((__overloadable__)); // expected-note 2 {{candidate function}} void test_promote_or_convert(float f, float _Complex fc) { - char *cp = promote_or_convert(fc); // expected-error{{call to 'promote_or_convert' is ambiguous; candidates are:}} - int *ip2 = promote_or_convert(f); // expected-error{{call to 'promote_or_convert' is ambiguous; candidates are:}} + char *cp = promote_or_convert(fc); // expected-error{{call to 'promote_or_convert' is ambiguous}} + int *ip2 = promote_or_convert(f); // expected-error{{call to 'promote_or_convert' is ambiguous}} } char *promote_or_convert2(float) __attribute__((__overloadable__)); diff --git a/test/Sema/overloadable.c b/test/Sema/overloadable.c index 8fb41a994c5..5d39f15ec81 100644 --- a/test/Sema/overloadable.c +++ b/test/Sema/overloadable.c @@ -22,7 +22,7 @@ float *accept_funcptr(int (*)(int, double)) __attribute__((overloadable)); // \ void test_funcptr(int (*f1)(int, double), int (*f2)(int, float)) { float *fp = accept_funcptr(f1); - accept_funcptr(f2); // expected-error{{no matching function for call to 'accept_funcptr'; candidates are:}} + accept_funcptr(f2); // expected-error{{no matching function for call to 'accept_funcptr'}} } struct X { int x; float y; }; diff --git a/test/Sema/thread-specifier.c b/test/Sema/thread-specifier.c index ed27c7063df..9ec88c52194 100644 --- a/test/Sema/thread-specifier.c +++ b/test/Sema/thread-specifier.c @@ -15,7 +15,7 @@ int f(__thread int t7) { // expected-error {{'__thread' is only allowed on varia __thread register int t13; // expected-error {{'__thread' variables must have global storage}} } __thread typedef int t14; // expected-error {{'__thread' is only allowed on variable declarations}} -__thread int t15; // expected-note {{[previous definition is here}} +__thread int t15; // expected-note {{previous definition is here}} int t15; // expected-error {{non-thread-local declaration of 't15' follows thread-local declaration}} -int t16; // expected-note {{[previous definition is here}} +int t16; // expected-note {{previous definition is here}} __thread int t16; // expected-error {{thread-local declaration of 't16' follows non-thread-local declaration}} diff --git a/test/SemaCXX/MicrosoftCompatibility.cpp b/test/SemaCXX/MicrosoftCompatibility.cpp index 5ac09d95735..4ae949544e6 100644 --- a/test/SemaCXX/MicrosoftCompatibility.cpp +++ b/test/SemaCXX/MicrosoftCompatibility.cpp @@ -23,7 +23,7 @@ namespace ms_protected_scope { int jump_over_variable_init(bool b) { if (b) - goto foo; // expected-warning {{illegal goto into protected scope}} + goto foo; // expected-warning {{goto into protected scope}} C c; // expected-note {{jump bypasses variable initialization}} foo: return 1; @@ -51,7 +51,7 @@ void jump_over_var_with_dtor() { void exception_jump() { - goto l2; // expected-error {{illegal goto into protected scope}} + goto l2; // expected-error {{goto into protected scope}} try { // expected-note {{jump bypasses initialization of try block}} l2: ; } catch(int) { diff --git a/test/SemaCXX/access.cpp b/test/SemaCXX/access.cpp index 6115ff6a94f..18ad301b5fe 100644 --- a/test/SemaCXX/access.cpp +++ b/test/SemaCXX/access.cpp @@ -28,7 +28,7 @@ namespace test1 { private: class X; // expected-note {{previously declared 'private' here}} public: - class X; // expected-error {{ 'X' redeclared with 'public' access}} + class X; // expected-error {{'X' redeclared with 'public' access}} class X {}; }; } diff --git a/test/SemaCXX/addr-of-overloaded-function.cpp b/test/SemaCXX/addr-of-overloaded-function.cpp index f9cc11174c7..096f74823a4 100644 --- a/test/SemaCXX/addr-of-overloaded-function.cpp +++ b/test/SemaCXX/addr-of-overloaded-function.cpp @@ -13,9 +13,9 @@ int (*pfe)(...) = &f; // expected-error{{address of overloaded function 'f' d int (&rfi)(int) = f; // selects f(int) int (&rfd)(double) = f; // selects f(double) -void g(int (*fp)(int)); // expected-note{{note: candidate function}} +void g(int (*fp)(int)); // expected-note{{candidate function}} void g(int (*fp)(float)); -void g(int (*fp)(double)); // expected-note{{note: candidate function}} +void g(int (*fp)(double)); // expected-note{{candidate function}} int g1(int); int g1(char); @@ -29,7 +29,7 @@ int g3(char); void g_test() { g(g1); - g(g2); // expected-error{{call to 'g' is ambiguous; candidates are:}} + g(g2); // expected-error{{call to 'g' is ambiguous}} g(g3); } @@ -98,8 +98,10 @@ namespace PR7971 { } namespace PR8033 { - template <typename T1, typename T2> int f(T1 *, const T2 *); // expected-note 2{{candidate function [with T1 = const int, T2 = int]}} - template <typename T1, typename T2> int f(const T1 *, T2 *); // expected-note 2{{candidate function [with T1 = int, T2 = const int]}} + template <typename T1, typename T2> int f(T1 *, const T2 *); // expected-note {{candidate function [with T1 = const int, T2 = int]}} \ + // expected-note{{candidate function}} + template <typename T1, typename T2> int f(const T1 *, T2 *); // expected-note {{candidate function [with T1 = int, T2 = const int]}} \ + // expected-note{{candidate function}} int (*p)(const int *, const int *) = f; // expected-error{{address of overloaded function 'f' is ambiguous}} \ // expected-error{{address of overloaded function 'f' is ambiguous}} diff --git a/test/SemaCXX/class.cpp b/test/SemaCXX/class.cpp index 5393230f5db..30b977913ac 100644 --- a/test/SemaCXX/class.cpp +++ b/test/SemaCXX/class.cpp @@ -1,14 +1,14 @@ // RUN: %clang_cc1 -fsyntax-only -verify -Wc++11-compat %s class C { public: - auto int errx; // expected-error {{error: storage class specified for a member declaration}} expected-warning {{'auto' storage class specifier is redundant}} - register int erry; // expected-error {{error: storage class specified for a member declaration}} - extern int errz; // expected-error {{error: storage class specified for a member declaration}} + auto int errx; // expected-error {{storage class specified for a member declaration}} expected-warning {{'auto' storage class specifier is redundant}} + register int erry; // expected-error {{storage class specified for a member declaration}} + extern int errz; // expected-error {{storage class specified for a member declaration}} static void sm() { sx = 0; - this->x = 0; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}} - x = 0; // expected-error {{error: invalid use of member 'x' in static member function}} + this->x = 0; // expected-error {{invalid use of 'this' outside of a nonstatic member function}} + x = 0; // expected-error {{invalid use of member 'x' in static member function}} } class NestedC { @@ -46,7 +46,7 @@ public: sx = 0; this->x = 0; y = 0; - this = 0; // expected-error {{error: expression is not assignable}} + this = 0; // expected-error {{expression is not assignable}} } int f1(int p) { @@ -57,7 +57,7 @@ public: typedef int A; virtual int viv; // expected-error {{'virtual' can only appear on non-static member functions}} - virtual static int vsif(); // expected-error {{error: 'virtual' can only appear on non-static member functions}} + virtual static int vsif(); // expected-error {{'virtual' can only appear on non-static member functions}} virtual int vif(); private: @@ -65,9 +65,9 @@ private: static int sx; mutable int mi; - mutable int &mir; // expected-error {{error: 'mutable' cannot be applied to references}} - mutable void mfn(); // expected-error {{error: 'mutable' cannot be applied to functions}} - mutable const int mci; // expected-error {{error: 'mutable' and 'const' cannot be mixed}} + mutable int &mir; // expected-error {{'mutable' cannot be applied to references}} + mutable void mfn(); // expected-error {{'mutable' cannot be applied to functions}} + mutable const int mci; // expected-error {{'mutable' and 'const' cannot be mixed}} static const int number = 50; static int arr[number]; @@ -98,11 +98,11 @@ void f() } // Play with mutable a bit more, to make sure it doesn't crash anything. -mutable int gi; // expected-error {{error: 'mutable' can only be applied to member variables}} +mutable int gi; // expected-error {{'mutable' can only be applied to member variables}} mutable void gfn(); // expected-error {{illegal storage class on function}} void ogfn() { - mutable int ml; // expected-error {{error: 'mutable' can only be applied to member variables}} + mutable int ml; // expected-error {{'mutable' can only be applied to member variables}} // PR3020: This used to crash due to double ownership of C4. struct C4; diff --git a/test/SemaCXX/complex-overload.cpp b/test/SemaCXX/complex-overload.cpp index 2c057acde04..719a850dbf7 100644 --- a/test/SemaCXX/complex-overload.cpp +++ b/test/SemaCXX/complex-overload.cpp @@ -32,7 +32,7 @@ int *promote_or_convert(long double _Complex); // expected-note{{candidate funct void test_promote_or_convert(float f, float _Complex fc) { char *cp = promote_or_convert(fc); - int *ip2 = promote_or_convert(f); // expected-error{{call to 'promote_or_convert' is ambiguous; candidates are:}} + int *ip2 = promote_or_convert(f); // expected-error{{call to 'promote_or_convert' is ambiguous}} } char *promote_or_convert2(float); diff --git a/test/SemaCXX/dcl_init_aggr.cpp b/test/SemaCXX/dcl_init_aggr.cpp index 2dbd381e4db..bd3de9eb7e1 100644 --- a/test/SemaCXX/dcl_init_aggr.cpp +++ b/test/SemaCXX/dcl_init_aggr.cpp @@ -80,7 +80,7 @@ struct HasReference { }; int global_int; HasReference r1 = { 1, global_int }; -HasReference r2 = { 1 } ; // expected-error{{initialization leaves reference member of type 'int &' uninitialized}} +HasReference r2 = { 1 } ; // expected-error{{reference member of type 'int &' uninitialized}} // C++ [dcl.init.aggr]p10 // Note: the behavior here is identical to C diff --git a/test/SemaCXX/exceptions.cpp b/test/SemaCXX/exceptions.cpp index e2bfe183946..908ff381779 100644 --- a/test/SemaCXX/exceptions.cpp +++ b/test/SemaCXX/exceptions.cpp @@ -35,37 +35,37 @@ void throws() { void jumps() { l1: goto l5; - goto l4; // expected-error {{illegal goto into protected scope}} - goto l3; // expected-error {{illegal goto into protected scope}} - goto l2; // expected-error {{illegal goto into protected scope}} + goto l4; // expected-error {{goto into protected scope}} + goto l3; // expected-error {{goto into protected scope}} + goto l2; // expected-error {{goto into protected scope}} goto l1; try { // expected-note 4 {{jump bypasses initialization of try block}} l2: goto l5; - goto l4; // expected-error {{illegal goto into protected scope}} - goto l3; // expected-error {{illegal goto into protected scope}} + goto l4; // expected-error {{goto into protected scope}} + goto l3; // expected-error {{goto into protected scope}} goto l2; goto l1; } catch(int) { // expected-note 4 {{jump bypasses initialization of catch block}} l3: goto l5; - goto l4; // expected-error {{illegal goto into protected scope}} + goto l4; // expected-error {{goto into protected scope}} goto l3; - goto l2; // expected-error {{illegal goto into protected scope}} + goto l2; // expected-error {{goto into protected scope}} goto l1; } catch(...) { // expected-note 4 {{jump bypasses initialization of catch block}} l4: goto l5; goto l4; - goto l3; // expected-error {{illegal goto into protected scope}} - goto l2; // expected-error {{illegal goto into protected scope}} + goto l3; // expected-error {{goto into protected scope}} + goto l2; // expected-error {{goto into protected scope}} goto l1; } l5: goto l5; - goto l4; // expected-error {{illegal goto into protected scope}} - goto l3; // expected-error {{illegal goto into protected scope}} - goto l2; // expected-error {{illegal goto into protected scope}} + goto l4; // expected-error {{goto into protected scope}} + goto l3; // expected-error {{goto into protected scope}} + goto l2; // expected-error {{goto into protected scope}} goto l1; } diff --git a/test/SemaCXX/explicit.cpp b/test/SemaCXX/explicit.cpp index 11b9672a850..12f0ca2643e 100644 --- a/test/SemaCXX/explicit.cpp +++ b/test/SemaCXX/explicit.cpp @@ -62,7 +62,7 @@ namespace Conversion { // 13.3.1.4p1 & 8.5p16: Y y2 = z; // expected-error {{no viable conversion from 'Conversion::Z' to 'Conversion::Y'}} // FIXME: These are well-formed per C++0x 13.3.1.4p1 (see DR899). - Y y3 = (Y)z; // expected-error {{no matching conversion for C-style cast from 'Conversion::Z' to 'Conversion::Y''}} + Y y3 = (Y)z; // expected-error {{no matching conversion for C-style cast from 'Conversion::Z' to 'Conversion::Y'}} Y y4 = Y(z); // expected-error {{no matching conversion for functional-style cast from 'Conversion::Z' to 'Conversion::Y'}} Y y5 = static_cast<Y>(z); // expected-error {{no matching conversion for static_cast from 'Conversion::Z' to 'Conversion::Y'}} // 13.3.1.5p1 & 8.5p16: diff --git a/test/SemaCXX/incomplete-call.cpp b/test/SemaCXX/incomplete-call.cpp index d627c33d835..69eb03a3eda 100644 --- a/test/SemaCXX/incomplete-call.cpp +++ b/test/SemaCXX/incomplete-call.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s struct A; // expected-note 14 {{forward declaration of 'A'}} -A f(); // expected-note {{note: 'f' declared here}} +A f(); // expected-note {{'f' declared here}} struct B { A f(); // expected-note {{'f' declared here}} diff --git a/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp b/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp index 5ec49793772..adfd3430dfc 100644 --- a/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp +++ b/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp @@ -9,7 +9,7 @@ fizbin::Foobar *my_foo = new fizbin::FooBar; // expected-error{{unknown type nam namespace barstool { int toFoobar() { return 1; } } // expected-note 3 {{'barstool::toFoobar' declared here}} int Double(int x) { return x + x; } void empty() { - Double(toFoobar()); // expected-error{{{use of undeclared identifier 'toFoobar'; did you mean 'barstool::toFoobar'?}} + Double(toFoobar()); // expected-error{{use of undeclared identifier 'toFoobar'; did you mean 'barstool::toFoobar'?}} } namespace fizbin { @@ -36,7 +36,7 @@ void Check() { // expected-note{{'Check' declared here}} } void Alt() { - Cleck(); // expected-error{{{use of undeclared identifier 'Cleck'; did you mean 'Check'?}} + Cleck(); // expected-error{{use of undeclared identifier 'Cleck'; did you mean 'Check'?}} } namespace N { diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp index 00f6a9460a7..1bbe00fcd40 100644 --- a/test/SemaCXX/overload-call.cpp +++ b/test/SemaCXX/overload-call.cpp @@ -8,10 +8,10 @@ void test_f(int iv, float fv) { int* ip = f(iv); } -int* g(int, float, int); // expected-note {{ candidate function }} -float* g(int, int, int); // expected-note {{ candidate function }} -double* g(int, float, float); // expected-note {{ candidate function }} -char* g(int, float, ...); // expected-note {{ candidate function }} +int* g(int, float, int); // expected-note {{candidate function}} +float* g(int, int, int); // expected-note {{candidate function}} +double* g(int, float, float); // expected-note {{candidate function}} +char* g(int, float, ...); // expected-note {{candidate function}} void g(); void test_g(int iv, float fv) { @@ -21,7 +21,7 @@ void test_g(int iv, float fv) { char* cp1 = g(0, 0); char* cp2 = g(0, 0, 0, iv, fv); - double* dp2 = g(0, fv, 1.5); // expected-error {{ call to 'g' is ambiguous; candidates are: }} + double* dp2 = g(0, fv, 1.5); // expected-error {{call to 'g' is ambiguous}} } double* h(double f); @@ -126,9 +126,9 @@ void test_bitfield(Bits bits, int x) { float* fp = bitfields(bits.uint_bitfield, 0u); } -int* multiparm(long, int, long); // expected-note {{ candidate function }} -float* multiparm(int, int, int); // expected-note {{ candidate function }} -double* multiparm(int, int, short); // expected-note {{ candidate function }} +int* multiparm(long, int, long); // expected-note {{candidate function}} +float* multiparm(int, int, int); // expected-note {{candidate function}} +double* multiparm(int, int, short); // expected-note {{candidate function}} void test_multiparm(long lv, short sv, int iv) { int* ip1 = multiparm(lv, iv, lv); @@ -137,7 +137,7 @@ void test_multiparm(long lv, short sv, int iv) { float* fp2 = multiparm(sv, iv, iv); double* dp1 = multiparm(sv, sv, sv); double* dp2 = multiparm(iv, sv, sv); - multiparm(sv, sv, lv); // expected-error {{ call to 'multiparm' is ambiguous; candidates are: }} + multiparm(sv, sv, lv); // expected-error {{call to 'multiparm' is ambiguous}} } // Test overloading based on qualification vs. no qualification @@ -183,9 +183,9 @@ void test_quals_ranking(int * p, int volatile *pq, int * * pp, int * * * ppp) { float* q6 = quals_rank2(pp); - quals_rank3(ppp); // expected-error {{call to 'quals_rank3' is ambiguous; candidates are:}} + quals_rank3(ppp); // expected-error {{call to 'quals_rank3' is ambiguous}} - quals_rank3(p); // expected-error {{call to 'quals_rank3' is ambiguous; candidates are:}} + quals_rank3(p); // expected-error {{call to 'quals_rank3' is ambiguous}} quals_rank3(pq); } @@ -266,8 +266,8 @@ float& cvqual_subsume2(const volatile Y&); // expected-note{{candidate function} Z get_Z(); void cvqual_subsume_test(Z z) { - cvqual_subsume(z); // expected-error{{call to 'cvqual_subsume' is ambiguous; candidates are:}} - int& x = cvqual_subsume2(get_Z()); // expected-error{{call to 'cvqual_subsume2' is ambiguous; candidates are:}} + cvqual_subsume(z); // expected-error{{call to 'cvqual_subsume' is ambiguous}} + int& x = cvqual_subsume2(get_Z()); // expected-error{{call to 'cvqual_subsume2' is ambiguous}} } // Test overloading with cv-qualification differences in reference diff --git a/test/SemaCXX/overload-member-call.cpp b/test/SemaCXX/overload-member-call.cpp index 37815b9ccce..37c955201a9 100644 --- a/test/SemaCXX/overload-member-call.cpp +++ b/test/SemaCXX/overload-member-call.cpp @@ -32,7 +32,7 @@ struct X { static void test_member_static() { double& d1 = g(0.0); - g(0); // expected-error{{call to 'g' is ambiguous; candidates are:}} + g(0); // expected-error{{call to 'g' is ambiguous}} } }; @@ -41,8 +41,8 @@ void test(X x, const X xc, X* xp, const X* xcp, volatile X xv, volatile X* xvp) int& i2 = xcp->f(0); float& f1 = x.f(0); float& f2 = xp->f(0); - xv.f(0); // expected-error{{no matching member function for call to 'f'; candidates are:}} - xvp->f(0); // expected-error{{no matching member function for call to 'f'; candidates are:}} + xv.f(0); // expected-error{{no matching member function for call to 'f'}} + xvp->f(0); // expected-error{{no matching member function for call to 'f'}} int& i3 = xc.g(0); int& i4 = xcp->g(0); @@ -50,7 +50,7 @@ void test(X x, const X xc, X* xp, const X* xcp, volatile X xv, volatile X* xvp) float& f4 = xp->g(0); double& d1 = xp->g(0.0); double& d2 = X::g(0.0); - X::g(0); // expected-error{{call to 'g' is ambiguous; candidates are:}} + X::g(0); // expected-error{{call to 'g' is ambiguous}} X::h(0); // expected-error{{call to non-static member function without an object argument}} } diff --git a/test/SemaCXX/overloaded-operator.cpp b/test/SemaCXX/overloaded-operator.cpp index d9b75f74f6f..2c9dff3ef90 100644 --- a/test/SemaCXX/overloaded-operator.cpp +++ b/test/SemaCXX/overloaded-operator.cpp @@ -232,7 +232,7 @@ struct Arrow2 { void test_arrow(Arrow1 a1, Arrow2 a2, const Arrow2 a3) { int &i1 = a1->m; int &i2 = a2->m; - a3->m; // expected-error{{no viable overloaded 'operator->'; candidate is}} + a3->m; // expected-error{{no viable overloaded 'operator->'}} } struct CopyConBase { diff --git a/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp b/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp index 09d08f95ee2..9cdf5a1e6a4 100644 --- a/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp +++ b/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp @@ -4,6 +4,6 @@ void fnptrs() { typedef void (*fnptr)(); fnptr fp = 0; - void *vp = reinterpret_cast<void*>(fp); // expected-warning {{reinterpret_cast between pointer-to-function and pointer-to-object is an extension}} - (void)reinterpret_cast<fnptr>(vp); // expected-warning {{reinterpret_cast between pointer-to-function and pointer-to-object is an extension}} + void *vp = reinterpret_cast<void*>(fp); // expected-warning {{cast between pointer-to-function and pointer-to-object is an extension}} + (void)reinterpret_cast<fnptr>(vp); // expected-warning {{cast between pointer-to-function and pointer-to-object is an extension}} } diff --git a/test/SemaCXX/scope-check.cpp b/test/SemaCXX/scope-check.cpp index ad109f4d4e0..b659de001c0 100644 --- a/test/SemaCXX/scope-check.cpp +++ b/test/SemaCXX/scope-check.cpp @@ -20,7 +20,7 @@ namespace test1 { int f(bool b) { if (b) - goto foo; // expected-error {{illegal goto into protected scope}} + goto foo; // expected-error {{goto into protected scope}} C c; // expected-note {{jump bypasses variable initialization}} foo: return 1; diff --git a/test/SemaCXX/statements.cpp b/test/SemaCXX/statements.cpp index 0e27f4645af..6d04c84a675 100644 --- a/test/SemaCXX/statements.cpp +++ b/test/SemaCXX/statements.cpp @@ -10,7 +10,7 @@ struct X { }; void test2() { - goto later; // expected-error {{illegal goto into protected scope}} + goto later; // expected-error {{goto into protected scope}} X x; // expected-note {{jump bypasses variable initialization}} later: ; diff --git a/test/SemaCXX/this.cpp b/test/SemaCXX/this.cpp index 167755f0a74..13158b93a44 100644 --- a/test/SemaCXX/this.cpp +++ b/test/SemaCXX/this.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -int x = this; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}} +int x = this; // expected-error {{invalid use of 'this' outside of a nonstatic member function}} void f() { - int x = this; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}} + int x = this; // expected-error {{invalid use of 'this' outside of a nonstatic member function}} } diff --git a/test/SemaCXX/typeid.cpp b/test/SemaCXX/typeid.cpp index 8db7db50746..d3a2a28deb8 100644 --- a/test/SemaCXX/typeid.cpp +++ b/test/SemaCXX/typeid.cpp @@ -2,7 +2,7 @@ void f() { - (void)typeid(int); // expected-error {{error: you need to include <typeinfo> before using the 'typeid' operator}} + (void)typeid(int); // expected-error {{you need to include <typeinfo> before using the 'typeid' operator}} } namespace std { diff --git a/test/SemaCXX/uninit-variables.cpp b/test/SemaCXX/uninit-variables.cpp index 358a5723563..eb6428d631f 100644 --- a/test/SemaCXX/uninit-variables.cpp +++ b/test/SemaCXX/uninit-variables.cpp @@ -27,7 +27,7 @@ void unevaluated_tests() { struct A { virtual ~A() {} }; void polymorphic_test() { A *a; // expected-note{{initialize the variable 'a' to silence this warning}} - (void)typeid(*a); // expected-warning{{variable 'a' is uninitialized when used here }} + (void)typeid(*a); // expected-warning{{variable 'a' is uninitialized when used here}} } // Handle cases where the CFG may constant fold some branches, thus diff --git a/test/SemaCXX/warn-bool-conversion.cpp b/test/SemaCXX/warn-bool-conversion.cpp index 595c749bcec..b3d136ecf2b 100644 --- a/test/SemaCXX/warn-bool-conversion.cpp +++ b/test/SemaCXX/warn-bool-conversion.cpp @@ -1,18 +1,18 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -int* j = false; // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} +int* j = false; // expected-warning{{initialization of pointer of type 'int *' to null from a constant boolean expression}} -void foo(int* i, int *j=(false)) // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} +void foo(int* i, int *j=(false)) // expected-warning{{initialization of pointer of type 'int *' to null from a constant boolean expression}} { - foo(false); // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} + foo(false); // expected-warning{{initialization of pointer of type 'int *' to null from a constant boolean expression}} foo((int*)false); // no-warning: explicit cast foo(0); // no-warning: not a bool, even though its convertible to bool - foo(false == true); // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} - foo((42 + 24) < 32); // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} + foo(false == true); // expected-warning{{initialization of pointer of type 'int *' to null from a constant boolean expression}} + foo((42 + 24) < 32); // expected-warning{{initialization of pointer of type 'int *' to null from a constant boolean expression}} const bool kFlag = false; - foo(kFlag); // expected-warning{{ initialization of pointer of type 'int *' to null from a constant boolean expression}} + foo(kFlag); // expected-warning{{initialization of pointer of type 'int *' to null from a constant boolean expression}} } char f(struct Undefined*); diff --git a/test/SemaCXX/warn-thread-safety-analysis.cpp b/test/SemaCXX/warn-thread-safety-analysis.cpp index 6289be7be22..23dcd8d4a8f 100644 --- a/test/SemaCXX/warn-thread-safety-analysis.cpp +++ b/test/SemaCXX/warn-thread-safety-analysis.cpp @@ -173,7 +173,7 @@ void sls_fun_bad_2() { void sls_fun_bad_3() { sls_mu.Lock(); // \ - // expected-warning{{mutex 'sls_mu' is still locked at the end of function 'sls_fun_bad_3'}} + // expected-warning{{mutex 'sls_mu' is still locked at the end of function}} } void sls_fun_bad_4() { @@ -241,7 +241,7 @@ void sls_fun_bad_9() { void sls_fun_bad_10() { sls_mu.Lock(); // \ - // expected-warning{{mutex 'sls_mu' is still locked at the end of function 'sls_fun_bad_10'}} \ + // expected-warning{{mutex 'sls_mu' is still locked at the end of function}} \ // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}} while(getBool()) { sls_mu.Unlock(); @@ -290,7 +290,7 @@ void aa_fun_bad_2() { void aa_fun_bad_3() { glock.globalLock(); // \ - // expected-warning{{mutex 'aa_mu' is still locked at the end of function 'aa_fun_bad_3'}} + // expected-warning{{mutex 'aa_mu' is still locked at the end of function}} } //--------------------------------------------------// @@ -303,19 +303,19 @@ Mutex wmu; class WeirdMethods { WeirdMethods() { wmu.Lock(); // \ - // expected-warning {{mutex 'wmu' is still locked at the end of function 'WeirdMethods'}} + // expected-warning {{mutex 'wmu' is still locked at the end of function}} } ~WeirdMethods() { wmu.Lock(); // \ - // expected-warning {{mutex 'wmu' is still locked at the end of function '~WeirdMethods'}} + // expected-warning {{mutex 'wmu' is still locked at the end of function}} } void operator++() { wmu.Lock(); // \ - // expected-warning {{mutex 'wmu' is still locked at the end of function 'operator++'}} + // expected-warning {{mutex 'wmu' is still locked at the end of function}} } operator int*() { wmu.Lock(); // \ - // expected-warning {{mutex 'wmu' is still locked at the end of function 'operator int *'}} + // expected-warning {{mutex 'wmu' is still locked at the end of function}} return 0; } }; diff --git a/test/SemaCXX/warn-thread-safety-parsing.cpp b/test/SemaCXX/warn-thread-safety-parsing.cpp index b243365c3cd..6eacc761d55 100644 --- a/test/SemaCXX/warn-thread-safety-parsing.cpp +++ b/test/SemaCXX/warn-thread-safety-parsing.cpp @@ -686,7 +686,7 @@ int slf_function_bad_7() __attribute__((shared_lock_function(0))); // \ // plus an optional list of locks (vars/fields) void etf_function() __attribute__((exclusive_trylock_function)); // \ - // expected-error {{attribute takes attribute takes at least 1 argument arguments}} + // expected-error {{attribute takes at least 1 argument}} void etf_function_args() __attribute__((exclusive_trylock_function(1, mu2))); diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m index b3405c05e26..13b3af62b8d 100644 --- a/test/SemaObjC/arc.m +++ b/test/SemaObjC/arc.m @@ -189,13 +189,13 @@ void test7_unsafe(void) { - (id) init50 { return 0; } - (void) init01 {} // expected-error {{method was declared as an 'init' method, but its implementation doesn't match because its result type is not an object pointer}} \ - // expected-warning{{ method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} + // expected-warning{{method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} - (void) init11 {} - (void) init21 {} // expected-error {{method was declared as an 'init' method, but its implementation doesn't match because its result type is not an object pointer}} - (void) init31 {} // expected-error {{method was declared as an 'init' method, but its implementation doesn't match because its result type is not an object pointer}} \ - // expected-warning{{ method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} + // expected-warning{{method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} - (void) init41 {} // expected-error {{method was declared as an 'init' method, but its implementation doesn't match because its result type is not an object pointer}} \ - // expected-warning{{ method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} + // expected-warning{{method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} - (void) init51 {} - (Test8_incomplete*) init02 { return 0; } // expected-error {{init methods must return a type related to the receiver type}} \ @@ -403,7 +403,7 @@ struct Test19 *const test19b = 0; void test19(void) { id x; x = (id) test19a; // expected-error {{bridged cast}} \ - // expected-note{{use __bridge to convert directly (no change in ownership))}} \ + // expected-note{{use __bridge to convert directly (no change in ownership)}} \ // expected-note{{use __bridge_transfer to transfer ownership of a +1 'struct Test19 *' into ARC}} x = (id) test19b; // expected-error {{bridged cast}} \ // expected-note{{use __bridge to convert directly (no change in ownership)}} \ diff --git a/test/SemaObjC/attr-deprecated.m b/test/SemaObjC/attr-deprecated.m index 571bd30e123..42bffa88111 100644 --- a/test/SemaObjC/attr-deprecated.m +++ b/test/SemaObjC/attr-deprecated.m @@ -77,8 +77,8 @@ void t4(Class c) int t5() { Bar *f; - f.FooBar = 1; // expected-warning {{warning: 'FooBar' is deprecated}} - return f.FooBar; // expected-warning {{warning: 'FooBar' is deprecated}} + f.FooBar = 1; // expected-warning {{'FooBar' is deprecated}} + return f.FooBar; // expected-warning {{'FooBar' is deprecated}} } @@ -99,10 +99,10 @@ __attribute ((deprecated)) @interface DEPRECATED (Category2) // no warning. @end -@implementation DEPRECATED (Category2) // expected-warning {{warning: 'DEPRECATED' is deprecated}} +@implementation DEPRECATED (Category2) // expected-warning {{'DEPRECATED' is deprecated}} @end -@interface NS : DEPRECATED // expected-warning {{warning: 'DEPRECATED' is deprecated}} +@interface NS : DEPRECATED // expected-warning {{'DEPRECATED' is deprecated}} @end diff --git a/test/SemaObjC/blocks.m b/test/SemaObjC/blocks.m index 2d77a20fce0..7beec19ea78 100644 --- a/test/SemaObjC/blocks.m +++ b/test/SemaObjC/blocks.m @@ -45,10 +45,10 @@ void foo7(id (^x)(int)) { @end void foo8() { - void *P = ^(itf x) {}; // expected-error {{Objective-C interface type 'itf' cannot be passed by value; did you forget * in 'itf'}} - P = ^itf(int x) {}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} - P = ^itf() {}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} - P = ^itf{}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} + void *P = ^(itf x) {}; // expected-error {{interface type 'itf' cannot be passed by value; did you forget * in 'itf'}} + P = ^itf(int x) {}; // expected-error {{interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} + P = ^itf() {}; // expected-error {{interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} + P = ^itf{}; // expected-error {{interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} } diff --git a/test/SemaObjC/call-super-2.m b/test/SemaObjC/call-super-2.m index d77b759ffa7..3c45a2c7323 100644 --- a/test/SemaObjC/call-super-2.m +++ b/test/SemaObjC/call-super-2.m @@ -68,8 +68,8 @@ id objc_getClass(const char *s); } - (int) instance_func1 { - int i = (size_t)[self instance_func0]; // expected-warning {{instance method '-instance_func0' not found (return type defaults to 'id'))}} - return i + (size_t)[super instance_func0]; // expected-warning {{'Object' may not respond to 'instance_func0')}} + int i = (size_t)[self instance_func0]; // expected-warning {{instance method '-instance_func0' not found (return type defaults to 'id')}} + return i + (size_t)[super instance_func0]; // expected-warning {{'Object' may not respond to 'instance_func0'}} } - (int) instance_func2 { diff --git a/test/SemaObjC/category-1.m b/test/SemaObjC/category-1.m index f2d4abd5aeb..7df85da5009 100644 --- a/test/SemaObjC/category-1.m +++ b/test/SemaObjC/category-1.m @@ -72,7 +72,7 @@ @interface MultipleCat_I() <MultipleCat_P> @end @implementation MultipleCat_I // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} @end // <rdar://problem/7680391> - Handle nameless categories with no name that refer diff --git a/test/SemaObjC/class-extension-dup-methods.m b/test/SemaObjC/class-extension-dup-methods.m index 452d242888a..692ff8c68a0 100644 --- a/test/SemaObjC/class-extension-dup-methods.m +++ b/test/SemaObjC/class-extension-dup-methods.m @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s @interface Foo -- (int) garf; // expected-note {{ previous declaration is here}} +- (int) garf; // expected-note {{previous declaration is here}} - (int) OK; -+ (int) cgarf; // expected-note {{ previous declaration is here}} ++ (int) cgarf; // expected-note {{previous declaration is here}} - (int) InstMeth; @end diff --git a/test/SemaObjC/compare-qualified-id.m b/test/SemaObjC/compare-qualified-id.m index ce0db191ea9..e195640d2bb 100644 --- a/test/SemaObjC/compare-qualified-id.m +++ b/test/SemaObjC/compare-qualified-id.m @@ -24,7 +24,7 @@ extern NSString * const NSTaskDidTerminateNotification; @end @implementation XCPropertyExpansionContext // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} - (NSString *)expandedValueForProperty:(NSString *)property { id <XCPropertyValues> cachedValueNode = [_propNamesToPropValuesCache objectForKey:property]; // expected-warning {{method '-objectForKey:' not found (return type defaults to 'id')}} if (cachedValueNode == ((void *)0)) { } diff --git a/test/SemaObjC/comptypes-1.m b/test/SemaObjC/comptypes-1.m index 98107eef215..997ef19c1b4 100644 --- a/test/SemaObjC/comptypes-1.m +++ b/test/SemaObjC/comptypes-1.m @@ -42,7 +42,7 @@ int main() MyProtocol), but not from an 'id' or from a 'MyOtherClass *' (which implements MyProtocol). */ obj_p = obj; /* Ok */ - obj_p = obj_c; // expected-warning {{ assigning to 'id<MyProtocol>' from incompatible type 'MyClass *'}} + obj_p = obj_c; // expected-warning {{assigning to 'id<MyProtocol>' from incompatible type 'MyClass *'}} obj_p = obj_cp; /* Ok */ obj_p = obj_C; // expected-warning {{incompatible pointer types assigning to 'id<MyProtocol>' from 'Class'}} diff --git a/test/SemaObjC/comptypes-7.m b/test/SemaObjC/comptypes-7.m index ef0f158c49e..dde504b8606 100644 --- a/test/SemaObjC/comptypes-7.m +++ b/test/SemaObjC/comptypes-7.m @@ -28,7 +28,7 @@ int main() obj = j; // expected-warning {{incompatible pointer types assigning to 'id' from 'int *'}} obj_p = i; // expected-warning {{incompatible integer to pointer conversion assigning to 'id<MyProtocol>' from 'int'}} - obj_p = j; // expected-warning {{ incompatible pointer types assigning to 'id<MyProtocol>' from 'int *'}} + obj_p = j; // expected-warning {{incompatible pointer types assigning to 'id<MyProtocol>' from 'int *'}} obj_c = i; // expected-warning {{incompatible integer to pointer conversion assigning to 'MyClass *' from 'int'}} obj_c = j; // expected-warning {{incompatible pointer types assigning to 'MyClass *' from 'int *'}} @@ -42,7 +42,7 @@ int main() i = obj_C; // expected-warning {{incompatible pointer to integer conversion assigning to 'int' from 'Class'}} j = obj; // expected-warning {{incompatible pointer types assigning to 'int *' from 'id'}} - j = obj_p; // expected-warning {{ incompatible pointer types assigning to 'int *' from 'id<MyProtocol>'}} + j = obj_p; // expected-warning {{incompatible pointer types assigning to 'int *' from 'id<MyProtocol>'}} j = obj_c; // expected-warning {{incompatible pointer types assigning to 'int *' from 'MyClass *'}} j = obj_C; // expected-warning {{incompatible pointer types assigning to 'int *' from 'Class'}} diff --git a/test/SemaObjC/conditional-expr-3.m b/test/SemaObjC/conditional-expr-3.m index 3b5f609e421..166e02be9e4 100644 --- a/test/SemaObjC/conditional-expr-3.m +++ b/test/SemaObjC/conditional-expr-3.m @@ -31,7 +31,7 @@ void f2(id<P1> x) { } void f3(A *a) { - id<P1> l = a; // expected-warning {{ initializing 'id<P1>' with an expression of incompatible type 'A *'}} + id<P1> l = a; // expected-warning {{initializing 'id<P1>' with an expression of incompatible type 'A *'}} } void f4(int cond, id x, A *a) { diff --git a/test/SemaObjC/conditional-expr.m b/test/SemaObjC/conditional-expr.m index 74ab59bdb9e..f97224fe7af 100644 --- a/test/SemaObjC/conditional-expr.m +++ b/test/SemaObjC/conditional-expr.m @@ -21,7 +21,7 @@ @end @interface DTFilterOutputStream2 -- nextOutputStream; // expected-note {{{{method definition for 'nextOutputStream' not found}} +- nextOutputStream; // expected-note {{method definition for 'nextOutputStream' not found}} @end @implementation DTFilterOutputStream2 // expected-warning {{incomplete implementation}} @@ -100,7 +100,7 @@ void f8(int a, A<P0> *x, A *y) { } void f9(int a, A<P0> *x, A<P1> *y) { - id l0 = (a ? x : y ); // expected-warning {{incompatible operand types ('A<P0> *' and 'A<P1> *')'}} + id l0 = (a ? x : y ); // expected-warning {{incompatible operand types ('A<P0> *' and 'A<P1> *')}} A<P0> *l1 = (a ? x : y ); // expected-warning {{incompatible operand types ('A<P0> *' and 'A<P1> *')}} A<P1> *l2 = (a ? x : y ); // expected-warning {{incompatible operand types ('A<P0> *' and 'A<P1> *')}} [ (a ? x : y ) intProp ]; // expected-warning {{incompatible operand types ('A<P0> *' and 'A<P1> *')}} diff --git a/test/SemaObjC/gcc-cast-ext.m b/test/SemaObjC/gcc-cast-ext.m index 599e37d7783..d023302bf58 100644 --- a/test/SemaObjC/gcc-cast-ext.m +++ b/test/SemaObjC/gcc-cast-ext.m @@ -5,8 +5,8 @@ typedef struct _NSRange { } NSRange; @class PBXFileReference; @interface PBXDocBookmark -+ alloc; // expected-note {{{{method definition for 'alloc' not found}} -- autorelease; // expected-note {{{{method definition for 'autorelease' not found}} ++ alloc; // expected-note {{method definition for 'alloc' not found}} +- autorelease; // expected-note {{method definition for 'autorelease' not found}} @end // GCC allows pointer expressions in integer constant expressions. diff --git a/test/SemaObjC/invalid-objc-decls-1.m b/test/SemaObjC/invalid-objc-decls-1.m index 91bd8a8c869..46338bb4bec 100644 --- a/test/SemaObjC/invalid-objc-decls-1.m +++ b/test/SemaObjC/invalid-objc-decls-1.m @@ -27,8 +27,8 @@ struct whatever { } @end -Super foo( // expected-error{{interface interface type 'Super' cannot be returned by value; did you forget * in 'Super'}} - Super parm1) { // expected-error{{interface interface type 'Super' cannot be passed by value; did you forget * in 'Super'}} +Super foo( // expected-error{{interface type 'Super' cannot be returned by value; did you forget * in 'Super'}} + Super parm1) { // expected-error{{interface type 'Super' cannot be passed by value; did you forget * in 'Super'}} Super p1; // expected-error{{interface type cannot be statically allocated}} return p1; } diff --git a/test/SemaObjC/ivar-lookup.m b/test/SemaObjC/ivar-lookup.m index c781a56d76c..f9a7b35cefe 100644 --- a/test/SemaObjC/ivar-lookup.m +++ b/test/SemaObjC/ivar-lookup.m @@ -29,7 +29,7 @@ extern struct foo x; @implementation A - (int*)method { - int *ip = [Ivar method]; // expected-warning{{warning: incompatible pointer types initializing 'int *' with an expression of type 'float *'}} + int *ip = [Ivar method]; // expected-warning{{incompatible pointer types initializing 'int *' with an expression of type 'float *'}} // Note that there is no warning in Objective-C++ return 0; } diff --git a/test/SemaObjC/method-bad-param.m b/test/SemaObjC/method-bad-param.m index 0a1b1cd0678..c58cfcf80fb 100644 --- a/test/SemaObjC/method-bad-param.m +++ b/test/SemaObjC/method-bad-param.m @@ -7,21 +7,21 @@ @end @interface bar --(void) my_method:(foo) my_param; // expected-error {{Objective-C interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} -- (foo)cccccc:(long)ddddd; // expected-error {{Objective-C interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} +-(void) my_method:(foo) my_param; // expected-error {{interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} +- (foo)cccccc:(long)ddddd; // expected-error {{interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} @end @implementation bar --(void) my_method:(foo) my_param // expected-error {{Objective-C interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} +-(void) my_method:(foo) my_param // expected-error {{interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} { } -- (foo)cccccc:(long)ddddd // expected-error {{Objective-C interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} +- (foo)cccccc:(long)ddddd // expected-error {{interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} { } @end -void somefunc(foo x) {} // expected-error {{Objective-C interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} -foo somefunc2() {} // expected-error {{Objective-C interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} +void somefunc(foo x) {} // expected-error {{interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} +foo somefunc2() {} // expected-error {{interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} // rdar://6780761 void f0(foo *a0) { diff --git a/test/SemaObjC/method-not-defined.m b/test/SemaObjC/method-not-defined.m index ed68b22945c..22466f7dc34 100644 --- a/test/SemaObjC/method-not-defined.m +++ b/test/SemaObjC/method-not-defined.m @@ -9,5 +9,5 @@ void test() { [[Foo alloc] init]; // expected-warning {{class method '+alloc' not found (return type defaults to 'id')}} expected-warning {{instance method '-init' not found (return type defaults to 'id')}} [fooObj notdefined]; // expected-warning {{instance method '-notdefined' not found (return type defaults to 'id')}} - [obj whatever:1 :2 :3]; // expected-warning {{instance method '-whatever:::' not found (return type defaults to 'id'))}} + [obj whatever:1 :2 :3]; // expected-warning {{instance method '-whatever:::' not found (return type defaults to 'id')}} } diff --git a/test/SemaObjC/method-undef-category-warn-1.m b/test/SemaObjC/method-undef-category-warn-1.m index 532ecfca9e0..9ef83b2641b 100644 --- a/test/SemaObjC/method-undef-category-warn-1.m +++ b/test/SemaObjC/method-undef-category-warn-1.m @@ -4,8 +4,8 @@ @end @protocol P -- (void) Pmeth; // expected-note {{method declared here }} -- (void) Pmeth1; // expected-note {{method declared here }} +- (void) Pmeth; // expected-note {{method declared here}} +- (void) Pmeth1; // expected-note {{method declared here}} @end @interface MyClass1(CAT) <P> // expected-note {{required for direct or indirect protocol 'P'}} @@ -13,7 +13,7 @@ @end @implementation MyClass1(CAT) // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} - (void) Pmeth1{} @end @@ -22,7 +22,7 @@ @end @implementation MyClass1(DOG) // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} - (void) Pmeth {} @end diff --git a/test/SemaObjC/method-undef-extension-warn-1.m b/test/SemaObjC/method-undef-extension-warn-1.m index ade861e52ee..9701a2e5d5e 100644 --- a/test/SemaObjC/method-undef-extension-warn-1.m +++ b/test/SemaObjC/method-undef-extension-warn-1.m @@ -19,6 +19,6 @@ @end @implementation MyClass // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} - (void)Pmeth {} @end diff --git a/test/SemaObjC/missing-method-return-type.m b/test/SemaObjC/missing-method-return-type.m index b62a0466ad3..a0c10f6fc95 100644 --- a/test/SemaObjC/missing-method-return-type.m +++ b/test/SemaObjC/missing-method-return-type.m @@ -2,10 +2,10 @@ // rdar://9615045 @interface I -- initWithFoo:(id)foo; // expected-warning {{method has no return type specified; defaults to 'id' [-Wmissing-method-return-type]}} +- initWithFoo:(id)foo; // expected-warning {{method has no return type specified; defaults to 'id'}} @end @implementation I -- initWithFoo:(id)foo { return 0; } // expected-warning {{method has no return type specified; defaults to 'id' [-Wmissing-method-return-type]}} +- initWithFoo:(id)foo { return 0; } // expected-warning {{method has no return type specified; defaults to 'id'}} @end diff --git a/test/SemaObjC/no-protocol-option-tests.m b/test/SemaObjC/no-protocol-option-tests.m index 5d2da0af48e..311800f39a8 100644 --- a/test/SemaObjC/no-protocol-option-tests.m +++ b/test/SemaObjC/no-protocol-option-tests.m @@ -17,7 +17,7 @@ // Test2 @interface super - PMeth; @end @interface J : super <P> -- PMeth; // expected-note {{ method definition for 'PMeth' not found}} +- PMeth; // expected-note {{method definition for 'PMeth' not found}} @end @implementation J @end // expected-warning {{incomplete implementation}} diff --git a/test/SemaObjC/property-9.m b/test/SemaObjC/property-9.m index 4ef21cc145c..60c8fd19ddd 100644 --- a/test/SemaObjC/property-9.m +++ b/test/SemaObjC/property-9.m @@ -51,14 +51,14 @@ typedef signed char BOOL; // test parser recovery: rdar://6254579 @property ( // expected-note {{to match this '('}} - readonly getter=isAwesome) // expected-error {{error: expected ')'}} + readonly getter=isAwesome) // expected-error {{expected ')'}} int _awesome; @property (readonlyx) // expected-error {{unknown property attribute 'readonlyx'}} int _awesome2; @property ( // expected-note {{to match this '('}} - +) // expected-error {{error: expected ')'}} + +) // expected-error {{expected ')'}} int _awesome3; diff --git a/test/SemaObjC/property-lookup-in-id.m b/test/SemaObjC/property-lookup-in-id.m index 86da48e8510..b729a4d85d7 100644 --- a/test/SemaObjC/property-lookup-in-id.m +++ b/test/SemaObjC/property-lookup-in-id.m @@ -25,7 +25,7 @@ extern id NSApp; - (void)startFSEventGathering:(id)sender { - fsEventStream = [NSApp delegate].fsEventStream; // expected-warning {{warning: instance method '-delegate' not found (return type defaults to 'id')}} \ + fsEventStream = [NSApp delegate].fsEventStream; // expected-warning {{instance method '-delegate' not found (return type defaults to 'id')}} \ // expected-error {{property 'fsEventStream' not found on object of type 'id'}} } diff --git a/test/SemaObjC/scope-check.m b/test/SemaObjC/scope-check.m index 3f474be6e8d..5b73be5851f 100644 --- a/test/SemaObjC/scope-check.m +++ b/test/SemaObjC/scope-check.m @@ -3,9 +3,9 @@ @class A, B, C; void test1() { - goto L; // expected-error{{illegal goto into protected scope}} - goto L2; // expected-error{{illegal goto into protected scope}} - goto L3; // expected-error{{illegal goto into protected scope}} + goto L; // expected-error{{goto into protected scope}} + goto L2; // expected-error{{goto into protected scope}} + goto L3; // expected-error{{goto into protected scope}} @try { // expected-note {{jump bypasses initialization of @try block}} L: ; } @catch (A *x) { // expected-note {{jump bypasses initialization of @catch block}} @@ -17,11 +17,11 @@ L3: ; } @try { - goto L4; // expected-error{{illegal goto into protected scope}} - goto L5; // expected-error{{illegal goto into protected scope}} + goto L4; // expected-error{{goto into protected scope}} + goto L5; // expected-error{{goto into protected scope}} } @catch (C *c) { // expected-note {{jump bypasses initialization of @catch block}} L5: ; - goto L6; // expected-error{{illegal goto into protected scope}} + goto L6; // expected-error{{goto into protected scope}} } @catch (B *c) { // expected-note {{jump bypasses initialization of @catch block}} L6: ; } @finally { // expected-note {{jump bypasses initialization of @finally block}} @@ -32,12 +32,12 @@ L3: ; @try { // expected-note 2 {{jump bypasses initialization of @try block}} L7: ; } @catch (C *c) { - goto L7; // expected-error{{illegal goto into protected scope}} + goto L7; // expected-error{{goto into protected scope}} } @finally { - goto L7; // expected-error{{illegal goto into protected scope}} + goto L7; // expected-error{{goto into protected scope}} } - goto L8; // expected-error{{illegal goto into protected scope}} + goto L8; // expected-error{{goto into protected scope}} @try { } @catch (A *c) { } @catch (B *c) { @@ -47,7 +47,7 @@ L3: ; // rdar://6810106 id X; - goto L9; // expected-error{{illegal goto into protected scope}} + goto L9; // expected-error{{goto into protected scope}} goto L10; // ok @synchronized // expected-note {{jump bypasses initialization of @synchronized block}} ( ({ L10: ; X; })) { @@ -79,7 +79,7 @@ void test3() { + (void) hello { @try { - goto blargh; // expected-error {{illegal goto into protected scope}} + goto blargh; // expected-error {{goto into protected scope}} } @catch (...) { // expected-note {{jump bypasses initialization of @catch block}} blargh: ; } @@ -87,14 +87,14 @@ void test3() { + (void)meth2 { int n; void *P; - goto L0; // expected-error {{illegal goto into protected scope}} + goto L0; // expected-error {{goto into protected scope}} typedef int A[n]; // expected-note {{jump bypasses initialization of VLA typedef}} L0: - goto L1; // expected-error {{illegal goto into protected scope}} + goto L1; // expected-error {{goto into protected scope}} A b, c[10]; // expected-note 2 {{jump bypasses initialization of variable length array}} L1: - goto L2; // expected-error {{illegal goto into protected scope}} + goto L2; // expected-error {{goto into protected scope}} A d[n]; // expected-note {{jump bypasses initialization of variable length array}} L2: return; diff --git a/test/SemaObjC/special-dep-unavail-warning.m b/test/SemaObjC/special-dep-unavail-warning.m index 91641114418..754bf5f4cb6 100644 --- a/test/SemaObjC/special-dep-unavail-warning.m +++ b/test/SemaObjC/special-dep-unavail-warning.m @@ -50,6 +50,6 @@ __attribute ((deprecated)) @end void foo() { - [DEPRECATED new]; // expected-warning {{warning: 'DEPRECATED' is deprecated}} + [DEPRECATED new]; // expected-warning {{'DEPRECATED' is deprecated}} } diff --git a/test/SemaObjC/super.m b/test/SemaObjC/super.m index 0c42e99d715..cf48c196db2 100644 --- a/test/SemaObjC/super.m +++ b/test/SemaObjC/super.m @@ -21,7 +21,7 @@ void takevoidptr(void*); @implementation B - (void)instanceMethod { - [super iMethod]; // expected-warning{{'A' may not respond to 'iMethod')}} + [super iMethod]; // expected-warning{{'A' may not respond to 'iMethod'}} // Use of super in a block is ok and does codegen to the right thing. // rdar://7852959 diff --git a/test/SemaObjC/try-catch.m b/test/SemaObjC/try-catch.m index da06eca4702..5afbbb6c32e 100644 --- a/test/SemaObjC/try-catch.m +++ b/test/SemaObjC/try-catch.m @@ -40,7 +40,7 @@ typedef struct _NSZone NSZone; int foo() { struct s { int a, b; } agg, *pagg; - @throw 42; // expected-error {{@throw requires an Objective-C object type ('int' invalid))}} + @throw 42; // expected-error {{@throw requires an Objective-C object type ('int' invalid)}} @throw agg; // expected-error {{@throw requires an Objective-C object type ('struct s' invalid)}} @throw pagg; // expected-error {{@throw requires an Objective-C object type ('struct s *' invalid)}} @throw; // expected-error {{@throw (rethrow) used outside of a @catch block}} diff --git a/test/SemaObjC/undef-protocol-methods-1.m b/test/SemaObjC/undef-protocol-methods-1.m index 44d384c6394..c685fdbcbe5 100644 --- a/test/SemaObjC/undef-protocol-methods-1.m +++ b/test/SemaObjC/undef-protocol-methods-1.m @@ -29,7 +29,7 @@ @end @implementation INTF // expected-warning {{incomplete implementation}} \ - // expected-warning 9 {{method in protocol not implemented [-Wprotocol}} + // expected-warning 9 {{method in protocol not implemented}} - (void) DefP1proto{} + (void) DefClsP3Proto{} diff --git a/test/SemaObjC/warn-implicit-atomic-property.m b/test/SemaObjC/warn-implicit-atomic-property.m index ec8e84e20f0..00e0c771d0f 100644 --- a/test/SemaObjC/warn-implicit-atomic-property.m +++ b/test/SemaObjC/warn-implicit-atomic-property.m @@ -8,6 +8,6 @@ @property int P3; // expected-note {{property declared here}} @end -@implementation Super // expected-warning {{property is assumed atomic when auto-synthesizing the property [-Wimplicit-atomic-properties]}} -@synthesize P,P1,P2; // expected-warning {{property is assumed atomic by default [-Wimplicit-atomic-properties]}} +@implementation Super // expected-warning {{property is assumed atomic when auto-synthesizing the property}} +@synthesize P,P1,P2; // expected-warning {{property is assumed atomic by default}} @end diff --git a/test/SemaObjC/warn-strict-selector-match.m b/test/SemaObjC/warn-strict-selector-match.m index 8ac0ca46ac4..34f1712f8b5 100644 --- a/test/SemaObjC/warn-strict-selector-match.m +++ b/test/SemaObjC/warn-strict-selector-match.m @@ -8,7 +8,7 @@ -(float) method; // expected-note {{also found}} @end -int main() { [(id)0 method]; } // expected-warning {{multiple methods named 'method' found [-Wstrict-selector-match]}} +int main() { [(id)0 method]; } // expected-warning {{multiple methods named 'method' found}} @interface Object @end @@ -24,7 +24,7 @@ id foo(void) { Object *obj = 0; id obj2 = obj; [obj setWindow:0]; // expected-warning {{Object' may not respond to 'setWindow:'}} - [obj2 setWindow:0]; // expected-warning {{multiple methods named 'setWindow:' found [-Wstrict-selector-match]}} + [obj2 setWindow:0]; // expected-warning {{multiple methods named 'setWindow:' found}} return obj; } @@ -54,7 +54,7 @@ id foo(void) { } + (NTGridDataObject*)dataObject:(id<MyObject, MyCoding>)data { - NTGridDataObject *result = [(id)0 initWithData:data]; // expected-warning {{multiple methods named 'initWithData:' found [-Wstrict-selector-match]}} \ + NTGridDataObject *result = [(id)0 initWithData:data]; // expected-warning {{multiple methods named 'initWithData:' found}} \ expected-warning {{sending 'id<MyObject,MyCoding>' to parameter of incompatible type 'Object *'}} return result; } diff --git a/test/SemaObjCXX/warn-strict-selector-match.mm b/test/SemaObjCXX/warn-strict-selector-match.mm index 6d315db27cb..330b10b471b 100644 --- a/test/SemaObjCXX/warn-strict-selector-match.mm +++ b/test/SemaObjCXX/warn-strict-selector-match.mm @@ -13,6 +13,6 @@ void foo(void) { id r; - [r meth1:r]; // expected-warning {{multiple methods named 'meth1:' found [-Wstrict-selector-match]}} - [r window]; // expected-warning {{multiple methods named 'window' found [-Wstrict-selector-match]}} + [r meth1:r]; // expected-warning {{multiple methods named 'meth1:' found}} + [r window]; // expected-warning {{multiple methods named 'window' found}} } diff --git a/test/SemaTemplate/explicit-instantiation.cpp b/test/SemaTemplate/explicit-instantiation.cpp index 63016fd7156..dae5c36b707 100644 --- a/test/SemaTemplate/explicit-instantiation.cpp +++ b/test/SemaTemplate/explicit-instantiation.cpp @@ -94,6 +94,6 @@ namespace PR7622 { template<typename,typename> struct basic_streambuf{friend bob<>()}; // expected-error{{unknown type name 'bob'}} \ - // expected-error{{ expected member name or ';' after declaration specifiers}} + // expected-error{{expected member name or ';' after declaration specifiers}} template struct basic_streambuf<int>; } diff --git a/test/SemaTemplate/friend.cpp b/test/SemaTemplate/friend.cpp index 99685f2396c..e78a067ef8f 100644 --- a/test/SemaTemplate/friend.cpp +++ b/test/SemaTemplate/friend.cpp @@ -28,6 +28,6 @@ namespace PR6770 { template <class T> void f() { friend class f; // expected-error{{'friend' used outside of class}} - friend class f1; // expected-error{{ 'friend' used outside of class}} + friend class f1; // expected-error{{'friend' used outside of class}} } } diff --git a/test/SemaTemplate/instantiate-expr-5.cpp b/test/SemaTemplate/instantiate-expr-5.cpp index 6cdedda4d88..13b7eae21fd 100644 --- a/test/SemaTemplate/instantiate-expr-5.cpp +++ b/test/SemaTemplate/instantiate-expr-5.cpp @@ -6,7 +6,7 @@ int y() { return x<int>(1); } namespace PR5880 { template<typename T> struct A { - static const int a = __builtin_offsetof(T, a.array[5].m); // expected-error{{error: no member named 'a' in 'HasM'}} + static const int a = __builtin_offsetof(T, a.array[5].m); // expected-error{{no member named 'a' in 'HasM'}} }; struct HasM { float m; -- GitLab