[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

Anna Zaks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 9 11:26:03 PST 2016


zaks.anna added inline comments.


================
Comment at: lib/CodeGen/CGExpr.cpp:1222
+/// modes, it's safe to treat such a type as 'the builtin bool'.
+static bool isObjCBool(QualType Ty, const SourceManager &SM,
+                       const LangOptions &LO) {
----------------
Could you use the existing method for this? From NSAPI.h:

```
   // \brief Returns true if \param T is a typedef of "BOOL" in objective-c.
   bool isObjCBOOLType(QualType T) const;

```



https://reviews.llvm.org/D27607





More information about the cfe-commits mailing list