diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-04 16:12:48 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-04 16:12:48 +0000 |
commit | 0883ccd9eac3b974df00e6548ee319a7dd3646f4 (patch) | |
tree | d6a70c3518b8dea8be7062438d7e8676820ed17f /test/FixIt/fixit.cpp | |
parent | 60bfabcd8ce617297c0d231f77d14ab507e98796 (diff) |
Notes
Diffstat (limited to 'test/FixIt/fixit.cpp')
-rw-r--r-- | test/FixIt/fixit.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp index 79c294b1d9292..b9282c4d94811 100644 --- a/test/FixIt/fixit.cpp +++ b/test/FixIt/fixit.cpp @@ -1,11 +1,13 @@ -// RUN: %clang_cc1 -pedantic -Wall -fixit %s -o - | %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -x c++ - +// RUN: cp %s %t +// RUN: %clang_cc1 -pedantic -Wall -fixit -x c++ %t || true +// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -x c++ %t /* This is a test of the various code modification hints that are provided as part of warning or extension diagnostics. All of the warnings will be fixed by -fixit, and the resulting file should compile cleanly with -Werror -pedantic. */ -struct C1 { +struct C1 { virtual void f(); static void g(); }; @@ -40,3 +42,12 @@ class B : public A { void f() throw(); void f(); // expected-warning{{missing exception specification}} + +namespace rdar7853795 { + struct A { + bool getNumComponents() const; // expected-note{{declared here}} + void dump() const { + getNumComponenets(); // expected-error{{use of undeclared identifier 'getNumComponenets'; did you mean 'getNumComponents'?}} + } + }; +} |