[PATCH] D111509: [clang] use getCommonSugar in an assortment of places

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 12 16:00:36 PDT 2021


mizvekov created this revision.
mizvekov retitled this revision from "[clang] WIP: Use getCommonSugar in an assortment of places" to "[clang] WIP: use getCommonSugar in an assortment of places".
mizvekov updated this revision to Diff 378694.
mizvekov added a comment.
mizvekov updated this revision to Diff 378776.
Herald added subscribers: kbarton, nemanjai.
mizvekov updated this revision to Diff 378810.
mizvekov updated this revision to Diff 378820.
mizvekov updated this revision to Diff 378830.
mizvekov updated this revision to Diff 378831.
mizvekov updated this revision to Diff 378843.
mizvekov updated this revision to Diff 379197.
mizvekov retitled this revision from "[clang] WIP: use getCommonSugar in an assortment of places" to "[clang] use getCommonSugar in an assortment of places".
mizvekov published this revision for review.
Herald added projects: clang, Sanitizers, clang-tools-extra.
Herald added subscribers: cfe-commits, Sanitizers.

.


mizvekov added a comment.

.


mizvekov added a comment.

.


mizvekov added a comment.

.


mizvekov added a comment.

.


mizvekov added a comment.

.


mizvekov added a comment.

.


mizvekov added a comment.

.


For this patch, a simple search was performed for patterns where there are
two types (usually an LHS and an RHS) which are structurally the same, and there
is some result type which is resolved as either one of them (typically LHS for
consistency).

We change those cases to resolve as the common sugared type between those two,
utilizing the new infrastructure created for this purpose.

It is likely that we miss other cases where this change could be performed as
well.

Depends on D111283 <https://reviews.llvm.org/D111283>

Signed-off-by: Matheus Izvekov <mizvekov at gmail.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111509

Files:
  clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions-ignoreconversionfromtypes-option.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaExprCXX.cpp
  clang/test/AST/ast-dump-fpfeatures.cpp
  clang/test/CodeGen/compound-assign-overflow.c
  clang/test/Sema/matrix-type-operators.c
  clang/test/Sema/nullability.c
  clang/test/Sema/sugar-common-types.c
  clang/test/SemaCXX/matrix-type-operators.cpp
  clang/test/SemaCXX/sugar-common-types.cpp
  clang/test/SemaCXX/sugared-auto.cpp
  clang/test/SemaObjC/format-strings-objc.m
  compiler-rt/test/ubsan/TestCases/Integer/add-overflow.cpp
  compiler-rt/test/ubsan/TestCases/Integer/no-recover.cpp
  compiler-rt/test/ubsan/TestCases/Integer/sub-overflow.cpp
  compiler-rt/test/ubsan/TestCases/Integer/uadd-overflow.cpp
  compiler-rt/test/ubsan/TestCases/Integer/umul-overflow.cpp
  compiler-rt/test/ubsan/TestCases/Integer/usub-overflow.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111509.379197.patch
Type: text/x-patch
Size: 29329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211012/446321e4/attachment-0001.bin>


More information about the cfe-commits mailing list