Issue 174229
Summary [clang-tidy] matchers::matchesAnyListedName() appears completely broken (via bugprone-use-after-move.InvalidationFunctions)
Labels clang-tidy
Assignees
Reporter higher-performance
    `::free` should ***not*** match the name of `::freedom::Id* S::blah();` (!)

https://godbolt.org/z/vEcY74h8M

```
namespace freedom {
class Id;
struct S { Id* blah(); };
}
void foo(freedom::S* s) {
  s->blah();
 s->blah();
}
```
```
$ clang-tidy --checks='bugprone-use-after-move' --config="{CheckOptions: {bugprone-use-after-move.InvalidationFunctions: '::free'}}"

<source>:7:3: warning: 's' used after it was invalidated [bugprone-use-after-move]
    7 |   s->blah();
      |   ^
<source>:6:6: note: invalidation occurred here
    6 |   s->blah();
      |      ^
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to