diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-12-26 15:00:45 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-12-26 15:00:45 +0000 |
commit | 70316a065bcf11c88143e22c88d530ebd320832f (patch) | |
tree | e74e3cd758435693f175a7bea8892c69db747b30 /test/SemaCXX/nested-name-spec.cpp | |
parent | 4bcd44d3b38a9aece40142ea54c07288eb0517f6 (diff) |
Add support for out-of-line definitions of conversion functions and member operators
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61442 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/nested-name-spec.cpp')
-rw-r--r-- | test/SemaCXX/nested-name-spec.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp index 7422066247..b48207345a 100644 --- a/test/SemaCXX/nested-name-spec.cpp +++ b/test/SemaCXX/nested-name-spec.cpp @@ -103,3 +103,23 @@ namespace E { } } } + + +class Operators { + Operators operator+(const Operators&) const; // expected-note{{member declaration nearly matches}} + operator bool(); +}; + +Operators Operators::operator+(const Operators&) { // expected-error{{out-of-line definition does not match any declaration in 'Operators'}} + Operators ops; + return ops; +} + +Operators Operators::operator+(const Operators&) const { + Operators ops; + return ops; +} + +Operators::operator bool() { + return true; +} |