[clang] [clang] Build argument string for clang::warn_unused_result (PR #148090)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 11 06:25:22 PDT 2025
zebullax wrote:
@AaronBallman
To bypass verification on the standard version used (*), which do not seem to make too much sense here as we were allowing albeit dropping the string until now. I have extracted the `if (AL.isClangScope()) {` code path out of the rest of that branch that focuses on validating either CXX17 or CXX20...
Happy to accommodate other preferences (update/remove the unit tests) if you think those make more sense to you.
(*)
```
[ RUN ] ASTMatchersTests/ASTMatchersTest.Attr/CXX14_win
input.cc:1:10: error: use of the 'warn_unused_result' attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
1 | struct [[clang::warn_unused_result]] F{};
```
https://github.com/llvm/llvm-project/pull/148090
More information about the cfe-commits
mailing list