summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/FixIt/typo.c5
-rw-r--r--clang/test/FixIt/typo.cpp12
-rw-r--r--clang/test/FixIt/typo.m18
-rw-r--r--clang/test/Sema/var-redecl.c2
-rw-r--r--clang/test/SemaObjC/undef-class-messagin-error.m2
5 files changed, 20 insertions, 19 deletions
diff --git a/clang/test/FixIt/typo.c b/clang/test/FixIt/typo.c
index d36e769ed0a..72e3d658e7b 100644
--- a/clang/test/FixIt/typo.c
+++ b/clang/test/FixIt/typo.c
@@ -5,13 +5,14 @@ struct Point {
};
struct Rectangle {
- struct Point top_left, bottom_right;
+ struct Point top_left, // expected-note{{'top_left' declared here}}
+ bottom_right;
};
enum Color { Red, Green, Blue };
struct Window {
- struct Rectangle bounds;
+ struct Rectangle bounds; // expected-note{{'bounds' declared here}}
enum Color color;
};
diff --git a/clang/test/FixIt/typo.cpp b/clang/test/FixIt/typo.cpp
index 041b86a7f2c..ffeb18dde10 100644
--- a/clang/test/FixIt/typo.cpp
+++ b/clang/test/FixIt/typo.cpp
@@ -1,15 +1,15 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsyntax-only -fixit -o - %s | %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ -
namespace std {
- template<typename T> class basic_string {
- int find(const char *substr);
- static const int npos = -1;
+ template<typename T> class basic_string { // expected-note 2{{'basic_string' declared here}}
+ int find(const char *substr); // expected-note{{'find' declared here}}
+ static const int npos = -1; // expected-note{{'npos' declared here}}
};
- typedef basic_string<char> string;
+ typedef basic_string<char> string; // expected-note 2{{'string' declared here}}
}
-namespace otherstd {
+namespace otherstd { // expected-note 2{{'otherstd' declared here}}
using namespace std;
}
@@ -36,7 +36,7 @@ bool test_string(std::string s) {
struct Base { };
struct Derived : public Base {
- int member;
+ int member; // expected-note 3{{'member' declared here}}
Derived() : base(), // expected-error{{initializer 'base' does not name a non-static data member or base class; did you mean the base class 'Base'?}}
ember() { } // expected-error{{initializer 'ember' does not name a non-static data member or base class; did you mean the member 'member'?}}
diff --git a/clang/test/FixIt/typo.m b/clang/test/FixIt/typo.m
index cff5dd84ead..4c3ee5f60bc 100644
--- a/clang/test/FixIt/typo.m
+++ b/clang/test/FixIt/typo.m
@@ -12,24 +12,24 @@ void test() {
}
@protocol P1
-@property int *sprop;
+@property int *sprop; // expected-note{{'sprop' declared here}}
@end
@interface A
{
- int his_ivar;
+ int his_ivar; // expected-note 2{{'his_ivar' declared here}}
float wibble;
}
-@property int his_prop;
+@property int his_prop; // expected-note{{'his_prop' declared here}}
@end
@interface B : A <P1>
{
- int her_ivar;
+ int her_ivar; // expected-note 2{{'her_ivar' declared here}}
}
-@property int her_prop;
+@property int her_prop; // expected-note{{'her_prop' declared here}}
- (void)inst_method1:(int)a;
+ (void)class_method1;
@end
@@ -60,13 +60,13 @@ void test_message_send(B* b) {
[NSstring method:17]; // expected-error{{use of undeclared identifier 'NSstring'; did you mean 'NSString'?}}
}
-@interface Collide
+@interface Collide // expected-note{{'Collide' declared here}}
{
@public
- int value;
+ int value; // expected-note{{'value' declared here}}
}
-@property int value;
+@property int value; // expected-note{{'value' declared here}}
@end
@implementation Collide
@@ -81,7 +81,7 @@ void test2(Collide *a) {
@interface Derived : Collid // expected-error{{cannot find interface declaration for 'Collid', superclass of 'Derived'; did you mean 'Collide'?}}
@end
-@protocol NetworkSocket
+@protocol NetworkSocket // expected-note{{'NetworkSocket' declared here}}
- (int)send:(void*)buffer bytes:(int)bytes;
@end
diff --git a/clang/test/Sema/var-redecl.c b/clang/test/Sema/var-redecl.c
index e67499bcc4c..71d7ea1baee 100644
--- a/clang/test/Sema/var-redecl.c
+++ b/clang/test/Sema/var-redecl.c
@@ -50,7 +50,7 @@ void outer_shadowing_test() {
}
}
-void g18(void) {
+void g18(void) { // expected-note{{'g18' declared here}}
extern int g19;
}
int *p=&g19; // expected-error{{use of undeclared identifier 'g19'}} \
diff --git a/clang/test/SemaObjC/undef-class-messagin-error.m b/clang/test/SemaObjC/undef-class-messagin-error.m
index 2a6d240840f..63e0b9dec32 100644
--- a/clang/test/SemaObjC/undef-class-messagin-error.m
+++ b/clang/test/SemaObjC/undef-class-messagin-error.m
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-@interface _Child
+@interface _Child // expected-note{{'_Child' declared here}}
+ (int) flashCache;
@end
OpenPOWER on IntegriCloud