mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 22:38:56 -04:00

CheckDesignatedInitializer wasn't taking into account the base classes when computing the index for the field in the derived class, which caused the test case to crash during IRGen because of a malformed AST. rdar://problem/26795040 Differential Revision: https://reviews.llvm.org/D28705 llvm-svn: 292245
13 lines
194 B
C++
13 lines
194 B
C++
// RUN: %clang_cc1 %s -std=c++1z -fsyntax-only -verify -Winitializer-overrides
|
|
// expected-no-diagnostics
|
|
|
|
struct B {
|
|
int x;
|
|
};
|
|
|
|
struct D : B {
|
|
int y;
|
|
};
|
|
|
|
void test() { D d = {1, .y = 2}; }
|