1 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -cl-std=c++ -fsyntax-only -verify
3 // Test that virtual functions and abstract classes are rejected.
4 class virtual_functions {
6 //expected-error@-1 {{virtual functions are not supported in OpenCL C++}}
8 virtual void bad2() = 0;
9 //expected-error@-1 {{virtual functions are not supported in OpenCL C++}}
10 //expected-error@-2 {{'bad2' is not virtual and cannot be declared pure}}
16 //expected-error@-1 {{virtual functions are not supported in OpenCL C++}}
19 // Test that virtual base classes are allowed.
25 struct B : virtual A {
29 struct C : public virtual A {
37 kernel void virtual_inheritance() {