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

anonymous-struct.cpp « SemaCXX « test « clang - github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dfa284ae8b52b1e1607c476fc5cf3c5f6abdacb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
// RUN: %clang_cc1 -fsyntax-only -verify %s

struct S {
  S();  // expected-note {{because type 'S' has a user-declared constructor}}    
};

struct E {
  struct {
    S x;  // expected-error {{anonymous struct member 'x' has a non-trivial constructor}} 
  };
};