[clang-tools-extra] [clang-tidy] Enable C99 in `implicit-bool-conversion` and avoid FP with `bool` operands in C23 (PR #171070)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 8 07:58:28 PST 2025
================
@@ -27,7 +27,9 @@ AST_MATCHER(Stmt, isMacroExpansion) {
return SM.isMacroBodyExpansion(Loc) || SM.isMacroArgExpansion(Loc);
}
-AST_MATCHER(Stmt, isC23) { return Finder->getASTContext().getLangOpts().C23; }
+AST_MATCHER(Stmt, isC) {
+ return !Finder->getASTContext().getLangOpts().CPlusPlus;
----------------
zwuis wrote:
What about `return .getLangOpts().C99`? We don't need to handle C89 in this check.
https://github.com/llvm/llvm-project/pull/171070
More information about the cfe-commits
mailing list