File indexing completed on 2024-04-28 05:38:42

0001 #include <QtCore/QObject>
0002 #include <QtCore/QString>
0003 class Foo
0004 {
0005 public:
0006     Foo();
0007     Foo& operator=(Foo&);
0008     Foo& change();
0009     Foo changed() const; // Warn
0010     Foo chang2ed() const { return *this; }  // Warn
0011     Foo chang3ed() const; // Warn
0012 
0013     [[nodiscard]] Foo chang4ed() const;
0014     Foo toBar() const;
0015 private:
0016     Foo chang5ed() const { return *this; }
0017 
0018     class Bar {
0019     public:
0020         Bar changed() const { return *this; }
0021     };
0022 };
0023 
0024 Foo Foo::chang3ed() const // OK
0025 {
0026     return *this;
0027 }