
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>
12 lines
368 B
C++
12 lines
368 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
|
|
|
|
struct S {
|
|
void* operator new(__SIZE_TYPE__, char*);
|
|
void* operator new(__SIZE_TYPE__, __SIZE_TYPE__);
|
|
};
|
|
|
|
int main() {
|
|
new (__builtin_strchr) S; // expected-error {{builtin functions must be directly called}}
|
|
new ((__builtin_strlen)) S; // expected-error {{builtin functions must be directly called}}
|
|
}
|