[all-commits] [llvm/llvm-project] 55d3b7: [clang] add APValue type check in `TryPrintAsStrin...

inclyc via All-commits all-commits at lists.llvm.org
Tue Aug 9 17:43:56 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 55d3b79d159bab53b140860279486db8a1c0e4f3
  Author: YingChi Long <me at inclyc.cn>
  Date:   2022-08-10 (Wed, 10 Aug 2022)

  Changed paths:
    M clang/lib/AST/APValue.cpp
    A clang/test/SemaCXX/try-print-as-string-literal-type-check.cpp

  Log Message:
  [clang] add APValue type check in `TryPrintAsStringLiteral`

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

https://reviews.llvm.org/D115031 improved printing of non-type template
parameter args. But checking if the end of Inits is 0 without checking
if APValue is an integer, causes clang to segfault. This patch adds
the code to check the type. (May not be a proper bugfix.)

Reviewed By: aaron.ballman, lichray

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

More information about the All-commits mailing list