[all-commits] [llvm/llvm-project] ec936b: [Clang][analyzer] Replace Stmt* with ConstCFGEleme...

Fangyi Zhou via All-commits all-commits at lists.llvm.org
Fri Apr 25 01:40:06 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec936b3186e3512a9297c5a12b58d627ef1a1b32
      https://github.com/llvm/llvm-project/commit/ec936b3186e3512a9297c5a12b58d627ef1a1b32
  Author: Fangyi Zhou <me at fangyi.io>
  Date:   2025-04-25 (Fri, 25 Apr 2025)

  Changed paths:
    M clang/include/clang/Analysis/CFG.h
    M clang/include/clang/StaticAnalyzer/Checkers/SValExplainer.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
    M clang/lib/Analysis/CFG.cpp
    M clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/ErrnoModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/ErrnoModeling.h
    M clang/lib/StaticAnalyzer/Checkers/ErrnoTesterChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/Iterator.cpp
    M clang/lib/StaticAnalyzer/Checkers/Iterator.h
    M clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/STLAlgorithmModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp
    M clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp
    M clang/lib/StaticAnalyzer/Core/CallEvent.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
    M clang/lib/StaticAnalyzer/Core/LoopWidening.cpp
    M clang/lib/StaticAnalyzer/Core/ProgramState.cpp
    M clang/lib/StaticAnalyzer/Core/RegionStore.cpp
    M clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
    M clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
    A clang/test/Analysis/PR57270.cpp
    M clang/test/Analysis/container-modeling.cpp
    M clang/test/Analysis/dump_egraph.cpp
    M clang/test/Analysis/explain-svals.cpp
    M clang/test/Analysis/explain-svals.m

  Log Message:
  -----------
  [Clang][analyzer] Replace Stmt* with ConstCFGElementRef in SymbolConjured (#128251)

This PR changes the `Stmt *` field in `SymbolConjured` with
`CFGBlock::ConstCFGElementRef`. The motivation is that, when conjuring a
symbol, there might not always be a statement available, causing
information to be lost for conjured symbols, whereas the CFGElementRef
can always be provided at the callsite.

Following the idea, this PR changes callsites of functions to create
conjured symbols, and replaces them with appropriate `CFGElementRef`s.

Closes #57270



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list