[PATCH] D78660: [SemaObjC] Add a warning for dictionary literals with duplicate keys

Ben D. Jones via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 5 02:39:17 PDT 2020


bendjones accepted this revision.
bendjones marked an inline comment as done.
bendjones added a comment.
This revision is now accepted and ready to land.

This addresses what we had an issue with on the tin. I’ll defer to @rjmccall for the specifics at the clang level.



================
Comment at: clang/lib/Sema/SemaExprObjC.cpp:948
+        checkOneKey(IntegralKeys, Result.Val.getInt(), Loc);
+      }
+    }
----------------
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. 


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