Hello, i would like to suggest a fix for one of the checks in clang-tidy and i should hope this one is the correct mailing list.
The check is modernize-avoid-bind.

Consider the following:

void bar(int x, int y);

namespace N{
  void bar(int x, int y);
}

void foo(){
  auto Test = std::bind(N::bar,1,1);
}

clang-tidy’s modernize-avoid-bind check suggests writing:

void foo(){
  auto Test =[] {return bar(1,1);};
}

instead of:

void foo(){
  auto Test = [] {return N::bar(1,1);};
}

So clang-tidy has proposed an incorrect Fix.

This is my proposal patch:

Attachment: AvoidBindCheck.patch
Description: Binary data


And this is my proposal testcase:

Attachment: modernize-avoid-bind.patch
Description: Binary data


Should I have to open a report on BugZilla?

Idriss Riouak
Corso di Laurea in scienze informatica.
Dipartimento di Matematica e Informatica.



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to