[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2022-10-31 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2868-2873 + // If we happen to share the same indirect and default dest, don't re-add + // stores. That was done for the default destination in the above call to + // EmitAsmStores. + llvm::B

[PATCH] D134902: [clang] Implement -fstrict-flex-arrays=3

2022-09-29 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added a reviewer: kees. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The -fstrict-flex-arrays=3 is the most restrictive type of flex arrays. No number, including 0, is al

[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

2022-10-03 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: efriedma, kees, serge-sans-paille. Herald added subscribers: steakhal, martong. Herald added a reviewer: NoQ. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.

[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

2022-10-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 465127. void marked 3 inline comments as done. void added a comment. Fix typos. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135107/new/ https://reviews.llvm.org/D135107 Files: clang/include/clang/Basic/LangOp

[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

2022-10-04 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:369-376 +/// Any trailing array memeber is a FAM. +Default = 0, +/// Any trailing array member of undefined, 0, or 1 size is a FAM. +OneZeroOrIncomplete = 1, +/// Any trailing arra

[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

2022-10-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 465129. void marked an inline comment as done. void added a comment. Use an already available context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135107/new/ https://reviews.llvm.org/D135107 Files: clang/inc

[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

2022-10-04 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/Driver/Options.td:1155 + NormalizedValuesScope<"LangOptions::StrictFlexArraysLevelKind">, + NormalizedValues<["Default", "OneZeroOrIncomplete", "ZeroOrIncomplete", "Incomplete"]>, HelpText<"Enable optimizations bas

[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

2022-10-05 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 465526. void added a comment. Rebase with ToT. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135107/new/ https://reviews.llvm.org/D135107 Files: clang/include/clang/AST/Expr.h clang/include/clang/Basic/LangOp

[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

2022-10-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 rG7404b855e528: [clang][NFC] Use enum for -fstrict-flex-arrays (authored by void). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

2022-10-06 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D135107#3840602 , @ronlieb wrote: > hi, seeing our amdgpu buildbot broken with this patch. please look into ? > let me know if you any help on our end. > https://lab.llvm.org/buildbot/#/builders/193/builds/19744 It's been fixed.

[PATCH] D134902: [clang] Implement -fstrict-flex-arrays=3

2022-10-07 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added inline comments. Comment at: clang/test/CodeGen/bounds-checking-fam.c:2 // REQUIRES: x86-registered-target -// RUN: %clang_cc1 -emit-llvm -triple x86_64 -fstrict-flex-arrays=0 -fsanitize=array-bounds%s -o - | FileCheck %

[PATCH] D134902: [clang] Implement -fstrict-flex-arrays=3

2022-10-07 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 466011. void added a comment. Herald added subscribers: steakhal, martong. Herald added a reviewer: NoQ. Update comments to reflect reality. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134902/new/ https://review

[PATCH] D134902: [clang] Implement -fstrict-flex-arrays=3

2022-10-10 Thread Bill Wendling via Phabricator via cfe-commits
void added a reviewer: rsmith. void added a subscriber: rsmith. void added a comment. @rsmith, @serge-sans-paille, and @kees, I need some advice. There's a test in `clang/test/CodeGen/bounds-checking.c` that's checking bounds stuff on unions. The behavior is...weird to me. It says that an array

[PATCH] D135727: [clang] Correct sanitizer behavior in union FAMs

2022-10-11 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: kees, serge-sans-paille, rsmith, efriedma. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang doesn't have the same behavior as GCC does with union flexi

[PATCH] D135727: [clang] Correct sanitizer behavior in union FAMs

2022-10-12 Thread Bill Wendling via Phabricator via cfe-commits
void marked 2 inline comments as done. void added a comment. @kees @serge-sans-paille: It appears to me that a terminating array of size > 2 *isn't* treated as a FAM in Clang, at least Clang warns about it. The first failure above (`clang/test/Sema/array-bounds-ptr-arith.c`) shows that. It turns

[PATCH] D135818: [clang] Update ASM goto documentation to reflect how Clang differs from GCC

2022-10-12 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added a reviewer: nickdesaulniers. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D135818 Files: clang/do

[PATCH] D135818: [clang] Update ASM goto documentation to reflect how Clang differs from GCC

2022-10-12 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 467284. void added a comment. Update with example. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135818/new/ https://reviews.llvm.org/D135818 Files: clang/docs/LanguageExtensions.rst Index: clang/docs/Languag

[PATCH] D135818: [clang] Update ASM goto documentation to reflect how Clang differs from GCC

2022-10-12 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/docs/LanguageExtensions.rst:1555 + on the indirect branch may result in undefined behavior and should be + avoided. shafik wrote: > It would be helpful to provide an example of what is not supported. If you > can

[PATCH] D135818: [clang] Update ASM goto documentation to reflect how Clang differs from GCC

2022-10-13 Thread Bill Wendling via Phabricator via cfe-commits
void marked 2 inline comments as done. void added inline comments. Comment at: clang/docs/LanguageExtensions.rst:1553 + implementation`_ in + that Clang doesn't support outputs on the indirect branch. Use of an output + on

[PATCH] D135818: [clang] Update ASM goto documentation to reflect how Clang differs from GCC

2022-10-13 Thread Bill Wendling via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. void marked an inline comment as done. Closed by commit rG8c7b3461a534: [clang] Update ASM goto documentation to reflect how Clang differs from GCC (authored by void). Changed prior to commit: https://reviews.llvm.org/D13

[PATCH] D135920: [clang][Sema] Use correct array size for diagnostic

2022-10-13 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: kees, serge-sans-paille, rsmith, efriedma. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The diagnostic was confusing and reporting that an array contains

[PATCH] D135727: [clang] Correct sanitizer behavior in union FAMs

2022-10-13 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D135727#3854252 , @kees wrote: > In D135727#3853896 , @void wrote: > >> @kees @serge-sans-paille: It appears to me that a terminating array of size >> > 2 *isn't* treated as a FAM in Clan

[PATCH] D135920: [clang][Sema] Use correct array size for diagnostic

2022-10-13 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:16068 DiagRuntimeBehavior(BaseExpr->getBeginLoc(), BaseExpr, PDiag(DiagID) << toString(index, 10, true) - << toString(size, 10, true) ---

[PATCH] D135989: [clang][Sema] Use size of char for void types

2022-10-14 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: serge-sans-paille, kees, nickdesaulniers. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The extension that allows for pointer arithmetic on 'void' types t

[PATCH] D135989: [clang][Sema] Use size of char for void types

2022-10-14 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/test/Sema/array-bounds-ptr-arith.c:14 +void* broken (struct ext2_super_block *es,int a) { + return (void *)es->s_uuid + 9; // expected-warning {{the pointer incremented by 9 refers past the end of the array (that contains 8 elements

[PATCH] D135989: [clang][Sema] Use size of char for void types

2022-10-14 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/test/Sema/array-bounds-ptr-arith.c:14 +void* broken (struct ext2_super_block *es,int a) { + return (void *)es->s_uuid + 9; // expected-warning {{the pointer incremented by 9 refers past the end of the array (that contains 8 elements

[PATCH] D135989: [clang][Sema] Use size of char for void types

2022-10-14 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 467912. void added a comment. Fix up testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135989/new/ https://reviews.llvm.org/D135989 Files: clang/lib/Sema/SemaChecking.cpp clang/test/Sema/array-bounds-pt

[PATCH] D135989: [clang][Sema] Use size of char for void types

2022-10-14 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 rG91b3823bd000: [clang][Sema] Use size of char in bits for void types (authored by void). Changed prior to commit: https://reviews.llvm.org/D135989?

[PATCH] D135989: [clang][Sema] Use size of char for void types

2022-10-14 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D135989#3859763 , @nickdesaulniers wrote: > LGTM; please consider appending to the commit message something along the > lines of "operations on the result of getTypeSize() are in bits, not bytes. > Using 1 as the value for voi

[PATCH] D135920: [clang][Sema] Use correct array size for diagnostic

2022-10-14 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 467941. void added a comment. Update test to use a smaller index. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135920/new/ https://reviews.llvm.org/D135920 Files: clang/lib/Sema/SemaChecking.cpp clang/test/S

[PATCH] D135920: [clang][Sema] Use correct array size for diagnostic

2022-10-17 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/test/SemaCXX/array-bounds.cpp:240 -((char*)foo)[sizeof(foo)] = '\0'; // expected-warning {{array index 32768 is past the end of the array (which contains 32768 elements)}} +((char*)foo)[sizeof(foo)] = '\0'; // expected-wa

[PATCH] D135920: [clang][Sema] Use correct array size for diagnostic

2022-10-17 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 468353. void added a comment. Improve the error message to include how many bytes the index goes over warning: the pointer incremented by 14 refers 1 byte past the end of the array (that has type 'const char[13]') Repository: rG LLVM Github Monorepo CHAN

[PATCH] D135920: [clang][Sema] Use correct array size for diagnostic

2022-10-17 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 468355. void added a comment. Update more testcases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135920/new/ https://reviews.llvm.org/D135920 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/li

[PATCH] D135920: [clang][Sema] Use correct array size for diagnostic

2022-10-17 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. The messages that's a bit annoying are the ones reporting "0 bytes past the end of the array": warning: array index 2 is 0 bytes past the end of the array (that has type 'int[2]') I'm not sure what to do with these (except to leave them alone). Repository: rG LLVM G

[PATCH] D135920: [clang][Sema] Use correct array size for diagnostic

2022-10-17 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 468356. void added a comment. Fix rogue test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135920/new/ https://reviews.llvm.org/D135920 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/

[PATCH] D135920: [clang][Sema] Use correct array size for diagnostic

2022-10-18 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D135920#3863648 , @shafik wrote: > The current approach of mixing bytes and indices in the same diagnostic is > too confusing. "Current" approach? > I think we see some acceptable messages for out of bounds access by looking >

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

2022-12-22 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: aaron.ballman, rjmccall, rsmith, dblaikie. Herald added subscribers: arphaman, martong. Herald added a reviewer: shafik. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: c

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

2023-01-03 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/D140584/new/ https://reviews.llvm.org/D140584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

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

2023-01-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 486436. void marked 4 inline comments as done. void added a comment. Herald added subscribers: libcxx-commits, kadircet. Herald added projects: libc++abi, clang-tools-extra. Herald added a reviewer: libc++abi. Combine the array designator internals and templatize

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

2023-01-04 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/AST/Designator.h:313-319 + /// ClearExprs - Null out any expression references, which prevents + /// them from being 'delete'd later. + void ClearExprs(Sema &Actions) {} + + /// FreeExprs - Release any unclaimed memo

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

2023-01-05 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D140584#4029607 , @aaron.ballman wrote: > Drive by comment (I'll give a more thorough review when I have a moment): > precommit CI seems to have found an issue to address. > > `Assertion failed: false && "Invalid accessor", file

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

2023-01-05 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 486710. void added a comment. Put assert in correct place. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140584/new/ https://reviews.llvm.org/D140584 Files: clang-tools-extra/clangd/FindTarget.cpp clang/inclu

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

2023-01-06 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. BTW, the naming of the enums sucks. Feel free to offer alternatives. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140584/new/ https://reviews.llvm.org/D140584 ___ cfe-commits m

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

2023-01-09 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/AST/Designator.h:88 + /// An array designator, e.g., "[42] = 0" and "[42 ... 50] = 1". + template struct ArrayDesignatorInfo { +/// Location of the first and last index expression within the designated ---

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

2023-01-09 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/AST/Designator.h:88 + /// An array designator, e.g., "[42] = 0" and "[42 ... 50] = 1". + template struct ArrayDesignatorInfo { +/// Location of the first and last index expression within the designated ---

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

2023-01-10 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 488005. void added a comment. Use EllipsisLoc instead of one of the Brackets. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140584/new/ https://reviews.llvm.org/D140584 Files: clang-tools-extra/clangd/FindTarge

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2023-01-31 Thread Bill Wendling via Phabricator via cfe-commits
void accepted this revision. void added a comment. This revision is now accepted and ready to land. One small comment about the documentation but L:GTM. Comment at: clang/docs/LanguageExtensions.rst:1584 +Outputs may be used along any branches from the ``asm goto`` whether the

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

2023-02-01 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. @rsmith Ping. This is blocking some patches I'd like to submit afterwards. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140584/new/ https://reviews.llvm.org/D140584 ___ cfe-com

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

2023-02-01 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/AST/Designator.h:88 + /// An array designator, e.g., "[42] = 0" and "[42 ... 50] = 1". + template struct ArrayDesignatorInfo { +/// Location of the first and last index expression within the designated ---

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

2023-02-02 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/AST/Designator.h:88 + /// An array designator, e.g., "[42] = 0" and "[42 ... 50] = 1". + template struct ArrayDesignatorInfo { +/// Location of the first and last index expression within the designated ---

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

2023-02-03 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/AST/Designator.h:88 + /// An array designator, e.g., "[42] = 0" and "[42 ... 50] = 1". + template struct ArrayDesignatorInfo { +/// Location of the first and last index expression within the designated ---

[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

[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-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-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 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 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] 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 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] 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
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] D140584: [Clang] Refactor "Designators" into a unified implementation [NFC]

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

[PATCH] D137113: [Clang] refactor CodeGenFunction::EmitAsmStmt NFC

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

[PATCH] D136497: [Clang] support for outputs along indirect edges of asm goto

2023-01-18 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/docs/ReleaseNotes.rst:199 + guaranteed (and necessary to support outputs along indirect edges, which is + now supported as of this release). + Is it worth it to mention that this change makes Clang's behavior with r

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

2023-01-20 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Friendly ping! BTW, I'm planning on future changes to designated initializers. This is the first step. I hope to get rid of the template stuff in the followup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140584/new/ https:

[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-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] 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-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-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-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] 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 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-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-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-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-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: [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 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 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-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 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 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 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: [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-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 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] 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] 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 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-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-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-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-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-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-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: [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 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-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

<    1   2   3   4   5   6   >