[PATCH] D155844: [clang][dataflow] fix failing assert in copyRecord

2023-07-26 Thread Paul Semel via 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 rG145f353fd679: [clang][dataflow] fix failing assert in copyRecord (authored by paulsemel). Herald added a subscriber: cfe-commits. Repository: rG

[PATCH] D144892: [clang][dataflow] unnamed bitfields should be discarded in InitListExpr

2023-02-28 Thread Paul Semel via 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 rG96d035c1dcd7: [clang][dataflow] unnamed bitfields should be discarded in InitListExpr (authored by paulsemel). Herald added a subscriber:

[PATCH] D144546: [clang][dataflow] Fix assert for CXXConstructExpr argument number

2023-02-24 Thread Paul Semel via 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 rGe6e753d173db: [clang][dataflow] Fix wrong assert for CXXConstructExpr (authored by paulsemel). Herald added a subscriber: cfe-commits. Repository:

[PATCH] D47953: [builtin] Add bitfield support for __builtin_dump_struct

2018-06-29 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 153511. paulsemel added a comment. Fixed version problem. Now building. Repository: rC Clang https://reviews.llvm.org/D47953 Files: lib/CodeGen/CGBuiltin.cpp Index: lib/CodeGen/CGBuiltin.cpp

[PATCH] D47953: [builtin] Add bitfield support for __builtin_dump_struct

2018-06-29 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. In https://reviews.llvm.org/D47953#1143044, @dblaikie wrote: > This doesn't seem to build for me - so hard to debug/probe it: > > llvm/src/tools/clang/lib/CodeGen/CGBuiltin.cpp:1264:65: error: no viable > conversion from 'clang::QualType' to 'llvm::Type *' > >

[PATCH] D47953: [builtin] Add bitfield support for __builtin_dump_struct

2018-06-22 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. First thanks all for reviewing ! Basically, what's happening is that it works good with non-packed structures. Here is an example for packed structure (with unsigned signed short): c struct lol { unsigned short a:3; unsigned short b:2;

[PATCH] D47953: [builtin] Add bitfield support for __builtin_dump_struct

2018-06-20 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. I will for sure add tests @lebedev.ri . Fact is that, for the moment, this is not working as expected. This is why I am asking for a bit of help about this bitfield handling :) Comment at: lib/CodeGen/CGBuiltin.cpp:1250 + if (Info.IsSigned) { +

[PATCH] D47953: [builtin] Add bitfield support for __builtin_dump_struct

2018-06-14 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. ping :) @aaron.ballman Repository: rC Clang https://reviews.llvm.org/D47953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47953: [builtin] Add bitfield support for __builtin_dump_struct

2018-06-08 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. This version is working for non packed structures. For packed structures, it might sometimes work, sometimes not. The resulting assembly code seems to be the right one. If someone went through bitfields manipulation, please do not hesitate to comment ! Requesting for

[PATCH] D47953: [builtin] Add bitfield support for __builtin_dump_struct

2018-06-08 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. paulsemel added a reviewer: aaron.ballman. This is an attempt for adding bitfield support to __builtin_dump_struct. Repository: rC Clang https://reviews.llvm.org/D47953 Files: lib/CodeGen/CGBuiltin.cpp Index: lib/CodeGen/CGBuiltin.cpp

[PATCH] D46064: [llvm-objcopy] Add --localize-symbol option

2018-04-25 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. paulsemel added reviewers: jakehehrlich, echristo. Herald added a subscriber: llvm-commits. This option permit to localize a symbol by given its name. Repository: rL LLVM https://reviews.llvm.org/D46064 Files: test/tools/llvm-objcopy/localize.test

[PATCH] D46033: add check for long double for __builtin_dump_struct

2018-04-25 Thread Paul Semel via Phabricator via cfe-commits
paulsemel closed this revision. paulsemel added a comment. commited on r330808 Repository: rC Clang https://reviews.llvm.org/D46033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46033: add check for long double for __builtin_dump_struct

2018-04-24 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. paulsemel added a reviewer: aaron.ballman. This patch adds a test for long double format. Repository: rC Clang https://reviews.llvm.org/D46033 Files: test/CodeGen/dump-struct-builtin.c Index: test/CodeGen/dump-struct-builtin.c

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-17 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. In https://reviews.llvm.org/D45615#1069755, @aaron.ballman wrote: > LGTM! I will go ahead and commit on your behalf. Btw, if you're thinking of > making additional patches, now might be a good time to ask for commit > privileges >

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-17 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 142750. paulsemel added a comment. Removed the two existing types. Added the correct format sizing. Added tests for those formats. These version is now relying on the previous patch : https://reviews.llvm.org/D45665 Repository: rC Clang

[PATCH] D45665: [builtin-dump-struct] printf formats generation testing

2018-04-17 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. In https://reviews.llvm.org/D45665#1069075, @aaron.ballman wrote: > LGTM! Nice to hear ! As for the last time, as I don't have any rights to push this, I would really appreciate if you could do it for me ! :) Repository: rC Clang https://reviews.llvm.org/D45665

[PATCH] D45665: [builtin-dump-struct] printf format checking

2018-04-15 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 142548. paulsemel added a comment. Fixed typo.. Repository: rC Clang https://reviews.llvm.org/D45665 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/dump-struct-builtin.c Index: test/CodeGen/dump-struct-builtin.c

[PATCH] D45665: [builtin-dump-struct] printf format checking

2018-04-15 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. paulsemel added a reviewer: aaron.ballman. Added check for correct formats in CodeGen tests, to ensure we are printing the fields correctly. Added a fix that outcomed from this previous add Repository: rC Clang https://reviews.llvm.org/D45665 Files:

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-13 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. In https://reviews.llvm.org/D45615#1067068, @aaron.ballman wrote: > In https://reviews.llvm.org/D45615#1066975, @paulsemel wrote: > > > In https://reviews.llvm.org/D45615#1066973, @lebedev.ri wrote: > > > > > Tests? > > > > > > I can do this. But currently, I am not

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-13 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. In https://reviews.llvm.org/D45615#1066973, @lebedev.ri wrote: > Tests? I can do this. But currently, I am not testing the formats in the tests.. Repository: rC Clang https://reviews.llvm.org/D45615 ___ cfe-commits

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-13 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. paulsemel added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. There was missing some basic types format (like uint8_t..). This patch is meant to print them the correct way. Repository: rC Clang https://reviews.llvm.org/D45615 Files:

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-10 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 141920. paulsemel added a comment. Added triple option to CodeGen test so that it matches with the correct architecture Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-10 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. Thanks a lot for your help, updating the patch ! Repository: rC Clang https://reviews.llvm.org/D44093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-10 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. Ok, I found the problem. In fact the size of `long` is 4 bytes on your machine, but 8 bytes on mine. This makes this `// CHECK: [[LOAD1:%[0-9]+]] = load i64, i64* [[RES1]],` fail. Do you know a smart way to do it without dealing with type sizes ? Repository: rC

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-10 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 141913. paulsemel added a comment. Fixed printf warning generated in tests/CodeGen. Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Sema/SemaChecking.cpp

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-10 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. Sorry about it, I also have the warning on my machine, but not the error you get... Those test are actually working on my different linux machines, that's really weird. This one is actually really weird, because I could find manually the missing pattern in your

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-10 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 141890. paulsemel added a comment. Patch rebased. Minor fix for single quotes escaping. Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Sema/SemaChecking.cpp

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-10 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. In https://reviews.llvm.org/D44093#1063348, @aaron.ballman wrote: > In https://reviews.llvm.org/D44093#1063340, @paulsemel wrote: > > > I don't really know what's the procedure right now.. What should I do once > > you both accepted the patch ? :) > > > You're good to

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-10 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. I don't really know what's the procedure right now.. What should I do once you both accepted the patch ? :) Repository: rC Clang https://reviews.llvm.org/D44093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-10 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. In https://reviews.llvm.org/D44093#1063122, @arichardson wrote: > I'm also often restricted to using printf for debugging so this looks really > useful! > > However, before committing this I feel like the test should also verify that > the format strings that are

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-09 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 141762. paulsemel added a comment. Added a good test for the `int (*)()` function prototype, as we decided to accept it as a valid function for the dumper Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-09 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added inline comments. Comment at: test/Sema/builtin-dump-struct.c:8 + void *b; + int (*goodfunc)(const char *, ...); + int (*badfunc1)(const char *); aaron.ballman wrote: > paulsemel wrote: > > aaron.ballman wrote: > > > paulsemel wrote: > > > >

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-09 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 141745. paulsemel marked an inline comment as done. paulsemel added a comment. Updated the amperstamp in the Sema test to be consistent with the remaining part of it. Repository: rC Clang https://reviews.llvm.org/D44093 Files:

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-04-09 Thread Paul Semel via Phabricator via cfe-commits
paulsemel marked an inline comment as done. paulsemel added a comment. No problem, thanks for getting back on this ! I was busy because of my midterms anyway :) Comment at: test/Sema/builtin-dump-struct.c:8 + void *b; + int (*goodfunc)(const char *, ...); + int

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-29 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 140304. paulsemel marked 3 inline comments as done. paulsemel added a comment. Added Aaron suggestions. Fixed a bug when having nested anonymous unions and structures. Repository: rC Clang https://reviews.llvm.org/D44093 Files:

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-29 Thread Paul Semel via Phabricator via cfe-commits
paulsemel marked 6 inline comments as done. paulsemel added inline comments. Comment at: test/Sema/builtin-dump-struct.c:8 + void *b; + int (*goodfunc)(const char *, ...); + int (*badfunc1)(const char *); aaron.ballman wrote: > Can you also add a test for:

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-17 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 138832. paulsemel added a comment. Applied Aaron's suggestions Added Sema tests for the typechecking Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Sema/SemaChecking.cpp

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-16 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 138687. paulsemel added a comment. Added some tests (unit tests for almost every types) and some other tests with tricky cases. More tests are coming soon. Repository: rC Clang https://reviews.llvm.org/D44093 Files:

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-12 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. Hi, In https://reviews.llvm.org/D44093#1034610, @lebedev.ri wrote: > BTW, as far as i can tell this still has zero test coverage (no new tests are > being added). > I'd expect to see the tests for the actual output > > - one struct per each type it is able to print

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-12 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 137998. paulsemel added a comment. Applied Francis' suggestions Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Sema/SemaChecking.cpp Index: lib/Sema/SemaChecking.cpp

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-09 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 137775. paulsemel added a comment. Added recursive type pretty-printing as suggested by Aaron. Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Sema/SemaChecking.cpp

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-09 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1252 + Types[getContext().getPointerType(getContext().CharTy)] = "%s"; + GENERATE_TYPE_QUALIFIERS_NO_RESTRICT(getContext().CharTy, "%s") +} aaron.ballman wrote: > paulsemel

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-08 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 137578. paulsemel marked 3 inline comments as done. paulsemel added a comment. Applied Aaron suggestions Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-08 Thread Paul Semel via Phabricator via cfe-commits
paulsemel marked 12 inline comments as done. paulsemel added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1231 + Types[getContext().VoidPtrTy] = "%p"; + Types[getContext().FloatTy] = "%f"; + Types[getContext().DoubleTy] = "%f";

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-07 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 137371. paulsemel added a comment. Updated with more context. Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def include/clang/Basic/DiagnosticSemaKinds.td lib/CodeGen/CGBuiltin.cpp

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-07 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 137369. paulsemel added a comment. Applied Aaron suggestion changes. Added parameters checking in Sema. Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-07 Thread Paul Semel via Phabricator via cfe-commits
paulsemel marked 2 inline comments as done. paulsemel added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1206 +QualType Arg0Type = Arg0->getType()->getPointeeType(); +const RecordType *RT = Arg0Type->getAs(); + aaron.ballman wrote: > You can

[PATCH] D44154: [checker] PoC : Unsequenced Modification Checker

2018-03-06 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. Hi Aleksei, In https://reviews.llvm.org/D44154#1028612, @a.sidorin wrote: > Hi Paul, > > You didn't add any reviewer. Do you need a review for this checker? Are you > going to contribute this code to the upstream? I was actually uploading this because Artem

[PATCH] D44154: [checker] PoC : Unsequenced Modification Checker

2018-03-06 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. Herald added subscribers: cfe-commits, mgorny. \!/ This is only a proof of concept ! The purpose of this checker is to improve the detection of unsequenced modifications. Indeed, there is a warning the tries to detect those, but this is not efficient at all.

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-06 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 137141. paulsemel added a comment. Applied Aaron change suggestions Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp Index: lib/CodeGen/CGBuiltin.cpp

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-06 Thread Paul Semel via Phabricator via cfe-commits
paulsemel marked 4 inline comments as done. paulsemel added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1208 + +assert(RT && "The first argument must be a record type"); + aaron.ballman wrote: > I don't see anything enforcing this constraint, so

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-05 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. paulsemel added a reviewer: aaron.ballman. The purpose of this new builtin is to be able to pretty print any structure at runtime. This might be really useful when debugging is not an option or is fastidious (like for kernel development). Repository: rC