[clang] 0a789ea - Fix test from #83124 and #88902

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 12:13:56 PDT 2024


Author: erichkeane
Date: 2024-04-16T12:13:50-07:00
New Revision: 0a789ea8a829da345e46d8224d73b2ddaba6969f

URL: https://github.com/llvm/llvm-project/commit/0a789ea8a829da345e46d8224d73b2ddaba6969f
DIFF: https://github.com/llvm/llvm-project/commit/0a789ea8a829da345e46d8224d73b2ddaba6969f.diff

LOG: Fix test from #83124 and #88902

This just replaces an '#include<new>' with a declaration of array
placement new.

Added: 
    

Modified: 
    clang/test/SemaCXX/PR41441.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/SemaCXX/PR41441.cpp b/clang/test/SemaCXX/PR41441.cpp
index 0b012b33fce343..d0f2917e52f211 100644
--- a/clang/test/SemaCXX/PR41441.cpp
+++ b/clang/test/SemaCXX/PR41441.cpp
@@ -1,6 +1,9 @@
 // RUN: %clang --target=x86_64-pc-linux -S -fno-discard-value-names -emit-llvm -o - %s | FileCheck %s
 
-#include <new>
+namespace std {
+  using size_t = decltype(sizeof(int));
+};
+void* operator new[](std::size_t, void*) noexcept;
 
 // CHECK: call void @llvm.memset.p0.i64(ptr align 1 %x, i8 0, i64 8, i1 false)
 // CHECK: call void @llvm.memset.p0.i64(ptr align 16 %x, i8 0, i64 32, i1 false)


        


More information about the cfe-commits mailing list