[all-commits] [llvm/llvm-project] e80748: [clang-diff] Fix assertion error when dealing with...

Jacket via All-commits all-commits at lists.llvm.org
Tue Jun 7 11:25:46 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e80748ff8840a10bd7c7336eb5e98664480ba1ba
      https://github.com/llvm/llvm-project/commit/e80748ff8840a10bd7c7336eb5e98664480ba1ba
  Author: Kaining Zhong <zhongkaining.paxos at bytedance.com>
  Date:   2022-06-07 (Tue, 07 Jun 2022)

  Changed paths:
    M clang/lib/Tooling/ASTDiff/ASTDiff.cpp
    M clang/test/Tooling/clang-diff-ast.cpp

  Log Message:
  -----------
  [clang-diff] Fix assertion error when dealing with wide strings

Directly using StringLiteral::getString for wide string is not
currently supported; therefore in ASTDiff, getStmtValue will fail when
asserting that the StringLiteral has a width of 1. This patch also
covers cases for UTF16 and UTF32 encoding, along with corresponding
test cases.

Fixes https://github.com/llvm/llvm-project/issues/55771.

Reviewed By: johannes

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




More information about the All-commits mailing list