xref: /llvm-project/clang/test/SemaOpenCLCXX/private-access-specifier.cpp (revision 314fab6d7fa9554b77e311577ccd0c527053c6ce)
1 // RUN: %clang_cc1 %s -pedantic -verify -fsyntax-only
2 
3 // Test that 'private' is not parsed as an address space qualifier
4 // in regular C++ mode.
5 
6 struct B {
7   virtual ~B() // expected-error{{expected ';' at end of declaration list}}
8 private:
9    void foo();
10    private int* i; // expected-error{{expected ':'}}
11 };
12 
13 void bar(private int*); //expected-error{{variable has incomplete type 'void'}} expected-error{{expected expression}}
14