[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 12 10:42:22 PDT 2018
lebedev.ri added a comment.
Thank you for taking a look!
In https://reviews.llvm.org/D48958#1160381, @vsk wrote:
> I have some minor comments but overall I think this is in good shape. It would be great to see some compile-time numbers just to make sure this is tractable. I'm pretty sure -fsanitize=null would fire more often across a codebase than this check, so I don't anticipate a big surprise here.
Could you please clarify, which numbers are you looking for, specifically?
The time it takes to build llvm stage2 with `-fsanitize=implicit-cast`?
Or the time it takes to build llvm stage3 with compiler built with `-fsanitize=implicit-cast`?
(The numbers won't be too representable, whole stage-1 takes ~40 minutes here...)
================
Comment at: lib/CodeGen/CGExprScalar.cpp:351
+ ScalarConversionOpts()
+ : TreatBooleanAsSigned(false),
+ EmitImplicitIntegerTruncationChecks(false) {}
----------------
vsk wrote:
> Why not use default member initializers here (e.g, "bool a = false")?
I'll double-check, but i'm pretty sure then there were some warnings when i did that,
Or, the default needs to be defined in the actual declaration of `EmitScalarConversion()`, i think.
Repository:
rC Clang
https://reviews.llvm.org/D48958
More information about the cfe-commits
mailing list