Some functions in cxa_exception_storage.cpp have incorrect indentation of braces,
use clang-format to fix them
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Differential D109408
[libcxxabi] NFC: fix incorrect indentation of braces zhouyizhou on Sep 7 2021, 6:22 PM. Authored by
Details
Some functions in cxa_exception_storage.cpp have incorrect indentation of braces, Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Diff Detail
Unit Tests Event Timeline
Comment Actions FWIW, I dislike that we don't indent stuff at all inside namespaces -- often I find it useful to indent things inside short-lived namespaces. But let's go for simplicity and consistency. Did you look into clang-formatting other files in libc++abi? What would the diff look like? Comment Actions Thanks for reviewing,
This comment was removed by zhouyizhou. Comment Actions I take a general view of .cpp(.h) files in libc++abi, they are distributed in several directories. I do an experiment with
+++ cxa_demangle_fuzzer.cpp 2021-09-09 02:19:34.845879852 +0800 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+ char *str = new char[size + 1]; memcpy(str, data, size); str[size] = 0; free(__cxa_demangle(str, 0, 0, 0));
+ delete[] str; return 0; } As a beginner of LLVM and C++, I guess clang-formatting is meaningful ;-) I guess we can clang-format a set of files at a time, and step-by-step clang-format all the .cpp(.h) files in libc++abi and fine-tune the results as how Quuxplusone did it , Zhouyi Comment Actions Hi, Comment Actions I was going to land this just now, but then realized that I've lost the thread of why we're doing most of this. Why are we touching clang/test/SemaCXX/? So I'm going to land just the fixing of the curly braces in libcxxabi/src/.
Comment Actions Hi, Zhouyi Comment Actions When you submit patches, please follow https://libcxx.llvm.org/Contributing.html. In particular, you should follow these instructions for submitting using arc diff -- it works a lot better than the web interface: https://www.llvm.org/docs/Phabricator.html#requesting-a-review-via-the-command-line. Thanks for the patch! Comment Actions Thanks for the instructions |
clang-format: please reformat the code