[clang-tools-extra] Fixed a false positive for pointer parameters used as placement-new storage (PR #207770)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 09:47:41 PDT 2026
================
@@ -433,3 +433,22 @@ void dependentInitInGenericLambdaMultiArg() {
DependentCtor2<T> s(p, p);
};
}
+
+namespace std { typedef decltype(sizeof(int)) size_t; }
+void* operator new(std::size_t, void*) noexcept;
----------------
zwuis wrote:
Create a mock header in `clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/std`, add this to the header, then `#include <new>`.
https://github.com/llvm/llvm-project/pull/207770
More information about the cfe-commits
mailing list