[PATCH] D93822: [clang][Sema] Add diagnostics for implicit widening of multiplication result

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 27 08:17:41 PST 2020


lebedev.ri updated this revision to Diff 313788.
lebedev.ri added a comment.

- Properly handle dependent types (bailout instead of crashing)
- Add `ASTContext::getCorrespondingSignedType()`
- Add fix-it for the `unsigned long r = int(x) * int(y)` case


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93822/new/

https://reviews.llvm.org/D93822

Files:
  clang/docs/ReleaseNotes.rst
  clang/include/clang/AST/ASTContext.h
  clang/include/clang/Basic/DiagnosticGroups.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Sema/Sema.h
  clang/lib/AST/ASTContext.cpp
  clang/lib/Sema/Sema.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/test/Misc/warning-wall.c
  clang/test/Sema/implicit-widening-of-multiplication-result.c
  clang/test/Sema/implicit-widening-of-pointer-offset-in-array-subscript-expression.c
  clang/test/Sema/implicit-widening-of-pointer-offset.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93822.313788.patch
Type: text/x-patch
Size: 32218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201227/d2488f4f/attachment.bin>


More information about the llvm-commits mailing list