[all-commits] [llvm/llvm-project] 95ce9f: [clang] Do not crash on pointer wchar_t pointer as...

Adam Czachorowski via All-commits all-commits at lists.llvm.org
Fri Nov 20 06:33:13 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 95ce9fbc235a467b84b2ffa2571f1d1a45af9427
      https://github.com/llvm/llvm-project/commit/95ce9fbc235a467b84b2ffa2571f1d1a45af9427
  Author: Adam Czachorowski <adamcz at google.com>
  Date:   2020-11-20 (Fri, 20 Nov 2020)

  Changed paths:
    M clang/lib/AST/ASTContext.cpp
    M clang/test/SemaCXX/wchar_t.cpp

  Log Message:
  -----------
  [clang] Do not crash on pointer wchar_t pointer assignment.

wchar_t can be signed (thus hasSignedIntegerRepresentation() returns
true), but it doesn't have an unsigned type, which would lead to a crash
when trying to get it.

With this fix, we special-case WideChar types in the pointer assignment
code.

Differential Revision: https://reviews.llvm.org/D91625




More information about the All-commits mailing list