mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 22:06:38 +00:00

It seems we were forgetting to call `checkArgsForPlaceholders` on the placement arguments of new-expressions in Sema. I don't think that was intended—at least doing so doesn't seem to break anything—so this pr adds that. This also fixes #65053 --------- Co-authored-by: Erich Keane <ekeane@nvidia.com>
13 lines
278 B
C++
13 lines
278 B
C++
// RUN: %clang_cc1 -fsyntax-only -fms-extensions -verify %s -std=c++11
|
|
// expected-no-diagnostics
|
|
|
|
struct S {
|
|
void* operator new(__SIZE_TYPE__, int);
|
|
};
|
|
|
|
int main() {
|
|
// MSVC supports __noop with no arguments or (), so we do as well.
|
|
new (__noop) S;
|
|
new ((__noop)) S;
|
|
}
|