Skip to content

Inconsistent line numbers between __LINE__ and clang SourceLocation #168526

@glugalug

Description

@glugalug

For multi-line macros, the SourceLocation of symbols generated by the macro expansion in the clang AST is the first line of the macro. But __LINE__ is expanding to the line number of the last line of it.

Should these be the same?

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"questionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!waiting-for-response

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions