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

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] 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] D139881: [clang] Use a StringRef instead of a raw char pointer to store builtin and call information

2022-12-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked 4 inline comments as done. serge-sans-paille added a comment. New version passes `ninja check` with clang, clang-tools-extra and lld. Comment at: clang/lib/StaticAnalyzer/Core/CallDescription.cpp:39 ento::CallDescription::CallDescription(CallDescriptio

[PATCH] D139881: [clang] Use a StringRef instead of a raw char pointer to store builtin and call information

2022-12-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 482825. serge-sans-paille added a comment. Make `Prefixes` an array of StringRef too CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139881/new/ https://reviews.llvm.org/D139881 Files: clang-tools-extra/clangd/CompileCommands.cpp clang/

[PATCH] D139881: [clang] Use a StringRef instead of a raw char pointer to store builtin and call information

2022-12-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang-tools-extra/clangd/CompileCommands.cpp:470 const char *const *Prefixes[DriverID::LastOption] = {nullptr}; -#define PREFIX(NAME, VALUE) static const char *const NAME[] = VALUE; +#define PREFIX(NAME, VALUE) static cons

[PATCH] D139881: [clang] Use a StringRef instead of a raw char pointer to store builtin and call information

2022-12-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: nikic. Herald added subscribers: steakhal, pmatos, asb, jhenderson, abrachet, ormris, martong, phosek, kadircet, arphaman, steven_wu, hiraditya, arichardson, sbc100, emaste. Herald added a reviewer: JDevlieghere. Herald

[PATCH] D139274: Store OptTable::Info::Name as a StringRef

2022-12-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D139274#3974176 , @thakis wrote: > Reverted in de4b6a1bc64db33643f001ad45fae7b92b4a4688 > for > now. (Note that there was a follow-up fix in > e

[PATCH] D139274: Store OptTable::Info::Name as a StringRef

2022-12-06 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 rG8ae18303f97d: Store OptTable::Info::Name as a StringRef (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D139274

[PATCH] D139274: Store OptTable::Info::Name as a StringRef

2022-12-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 480421. serge-sans-paille added a comment. Also simplify `StrCmpOptionNameIgnoreCase` implementation thanks to the move to StringRef CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139274/new/ https://reviews.llvm.org/D139274 Files: clan

[PATCH] D139274: Store OptTable::Info::Name as a StringRef

2022-12-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 480363. serge-sans-paille added a comment. fix test / compile errors CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139274/new/ https://reviews.llvm.org/D139274 Files: clang/lib/Driver/ToolChains/Gnu.cpp llvm/include/llvm/Option/OptTab

[PATCH] D139274: Store OptTable::Info::Name as a StringRef

2022-12-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: thakis, 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 adde

[PATCH] D139188: [Draft] Sanitize clang target triple

2022-12-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. This is a tentative patch for https://discourse.llvm.org/t/linking-without-gcc-on-gnu-linux/66428/3 unfortunately it appears that many triples are not recognized while widely used (at least in the CI) for instance `aarch64-arm-none-eabi` is used a lot in the

[PATCH] D139188: [Draft] Sanitize clang target triple

2022-12-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: aaron.ballman. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Warn when meeting an unknown vendor / os / environmen

[PATCH] D138474: [clang] Speedup LineOffsetMapping::get

2022-11-30 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf607884a04b0: [clang] Speedup LineOffsetMapping::get (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138474/new/ https://revi

[PATCH] D138474: [clang] Speedup LineOffsetMapping::get

2022-11-28 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Gentle ping :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138474/new/ https://reviews.llvm.org/D138474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D138474: [clang] Speedup LineOffsetMapping::get

2022-11-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: aaron.ballman, nikic, lattner. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. LineOffsetMapping::get is a critical f

[PATCH] D137960: [Lexer] Speedup LexTokenInternal

2022-11-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:3520-3521 +LexStart: + assert(!Result.needsCleaning() && "Result doesn't need cleaning"); + assert(!Result.hasPtrData() && "Result has been reset"); foad wrote: > Messages are backwa

[PATCH] D137960: [Lexer] Speedup LexTokenInternal

2022-11-16 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcb3f8d53e6c3: [Lexer] Speedup LexTokenInternal (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D137960?vs=475699&id=475818#toc Repository: rG LLVM Github Monorepo

[PATCH] D137960: [Lexer] Speedup LexTokenInternal

2022-11-15 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 475699. serge-sans-paille added a comment. Add extra assert to ensure we start lexing in a clean state CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137960/new/ https://reviews.llvm.org/D137960 Files: clang/include/clang/Lex/Token.h c

[PATCH] D137960: [Lexer] Speedup LexTokenInternal

2022-11-14 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Compile time tracker record : https://llvm-compile-time-tracker.com/compare.php?from=f71d32a0eea47b3d2bb43d6be15cf09d47ef6971&to=b4df7d2a01aacd29ae539b04e72b3667e2362aa1&stat=instructions:u The cost of preprocessing is hidden by the optimization time, but -O0 gi

[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

[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] 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-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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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-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] 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] 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] 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 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
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 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] 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-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] 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-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 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-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] 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-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] 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] 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] 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] 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] 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-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 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] 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] 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-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] D133349: [clang][doc] Do not keep a copy of ClangCommandLineReference.rst in tree

2022-09-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. That's sounds like an "OK" to me, right? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133349/new/ https://reviews.llvm.org/D133349 ___ cfe-commits mailing list cfe-com

[PATCH] D133349: [clang][doc] Do not keep a copy of ClangCommandLineReference.rst in tree

2022-09-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @aaron.ballman this is just a patch to start a discussion: We already have the cmake rule to generate this file, so removing it from tree actually doesn't break compilation. So I'm wondering why and if we should keep it checked in? Removing it would make it le

[PATCH] D133197: [clang] Fix crash when parsing scanf format string with missing arguments

2022-09-05 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGab09043a1985: [clang] Fix crash when parsing scanf format string with missing arguments (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D133197: [clang] Fix crash when parsing scanf format string with missing arguments

2022-09-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When parsing a format string with less argument than specified, one should check argument access because

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

2022-09-01 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: jyknight. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixes a bunch of FIXME within IsTailPaddedMemberArray

[PATCH] D132944: [clang] cleanup -fstrict-flex-arrays implementation

2022-09-01 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe0746a8a8d64: [clang] cleanup -fstrict-flex-arrays implementation (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132944/new/

[PATCH] D132944: [clang] cleanup -fstrict-flex-arrays implementation

2022-08-31 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 456971. serge-sans-paille edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132944/new/ https://reviews.llvm.org/D132944 Files: clang/include/clang/Driver/Options.td clang/lib/CodeGen/CGExpr.cpp clang/

[PATCH] D132944: [clang] cleanup -fstrict-flex-arrays implementation

2022-08-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: jyknight. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is a follow up to https://reviews.llvm.org/D126864, a

[PATCH] D132853: [clang] Fix -Warray-bound interaction with -fstrict-flex-arrays=1

2022-08-30 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG31dd0255aeaa: [clang] Fix -Warray-bound interaction with -fstrict-flex-arrays=1 (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D132853: [clang] Fix -Warray-bound interaction with -fstrict-flex-arrays=1

2022-08-29 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Description updated, it's just a bug in the previous implementation (by myself!) I don't think it's worth an entry in the release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132853/new/ https://reviews.l

[PATCH] D132853: [clang] Fix -Warray-bound interaction with -fstrict-flex-arrays=1

2022-08-29 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: sberg, kees. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-07-18 Thread serge via Phabricator via cfe-commits
serge-sans-paille closed this revision. serge-sans-paille added a comment. Forgot the commit tag: just landed it as f764dc99b37e1e6428724a61f36bcb49c015dc70 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D129798: [clang-tidy] Add a "clang-" namespace prefix to the make-confusable-target executable

2022-07-18 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/D129798/new/ https://reviews.llvm.org/D129798 _

[PATCH] D129797: [clang-tidy] Reduce the dependencies for the "make-confusable-table" tool

2022-07-18 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. I'm fine with this too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129797/new/ https://reviews.llvm.org/D129797 __

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-07-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. > I'd like to see the set of concrete examples you cannot otherwise deal with. I'm also very curious, I fail to understand the need of not considering [0] as a FAM, esp. given that to my understanding, this is the only use of that syntax. Repository: rG L

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-07-13 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Thanks for the extra test case! > Do you see an obvious fix? If not, please revert while investigating. Obvious fix landed in 66fa2847a775dda27ddcac3832769441727db42f Repository: rG LLVM

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-07-11 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @kees are you ok with current state? Comment at: clang/lib/CodeGen/CGExpr.cpp:906 // member, only a T[0] or T[] member gets that treatment. + // Under StrictFlexArraysLevel, obey c99+ that disallows FAM in union, see + // C11

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-09 Thread serge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGda6a14b91ad9: [clang] Enforce instantiation of constexpr template functions during non… (authored by serge-sans-paille). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443459. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/test/CodeGenCXX/constexpr-late-instantiation.cp

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-07-08 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 rGcc5b77273af3: [clang] Introduce -Warray-parameter (authored by serge-sans-paille). Changed prior to commit: https://reviews.llvm.org/D128449?vs=44

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:3213 +static bool EquivalentArrayTypes(QualType Old, QualType New, + ASTContext const &Ctx) { + aaron.ballman wrote: > East const? MONSTEROUS! ;-) (We

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/docs/ReleaseNotes.rst:184 initializer is not allowed this is now diagnosed as an error. +- Clang now correctly emit symbols for implicitly instanciated constexpr + template function. Fixes `Issue 55560

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443337. serge-sans-paille added a comment. ++review CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/t

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443276. serge-sans-paille added a comment. + release note + take review into account Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/docs/Rel

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443243. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.org/D128119 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/test/CodeGenCXX/constexpr-late-instantiation.cpp clang/test/SemaCXX/constex

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @shafik: I've implemented your patch which indeed looks closer to the original intent @aaron.ballman : test case and code updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128119/new/ https://reviews.llvm.or

[PATCH] D128119: [clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443230. serge-sans-paille retitled this revision from "[clang] enforce instantiation of constexpr template functions" to "[clang] Enforce instantiation of constexpr template functions during non-constexpr evaluation". serge-sans-paille edited the su

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-07-08 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 443185. serge-sans-paille marked 4 inline comments as done. serge-sans-paille added a comment. Take reviews into account, basically spreading a lot of FIXME across the codebase :'( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-07-07 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 442844. serge-sans-paille marked an inline comment as done. serge-sans-paille added a comment. Take review into account. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128449/new/ https://reviews.llvm.org/D128449 Files: clang/docs/Releas

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-07-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 442692. serge-sans-paille edited the summary of this revision. serge-sans-paille added a comment. Remove debug code CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://reviews.llvm.org/D126864 Files: clang/docs/ClangComman

[PATCH] D126864: [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-07-06 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 442686. serge-sans-paille edited the summary of this revision. serge-sans-paille added a comment. Take into account @jyknight review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126864/new/ https://

<    1   2   3   4   5   6   7   8   9   >