[clang-tidy] readability-redundant-declaration false positive for defaulted function
authorAlexander Kornienko <alexfh@google.com>
Mon, 22 May 2017 13:58:57 +0000 (13:58 +0000)
committerAlexander Kornienko <alexfh@google.com>
Mon, 22 May 2017 13:58:57 +0000 (13:58 +0000)
commit1e034c3f228122beb2bf7b32ba4bba667068760d
tree6460086d6d6ba7dbd3c1cea2c880d0330c695127
parenta0ddf5fc1c16e89ee1b382a0597050182f9f5a99
[clang-tidy] readability-redundant-declaration false positive for defaulted function

Summary:
```
template <class T>
struct C {
  C();
};

template <class T>
C<T>::C() = default;
```

Causes a readability-redundant-declaration diagnostic. This is caused by `isDefinition` not matching defaulted functions.

Reviewers: alexfh, danielmarjamaki

Reviewed By: alexfh

Subscribers: xazax.hun, cfe-commits

Patch by Florian Gross!
Differential Revision: https://reviews.llvm.org/D33358

llvm-svn: 303552
clang-tools-extra/clang-tidy/readability/RedundantDeclarationCheck.cpp
clang-tools-extra/test/clang-tidy/readability-redundant-declaration.cpp