[PATCH] D112914: Misleading identifier detection

2021-11-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384017. serge-sans-paille added a comment. Also update clang-tidy doc index CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112914/new/ https://reviews.llvm.org/D112914 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tools

[PATCH] D112914: Misleading identifier detection

2021-11-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384020. serge-sans-paille added a comment. Update release note too. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112914/new/ https://reviews.llvm.org/D112914 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tools-extra/c

[PATCH] D112914: Misleading identifier detection

2021-11-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. AKAIU, the licensing issue doesn't impact that particular review, only the one on confusable identifiers. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112914/new/ https://reviews.llvm.org/D112914 ___ cfe-c

[PATCH] D112916: Confusable identifiers detection

2021-11-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added subscribers: tonic, tstellar. serge-sans-paille added a comment. @tonic / @tstellar as members of the LLVM fundation board, can you tell us if it's okay to ship the `confusables.txt` file from https://www.unicode.org/Public/security/latest/confusables.txt and what are the

[PATCH] D112914: Misleading identifier detection

2021-11-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D112914#3102728 , @carlosgalvezp wrote: > Ok! I don't really know what applies when you take //part// of a file, so > I'll leave that up to people who know. I don't know how to remove the > "Requested changes" from

[PATCH] D112913: Misleading bidirectional detection

2021-11-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384111. serge-sans-paille added a comment. - recover from failed utf8 decoding - doc and release note updated - clang-formatting - more examples / testing CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112913/new/ https://reviews.llvm.org/D

[PATCH] D112914: Misleading identifier detection

2021-11-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384118. serge-sans-paille added a comment. Minor typos CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112914/new/ https://reviews.llvm.org/D112914 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tools-extra/clang-tidy/mis

[PATCH] D112914: Misleading identifier detection

2021-11-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384381. serge-sans-paille added a comment. Fix comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112914/new/ https://reviews.llvm.org/D112914 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tools-extra/clang-tidy/mi

[PATCH] D112916: Confusable identifiers detection

2021-11-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D112916#3102767 , @serge-sans-paille wrote: > @tonic / @tstellar as members of the LLVM fundation board, can you tell us if > it's okay to ship the `confusables.txt` file from > https://www.unicode.org/Public/secur

[PATCH] D112913: Misleading bidirectional detection

2021-11-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/MisleadingBidirectional.cpp:59 +// If conversion fails, utf-8 is designed so that we can just try next char. +if (Result != llvm::conversionOK) { + ++CurPtr; rsmi

[PATCH] D112916: Confusable identifiers detection

2021-11-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384687. serge-sans-paille added a comment. - Add documentation and changelog entry - Formatting / renaming nits - Some extra test cases - Check scope intersection in both orders CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ htt

[PATCH] D112916: Confusable identifiers detection

2021-11-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384694. serge-sans-paille added a comment. Update doc CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ https://reviews.llvm.org/D112916 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tools-extra/clang-tidy/misc

[PATCH] D112916: Confusable identifiers detection

2021-11-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384854. serge-sans-paille added a comment. Portable `confusable.txt` parsing CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ https://reviews.llvm.org/D112916 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tool

[PATCH] D112914: Misleading identifier detection

2021-11-09 Thread serge 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 rG299aa4dfa1d8: Misleading unicode identifier detection pass (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D112

[PATCH] D112914: Misleading identifier detection

2021-11-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Yep, I'm currently validating locally, I somehow messed up a rebase :-/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112914/new/ https://reviews.llvm.org/D112914 ___ c

[PATCH] D112914: Misleading identifier detection

2021-11-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D112914#3119704 , @thakis wrote: > The test seems to trigger an assert: http://45.33.8.238/linux/60293/step_9.txt > > Please take a look! It's getting late here: Reverted, I'll have a look tomorrow. Repository: r

[PATCH] D112914: Misleading identifier detection

2021-11-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/misc-misleading-identifier.cpp:3 + +#include + RKSimon wrote: > @serge-sans-paille Any chance you can remove the include and just forward > declare printf()? Sure,

[PATCH] D97320: Use a fast path when initializing LineOffsetMapping

2021-03-01 Thread serge 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 rG80e8efd563fd: Use a fast path when initializing LineOffsetMapping (authored by serge-sans-paille). Herald added a project: clang. Herald added a subs

[PATCH] D89942: Disable LTO and LLD for bootstrap builds on systems unsupported by LLD

2021-03-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. This revision is now accepted and ready to land. @tbaeder sorry for the delay. I don't see any reason why we should keep that one in review any longer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D93095: Introduce -Wreserved-identifier

2021-03-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 329242. serge-sans-paille added a comment. Patch rebased on main. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93095/new/ https://reviews.llvm.org/D93095 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/DiagnosticGroup

[PATCH] D93095: Introduce -Wreserved-identifier

2021-03-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 329318. serge-sans-paille added a comment. Updated error message to report the reason why an identifier is reserved. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93095/new/ https://reviews.llvm.org/D93095 Files: clang/include/clang/AST

[PATCH] D93095: Introduce -Wreserved-identifier

2021-03-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 329361. serge-sans-paille added a comment. Fix some formatting Support literal operator CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93095/new/ https://reviews.llvm.org/D93095 Files: clang/include/clang/AST/Decl.h clang/include/clang

[PATCH] D98175: [NFC] Remove duplicate isNoBuiltinFunc method

2021-03-10 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGea8e5b87acba: [NFC] Remove duplicate isNoBuiltinFunc method (authored by serge-sans-paille). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo C

[PATCH] D98175: [NFC] Remove duplicate isNoBuiltinFunc method

2021-03-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. That was a very convincing argument :-) tag added. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98175/new/ https://reviews.llvm.org/D98175 ___ cfe-commits mailing list

[PATCH] D89942: Disable LTO and LLD for bootstrap builds on systems unsupported by LLD

2021-03-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/CMakeLists.txt:639 + # We want LLD for LTO, but LLD does not support SystemZ, so disable + # LTO here and use the installed system linker + if ("${LLVM_NATIVE_ARCH}" MATCHES "SystemZ") I guess you're u

[PATCH] D95635: [CMake] Require python 3.6 if enabling LLVM test targets

2021-03-11 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. would it make sense to syndicate the minimal version in a single variable, say `LLVM_MINIMAL_PYTHON_VERSION`, and use it in several place instead of hard-coding the value across multiple files? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D95635: [CMake] Require python 3.6 if enabling LLVM test targets

2021-03-11 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. This revision is now accepted and ready to land. LGTM, thanks for doing this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95635/new/ https://reviews.llvm.org/D95635 ___

[PATCH] D98637: [NFC] Use higher level constructs to check for whitespace/newlines in the lexer

2021-03-15 Thread serge 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 rG9628cb1feef6: [NFC] Use higher level constructs to check for whitespace/newlines in the lexer (authored by serge-sans-paille). Herald added a project

[PATCH] D97846: Allow __ieee128 as an alias to __float128 on ppc

2021-03-15 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4aa510be78a7: Allow __ieee128 as an alias to __float128 on ppc (authored by serge-sans-paille). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D97846: Allow __ieee128 as an alias to __float128 on ppc

2021-03-15 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Thanks @hubert.reinterpretcast , @jwakely and @hubert.reinterpretcast for the feedback on that review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97846/new/ https://reviews.llvm.org/D97846 ___

[PATCH] D114082: [WIP] Normalize String Attributes

2021-11-17 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. This is a WIP, to start the discussion. I've only turned on the X86 backend. Otherwise should be functional. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114082/new/ https://reviews.llvm.org/D114082 ___

[PATCH] D112913: Misleading bidirectional detection

2021-11-19 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 388424. serge-sans-paille added a comment. Rebase on main branch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112913/new/ https://reviews.llvm.org/D112913 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tools-extra/clan

[PATCH] D112913: Misleading bidirectional detection

2021-11-19 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Patch rebased on main, all comments addressed. Looks good? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112913/new/ https://reviews.llvm.org/D112913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D112913: Misleading bidirectional detection

2021-11-19 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 388425. serge-sans-paille added a comment. Nits CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112913/new/ https://reviews.llvm.org/D112913 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tools-extra/clang-tidy/misc/MiscT

[PATCH] D114229: [clang][driver] Always add LTO options when using GNU toolchain

2021-11-22 Thread serge via Phabricator via cfe-commits
serge-sans-paille added subscribers: rsmith, serge-sans-paille. serge-sans-paille added a comment. Gentle ping @MaskRay and/or @rsmith Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114229/new/ https://reviews.llvm.org/D114229 _

[PATCH] D112913: Misleading bidirectional detection

2021-11-22 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Gentle ping @MaskRay and/or @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112913/new/ https://reviews.llvm.org/D112913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D114394: Compile-time computation of string attribute hashes

2021-11-22 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: dblaikie, nikic. Herald added subscribers: ormris, dexonsmith, wenlei, okura, jdoerfert, kuter, haicheng, hiraditya, eraman. serge-sans-paille requested review of this revision. Herald added a reviewer: jdoerfert. Herald a

[PATCH] D114082: [WIP] Normalize String Attributes

2021-11-23 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. This diff is indeed very large. I reworked it in https://reviews.llvm.org/D114394 to capture the essence of it, on which we could then rebase this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114082/new/

[PATCH] D114394: Compile-time computation of string attribute hashes

2021-11-23 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 389187. serge-sans-paille added a comment. Remove static Dict and replace it by a dict attached to LLVMContext. Some early benchmarks, on the SQLite amalgamation, through ` valgrind --tool=callgrind ./bin/clang -c -o/dev/null sqlite3.c` Instructio

[PATCH] D114394: Compile-time computation of string attribute hashes

2021-11-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 389437. serge-sans-paille marked 6 inline comments as done. serge-sans-paille added a comment. Use CachedHashStringRef as suggested by @MaskRay CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114394/new/ https://reviews.llvm.org/D114394 Fil

[PATCH] D114394: Compile-time computation of string attribute hashes

2021-11-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 389463. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114394/new/ https://reviews.llvm.org/D114394 Files: clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CodeGenFunction.cpp llvm/include/llvm/Ana

[PATCH] D114394: Compile-time computation of string attribute hashes

2021-11-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked an inline comment as done. serge-sans-paille added inline comments. Comment at: llvm/include/llvm/IR/Attributes.h:79 + bool operator<(AttributeKey const &other) const { +return strcmp(value_, other.value_) < 0; + } JonChesterfield w

[PATCH] D114082: [WIP] Normalize String Attributes

2021-11-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D114082#3149631 , @rnk wrote: >> it is possible to list all internal keys in one place > > I think one of the original goals of adding support for string attributes > (maybe @void will give some input) was specifical

[PATCH] D114394: Compile-time computation of string attribute hashes

2021-11-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Gentle ping :-) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114394/new/ https://reviews.llvm.org/D114394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

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

2022-10-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. I really like the new message, thanks for taking account the diverging reviews! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135920/new/ https://reviews.llvm.org/D135920

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

2022-10-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:60 /// static_asserts in Triple.cpp and in clang/Basic/HLSLRuntime.h. enum class ShaderStage { Pixel = 0, Looks unrelated to this patch :-) Comme

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

2022-10-26 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. Looks good! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134902/new/ https://reviews.llvm.org/D134902 ___ cfe-commits mailing

[PATCH] D133108: [clang] Rework IsTailPaddedMemberArray into isFlexibleArrayMemberExpr

2022-09-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 460704. serge-sans-paille added a comment. Take reviews into account CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133108/new/ https://reviews.llvm.org/D133108 Files: clang/lib/Sema/SemaChecking.cpp Index: clang/lib/Sema/SemaChecking.c

[PATCH] D133108: [clang] Rework IsTailPaddedMemberArray into isFlexibleArrayMemberExpr

2022-09-16 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 460899. serge-sans-paille edited the summary of this revision. serge-sans-paille added a comment. Address minor nits, plus add a test case that showcases the extra (legitimate!) warning we now get when accessing a "struct hack" field with an index t

[PATCH] D133108: [clang] Rework IsTailPaddedMemberArray into isFlexibleArrayMemberExpr

2022-09-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/test/Sema/unbounded-array-bounds.c:101 + char tail[1]; // addr16-note {{declared here}} addr32-note {{declared here}} +} fam1; + msebor wrote: > msebor wrote: > > There's a difference between the sizes

[PATCH] D134362: [clang] Fix interaction between asm labels and inline builtins

2022-09-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: RKSimon, aaron.ballman, nickdesaulniers. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. One must pick the same name

[PATCH] D134362: [clang] Fix interaction between asm labels and inline builtins

2022-09-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 461893. serge-sans-paille added a comment. (rebased on main branch) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134362/new/ https://reviews.llvm.org/D134362 Files: clang/lib/CodeGen/CGExpr.cpp clang/test/CodeGen/asm-label-inline-bui

[PATCH] D134362: [clang] Fix interaction between asm labels and inline builtins

2022-09-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 462009. serge-sans-paille added a comment. Address reviews. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134362/new/ https://reviews.llvm.org/D134362 Files: clang/docs/ReleaseNotes.rst clang/lib/CodeGen/CGExpr.cpp clang/test/CodeGe

[PATCH] D134362: [clang] Fix interaction between asm labels and inline builtins

2022-09-22 Thread serge 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 rGd4420402927e: [clang] Fix interaction between asm labels and inline builtins (authored by serge-sans-paille). Changed prior to commit: https://rev

[PATCH] D133108: [clang] Rework IsTailPaddedMemberArray into isFlexibleArrayMemberExpr

2022-09-22 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdad36245a5c2: [clang] Rework IsTailPaddedMemberArray into isFlexibleArrayMemberExpr (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D133108?vs=460899&id=462140#toc Re

[PATCH] D134394: Update docs about [[likely]] vs. PGO

2022-09-22 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. While running this small experiment: https://sergesanspaille.fedorapeople.org/proftest.sh I get the following output: clang version 16.0.0 (...) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: ... - instrumentation + likely: pu

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2022-09-22 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Shouldn't this be a situation where `-Wmisexpect` shold / could trigger? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134456/new/ https://reviews.llvm.org/D134456 ___

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-09-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: aaron.ballman, efriedma, jyknight, jrtc27, msebor. Herald added a subscriber: kristof.beyls. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a s

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

2022-09-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. I think this is missing a change in SemaChecking.cpp too. It would probably be better to first merge https://reviews.llvm.org/D134791 so that you don't have to patch (too much) multiple places :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-09-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D134791#3827722 , @msebor wrote: > Thanks for the heads up! My only general comment is that unless this change > has no externally observable effect I'd suggest adding tests. (Otherwise, > noting it has no such ef

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-01 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 464485. serge-sans-paille edited the summary of this revision. serge-sans-paille added a comment. Add test case for ObjC interface with FAM, as hinted by @msebor CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134791/new/ https://reviews.llv

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-01 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 464494. serge-sans-paille added a comment. Add an early exit CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134791/new/ https://reviews.llvm.org/D134791 Files: clang/include/clang/AST/Expr.h clang/lib/AST/Expr.cpp clang/lib/CodeGen/C

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-01 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked an inline comment as done. serge-sans-paille added inline comments. Comment at: clang/lib/AST/Expr.cpp:225 + + } else if (!Context.getAsIncompleteArrayType(getType())) +return false; tschuett wrote: > Could this be an early exit? I d

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @aaron.ballman : gentle ping :-) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134791/new/ https://reviews.llvm.org/D134791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2022-10-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Thanks for working on this! A few nits inline Comment at: clang/include/clang/Basic/LangOptions.h:369 + enum class StrictFlexArraysLevelKind { +/// Any trailing array memeber is a FAM. +Default = 0, typo: member ==

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 465053. serge-sans-paille marked 3 inline comments as done. serge-sans-paille added a comment. Herald added a reviewer: rafauler. Herald added subscribers: yota9, ayermolo. Herald added a reviewer: Amir. Herald added a reviewer: maksfb. Address revie

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/include/clang/AST/Expr.h:531 + bool isFlexibleArrayMemberLike( + ASTContext &Context, unsigned StrictFlexArraysLevel, + bool IgnoreTemplateOrMacroSubstitution = false) const; aaron.ballman wrot

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 465071. serge-sans-paille added a comment. Removed a diff that sneaked in. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134791/new/ https://reviews.llvm.org/D134791 Files: clang/include/clang/AST/Expr.h clang/lib/AST/Expr.cpp clang

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-04 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3460a5d79572: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D134791: [clang] Unify Sema and CodeGen implementation of isFlexibleArrayMemberExpr

2022-10-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Thanks for the reviews! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134791/new/ https://reviews.llvm.org/D134791 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

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

2022-10-05 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. Thanks for the cleanup! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135107/new/ https://reviews.llvm.org/D135107 ___ cfe-com

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

2022-10-05 Thread serge via Phabricator via cfe-commits
serge-sans-paille 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 %s --check-prefixes=CHECK,

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

2022-10-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/test/CodeGen/object-size-flex-array.c:45 + // CHECK-STRICT-2: ret i32 -1 + // CHECK-STRICT-3: ret i32 0 return OBJECT_SIZE_BUILTIN(f->c, 1); kees wrote: > serge-sans-paille wrote: > > This one worrie

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

2022-10-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D134902#3848246 , @void wrote: > @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...wei

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

2022-10-11 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/lib/AST/Expr.cpp:228 +if (StrictFlexArraysLevel == FAMKind::OneZeroOrIncomplete && Size.uge(2)) + return false; } else if (!Context.getAsIncompleteArrayType(getType())) I <3 this simplificatio

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

2022-10-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille 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 contai

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

2022-10-15 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Thanks for clarifying! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135989/new/ https://reviews.llvm.org/D135989 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

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

2022-10-17 Thread serge via Phabricator via cfe-commits
serge-sans-paille 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'; /

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

2022-10-17 Thread serge via Phabricator via cfe-commits
serge-sans-paille 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'; /

[PATCH] D140699: [clang] Make ValuesCode initialisation of Options constexpr

2022-12-27 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: aaron.ballman, nikic. Herald added a subscriber: hiraditya. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, MaskRay. Herald added projec

[PATCH] D140800: Precompute OptTable prefixes union table through tablegen

2022-12-31 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: nikic. Herald added subscribers: pmatos, asb, jhenderson, ormris, mstorsjo, steven_wu, hiraditya, arichardson, sbc100, emaste. Herald added a reviewer: JDevlieghere. Herald added a reviewer: alexander-shaposhnikov. Herald

[PATCH] D140800: Precompute OptTable prefixes union table through tablegen

2023-01-01 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D140800#4021228 , @thakis wrote: > Could we make this an optional opt-in maybe? I imagine for the majority of > the tools, this has no measurable effect, but it currently makes the Opt > library harder to use for ev

[PATCH] D140800: Precompute OptTable prefixes union table through tablegen

2023-01-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 485929. serge-sans-paille added a comment. Added to versions of OptTable, one that uses a precomputed Table, generated by TableGen, and one that relies on the old, generic approach. Both are tested using the same test bench. Updated benchmark: ht

[PATCH] D140800: Precompute OptTable prefixes union table through tablegen

2023-01-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D140800#4021282 , @thakis wrote: > I'm guessing on non-empty files this is a negligible win even in clang. As showcased by https://llvm-compile-time-tracker.com/compare.php?from=4da6cb3202817ee2897d6b690e4af950459ca

[PATCH] D140800: Precompute OptTable prefixes union table through tablegen

2023-01-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 485931. serge-sans-paille added a comment. (rebased on main. Note that this patch is applied on top of https://reviews.llvm.org/D140699) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140800/new/ https://reviews.llvm.org/D140800 Files:

[PATCH] D140699: [OptTable] Make ValuesCode initialisation of Options constexpr

2023-01-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 485932. serge-sans-paille retitled this revision from "[clang] Make ValuesCode initialisation of Options constexpr" to "[OptTable] Make ValuesCode initialisation of Options constexpr". serge-sans-paille added a comment. (rebased on main) CHANGES

[PATCH] D140896: [WIP] Move from llvm::makeArrayRef to ArrayRef deduction guides

2023-01-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. Herald added subscribers: libc-commits, hanchung, kadircet, Moerafaat, kmitropoulou, zero9178, Enna1, bzcheeseman, kosarev, mattd, gchakrabarti, ThomasRaoux, pmatos, asb, ayermolo, awarzynski, arjunp, sdasgup3, asavonic, carlosgalvezp, Groverkss, wenzhicu

[PATCH] D140896: [WIP] Move from llvm::makeArrayRef to ArrayRef deduction guides

2023-01-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 486049. serge-sans-paille added a comment. + keep deprecated version, flagged appropriately CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140896/new/ https://reviews.llvm.org/D140896 Files: bolt/tools/bat-dump/bat-dump.cpp bolt/tools/

[PATCH] D140896: [WIP] Move from llvm::makeArrayRef to ArrayRef deduction guides

2023-01-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 486172. serge-sans-paille added a comment. Split the original patch in pieces: first just introduce the deduction guide. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140896/new/ https://reviews.llvm.org/D140896 Files: llvm/include/llvm

[PATCH] D140896: [WIP] Move from llvm::makeArrayRef to ArrayRef deduction guides

2023-01-03 Thread serge via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3677ee65d192: Move from llvm::makeArrayRef to ArrayRef deduction g

[PATCH] D141047: build: with -DCLANGD_ENABLE_REMOTE=ON, search for grpc++ dependencies too

2023-01-05 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: cmake/Modules/FindGRPC.cmake:85 if(NOT TARGET grpc++) +find_library(GPR_LIBRARY gpr $GRPC_OPTS REQUIRED) +add_library(gpr UNKNOWN IMPORTED GLOBAL) Shouldn't this be `${GPRC_OPTS}`?

[PATCH] D141298: Move from llvm::makeArrayRef to ArrayRef deduction guides - last part

2023-01-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Herald added subscribers: Michael137, JDevlieghere. Once that patch lands, I'll mark `makeArrayRef` as deprecated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141298/new/ https://reviews.llvm.org/D141298 __

[PATCH] D140699: [OptTable] Make ValuesCode initialisation of Options constexpr

2023-01-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Herald added a subscriber: StephenFan. @nikic: gentle ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140699/new/ https://reviews.llvm.org/D140699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D140800: [OptTable] Precompute OptTable prefixes union table through tablegen

2023-01-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @nikic : gentle ping :-) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140800/new/ https://reviews.llvm.org/D140800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[PATCH] D141047: build: with -DCLANGD_ENABLE_REMOTE=ON, search for grpc++ dependencies too

2023-01-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille accepted this revision. serge-sans-paille added a comment. This revision is now accepted and ready to land. LGTM, assuming, you actually tested that locally. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141047/new/ https://review

[PATCH] D137337: Replace LLVM_LIBDIR_SUFFIX by CMAKE_INSTALL_LIBDIR

2022-11-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: MaskRay, tstellar, mgorny, sylvestre.ledru. Herald added subscribers: libc-commits, libcxx-commits, Moerafaat, zero9178, Enna1, bzcheeseman, kosarev, ayermolo, sdasgup3, wenzhicui, wrengr, cota, StephenFan, teijeong, rdzh

[PATCH] D137337: Replace LLVM_LIBDIR_SUFFIX by CMAKE_INSTALL_LIBDIR

2022-11-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 472945. serge-sans-paille added a comment. + Release Note CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137337/new/ https://reviews.llvm.org/D137337 Files: bolt/CMakeLists.txt bolt/include/bolt/RuntimeLibs/RuntimeLibraryVariables.inc.

[PATCH] D125860: [clang] Only use major version in resource dir

2022-11-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. The consensus in the discourse thread you mention is not super strong, but I tend to agree with that patch. +1 for me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125860/new/ https://reviews.llvm.org/D125860

[PATCH] D137337: Replace LLVM_LIBDIR_SUFFIX by CMAKE_INSTALL_LIBDIR

2022-11-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: bolt/lib/RuntimeLibs/RuntimeLibrary.cpp:32 SmallString<128> LibPath = llvm::sys::path::parent_path(Dir); - llvm::sys::path::append(LibPath, "lib" LLVM_LIBDIR_SUFFIX); + llvm::sys::path::append(LibPath, CMAKE_INSTALL_LIBDIR

[PATCH] D137960: [Lexer] Speedup LexTokenInternal

2022-11-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: lattner, nikic. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Only reset "NeedsCleaning" flag in case of re-entrant

<    1   2   3   4   5   6   7   8   9   >