brintos

brintos / llvm-project-archived public Read only

0
0
Text · 368 B · 5776a94 Raw
12 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++112 3struct S {4  void* operator new(__SIZE_TYPE__, char*);5  void* operator new(__SIZE_TYPE__, __SIZE_TYPE__);6};7 8int main() {9  new (__builtin_strchr) S; // expected-error {{builtin functions must be directly called}}10  new ((__builtin_strlen)) S; // expected-error {{builtin functions must be directly called}}11}12