reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
409 Optional<int32_t> MaybeKey = checkedAdd(Index, SmallestKey);
include/llvm/Support/CheckedArithmetic.h 77 return checkedAdd(*Product, C);
unittests/Support/CheckedArithmeticTest.cpp11 EXPECT_EQ(checkedAdd<int64_t>(Max, Max), None); 12 EXPECT_EQ(checkedAdd<int64_t>(Min, -1), None); 13 EXPECT_EQ(checkedAdd<int64_t>(Max, 1), None); 14 EXPECT_EQ(checkedAdd<int64_t>(10, 1), Optional<int64_t>(11)); 20 EXPECT_EQ(checkedAdd<int16_t>(Max, Max), None); 21 EXPECT_EQ(checkedAdd<int16_t>(Min, -1), None); 22 EXPECT_EQ(checkedAdd<int16_t>(Max, 1), None); 23 EXPECT_EQ(checkedAdd<int16_t>(10, 1), Optional<int64_t>(11));