diff options
Diffstat (limited to 'clang/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp')
-rw-r--r-- | clang/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp b/clang/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp index 85e3e7ed08f..76ceea1d4d5 100644 --- a/clang/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp +++ b/clang/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp @@ -1,8 +1,10 @@ // RUN: %clang_cc1 -fsyntax-only -verify -Wno-c++0x-extensions %s -namespace fizbin { class Foobar; } // expected-note{{'fizbin::Foobar' declared here}} +namespace fizbin { class Foobar {}; } // expected-note 2 {{'fizbin::Foobar' declared here}} \ + // expected-note {{'Foobar' declared here}} Foobar *my_bar // expected-error{{unknown type name 'Foobar'; did you mean 'fizbin::Foobar'?}} - = new Foobar; // expected-error{{expected a type}} + = new Foobar; // expected-error{{unknown type name 'Foobar'; did you mean 'fizbin::Foobar'?}} +fizbin::Foobar *my_foo = new fizbin::FooBar; // expected-error{{unknown type name 'FooBar'; did you mean 'Foobar'?}} namespace barstool { int toFoobar() { return 1; } } // expected-note 3 {{'barstool::toFoobar' declared here}} int Double(int x) { return x + x; } @@ -62,11 +64,13 @@ void f() { // Test case from http://llvm.org/bugs/show_bug.cgi?id=10318 namespace llvm { - template <typename T> class GraphWriter {}; // expected-note{{'llvm::GraphWriter' declared here}} + template <typename T> class GraphWriter {}; // expected-note {{'llvm::GraphWriter' declared here}} \ + // expected-note {{'GraphWriter' declared here}} } struct S {}; void bar() { GraphWriter<S> x; //expected-error{{no template named 'GraphWriter'; did you mean 'llvm::GraphWriter'?}} - + (void)new llvm::GraphWriter; // expected-error {{expected a type}} + (void)new llvm::Graphwriter<S>; // expected-error {{no template named 'Graphwriter' in namespace 'llvm'; did you mean 'GraphWriter'?}} } |