[all-commits] [llvm/llvm-project] 0086a3: [clang][dataflow] Fix bug in optional-checker's ha...
Yitzhak Mandelbaum via All-commits
all-commits at lists.llvm.org
Tue Jan 3 13:57:54 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0086a3555ac6cd76bb637252a0ba17c06c9b869b
https://github.com/llvm/llvm-project/commit/0086a3555ac6cd76bb637252a0ba17c06c9b869b
Author: Yitzhak Mandelbaum <yitzhakm at google.com>
Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths:
M clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
M clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp
Log Message:
-----------
[clang][dataflow] Fix bug in optional-checker's handling of nullopt constructor.
Currently, the checker only recognizes the nullopt constructor when it is called
without sugar, resulting in a crash in the (rare) case where it has been wrapped
in sugar. This relaxes the constraint by checking the constructor decl directly
(which always contains the same, desugared form) rather than the construct
expression (where the spelling depends on the context).
Differential Revision: https://reviews.llvm.org/D140921
More information about the All-commits
mailing list