filcab added a subscriber: filcab.

================
Comment at: test/CodeGen/wrapv-lshr-sanitize.c:1
@@ +1,2 @@
+// RUN: %clang_cc1 -fsanitize=shift-base -emit-llvm %s -o - -triple 
x86_64-linux-gnu -fwrapv | opt -instnamer -S | FileCheck %s
+
----------------
Do you really need `instnamer`?

================
Comment at: test/Sema/negative-shift-wrapv.c:9
@@ +8,3 @@
+  int i;
+  i = -1 << (WORD_BIT - 1); // no-warning
+}
----------------
It's a bit weird to have the test function be dead code, but I don't see a big 
problem anyway.

Do you need to do the whole `WORD_BIT` thing? I'd rather just shift -1 by 1 
(which is already UB in non -fwrapv world, but defined in -fwrapv world).


https://reviews.llvm.org/D23498



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to