mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 00:20:25 +08:00
[clang-tidy] hicpp-ignored-remove-result ignore functions with same prefixes as the target (#87587)
This commit is contained in:
@@ -14,9 +14,9 @@ IgnoredRemoveResultCheck::IgnoredRemoveResultCheck(llvm::StringRef Name,
|
||||
ClangTidyContext *Context)
|
||||
: UnusedReturnValueCheck(Name, Context,
|
||||
{
|
||||
"::std::remove",
|
||||
"::std::remove_if",
|
||||
"::std::unique",
|
||||
"::std::remove$",
|
||||
"::std::remove_if$",
|
||||
"::std::unique$",
|
||||
}) {
|
||||
// The constructor for ClangTidyCheck needs to have been called
|
||||
// before we can access options via Options.get().
|
||||
|
||||
@@ -210,6 +210,10 @@ Changes in existing checks
|
||||
- Improved :doc:`google-runtime-int <clang-tidy/checks/google/runtime-int>`
|
||||
check performance through optimizations.
|
||||
|
||||
- Improved :doc:`hicpp-ignored-remove-result <clang-tidy/checks/hicpp/ignored-remove-result>`
|
||||
check by ignoring other functions with same prefixes as the target specific
|
||||
functions.
|
||||
|
||||
- Improved :doc:`llvm-header-guard
|
||||
<clang-tidy/checks/llvm/header-guard>` check by replacing the local
|
||||
option `HeaderFileExtensions` by the global option of the same name.
|
||||
|
||||
@@ -15,6 +15,10 @@ ForwardIt unique(ForwardIt, ForwardIt);
|
||||
template <class InputIt, class T>
|
||||
InputIt find(InputIt, InputIt, const T&);
|
||||
|
||||
struct unique_disposable {
|
||||
void* release();
|
||||
};
|
||||
|
||||
class error_code {
|
||||
};
|
||||
|
||||
@@ -63,4 +67,6 @@ void noWarning() {
|
||||
// bugprone-unused-return-value's checked return types.
|
||||
errorFunc();
|
||||
(void) errorFunc();
|
||||
|
||||
std::unique_disposable{}.release();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user