diff options
Diffstat (limited to 'test/FixIt/typo.cpp')
-rw-r--r-- | test/FixIt/typo.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/FixIt/typo.cpp b/test/FixIt/typo.cpp index d1e732f..f8b5352 100644 --- a/test/FixIt/typo.cpp +++ b/test/FixIt/typo.cpp @@ -1,7 +1,8 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s // RUN: cp %s %t -// RUN: %clang_cc1 -fsyntax-only -fixit -x c++ %t || true +// RUN: not %clang_cc1 -fsyntax-only -fixit -x c++ %t // RUN: %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ %t +// RUN: grep test_string %t namespace std { template<typename T> class basic_string { // expected-note 2{{'basic_string' declared here}} @@ -64,3 +65,12 @@ struct Derived : public Base { // expected-note{{base class 'Base' specified her int &Derived::getMember() { return ember; // expected-error{{use of undeclared identifier 'ember'; did you mean 'member'?}} } + +typedef int Integer; // expected-note{{'Integer' declared here}} +int global_value; // expected-note{{'global_value' declared here}} + +int foo() { + integer * i = 0; // expected-error{{unknown type name 'integer'; did you mean 'Integer'?}} + unsinged *ptr = 0; // expected-error{{use of undeclared identifier 'unsinged'; did you mean 'unsigned'?}} + return *i + *ptr + global_val; // expected-error{{use of undeclared identifier 'global_val'; did you mean 'global_value'?}} +} |