diff options
Diffstat (limited to 'test/CXX/class/class.mem')
-rw-r--r-- | test/CXX/class/class.mem/p1b.cpp | 2 | ||||
-rw-r--r-- | test/CXX/class/class.mem/p5-0x.cpp | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/test/CXX/class/class.mem/p1b.cpp b/test/CXX/class/class.mem/p1b.cpp index d3493f6..3e8c985 100644 --- a/test/CXX/class/class.mem/p1b.cpp +++ b/test/CXX/class/class.mem/p1b.cpp @@ -16,7 +16,7 @@ public: void a3(int a = 42); - // CHEKC: error: use of undeclared identifier 'first' + // CHECK: error: use of undeclared identifier 'first' void a4(int a = first); // expected-error{{use of undeclared identifier 'first'}} class B { diff --git a/test/CXX/class/class.mem/p5-0x.cpp b/test/CXX/class/class.mem/p5-0x.cpp new file mode 100644 index 0000000..78560e2 --- /dev/null +++ b/test/CXX/class/class.mem/p5-0x.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s + +int f(); + +struct S +{ + int a = f(); // ok + int b = g(); // expected-error {{use of undeclared identifier 'g'}} +}; |