Skip to content

extent of MacroDefinition cursor is wrong #10019

@llvmbot

Description

@llvmbot
Bugzilla Link 9647
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @tkremenek

Extended Description

There are actually two issues:

  1. For normal (C, C++) declarators it has been decided to report the extent start as the first token of the declaration specifier.
    I would argue that for macro definitions, the extent start should fall on the '#' token / character.

  2. For a macro definition "#define FOO() ", the range end is reported to not include the parens. When I change it to "#define FOO () " (i.e. insert a whitespace), the parens are included, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions