aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaOpenCLCXX/private-access-specifier.cpp
blob: 2aff2285e1c395fb03521399cf1bf2941ddc4717 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 %s -pedantic -verify -fsyntax-only

// Test that 'private' is not parsed as an address space qualifier
// in regular C++ mode.

struct B {
  virtual ~B() // expected-error{{expected ';' at end of declaration list}}
private:
   void foo();
   private int* i; // expected-error{{expected ':'}}
};

void bar(private int*); //expected-error{{variable has incomplete type 'void'}} expected-error{{expected expression}}