brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · c7685fd Raw
31 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "2// RUN: %clang_cc1 -triple x86_64-linux -std=c++11 %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "3// RUN: %clang_cc1 -triple x86_64-linux -std=c++14 %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "4// RUN: %clang_cc1 -triple x86_64-linux -std=c++17 %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "5// RUN: %clang_cc1 -triple x86_64-linux -std=c++20 %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "6// RUN: %clang_cc1 -triple x86_64-linux -std=c++23 %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "7// RUN: %clang_cc1 -triple x86_64-linux -std=c++2c %s -pedantic-errors -emit-llvm -o - | FileCheck %s --implicit-check-not " call "8 9 10// cwg118: yes11 12struct S {13  virtual void f();14};15void (S::*pmf)();16 17// CHECK-LABEL: define {{.*}} @_Z1g18void g(S *sp) {19  // CHECK: call void %20  sp->f();        // 1: polymorphic21  // CHECK: call void @22  sp->S::f();     // 2: non-polymorphic23  // CHECK: call void @24  (sp->S::f)();   // 3: non-polymorphic25  // CHECK: call void %26  (sp->*pmf)();   // 4: polymorphic27  // CHECK: call void %28  (sp->*&S::f)(); // 5: polymorphic29}30 31