https://bugs.llvm.org/show_bug.cgi?id=47089

            Bug ID: 47089
           Summary: The use of if (Condition) {...} else if (Condition)
                    {...} pattern should be
                    avoided.(llvm-project/lldb/source/Plugins/Language/Obj
                    C/NSArray.cpp:line 826)
           Product: lldb
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev@lists.llvm.org
          Reporter: i...@ustchcs.com
                CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

The use of if (Condition) {...} else if (Condition) {...} pattern should be
avoided.
Code on line 827 cannot be executed.

commit e3546c78cabfbf670391a57766872f0a8e28a423

llvm-project/lldb/source/Plugins/Language/ObjC/NSArray.cpp:line 826

   814    if (class_name == g_NSArrayI) {
   815      if (runtime->GetFoundationVersion() >= 1436)
   816        return (new
Foundation1436::NSArrayISyntheticFrontEnd(valobj_sp));
   817      if (runtime->GetFoundationVersion() >= 1430)
   818        return (new
Foundation1430::NSArrayISyntheticFrontEnd(valobj_sp));
   819      else
   820        return (new
Foundation1300::NSArrayISyntheticFrontEnd(valobj_sp));
   821    } else if (class_name == g_NSArrayI_Transfer) {
   822        return (new
Foundation1436::NSArrayI_TransferSyntheticFrontEnd(valobj_sp));
   823    } else if (class_name == g_NSArray0) {
   824    } else if (class_name == g_NSFrozenArrayM) {
   825      return (new
Foundation1436::NSFrozenArrayMSyntheticFrontEnd(valobj_sp));
   826    } else if (class_name == g_NSArray0) {
   827      return (new NSArray0SyntheticFrontEnd(valobj_sp));

Reported by: Ustchcs Toolsets Bugfinder
(bugfinder-2.2: The use of if (Condition) {...} else if (Condition) {...}
pattern should be avoided.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to