llvm-project/clang
mydeveloperday a75f8d98d7 [clang-format] [PR36294] AlwaysBreakAfterReturnType works incorrectly for some operator functions
Summary:
https://bugs.llvm.org/show_bug.cgi?id=36294

Addressing bug related to returning after return type not being honoured for some operator types.

```
$ bin/clang-format --style="{BasedOnStyle: llvm, AlwaysBreakAfterReturnType: TopLevelDefinitions}" /tmp/foo.cpp
class Foo {
public:
  bool operator!() const;
  bool operator<(Foo const &) const;
  bool operator*() const;
  bool operator->() const;
  bool operator+() const;
  bool operator-() const;
  bool f() const;
};

bool Foo::operator!() const { return true; }
bool
Foo::operator<(Foo const &) const {
  return true;
}
bool Foo::operator*() const { return true; }
bool Foo::operator->() const { return true; }
bool
Foo::operator+() const {
  return true;
}
bool
Foo::operator-() const {
  return true;
}
bool
Foo::f() const {
  return true;
}
```

Reviewers: mitchell-stellar, klimek, owenpan, sammccall, rianquinn

Reviewed By: sammccall

Subscribers: merge_guards_bot, cfe-commits

Tags: #clang-format, #clang-tools-extra, #clang

Differential Revision: https://reviews.llvm.org/D69573
2019-11-12 09:25:00 +00:00
..
INPUTS
bindings Fixed more -Wreturn-type tests 2019-11-09 18:13:51 +01:00
cmake [CMake] Add cross Windows to ARM Linux toolchain CMake cache file. 2019-11-01 12:40:25 -07:00
docs clang-format: fix a typo introduced by the previous change 2019-11-11 21:52:08 +01:00
examples Fixup build of clang-interpreter example after change in r370122. 2019-08-28 02:13:24 +00:00
include clang/Modules: Delay err_module_file_conflict if a diagnostic is in flight 2019-11-11 15:34:52 -08:00
lib [clang-format] [PR36294] AlwaysBreakAfterReturnType works incorrectly for some operator functions 2019-11-12 09:25:00 +00:00
runtime
test [OPENMP50]Add support for nested atomic and simd constructs in 2019-11-11 14:28:28 -05:00
tools [Format] Fix clang-format.el unit tests after commit f349cc37cc 2019-11-11 17:55:38 +01:00
unittests [clang-format] [PR36294] AlwaysBreakAfterReturnType works incorrectly for some operator functions 2019-11-12 09:25:00 +00:00
utils [creduce] Fixed a typo in the error message we're looking for. 2019-11-07 17:16:51 -08:00
www [cxx_status] Update with Belfast motions. 2019-11-09 03:13:21 -08:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [clang] [cmake] Support LLVM_DISTRIBUTION_COMPONENTS in stand-alone build 2019-10-07 18:14:56 +00:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt Revert "test commit" 2019-11-08 14:09:09 +01:00

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/