[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-10-04 Thread Bill Wendling via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9a954c693573: [Clang] Implement the 'counted_by' attribute (authored by void). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llv

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-10-03 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:8420-8428 +if (Result.getResultKind() == LookupResult::Found) { + SourceRange SR = CBA->getCountedByFieldLoc(); + Diag(SR.getBegin(), + diag::err_flexible_array_counted_by_attr_field_n

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-29 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Okay, I now have a suggested fix hint. PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-29 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 557496. void added a comment. FINALLY! found out how to do suggestions for typos. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/docs/ReleaseNotes.rst

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-28 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 557473. void added a comment. Add a "FIXME" to improve the diagnostics with a typo hint. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/docs/ReleaseNotes

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-28 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4246 +private: + SourceRange countedByFieldLoc; +public: aaron.ballman wrote: > void wrote: > > aaron.ballman wrote: > > > void wrote: > > > > erichkeane wrote: > > > > > aaron

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-28 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 557462. void marked an inline comment as done. void added a comment. Move attribute checking over to SemaDeclAttr.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Fil

[PATCH] D144136: Add a "remark" to report on array accesses

2023-09-27 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. The GitHub repo with this and the `counted_by` change: https://github.com/bwendling/llvm-project/tree/array-bounds-remarks-with-counted-by Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144136/new/ https://reviews.llvm.org/D14

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-27 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 557415. void added a comment. Use CBA as an acronym of CountedByAttribute instead of EBA, which is oldspeak. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: cla

[PATCH] D144136: Add a "remark" to report on array accesses

2023-09-26 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D144136#4639907 , @kees wrote: > Can you refresh this patch to work with https://reviews.llvm.org/D148381 ? My > testing seems to imply that it doesn't know the size of the array. I assume > the `if (!IsUnboundedArray)` check is

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-21 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Friendly Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-18 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/AST/Decl.h:4272-4275 +FieldDecl *FD = nullptr; +for (FieldDecl *Field : fields()) + FD = Field; +return FD; erichkeane wrote: > aaron.ballman wrote: > > void wrote: > > > aaron.ballman w

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-15 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D148381#4646780 , @kees wrote: > In D148381#4645600 , @void wrote: > >> Added more error messages. Changed some code around to align with coding >> practices. Added some more test cases.

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-14 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4246 +private: + SourceRange countedByFieldLoc; +public: aaron.ballman wrote: > void wrote: > > erichkeane wrote: > > > aaron.ballman wrote: > > > > Teeny tiniest of coding sty

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-14 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 556749. void added a comment. Add release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/Decl.h c

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-13 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/AST/Decl.h:4272-4275 +FieldDecl *FD = nullptr; +for (FieldDecl *Field : fields()) + FD = Field; +return FD; aaron.ballman wrote: > Could this be implemented as: `return !field_empty() ?

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-13 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 556734. void marked 36 inline comments as done. void added a comment. Added more error messages. Changed some code around to align with coding practices. Added some more test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-12 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 556619. void added a comment. This is ready for review. Please take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h cla

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-08 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 556324. void added a comment. Add test output when the attribute isn't used. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h cl

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-08 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/test/CodeGen/attr-counted-by.c:2 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 3 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -O2 -Wall -fsanitize=array-bounds,object-size

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-08 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/test/CodeGen/attr-counted-by.c:2 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 3 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -O2 -Wall -fsanitize=array-bounds,object-size

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-08 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 556323. void edited the summary of this revision. void added a comment. Fix docs to use the correct code examples throughout. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148

[PATCH] D148381: [Clang] Add counted_by attribute

2023-09-08 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. I changed more than just the testcase (not a lot, but non-trivial nonetheless). PTAL. Comment at: clang/test/CodeGen/attr-counted-by.c:2 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 3 +// RUN: %clang_

[PATCH] D148381: [Clang] Add counted_by attribute

2023-09-08 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 556312. void marked an inline comment as done. void added a comment. Remove unneded extern decl from test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang

[PATCH] D148381: [Clang] Add counted_by attribute

2023-09-08 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 556310. void added a comment. - Expand test to show the unsanitized version, - Unify the ways of finding a specific field based on a predicate, - Make sure we're using the correct types in a couple of key places. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D148381: [Clang] Add counted_by attribute

2023-09-06 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D148381#4639909 , @kees wrote: > I can generate warnings for anonymous structs were the `__counted_by` member > is reported as "not found". For example: > > little.c:7:28: warning: counted_by field 'count' not found > 7 |

[PATCH] D148381: [Clang] Add counted_by attribute

2023-09-06 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. This is now ready for a non-WIP review. PTAL. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 ___ cfe-commits mailing list cfe-commits

[PATCH] D148381: [Clang] Add counted_by attribute

2023-09-05 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 555946. void added a comment. Update documentation. Cribbed off of Qing Zhao's GCC implementation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include

[PATCH] D159421: [NFC] Remove unneeded header includes

2023-09-05 Thread Bill Wendling via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7d6283fd0901: [NFC] Remove unneeded header includes (authored by void). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159421/new/ https://reviews.llvm.org/D

[PATCH] D159435: [NFC] remove unneded header includes

2023-09-05 Thread Bill Wendling 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 rGb0cbf3a0dac5: [NFC] remove unneded header includes (authored by void). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D159435: [NFC] remove unneded header includes

2023-09-04 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: nickdesaulniers, aaron.ballman. Herald added a project: All. void requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, jplehr, sstefan1. Herald added a project: clang. This time from clang/Pa

[PATCH] D159421: [NFC] Remove unneeded header includes

2023-09-04 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: erichkeane, nickdesaulniers. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Use forward decls instead of #including the header files. Repository: rG LL

[PATCH] D159320: [NFC] Cleanup some #includes in header files

2023-09-01 Thread Bill Wendling via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG671365225ccc: [NFC] Cleanup some #includes in header files (authored by void). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159320/new/ https://reviews.llv

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-31 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 555219. void added a comment. Fix testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h clang/include/clang/AST/DeclBase.h

[PATCH] D159320: [NFC] Cleanup some #includes in header files

2023-08-31 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: nickdesaulniers, erichkeane. Herald added a subscriber: ChuanqiXu. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Limit the #includes to the least necessar

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-31 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 555180. void added a comment. Remove un-needed change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h clang/include/clang/AST/

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-31 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 555169. void added a comment. Add a few more tests to the codegen testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h cla

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-30 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 554792. void added a comment. Add testcases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h clang/include/clang/AST/DeclBase.h

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-30 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 554769. void added a comment. Add more diagnostics. Coming next: testcases!!! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-29 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 554533. void added a comment. Fix some issues Nick pointed out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h clang/include/c

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-29 Thread Bill Wendling via Phabricator via cfe-commits
void marked 4 inline comments as done. void added a comment. In D148381#4625462 , @nickdesaulniers wrote: > I assume you plan to add some clang CodeGen tests at some point? Yes. :-) Comment at: clang/lib/CodeGen/CodeGenFunction.h:531

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-29 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D148381#4626229 , @serge-sans-paille wrote: > Jumping a bit late in the thread, apologize in advance if I missed something. > > The GCC version of the attributes seems to be `element_count` (as found in > the link https://gcc.gn

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-28 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 554083. void added a comment. Move the isFlexibleArrayMemberLike fully into Decl and fix tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/cl

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-25 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 553682. void added a comment. Modify sanitize scope to avoid the instruction creation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/A

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-22 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 552554. void added a comment. Fix clang-ast-dump issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h clang/include/clang/Bas

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-22 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/AST/Decl.cpp:4541-4544 +bool FieldDecl::isFlexibleArrayMemberLike( +ASTContext &Ctx, +LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel, +bool IgnoreTemplateOrMacroSubstitution) const { nick

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-22 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 552552. void marked 3 inline comments as done. void added a comment. Address Nick's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clan

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-22 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 552318. void added a comment. Support when doing a _bdos on the full structure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-22 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 552305. void added a comment. Fix a segfault. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/Attr.td

[PATCH] D148381: [WIP][Clang] Add counted_by attribute

2023-08-21 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 552184. void edited the summary of this revision. void added a comment. Make __builtin_dynamic_object_size use the __counted_by attribute to help determine the object size. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-08-10 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 549232. void added a comment. Update to more match Qing's GCC implementation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/Basic/Attr.td

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-07-11 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 539219. void added a comment. Rebasing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-05-22 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 524541. void added a comment. Herald added a subscriber: ormris. Add bounds checking for the "ArrayBounds" saniziter kind. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-05-11 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 521406. void added a comment. Use strings for the attribute argument. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/Basic/Attr.td clang/

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-05-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 519605. void marked an inline comment as done. void added a comment. Use "Expected" for the SourceRange imports. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files:

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-05-01 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 518546. void added a comment. Improve error message to use the unknown field's name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/Basic/A

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-28 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 518106. void added a comment. Change sanitizer scope because instructions may be created. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/Ba

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-28 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 518013. void marked an inline comment as done. void added a comment. Fix the way the source ranges are imported via the ASTImporter. Do other minor fixes according to feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-28 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4170 +private: + mutable SmallVector CountFieldRanges; +public: nickdesaulniers wrote: > `mutable`...my least favorite keyword in C++. I

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-27 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 517734. void added a comment. Use the new memory location. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/Basic/Attr.td clang/include/cla

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-27 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. This is a precursor to specifying the field with the designated initializer syntax. Therefore, it may be a bit cumbersome. The code in `CGExpr.cpp` is decidedly gross. I would appreciate any advice on how to de-grossify it. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-27 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 517704. void added a comment. Fix ICE when the FD isn't found. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/Basic/Attr.td clang/include

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-27 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 517700. void added a comment. Add the ability to specify a "path" to the element count if it resides within a sub-structure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148

[PATCH] D147743: [Clang][NFC] Rename methods/vars to reflect their real usage

2023-04-18 Thread Bill Wendling 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 rGb51a03e1bbe7: [Clang][NFC] Rename methods/vars to reflect their real usage (authored by void). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D147743: [Clang][NFC] Rename methods/vars to reflect their real usage

2023-04-18 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 514730. void marked an inline comment as done. void added a comment. Add comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147743/new/ https://reviews.llvm.org/D147743 Files: clang-tools-extra/clangd/FindT

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-17 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 514451. void added a comment. Herald added a subscriber: jdoerfert. Fix failing testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381 Files: clang/include/clang/Ba

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-17 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:951-952 +if (auto *ME = dyn_cast(CE->getSubExpr())) { + if (ME->isFlexibleArrayMemberLike(CGF.getContext(), +StrictFlexArraysLevel, true)) { +if (auto *MD

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-17 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D148381#4274857 , @nickdesaulniers wrote: > Cool! > > How about some codegen tests? I'll add those to the next iteration. :-) > This looks a lot like the EuroLLVM keynote: > https://llvm.swoogo.com/2023eurollvm/agenda (Thursda

[PATCH] D147743: [Clang][NFC] Rename methods/vars to reflect their real usage

2023-04-17 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 514395. void added a comment. Reformat. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147743/new/ https://reviews.llvm.org/D147743 Files: clang-tools-extra/clangd/FindTarget.cpp clang-tools-extra/clangd/XRefs

[PATCH] D147743: [Clang][NFC] Rename methods/vars to reflect their real usage

2023-04-17 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Friendly ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147743/new/ https://reviews.llvm.org/D147743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-14 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Note: This is a work-in-progress, so there's no need for a formal review, though any suggestions will definitely be appreciated. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148381/new/ https://reviews.llvm.org/D148381

[PATCH] D148381: [WIP][Clang] Add element_count attribute

2023-04-14 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: kees, nickdesaulniers. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a reviewer: aaron.ballman. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a su

[PATCH] D147743: [Clang][NFC] Rename methods/vars to reflect their real usage

2023-04-07 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 511772. void added a comment. Herald added a subscriber: kadircet. Herald added a project: clang-tools-extra. Fix compilation issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147743/new/ https://reviews.llvm.o

[PATCH] D147580: [Clang][NFC] Refactor "Designators" to be more similar

2023-04-07 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D147580#4250232 , @shafik wrote: > I guess I should have waited till I saw: https://reviews.llvm.org/D147673 Yeah, sorry about that. I realized that I still needed to add the testcase before continuing. :-) Repository: rG LL

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-07 Thread Bill Wendling 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 rG2cbf5127d585: [Clang] Improve designated inits diagnostic location (authored by void). Changed prior to commit: https://reviews.llvm.org/D147673?v

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-07 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added inline comments. Comment at: clang/test/SemaCXX/cxx2b-designated-initializers.cpp:13 + const S result { // expected-error {{field designator (null) does not refer to any field in type 'const S'}} +.a = x + }; --

[PATCH] D147743: [Clang][NFC] Rename methods/vars to reflect their real usage

2023-04-06 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: rsmith, rjmccall, aaron.ballman, dblaikie. Herald added a subscriber: arphaman. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The "getField" method is a b

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 511529. void added a comment. Remove extraneous space. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147673/new/ https://reviews.llvm.org/D147673 Files: clang/lib/Sema/SemaInit.cpp clang/test/SemaCXX/cxx2b-de

[PATCH] D147673: [Clang] Improve designated inits diagnostic location

2023-04-05 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added a reviewer: rsmith. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A "null" designator won't have a valid location. Try to approximate this location as best we can in

[PATCH] D147580: [Clang][NFC] Refactor "Designators" to be more similar

2023-04-05 Thread Bill Wendling 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 rGbfee6f114236: [Clang][NFC] Refactor "Designators" to be more similar (authored by void). Changed prior to commit: https://reviews.llvm.org/D147580

[PATCH] D147580: [Clang] Refactor "Designators" to be more similar [NFC]

2023-04-05 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 511215. void added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147580/new/ https://reviews.llvm.org/D147580 Files: clang/include/clang/AST/Expr.h clang/include/clang/Sema/Designator.h c

[PATCH] D147580: [Clang] Refactor "Designators" to be more similar [NFC]

2023-04-04 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: aaron.ballman, rjmccall, rsmith, dblaikie, shafik. Herald added a subscriber: martong. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This makes the two in

[PATCH] D144136: Add a "remark" to report on array accesses

2023-03-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 502766. void added a comment. Slight typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144136/new/ https://reviews.llvm.org/D144136 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Ba

[PATCH] D144136: Add a "remark" to report on array accesses

2023-03-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 502760. void added a comment. Revise with Kees's code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144136/new/ https://reviews.llvm.org/D144136 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/inc

[PATCH] D144136: Add a "remark" to report on array accesses

2023-02-21 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 499321. void added a comment. Report when there's a non-constant access: array_access_report.c:32:17: remark: accessing fixed sized array 'int[16]' by 'index' [-Rarray-bounds] report_size(p->array, index); ^ Repository: rG LLVM Github Monor

[PATCH] D144136: Add a "remark" to report on array accesses

2023-02-21 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D144136#4137143 , @kees wrote: > Here's a test-case. I'd expect 6 remarks from building this: > > /* Build with -Wall -O2 -fstrict-flex-arrays=3 -fsanitize=bounds > -Rarray-bounds */ > #include > #include > #include >

[PATCH] D144136: Add a "remark" to report on array accesses

2023-02-16 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D144136#4131825 , @aaron.ballman wrote: > I'd like to understand what the overhead is for this. How much overhead does > this add when the remark is disabled? How much overhead does this add when > the remark is enabled? > >> T

[PATCH] D144136: Add a "remark" to report on array accesses

2023-02-15 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This will report a ton of information. It's basically only good for piping to a file and using Perl to gather any useful informati

[PATCH] D140584: [Clang] Refactor "Designators" into a unified implementation [NFC]

2023-02-07 Thread Bill Wendling via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG3c07db5f58e9: [Clang] Refactor "Designators" into a unified implementation [NFC] (authored by void). Repository: rG LLV

[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

2023-02-06 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D143300#4108500 , @haowei wrote: > FYI, this patch looks like was pushed into a new "Main" branch instead of the > actual "main" branch.: > > commit f85a9a6452e8f49f9768d66a86434a88a5891614 (origin/Main) > Author: Bill Wendli

[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

2023-02-06 Thread Bill Wendling 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 rGf85a9a6452e8: [randstruct] Don't allow implicit forward decl to stop struct randomization (authored by void). Repository: rG LLVM Github Monorepo

[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

2023-02-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 495237. void added a comment. Remove extra line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143300/new/ https://reviews.llvm.org/D143300 Files: clang/lib/Sema/SemaDecl.cpp clang/test/CodeGen/init-randomize

[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

2023-02-06 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:18891 +// incomplete definition. +if (const auto *RD = dyn_cast(D)) + return !RD->isCompleteDefinition(); nickdesaulniers wrote: > nickdesaulniers wrote: > > void wrote:

[PATCH] D143205: [clang] add __has_extension(gnu_asm_goto_with_outputs_full)

2023-02-06 Thread Bill Wendling via Phabricator via cfe-commits
void accepted this revision. void added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143205/new/ https://reviews.llvm.org/D143205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

2023-02-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 495204. void marked an inline comment as done. void added a comment. Use TagDecl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143300/new/ https://reviews.llvm.org/D143300 Files: clang/lib/Sema/SemaDecl.cpp

[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

2023-02-06 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:18891 +// incomplete definition. +if (const auto *RD = dyn_cast(D)) + return !RD->isCompleteDefinition(); nickdesaulniers wrote: > what about `EnumDecl`s? I suspect the s

[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

2023-02-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 495194. void added a comment. Fix test and add check for EnumDecl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143300/new/ https://reviews.llvm.org/D143300 Files: clang/lib/Sema/SemaDecl.cpp clang/test/Code

[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

2023-02-06 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D143300#4107132 , @nickdesaulniers wrote: > In D143300#4104469 , @MaskRay wrote: > >> `clang/test/CodeGen/init-randomized-struct-fwd-decl.c` passes without this >> patch. Is it correct?

[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

2023-02-03 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 494772. void added a comment. Move test and improve checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143300/new/ https://reviews.llvm.org/D143300 Files: clang/lib/Sema/SemaDecl.cpp clang/test/CodeGen/ini

[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

2023-02-03 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: aaron.ballman, MaskRay, nickdesaulniers. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If a struct/enum type used in a record doesn't have a forward decl

  1   2   3   4   5   6   >