[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2023-05-19 Thread Domján Dániel via Phabricator via cfe-commits
isuckatcs added inline comments. Comment at: clang/test/Analysis/array-punned-region.c:23 + BITFIELD_CAST *pff = + int a = *((int *)pff + 2); // expected-warning{{Assigned value is garbage or undefined [core.uninitialized.Assign]}} + return a; @steakhal

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-05-05 Thread Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdf5801806d03: [analyzer] Get direct binding for specific punned case (authored by einvbri vince.a.bridg...@ericsson.com). Repository: rG LLVM

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-05-05 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers marked an inline comment as done. vabridgers added a comment. Thanks @martong. I fixed the "typo" :/, landing. Best! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124349/new/ https://reviews.llvm.org/D124349

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-05-05 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 427246. vabridgers added a comment. fix a stupid leftover cut/paste mistake in the test case :/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124349/new/ https://reviews.llvm.org/D124349 Files:

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-05-05 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. LGTM! Thanks Vince! Comment at: clang/test/Analysis/array-punned-region.c:38 + ff.b[0] = 3; + clang_analyzer_eval(*((int *)pff + 2) == 3); // expected-warning{{TRUE}} // Or should this be `pff + 3` ??? +}

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-05-04 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 427106. vabridgers added a comment. Address comments from @martong Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124349/new/ https://reviews.llvm.org/D124349 Files:

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-05-04 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added a comment. Thanks for the comments! Per our discussion, I'll create a different test case with a pinned target and add the additional test case to be sure we see expected behavior. Best! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-05-04 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D124349#3490524 , @martong wrote: > Can we have a test for this, got idea from here > (https://stackoverflow.com/questions/4129961/how-is-the-size-of-a-struct-with-bit-fields-determined-measured) > > typedef struct > { >

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-05-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Can we have a test for this, got idea from here (https://stackoverflow.com/questions/4129961/how-is-the-size-of-a-struct-with-bit-fields-determined-measured) typedef struct { unsigned int a:1; unsigned int x:31; unsigned int c:1;

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-04-27 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added a comment. polite ping to @NoQ and/or @martong. @steakhal is ok with this change, are you ok if I land this? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124349/new/ https://reviews.llvm.org/D124349

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-04-25 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 424844. vabridgers added a comment. update LIT per comments from @steakhal Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124349/new/ https://reviews.llvm.org/D124349 Files:

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-04-25 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added inline comments. Comment at: clang/test/Analysis/array-struct-region.c:362-366 +int array_struct_bitfield_1() { + BITFIELD_CAST ff = {0}; + BITFIELD_CAST *pff = + return *((int *)pff + 1); +} steakhal wrote: > ```lang=c > void

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-04-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. Looks good. Wait for an other accept. Comment at: clang/test/Analysis/array-struct-region.c:362-366 +int array_struct_bitfield_1() { + BITFIELD_CAST ff = {0}; +

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-04-24 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 424796. vabridgers added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124349/new/ https://reviews.llvm.org/D124349 Files: clang/lib/StaticAnalyzer/Core/RegionStore.cpp

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-04-24 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers created this revision. vabridgers added reviewers: NoQ, steakhal. Herald added subscribers: manas, ASDenysPetrov, martong, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: All. vabridgers requested review of this