Produce SymbolCast for a pointer-to-integer cast if the
support-symbolic-integer-casts flag is enabled.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | ||
---|---|---|
1022 | And it'd be great if you bring the original comment here, as the logic is here. |
- Move the comment hunk
clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | ||
---|---|---|
1022 | Ok, I've moved it. |
clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | ||
---|---|---|
1088 | Notify the user about the contract. | |
1095–1097 | Explain please, why do you need to create a new SymbolVal here, but not just returning V as long as you know that the type is the same? |
clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | ||
---|---|---|
1088 | Mistake. CastTy, not SafeTy |
Thanks for the review Denys, and sorry for the long delay with the update. I hope that this patch is going to complement nicely the rest of the cast patches.
clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | ||
---|---|---|
1088 | Okay, I've added an assertion for this check. | |
1095–1097 | You're right, we can just simply return V, I've updated like so. (I just wanted to make sure that the makeSymbolVal is consistent, but that has nothing to do with this patch.) |
Looks correct to me.
clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h | ||
---|---|---|
110–113 | You don't need to have gap between these two. They belong in the same overload set. | |
clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | ||
776–785 | ||
clang/test/Analysis/produce-ptr-to-integer-symbolcast.cpp | ||
25–28 | Is this the only obstacle to eradicate LocAsInteger? | |
clang/test/Analysis/symbol-simplification-mem-region-to-int-cast.cpp | ||
2–7 | I think you need to pin the target. You assume a specific pointer bitwidth in the test. | |
24 | Why is this `UNKNOWN? I would expect TRUE here as well. |
clang/test/Analysis/symbol-simplification-mem-region-to-int-cast.cpp | ||
---|---|---|
24 | Hmm, I meant it for line 39 :D |
You don't need to have gap between these two. They belong in the same overload set.