[PATCH] D25294: [ubsan] Un-templatize handleIntegerOverflowImpl (NFC)
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 5 16:14:52 PDT 2016
vsk created this revision.
vsk added a reviewer: rsmith.
vsk added a subscriber: llvm-commits.
Herald added a subscriber: kubabrecka.
https://reviews.llvm.org/D25294
Files:
lib/ubsan/ubsan_handlers.cc
Index: lib/ubsan/ubsan_handlers.cc
===================================================================
--- lib/ubsan/ubsan_handlers.cc
+++ lib/ubsan/ubsan_handlers.cc
@@ -103,9 +103,8 @@
}
/// \brief Common diagnostic emission for various forms of integer overflow.
-template <typename T>
static void handleIntegerOverflowImpl(OverflowData *Data, ValueHandle LHS,
- const char *Operator, T RHS,
+ const char *Operator, const Value &RHSVal,
ReportOptions Opts) {
SourceLocation Loc = Data->Loc.acquire();
bool IsSigned = Data->Type.isSignedIntegerTy();
@@ -120,7 +119,7 @@
Diag(Loc, DL_Error, "%0 integer overflow: "
"%1 %2 %3 cannot be represented in type %4")
<< (IsSigned ? "signed" : "unsigned")
- << Value(Data->Type, LHS) << Operator << RHS << Data->Type;
+ << Value(Data->Type, LHS) << Operator << RHSVal << Data->Type;
}
#define UBSAN_OVERFLOW_HANDLER(handler_name, op, unrecoverable) \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25294.73706.patch
Type: text/x-patch
Size: 1074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161005/951a395d/attachment.bin>
More information about the llvm-commits
mailing list