[all-commits] [llvm/llvm-project] 39851e: [clang][dataflow] Add a test demonstrating an issu...

Jan Voung via All-commits all-commits at lists.llvm.org
Wed Oct 2 12:04:58 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 39851e3a4641864ce29c7066bf304ae0be325f33
      https://github.com/llvm/llvm-project/commit/39851e3a4641864ce29c7066bf304ae0be325f33
  Author: Jan Voung <jvoung at google.com>
  Date:   2024-10-02 (Wed, 02 Oct 2024)

  Changed paths:
    M clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp

  Log Message:
  -----------
  [clang][dataflow] Add a test demonstrating an issue in unchecked-optional-access-check (#110870)

createStorageLocation used in transferCallReturningOptional:

https://github.com/llvm/llvm-project/blob/09ba83be0ac178851e3c9c9c8fefddbdd4d8353f/clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp#L515
can stop recursively creating storage locations when it hits a field of
reference type for a non-optional record:

https://github.com/llvm/llvm-project/blob/3ca5d8082a0c6bd9520544ce3bca11bf3e02a5fa/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp#L67

If an optional is reached through that field then it may not have a
storage location by the type we handle has_value in a transfer function.



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