Skip to content

Commit

Permalink
Fix for Issue checkedc#1200 "Assertion failure in checkPointerTypesFo…
Browse files Browse the repository at this point in the history
…rAssignment due to non-canonical RHS type"
  • Loading branch information
arunkumarbhattar committed May 2, 2023
1 parent ebf531a commit f690431
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clang/lib/Sema/SemaExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9151,6 +9151,12 @@ static bool IsInvalidCmseNSCallConversion(Sema &S, QualType FromType,
// FIXME: add a couple examples in this comment.
static Sema::AssignConvertType
checkPointerTypesForAssignment(Sema &S, QualType LHSType, QualType RHSType) {
if (!LHSType.isCanonical())
LHSType = LHSType.getCanonicalType();

if (!RHSType.isCanonical())
RHSType = RHSType.getCanonicalType();

assert(LHSType.isCanonical() && "LHS not canonicalized!");
assert(RHSType.isCanonical() && "RHS not canonicalized!");

Expand Down

0 comments on commit f690431

Please sign in to comment.