[all-commits] [llvm/llvm-project] c28178: [clang][Sema] Add -Wswitch-default warning option ...

dong jianqiang via All-commits all-commits at lists.llvm.org
Wed Dec 6 17:03:28 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c28178298513f99dc869daa301fc25257df81688
      https://github.com/llvm/llvm-project/commit/c28178298513f99dc869daa301fc25257df81688
  Author: dong jianqiang <dongjianqiang2 at huawei.com>
  Date:   2023-12-07 (Thu, 07 Dec 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaStmt.cpp
    A clang/test/Sema/switch-default.c

  Log Message:
  -----------
  [clang][Sema] Add -Wswitch-default warning option (#73077)

Adds a warning, issued by the clang semantic analysis. The patch warns
on switch which don't have the default branch.

This is a counterpart of gcc's Wswitch-default.




More information about the All-commits mailing list