[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 3 13:44:54 PDT 2018


xbolva00 added inline comments.


================
Comment at: lib/Sema/SemaChecking.cpp:10862
+  if (Source->isIntegerType() && Target->isFloatingType()) {
+    const llvm::fltSemantics *FloatSem = nullptr;
+    if (Target->isSpecificBuiltinType(BuiltinType::Float)) {
----------------
erichkeane wrote:
> Since there is only 1, and fltSemantics is really small (2 shorts + 2 uints), making this a 'by copy' is likely a better solution than a pointer.
llvm::fltSemantics has incomplete type and cannot be defined :/ Quite strange error


https://reviews.llvm.org/D52835





More information about the cfe-commits mailing list