yvesdm3000 / ClangLib

Code::Blocks plugin integrating various features of LLVM Clang.
5 stars 4 forks source link

Code completion doesn't work for fields of unions/structures inside compound literals (in C) #8

Open yvesdm3000 opened 8 years ago

yvesdm3000 commented 8 years ago

Reported by I_inc:

Code completion doesn't work for fields of unions/structures inside compound literals (in C): Code: [Select]

typedef union mystruct_t_
{
  uint32_t raw;
  struct
  {
    uint32_t offset:12;
    uint32_t reserved:24;
  } fields;
} mystruct_t;

uint32_t const value =
      ((mystruct_t) { .fields.reserved = 1 }).raw;
//CC not working here ^