diff options
Diffstat (limited to 'clang/test/SemaCXX/nested-name-spec.cpp')
-rw-r--r-- | clang/test/SemaCXX/nested-name-spec.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp index 74220662474..b48207345a5 100644 --- a/clang/test/SemaCXX/nested-name-spec.cpp +++ b/clang/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; +} |