This is an archive of the discontinued LLVM Phabricator instance.

Allow the warning 'case value not in enumerated type' to be silenced
ClosedPublic

Authored by gribozavr on Dec 4 2013, 7:05 PM.

Details

Reviewers
doug.gregor
Summary

Allow the warning 'case value not in enumerated type' to be silenced with
the following pattern.

If 'case' expression refers to a static const variable of the correct enum
type, then we count this as a sufficient declaration of intent by the user,
so we silence the warning.

Diff Detail

Event Timeline

gribozavr updated this revision to Unknown Object (????).Dec 5 2013, 12:39 PM

Use ASTContext::hasSameUnqualifiedType().

gribozavr closed this revision.Dec 5 2013, 2:58 PM

Thank you for the review! Committed in r196546.