xref: /llvm-project/clang/test/CodeGenCXX/new-alias.cpp (revision 12f78e740c5419f7d1fbcf8f2106e7a40cd1d6f7)
1 // RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -std=c++11 -o - %s | FileCheck %s
2 
3 using size_t = decltype(sizeof(0));
4 
5 extern "C" char *something(long long x) {
6   return nullptr;
7 }
8 
9 // CHECK: @_Znwm ={{.*}} alias ptr (i64), ptr @something
10 void *operator new(size_t) __attribute__((alias("something")));
11 
12 // PR16715: don't assert here.
13 // CHECK: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4)
14 int *pr16715 = new int;
15