summaryrefslogtreecommitdiffstats
path: root/test/CXX/class/class.mem/p8-0x-pedantic.cpp
blob: a4b775c191d8807a9447d7e22d1452d381cf8d10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -fsyntax-only -std=c++0x -pedantic -verify %s 

namespace inline_extension {
  struct Base1 { 
    virtual void f() {}
  };

  struct B : Base1 {
    virtual void f() override {} // expected-warning {{'override' keyword only allowed in declarations, allowed as an extension}}
    virtual void g() final {} // expected-warning {{'final' keyword only allowed in declarations, allowed as an extension}}
    virtual void h() new {} // expected-warning {{'new' keyword only allowed in declarations, allowed as an extension}}
  };
}

OpenPOWER on IntegriCloud