[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 10 08:55:00 PDT 2019


xbolva00 created this revision.
xbolva00 added reviewers: rsmith, rnk.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

I consider -Wint-in-bool-context as quite useful warning so I ported it to Clang.

-Wint-in-bool-context is on by default, it is part of GCC's -Wall so I make it same here.

Current patch passes all tests for -Wint-in-bool-context in GCC's test-suite.


Repository:
  rC Clang

https://reviews.llvm.org/D63082

Files:
  include/clang/Basic/DiagnosticGroups.td
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaChecking.cpp
  test/Analysis/misc-ps.c
  test/Sema/integer-overflow.c
  test/Sema/parentheses.c
  test/Sema/parentheses.cpp
  test/Sema/warn-unreachable.c
  test/Sema/warn_int_in_bool_context.c
  test/SemaCXX/constexpr-printing.cpp
  test/SemaCXX/integer-overflow.cpp
  test/SemaCXX/nested-name-spec.cpp
  test/SemaCXX/warn-unreachable.cpp
  test/SemaCXX/warn_int_in_bool_context.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63082.203835.patch
Type: text/x-patch
Size: 24456 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190610/3b8a42ef/attachment-0001.bin>


More information about the cfe-commits mailing list