Warning, /sdk/clazy/docs/checks/README-unused-result-check.md is written in an unsupported language. File is not indexed.
0001 # unused-result-check
0002
0003 Warns about the unused return value of const member functions.
0004 for e.g.
0005 ```cpp
0006 class A : public QObject
0007 {
0008 Q_OBJECT
0009 public:
0010 int foo() const {
0011 return 5;
0012 }
0013 void bar() const {
0014 foo(); // Warn [Result of const member function is unused]
0015 }
0016 };
0017
0018 int main(int argc, char *argv[]) {
0019 A a;
0020 a.bar();
0021 return 0;
0022 }
0023
0024 ```