[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

Congcong Cai via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 10 20:24:38 PDT 2024


================
@@ -15,3 +15,5 @@ std::string HelloString;
 // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: no header providing "std::string" is directly included [misc-include-cleaner]
 int FooBarResult = foobar();
 // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: no header providing "foobar" is directly included [misc-include-cleaner]
+
+void log2() {}
----------------
HerrCai0907 wrote:

```suggestion
namespace gh93335 {
void log2() {}
}
```

https://github.com/llvm/llvm-project/pull/94923


More information about the cfe-commits mailing list