Go to file
Ehsan Akhgari c62c639610 Insert override at the same line as the end of the function declaration
Summary:
The existing check converts the code pattern below:

  void f()
  {
  }

to:

  void f()
  override {
  }

which is fairly sub-optimal.  This patch fixes this by inserting the
override keyword on the same line as the function declaration if
possible, so that we instead get:

  void f() override
  {
  }

We do this by looking for the last token before the start of the body
and inserting the override keyword at the end of its location.  Note
that we handle const, volatile and ref-qualifiers correctly.

Test Plan: Includes an automated test.

Reviewers: alexfh

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D9286

llvm-svn: 245401
2015-08-19 02:05:37 +00:00
clang unique_ptrify CXXBasePaths::DeclsFound & remove the then-unnecessary user-defined dtor 2015-08-18 23:56:00 +00:00
clang-tools-extra Insert override at the same line as the end of the function declaration 2015-08-19 02:05:37 +00:00
compiler-rt [windows] Implement GetProcAddress internally to avoid initializing the CRT 2015-08-18 22:38:27 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Remove files accidentally not removed in r244310 2015-08-13 23:43:12 +00:00
libcxx [libcxx] Add Atomic test helper and fix TSAN failures. 2015-08-18 23:29:59 +00:00
libcxxabi Revert r243752, it broke running tests on OS X (PR24491). 2015-08-18 18:29:33 +00:00
libunwind Enable zero-cost exceptions on non-Apple arm64 platforms 2015-08-13 14:21:03 +00:00
lld COFF: Use ErrorOr::operator* instead of ErrorOr::get. 2015-08-18 09:18:15 +00:00
lldb Update to r245397. 2015-08-19 01:24:57 +00:00
llgo Update to new lists.llvm.org 2015-08-05 04:03:05 +00:00
llvm Make ScalarEvolution::isKnownPredicate a little smarter 2015-08-19 01:51:51 +00:00
openmp D11990: Lock-free start of serialized parallel regions 2015-08-18 10:08:27 +00:00
polly Update test case multidim_indirect_access.ll 2015-08-18 21:08:41 +00:00