[all-commits] [llvm/llvm-project] 4b0029: [c++20] Add deprecation warnings for the expressio...

Richard Smith via All-commits all-commits at lists.llvm.org
Mon Dec 16 17:49:54 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b0029995853fe37d1dc95ef96f46697c743fcad
      https://github.com/llvm/llvm-project/commit/4b0029995853fe37d1dc95ef96f46697c743fcad
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M clang/include/clang/AST/Type.h
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/Type.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    A clang/test/CXX/expr/expr.arith.conv/p2.cpp
    M clang/test/Sema/switch.c
    M clang/test/Sema/warn-conditional-emum-types-mismatch.c
    M clang/test/SemaCXX/deprecated.cpp
    M clang/test/SemaCXX/self-comparison.cpp
    M clang/test/SemaCXX/warn-enum-compare.cpp
    M clang/www/cxx_status.html

  Log Message:
  -----------
  [c++20] Add deprecation warnings for the expression forms deprecated by P1120R0.

This covers:
 * usual arithmetic conversions (comparisons, arithmetic, conditionals)
   between different enumeration types
 * usual arithmetic conversions between enums and floating-point types
 * comparisons between two operands of array type

The deprecation warnings are on-by-default (in C++20 compilations); it
seems likely that these forms will become ill-formed in C++23, so
warning on them now by default seems wise.

For the first two bullets, off-by-default warnings were also added for
all the cases where we didn't already have warnings (covering language
modes prior to C++20). These warnings are in subgroups of the existing
-Wenum-conversion (except that the first case is not warned on if either
enumeration type is anonymous, consistent with our existing
-Wenum-conversion warnings).


  Commit: 4e9f1379b9cd7ddce8cf182707e976ebceb72b05
      https://github.com/llvm/llvm-project/commit/4e9f1379b9cd7ddce8cf182707e976ebceb72b05
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticASTKinds.td
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/CXX/expr/expr.const/p2-0x.cpp
    M clang/test/SemaCXX/constant-expression-cxx11.cpp
    M clang/test/SemaCXX/constant-expression-cxx2a.cpp

  Log Message:
  -----------
  If constant evaluation fails due to an unspecified pointer comparison,
produce a note saying that rather than the default "evaluation failed"
note.


  Commit: f495de43bd5da50286da6020e508d106cfc60f57
      https://github.com/llvm/llvm-project/commit/f495de43bd5da50286da6020e508d106cfc60f57
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M clang/include/clang/AST/ComparisonCategories.h
    M clang/include/clang/AST/Type.h
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/AST/ComparisonCategories.cpp
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/AST/Interp/Interp.h
    M clang/lib/CodeGen/CGExprAgg.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/test/CodeGenCXX/Inputs/std-compare.h
    M clang/test/CodeGenCXX/cxx2a-compare.cpp
    M clang/test/PCH/Inputs/std-compare.h
    M clang/test/SemaCXX/Inputs/std-compare.h
    M clang/test/SemaCXX/compare-cxx2a.cpp
    M clang/test/SemaCXX/constant-expression-cxx2a.cpp
    M clang/test/SemaCXX/std-compare-cxx2a.cpp
    M clang/www/cxx_status.html

  Log Message:
  -----------
  [c++20] P1959R0: Remove support for std::*_equality.


Compare: https://github.com/llvm/llvm-project/compare/434905b97d96...f495de43bd5d


More information about the All-commits mailing list