[PATCH] D78660: [SemaObjC] Add a warning for dictionary literals with duplicate keys
Erik Pilkington via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 5 06:25:52 PDT 2020
erik.pilkington marked an inline comment as done.
erik.pilkington added inline comments.
================
Comment at: clang/lib/Sema/SemaExprObjC.cpp:948
+ checkOneKey(IntegralKeys, Result.Val.getInt(), Loc);
+ }
+ }
----------------
bendjones wrote:
> rjmccall wrote:
> > Does `EvaluateAsInt` really just fail cleanly if the argument doesn't have integral type?
> I thought it fails if a type can’t be “some how” converted to an integral type. The loose quotes are key here.
Yeah, it checks if the expression has an integral type before evaluating: https://github.com/llvm/llvm-project/blob/1de4e5693317c1e34cae4740d6c9c6733e5ed3fd/clang/lib/AST/ExprConstant.cpp#L13830
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78660/new/
https://reviews.llvm.org/D78660
More information about the cfe-commits
mailing list