[all-commits] [llvm/llvm-project] a27af1: [analyzer] Fix assertion in SVals.h

vabridgers via All-commits all-commits at lists.llvm.org
Fri Apr 30 09:01:22 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a27af1d8166cc8cebd6ecfed94042852922d8239
      https://github.com/llvm/llvm-project/commit/a27af1d8166cc8cebd6ecfed94042852922d8239
  Author: Vince Bridgers <vince.a.bridgers at gmail.com>
  Date:   2021-04-30 (Fri, 30 Apr 2021)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
    M clang/test/Analysis/casts.c

  Log Message:
  -----------
  [analyzer] Fix assertion in SVals.h

Fix assertion in SVals.h apparently caused by
https://reviews.llvm.org/D89055.

clang:clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h:596:
clang::ento::loc::MemRegionVal::MemRegionVal(const clang::ento::MemRegion *):
  Assertion `r' failed.

Backtrace:
...
     clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h:597:3
     clang::QualType, clang::QualType)
     clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:773:18
     clang::QualType, clang::QualType)
     clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:612:12
     clang::QualType) clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:587:12
     namespace)::RegionBindingsRef const&, clang::ento::Loc, clang::QualType)
     clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1510:24
...

Reviewed By: ASDenysPetrov

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




More information about the All-commits mailing list