Go to file
Krasimir Georgiev 446d6ec996 [clang-format] fix handling of consecutive unary operators
Summary:
Code that used to be formatted as `if (! + object) {` is now formatted as `if (!+object) {`
(we have a particular object in our codebase where unary `operator+` is overloaded to return the underlying value, which in this case is a `bool`)

We still preserve the TypeScript behavior where `!` is a trailing non-null operator. (This is already tested by an existing unit test in `FormatTestJS.cpp`)

It doesn't appear like handling of consecutive unary operators are tested in general, so I added another test for completeness

Patch contributed by @kevinl!

Reviewers: krasimir

Reviewed By: krasimir

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D43312

llvm-svn: 326792
2018-03-06 13:56:28 +00:00
clang [clang-format] fix handling of consecutive unary operators 2018-03-06 13:56:28 +00:00
clang-tools-extra [clangd] Fix -Wpedantic warning, NFC. 2018-03-06 12:56:18 +00:00
compiler-rt OpenBSD sanitizer common, define RLIMIT_AS constant 2018-03-06 08:24:16 +00:00
debuginfo-tests [Darwin] Specify DWARF 2/4 when running apple accelerator tests. 2018-02-26 20:56:45 +00:00
libclc utils: Adapt to llvm r325155 2018-02-23 07:37:03 +00:00
libcxx Added P0805 to the list of ready bits 2018-03-01 21:16:07 +00:00
libcxxabi [demangler] Modernize parse_name. 2018-03-05 16:35:06 +00:00
libunwind [libunwind][MIPS]: Add support for unwinding in N32 processes. 2018-02-27 21:24:02 +00:00
lld Remove redundant casts. 2018-03-05 23:50:45 +00:00
lldb ObjectFileMachO: split CreateSections mega-function into more manageable chunks 2018-03-06 13:53:26 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm TableGen: Add !foldl operation 2018-03-06 13:49:16 +00:00
openmp Improve OpenMP threadprivate implementation. 2018-03-05 18:42:01 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [Polly][CMake] Fix lit setup for building the in the mono repo 2018-03-05 14:43:04 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.