Skip to content

Regression (r316268): erroneous -Wsign-compare for typeof(enum T) and typeof(enumValue) #35356

@hyp

Description

@hyp
Bugzilla Link 36008
Resolution FIXED
Resolved on Feb 08, 2018 05:19
Version trunk
OS All
Blocks #35152
CC @AaronBallman,@hyp,@efriedma-quic,@zmodem,@LebedevRI,@zygoloid

Extended Description

In LLVM 6 Clang reports -Wsign-compare:

comparison of integers of different signs: 'typeof (lhs)' (aka 'enum EnumTest') and 'typeof (kValue)' (aka 'int')

For the following sample:

enum EnumTest {
kValue = 0,
};

void foo(enum EnumTest lhs) {
typeof(lhs) x = lhs;
typeof(kValue) y = kValue;
x == y;
}

This is a regression after r316268.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclangClang issues not falling into any other category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions