HomePhabricator

[clang][Sema] Use enumerator instead of hard-coded constant

Authored by miyuki on Sep 24 2020, 2:22 AM.

Description

[clang][Sema] Use enumerator instead of hard-coded constant

Sema::DiagnoseSwiftName uses the constant 12 instead of the
corresponding enumerator ExpectedFunctionWithProtoType. This is
fragile and will fail if a new value gets added in the middle of the
enum.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D88164

Details