================
@@ -382,7 +382,8 @@ void ImplicitBoolConversionCheck::handleCastToBool(const 
ImplicitCastExpr *Cast,
     return;
   }
 
-  auto Diag = diag(Cast->getBeginLoc(), "implicit conversion %0 -> 'bool'")
+  auto Diag = diag(Context.getSourceManager().getFileLoc(Cast->getBeginLoc()),
----------------
zeyi2 wrote:

Sorry that I didn't make it clear, here is more background info:

When I was working on #188399, I found that the check can't find `NULL` from 
system headers:

https://clang-tidy.godbolt.org/z/Exd4bzqaT

Spook and I agreed that this is not the behaviour we want from this check. The 
check should be able to find this macro from standard library, the former 
testcases actually mask this wrong behaviour.

But to keep that PR a pure NFC, I added `--system-header` as a temp workaround 
to get all the tests passing.

> Do we need some new tests for this?

I think that removing `--system-header` already show that the check is now 
working as intended. So I don't think extra tests are necessary.

https://github.com/llvm/llvm-project/pull/188694
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to