[llvm-bugs] [Bug 47028] New: A project should not contain unreachable code.(llvm-project/clang/lib/Driver/ToolChains/Arch/Mips.cpp:line 456)

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 7 02:01:12 PDT 2020


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

            Bug ID: 47028
           Summary: A project should not contain unreachable
                    code.(llvm-project/clang/lib/Driver/ToolChains/Arch/Mi
                    ps.cpp:line 456)
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: info at ustchcs.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

A project should not contain unreachable code.

(commit e3546c78cabfbf670391a57766872f0a8e28a423)

llvm-project/clang/lib/Driver/ToolChains/Arch/Mips.cpp:line 456

   444  bool mips::isNaN2008(const ArgList &Args, const llvm::Triple &Triple) {
   445    if (Arg *NaNArg = Args.getLastArg(options::OPT_mnan_EQ))
   446      return llvm::StringSwitch<bool>(NaNArg->getValue())
   447          .Case("2008", true)
   448          .Case("legacy", false)
   449          .Default(false);
   450  
   451    // NaN2008 is the default for MIPS32r6/MIPS64r6.
   452    return llvm::StringSwitch<bool>(getCPUName(Args, Triple))
   453        .Cases("mips32r6", "mips64r6", true)
   454        .Default(false);
   455  
   456    return false;
   457  }

Reported by: Ustchcs Toolsets Bugfinder
(bugfinder-1.1: A project should not contain unreachable code.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200807/63f7b498/attachment.html>


More information about the llvm-bugs mailing list