[all-commits] [llvm/llvm-project] c18407: [analyzer] Fix StringChecker for Unknown params

Balazs Benics via All-commits all-commits at lists.llvm.org
Tue Oct 26 09:15:26 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c18407217e91abea73555e07956d7132dd093bd2
      https://github.com/llvm/llvm-project/commit/c18407217e91abea73555e07956d7132dd093bd2
  Author: Balazs Benics <balazs.benics at sigmatechnology.se>
  Date:   2021-10-26 (Tue, 26 Oct 2021)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/StringChecker.cpp
    M clang/test/Analysis/std-string.cpp

  Log Message:
  -----------
  [analyzer] Fix StringChecker for Unknown params

It seems like protobuf crashed the `std::string` checker.
Somehow it acquired `UnknownVal` as the sole `std::string` constructor
parameter, causing a crash in the `castAs<Loc>()`.

This patch addresses this.

Reviewed By: martong

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




More information about the All-commits mailing list