Welcome to mirror list, hosted at ThFree Co, Russian Federation.

value-initialization.cpp « SemaCXX « test « clang - github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 10520fb8bba460531e4847db412a41b04993df72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x

struct A { // expected-error {{implicit default constructor for 'A' must explicitly initialize the const member 'i'}} \
  // expected-warning{{struct 'A' does not declare any constructor to initialize its non-modifiable members}}
     const int i;	// expected-note {{declared here}} \
  // expected-note{{const member 'i' will never be initialized}}
     virtual void f() { } 
};

int main () {
      (void)A(); // expected-note {{first required here}}
}