[PATCH] D50467: [SEMA] add more -Wfloat-conversion to compound assigment analysis

Pirama Arumuga Nainar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 8 15:30:11 PDT 2018


pirama added inline comments.


================
Comment at: lib/Sema/SemaChecking.cpp:10411
+                        ->getAs<BuiltinType>();
+  if (!ResultBT || !(RBT && RBT->isFloatingPoint())) return;
+
----------------
Add a comment explaining this conditional as well?  

> Return if source and target types are unavailable or if source is not a floating point.

With the comment, it might be cleaner to read if you expand the negation: `!ResultBT || !RBT || !RBT->isFloatingPoint()`


Repository:
  rC Clang

https://reviews.llvm.org/D50467





More information about the cfe-commits mailing list