[all-commits] [llvm/llvm-project] 695451: [Sema] Move 'char-expression-as-unsigned < 0' into...

Anton Bikineev via All-commits all-commits at lists.llvm.org
Tue Apr 13 16:03:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 69545154cc28a0a7f813174253c6cb428666eb3a
      https://github.com/llvm/llvm-project/commit/69545154cc28a0a7f813174253c6cb428666eb3a
  Author: Anton Bikineev <bikineev at chromium.org>
  Date:   2021-04-14 (Wed, 14 Apr 2021)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaChecking.cpp
    A clang/test/Sema/tautological-unsigned-char-zero-compare.cc

  Log Message:
  -----------
  [Sema] Move 'char-expression-as-unsigned < 0' into a separate diagnostic

This change splits '-Wtautological-unsigned-zero-compare' by reporting
char-expressions-interpreted-as-unsigned under a separate diagnostic
'-Wtautological-unsigned-char-zero-compare'. This is beneficial for
projects that want to enable '-Wtautological-unsigned-zero-compare' but at
the same time want to keep code portable for platforms with char being
signed or unsigned, such as Chromium.

Differential Revision: https://reviews.llvm.org/D99808




More information about the All-commits mailing list