brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 2f7f1ad Raw
26 lines · cpp
1// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK2// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK3// RUN: %clang_cc1 -std=c++14 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK4// RUN: %clang_cc1 -std=c++17 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK5// RUN: %clang_cc1 -std=c++20 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK6// RUN: %clang_cc1 -std=c++23 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK7// RUN: %clang_cc1 -std=c++2c %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK8 9namespace cwg658 { // cwg658: 2.710 11void f(int* p1) {12  char* p2 = reinterpret_cast<char*>(p1);13}14 15} // namespace cwg65816 17// We're checking that p1 is stored into p2 without changes.18 19// CHECK-LABEL: define {{.*}} void @cwg658::f(int*)(ptr noundef %p1)20// CHECK:         [[P1_ADDR:%.+]] = alloca ptr, align 821// CHECK-NEXT:    [[P2:%.+]] = alloca ptr, align 822// CHECK:         store ptr %p1, ptr [[P1_ADDR]]23// CHECK-NEXT:    [[TEMP:%.+]] = load ptr, ptr [[P1_ADDR]]24// CHECK-NEXT:    store ptr [[TEMP]], ptr [[P2]]25// CHECK-LABEL: }26