[SE] Add .clang-format
authorJason Henline <jhen@google.com>
Tue, 13 Sep 2016 19:25:43 +0000 (19:25 +0000)
committerJason Henline <jhen@google.com>
Tue, 13 Sep 2016 19:25:43 +0000 (19:25 +0000)
commitfb621479491f353562ec745a3daa402123110615
treed056f6065c45f1d2ea316a6a3ebfe44b81d1e54a
parent6956d290341b3ceb7fb7599c9c772c08b0c2450a
[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
19 files changed:
parallel-libs/.clang-tidy [new file with mode: 0644]
parallel-libs/streamexecutor/include/streamexecutor/Device.h
parallel-libs/streamexecutor/include/streamexecutor/DeviceMemory.h
parallel-libs/streamexecutor/include/streamexecutor/Error.h
parallel-libs/streamexecutor/include/streamexecutor/HostMemory.h
parallel-libs/streamexecutor/include/streamexecutor/Kernel.h
parallel-libs/streamexecutor/include/streamexecutor/KernelSpec.h
parallel-libs/streamexecutor/include/streamexecutor/Stream.h
parallel-libs/streamexecutor/include/streamexecutor/unittests/CoreTests/SimpleHostPlatformDevice.h [moved from parallel-libs/streamexecutor/unittests/CoreTests/SimpleHostPlatformDevice.h with 96% similarity]
parallel-libs/streamexecutor/lib/Device.cpp
parallel-libs/streamexecutor/lib/DeviceMemory.cpp
parallel-libs/streamexecutor/lib/Error.cpp
parallel-libs/streamexecutor/lib/HostMemory.cpp
parallel-libs/streamexecutor/lib/Kernel.cpp
parallel-libs/streamexecutor/lib/KernelSpec.cpp
parallel-libs/streamexecutor/lib/Stream.cpp
parallel-libs/streamexecutor/unittests/CoreTests/DeviceTest.cpp
parallel-libs/streamexecutor/unittests/CoreTests/PackedKernelArgumentArrayTest.cpp
parallel-libs/streamexecutor/unittests/CoreTests/StreamTest.cpp