[cfe-dev] clang-format indents template methods with ref-qualification + noexcept wrongly.
Han Wang via cfe-dev
cfe-dev at lists.llvm.org
Wed Oct 5 08:30:56 PDT 2016
Sorry the semicolon is missing at the end of class definition but it
doesn't change the result.
On Wed, Oct 5, 2016 at 4:45 PM, Han Wang <wanghan02 at gmail.com> wrote:
> Hi,
>
> Let's say we have a simple template method with ref-qualification and
> noexcept.
>
> struct A {
> template <typename T>
> void foo(T&& t) & noexcept {
> DoSomething();
> DoSomethingElse();
> }
> }
>
> If we use clang-format to re-format the code with google style (or llvm or
> other styles), we get
>
> struct A {
> template <typename T>
> void foo(T&& t) & noexcept {
> DoSomething();
> DoSomethingElse();
> }
> }
>
> If we remove the noexcept or if we put a const before ref-qualification
> the reformat will work correctly.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20161005/0d7ff311/attachment.html>
More information about the cfe-dev
mailing list