================
@@ -33,16 +33,17 @@ FormatStringHandler::~FormatStringHandler() {}
 // scanf format strings.
 
//===----------------------------------------------------------------------===//
 
-OptionalAmount
-clang::analyze_format_string::ParseAmount(const char *&Beg, const char *E) {
+OptionalAmount clang::analyze_format_string::ParseAmount(
+    const char *&Beg, const char *E,
+    const llvm::TextEncodingConverter &FormatStrConverter) {
   const char *I = Beg;
   UpdateOnReturn <const char*> UpdateBeg(Beg, I);
 
   unsigned accumulator = 0;
   bool hasDigits = false;
 
   for ( ; I != E; ++I) {
-    char c = *I;
+    char c = FormatStrConverter.convert(*I);
----------------
s-barannikov wrote:

> What about changing the name of the function to emphasize this nature of the 
> function? That should help avoid someone comparing the result to zero.

Renaming the function and/or adding a comment would certainly be helpful.


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

Reply via email to