| Issue |
52838
|
| Summary |
readability-make-member-function-const: misses opportunity to make function const with extra parentheses in return statement
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
sfc-gh-sgiesecke
|
The clang-tidy check readability-make-member-function-const misses the opportunity to make function const with an extra parentheses in return statement, e.g.
```
struct Foo {
int getFoo() { return (m_bar); }
int m_bar;
};
```
When the extra parentheses are removed, it is diagnosed:
```
struct Foo {
int getFoo() { return m_bar; }
int m_bar;
};
```
See https://godbolt.org/z/sMKKfPaqq
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs