================ @@ -39,14 +39,22 @@ AST_MATCHER(Stmt, isNULLMacroExpansion) { } StringRef getZeroLiteralToCompareWithForType(CastKind CastExprKind, - QualType Type, - ASTContext &Context) { + QualType Type, ASTContext &Context, + bool UseUpperCaseSuffix) { switch (CastExprKind) { - case CK_IntegralToBoolean: - return Type->isUnsignedIntegerType() ? "0u" : "0"; + case CK_IntegralToBoolean: { + if (Type->isUnsignedIntegerType()) { + return UseUpperCaseSuffix ? "0U" : "0u"; + } + return "0"; + } - case CK_FloatingToBoolean: - return Context.hasSameType(Type, Context.FloatTy) ? "0.0f" : "0.0"; + case CK_FloatingToBoolean: { + if (Context.hasSameType(Type, Context.FloatTy)) { + return UseUpperCaseSuffix ? "0.0F" : "0.0f"; + } ---------------- 5chmidti wrote:
Nit: Please remove the two compound statements of the two `if` statements (LLVM coding standards). e.g., ```c++ if (Type->isUnsignedIntegerType()) return UseUpperCaseSuffix ? "0U" : "0u"; ``` This also applies to lines 214-226 https://github.com/llvm/llvm-project/pull/102831 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits