brintos

brintos / llvm-project-archived public Read only

0
0
Text · 410 B · 89d9091 Raw
29 lines · plain
1// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only \2// RUN:            -fcuda-is-device %s3// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only %s4 5// expected-no-diagnostics6 7#include "Inputs/cuda.h"8 9class A10{11public:12    constexpr virtual int f() = 0;13};14 15class B : public A16{17public:18    int f() override19    {20        return 42;21    }22};23 24int test()25{26    B b;27    return b.f();28}29