[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-06-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. danielmarjamaki marked an inline comment as done. Closed by commit rL305669: [analyzer] Fix logical not for pointers with different bit width (authored by danielmarjamaki). Changed prior to commit:

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land. Looks good with a nit! Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:325 + Loc makeNull() { return

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-05-26 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D31029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-05-16 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 99114. danielmarjamaki added a comment. Fix review comments Repository: rL LLVM https://reviews.llvm.org/D31029 Files: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-05-10 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Sorry for the delay!!! Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:180 + inline const llvm::APSInt (QualType T, + bool isUnsigned = true) { +return getValue(0,

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-04-25 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D31029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-04-18 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D31029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-04-03 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D31029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-23 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki marked an inline comment as done. danielmarjamaki added a comment. In https://reviews.llvm.org/D31029#708567, @danielmarjamaki wrote: > In https://reviews.llvm.org/D31029#703428, @zaks.anna wrote: > > > Are there other cases where makeNull would need to be replaced? > > > There

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-23 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. In https://reviews.llvm.org/D31029#703428, @zaks.anna wrote: > Are there other cases where makeNull would need to be replaced? There might be. As I understand it, this is the only known case at the moment. Repository: rL LLVM

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-23 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 92773. danielmarjamaki added a comment. Added a testcase that will crash without the fix. Used the amdgcn target as that happens to use different pointer bit widths for different address spaces. Updated the comment. I am not good at english so I

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Are there other cases where makeNull would need to be replaced? Repository: rL LLVM https://reviews.llvm.org/D31029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Noel Grandin via Phabricator via cfe-commits
grandinj added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:313 - Loc makeNull() { -return loc::ConcreteInt(BasicVals.getZeroWithPtrWidth()); + // Pass type to accomodate for different pointer bit-witdths of different + //

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. I am not sure where to look. I heard somebody say OpenCL has different pointer widths. Repository: rL LLVM https://reviews.llvm.org/D31029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. So there is no LLVM supported target with different bit width pointer types? In case we have such a target upstreamed, you can add a test with the host-triple hardcoded into the test. Repository: rL LLVM https://reviews.llvm.org/D31029

[PATCH] D31029: [analyzer] Fix logical not for pointers with different bit width

2017-03-16 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki created this revision. The Static Analyzer assumed that all pointers had the same bit width. Now pass the type to the 'makeNull' method, to construct a null pointer of the appropiate bit width. Example code that does not work well: int main(void) {   __cm void *cm_p = 0;