[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 14 12:45:06 PST 2018


aaron.ballman added inline comments.


================
Comment at: lib/Sema/SemaChecking.cpp:7725-7726
+    return true;
+  // Look through vector types, since we do default argument promotion for
+  // those in OpenCL.
+  if (const ExtVectorType *VecTy = From->getAs<ExtVectorType>())
----------------
Looking at `Sema::DefaultArgumentPromotion()`, it seems there is some special logic there for _Float16 vs half/fp16. Do we need to deal with that here as well?


================
Comment at: lib/Sema/SemaChecking.cpp:7727
+  // those in OpenCL.
+  if (const ExtVectorType *VecTy = From->getAs<ExtVectorType>())
+    From = VecTy->getElementType();
----------------
Should use `const auto *` here and below.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D51211/new/

https://reviews.llvm.org/D51211





More information about the cfe-commits mailing list