struct Thing {
std::string something;
};
Run Code Online (Sandbox Code Playgroud)
Clang-tidy 抱怨:
warning: an exception may be thrown in function 'Thing' which should not throw exceptions [bugprone-exception-escape]
我知道该bugprone-exception-escape.FunctionsThatShouldNotThrow设置,但我不知道该放什么来抑制所有包含字符串的结构的警告。
有什么建议么?
这是检查中的一个错误,请参阅https://github.com/llvm/llvm-project/issues/54668,显然是在 LLVM 14 中引入的。根据问题描述,除了抑制它之外,您实际上无能为力每个班级单独。
如果这工作量太大,您可能需要考虑禁用检查,直到他们修复此问题。根据链接的问题,修复已在审核中:https://reviews.llvm.org/D134588
| 归档时间: |
|
| 查看次数: |
258 次 |
| 最近记录: |