[llvm-bugs] [Bug 50951] New: Completion for designated initializers of anonymous structures

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 30 19:45:51 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50951

            Bug ID: 50951
           Summary: Completion for designated initializers of anonymous
                    structures
           Product: clang-tools-extra
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: clangd
          Assignee: unassignedclangbugs at nondot.org
          Reporter: michaelaganier at gmail.com
                CC: llvm-bugs at lists.llvm.org

Completion of nested initializers now works as of clangd version 13.0.0.

Unfortunately, it does not seem to support anonymous structures and unions.

struct test {
        struct {
                int x;
                struct {
                        int y;
                } nested;
        } nested;

        struct {
                int z,w;
        }; // anonymous struct
};

int main()
{
        struct test t = {
                .nested = { .x = 3, .nested = { .y = 6 }, }, // full completion
                . // no completion for anonymous struct members z,w 
        };

        return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210701/deeea677/attachment-0001.html>


More information about the llvm-bugs mailing list