1 | // RUN: %check_clang_tidy %s modernize-use-nodiscard %t -- \ |
---|---|
2 | // RUN: -config="{CheckOptions: {modernize-use-nodiscard.ReplacementString: 'CUSTOM_NO_DISCARD'}}" |
3 | |
4 | // As if the macro was not defined. |
5 | // #define CUSTOM_NO_DISCARD __attribute_((warn_unused_result)) |
6 | |
7 | class Foo |
8 | { |
9 | public: |
10 | bool f1() const; |
11 | // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: function 'f1' should be marked CUSTOM_NO_DISCARD [modernize-use-nodiscard] |
12 | }; |
13 | |
14 |