teak-llvm/clang/test/SemaCXX/PR12778.cpp
Serge Pavlov d5489074e6 Avoid getting an argument of allocation function if it does not exist.
This is a fix to PR12778: in erroneous code an allocation function
can be declared with no arguments, quering the first argument in this case
causes assertion violation.

llvm-svn: 190751
2013-09-14 12:00:01 +00:00

8 lines
214 B
C++

// RUN: %clang_cc1 -fsyntax-only -verify %s
void operator delete() throw(void*); // expected-error{{'operator delete' must have at least one parameter}}
void* allocate(int __n) {
return ::operator new(__n);
}