[Lldb-commits] [PATCH] D80150: [lldb/DataFormatter] Check for overflow when finding NSDate epoch

Davide Italiano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 18 13:00:56 PDT 2020

davide accepted this revision.
davide added inline comments.
This revision is now accepted and ready to land.

Comment at: lldb/include/lldb/DataFormatters/Mock.h:1-8
+//===-- Mock.h --------------------------------------------------*- C++ -*-===//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Neat way to test.

Comment at: lldb/source/Plugins/Language/ObjC/Cocoa.cpp:801-804
+  // this snippet of code assumes that time_t == seconds since Jan-1-1970 this
+  // is generally true and POSIXly happy, but might break if a library vendor
+  // decides to get creative
+  time_t epoch = GetOSXEpoch();
I think you can drop this comment [you just moved it, but it feels irrelevant at this point because there's only one vendor].

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list