[Lldb-commits] [lldb] [lldb] Add comment to ParseInternal in FormatEntity (NFC) (PR #81018)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 7 10:27:52 PST 2024


================
@@ -2204,7 +2204,9 @@ static Status ParseInternal(llvm::StringRef &format, Entry &parent_entry,
                   return error;
                 }
               } else if (FormatManager::GetFormatFromCString(
-                             entry.printf_format.c_str(), true, entry.fmt)) {
+                             entry.printf_format.c_str(), true,
+                             entry.fmt)) { // Try GetFormatFromCString again,
----------------
bulbazord wrote:

Is the ordering important here? Why not try partial formatting first from the start? The code paths are nearly identical except for one parameter... The comment definitely helps disambiguate but it would be nicer if we could just rewrite this entirely.

https://github.com/llvm/llvm-project/pull/81018


More information about the lldb-commits mailing list