[all-commits] [llvm/llvm-project] 8cc842: [clang][Sema] Use enumerator instead of hard-coded...
Mikhail Maltsev via All-commits
all-commits at lists.llvm.org
Thu Sep 24 02:24:48 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 8cc842a95072aaa87b5067a12aa9ef5b3ac8e592
https://github.com/llvm/llvm-project/commit/8cc842a95072aaa87b5067a12aa9ef5b3ac8e592
Author: Mikhail Maltsev <mikhail.maltsev at arm.com>
Date: 2020-09-24 (Thu, 24 Sep 2020)
Changed paths:
M clang/lib/Sema/SemaDeclAttr.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list