Discookie wrote:

``::open`` and ``::std::fstream::open`` are matched as two different things 
already.

```c++
#include <fcntl.h>
#include <fstream>

void f() {
  int fd = open("file.txt", O_RDONLY, 0);

  std::ifstream file;
  file.open("file.txt");
}
```
```
 -- matches ::open
{CheckOptions:{bugprone-unsafe-functions.ReportDefaultFunctions: false, 
bugprone-unsafe-functions.CustomFunctions: '^::open$,replacement,bla'}}
 -- matches .open
{CheckOptions:{bugprone-unsafe-functions.ReportDefaultFunctions: false, 
bugprone-unsafe-functions.CustomFunctions: 
'std::basic_ifstream.*::open,replacement,bla'}}
```

I do realize that the matching of templates and child classes in general need a 
bit of a cleanup.

https://github.com/llvm/llvm-project/pull/117165
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to