From fb621479491f353562ec745a3daa402123110615 Mon Sep 17 00:00:00 2001 From: Jason Henline Date: Tue, 13 Sep 2016 19:25:43 +0000 Subject: [SE] Add .clang-format Summary: The .clang-tidy file is copied from the top-level LLVM source directory. Also fix warnings generated by clang-format: * Moved SimpleHostPlatformDevice.h so its header include guard could have the right format. * Changed signatures of methods taking llvm::Twine by value to take it by const ref instead. * Add "noexcept" to some move constructors and assignment operators. * Removed a bunch of places where single-statement loops and conditionals were surrounded with braces. (This was not found by the current clang-tidy, but with a local patch that I hope to upstream soon.) Reviewers: jlebar, jprice Subscribers: parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24468 llvm-svn: 281374 --- parallel-libs/streamexecutor/lib/HostMemory.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'parallel-libs/streamexecutor/lib/HostMemory.cpp') diff --git a/parallel-libs/streamexecutor/lib/HostMemory.cpp b/parallel-libs/streamexecutor/lib/HostMemory.cpp index f7fbe044aa3..8eba7e6b563 100644 --- a/parallel-libs/streamexecutor/lib/HostMemory.cpp +++ b/parallel-libs/streamexecutor/lib/HostMemory.cpp @@ -20,9 +20,8 @@ namespace internal { void destroyRegisteredHostMemoryInternals(Device *TheDevice, void *Pointer) { // TODO(jhen): How to handle errors here? - if (Pointer) { + if (Pointer) consumeError(TheDevice->unregisterHostMemory(Pointer)); - } } } // namespace internal -- cgit v1.2.3