================
@@ -39,14 +39,22 @@ AST_MATCHER(Stmt, isNULLMacroExpansion) {
 }
 
 StringRef getZeroLiteralToCompareWithForType(CastKind CastExprKind,
-                                             QualType Type,
-                                             ASTContext &Context) {
+                                             QualType Type, ASTContext 
&Context,
+                                             bool UseUpperCaseLiteralSuffix) {
   switch (CastExprKind) {
-  case CK_IntegralToBoolean:
-    return Type->isUnsignedIntegerType() ? "0u" : "0";
+  case CK_IntegralToBoolean: {
+    if (Type->isUnsignedIntegerType())
+      return UseUpperCaseLiteralSuffix ? "0U" : "0u";
----------------
PiotrZSL wrote:

Note: You could just use StringRef::upper to avoid using 
UseUpperCaseLiteralSuffix multiple times.

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

Reply via email to