[all-commits] [llvm/llvm-project] 48e182: [Diagnostics] Fix inconsistent shift-overflow warn...
Shivam Gupta via All-commits
all-commits at lists.llvm.org
Tue Jun 14 07:50:00 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 48e1829874df15fd57e731d4824604f28e177585
https://github.com/llvm/llvm-project/commit/48e1829874df15fd57e731d4824604f28e177585
Author: Shivam Gupta <shivam98.tkg at gmail.com>
Date: 2022-06-14 (Tue, 14 Jun 2022)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaExpr.cpp
M clang/test/CXX/expr/expr.const/p2-0x.cpp
M clang/test/SemaCXX/constant-expression-cxx2a.cpp
M clang/test/SemaCXX/shift.cpp
Log Message:
-----------
[Diagnostics] Fix inconsistent shift-overflow warnings in C++20
This fixes https://github.com/llvm/llvm-project/issues/52873.
Don't warn in C++2A mode (and newer), as signed left shifts
always wrap and never overflow. Ref. -
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1236r1.html.
More information about the All-commits
mailing list