Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
KDevelop
KDevelop
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 28
    • Merge Requests 28
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • KDevelop
  • KDevelopKDevelop
  • Merge Requests
  • !210

Merged
Opened Dec 22, 2020 by Milian Wolff@mwolffDeveloper

Allow inspecting sizes and alignment of types

  • Overview 13
  • Commits 1
  • Pipelines 4
  • Changes 12

Previously we only supported this information for class declarations and class members. But I find myself wanting to inspect this information frequently for other types too, most notably type aliases that instantiate a template.

Move the data from the ClassMemberDeclaration to the abstract type and set it for all C++/C types we encounter that have that data. Explicitly filter out function types, because we get strange data there with libclang: sizeof 1, alignof 4? In reality one cannot directly apply sizeof to a function anyways

Also only unalias the types in the navigation context instead of fully dereference them, as that would break the sizeof for pointers.

As this changes the layout of the on-disk DUChain data, we have to bump our cache version number and trigger a full reparse.

@igorkushnir @apol @dakon

Edited Dec 22, 2020 by Milian Wolff
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: kdevelop/kdevelop!210
Source branch: work/type-sizeof-alignof