[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D137181#3918715 , @goldstein.w.n wrote: > In D137181#3918673 , @owenpan wrote: > >> Below is how I defined `PPLevel`: >> >> $ git diff UnwrappedLineParser.h >> diff --git

[PATCH] D137823: [clang-format][NFC] Moved configuration parsing tests in own file

2022-11-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/unittests/Format/ConfigParseTest.cpp:14 + +#define DEBUG_TYPE "parse-test" + You can delete it. Comment at: clang/unittests/Format/ConfigParseTest.cpp:1006 + +TEST(FormatStyle,

[PATCH] D137897: Extend the number of case Sema::CheckForIntOverflow covers

2022-11-12 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik updated this revision to Diff 474981. shafik added a comment. Fix formatting of test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137897/new/ https://reviews.llvm.org/D137897 Files: clang/lib/Sema/SemaChecking.cpp clang/test/Sema/integer-overflow.cpp Index:

[PATCH] D137040: [clangd] Add heuristic for dropping snippet when completing member function pointer

2022-11-12 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks! In D137040#3918118 , @tom-anders wrote: > now we kinda have the same test case duplicated in sema and clangd tests - I > guess for clangd we now actually only have to test that the SnippetSuffix is > cleared when

[PATCH] D137901: [Clang] `nothrow`-implying attributes should actually manifest `nothrow` attribute (PR58798)

2022-11-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: aaron.ballman, erichkeane, rjmccall. lebedev.ri added a project: LLVM. Herald added a project: All. lebedev.ri requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Herald added a

[PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-11-12 Thread Tim Neumann via Phabricator via cfe-commits
TimNN added a comment. I didn't manage to repro with `opt`, so still no compilable IR. I did some more debugging, though: - Inside `removeDeadArgumentsFromCallers`, `CB->getCalledFunction()->dump()` (after the modification) is `define void

[clang] 6daa005 - [NFC][Clang] Add some codegen tests for https://github.com/llvm/llvm-project/issues/58798

2022-11-12 Thread Roman Lebedev via cfe-commits
Author: Roman Lebedev Date: 2022-11-13T02:39:52+03:00 New Revision: 6daa005b90c8122751d04c6eba0fa1259e912cfe URL: https://github.com/llvm/llvm-project/commit/6daa005b90c8122751d04c6eba0fa1259e912cfe DIFF: https://github.com/llvm/llvm-project/commit/6daa005b90c8122751d04c6eba0fa1259e912cfe.diff

[PATCH] D137897: Extend the number of case Sema::CheckForIntOverflow covers

2022-11-12 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik created this revision. shafik added reviewers: aaron.ballman, erichkeane. Herald added a project: All. shafik requested review of this revision. Currently `Sema::CheckForIntOverflow` misses several case that other compilers diagnose for overflow in integral constant expressions. This

[PATCH] D137885: [modules] Support zstd in .pcm file

2022-11-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 474953. MaskRay edited the summary of this revision. MaskRay added a comment. use level 9 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137885/new/ https://reviews.llvm.org/D137885 Files:

[PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-11-12 Thread Tim Neumann via Phabricator via cfe-commits
TimNN added a comment. I've included excerpts from the IR below. It will take me a bit to provide something compilable. Though you are right, the `noundef` did indeed get removed from the `call`. *** IR Dump Before DeadArgumentEliminationPass on [module] *** ; Function Attrs: nonlazybind

[PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-11-12 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. @TimNN Do you have an IR sample for this? DAE is supposed to strip UB-implying attributes when converting arguments to poison here:

[PATCH] D133036: [InstCombine] Treat passing undef to noundef params as UB

2022-11-12 Thread Tim Neumann via Phabricator via cfe-commits
TimNN added a comment. I'm still trying to properly minimize this, but this definitely interacts badly with other optimizations (which triggers the Rust CI failure I mentioned above): - We start with two functions, `outer` and `inner`. `outer` calls `inner`. `outer` has a `noundef` argument

Re: How can Autoconf help with the transition to stricter compilation defaults?

2022-11-12 Thread Joseph Myers via cfe-commits
On Fri, 11 Nov 2022, Zack Weinberg via Gcc wrote: > These are also a trip hazard for novices, and the only way to turn them > off is with -std=cXX, which also turns another trip hazard (trigraphs) > *on*… so yeah, anything you can do to help speed up their removal, I > think it’d be worthwhile.

Re: How can Autoconf help with the transition to stricter compilation defaults?

2022-11-12 Thread Wookey via cfe-commits
On 2022-11-10 19:08 +0100, Florian Weimer wrote: > * Zack Weinberg via Gcc: > > > It’s come to my attention (via https://lwn.net/Articles/913505/ and > > https://fedoraproject.org/wiki/Changes/PortingToModernC) that GCC and > > Clang both plan to disable several “legacy” C language features by >

Re: How can Autoconf help with the transition to stricter compilation defaults?

2022-11-12 Thread Sam James via cfe-commits
> On 12 Nov 2022, at 03:40, Zack Weinberg wrote: > > Florian Weimer writes: >> based on a limited attempt to get this fixed about three years >> ago, I expect that many of the problematic packages have not had their >> configure scripts regenerated using autoconf for a decade or more. This

Re: How can Autoconf help with the transition to stricter compilation defaults?

2022-11-12 Thread Zack Weinberg via cfe-commits
Wookey writes: > On 2022-11-10 19:08 +0100, Florian Weimer wrote: >> based on a limited attempt to get this fixed about three years >> ago, I expect that many of the problematic packages have not had their >> configure scripts regenerated using autoconf for a decade or more. This >> means that

[PATCH] D137768: [opt][clang] Enable using -module-summary with -S / -emit-llvm

2022-11-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1016 case Backend_EmitLL: -MPM.addPass(PrintModulePass(*OS, "", CodeGenOpts.EmitLLVMUseLists)); +if (CodeGenOpts.PrepareForThinLTO && !CodeGenOpts.DisableLLVMPasses) { + if

Re: How can Autoconf help with the transition to stricter compilation defaults?

2022-11-12 Thread Zack Weinberg via cfe-commits
Sam James writes: >> On 12 Nov 2022, at 03:40, Zack Weinberg wrote: >> This is definitely more work than I can see myself doing on a volunteer >> basis, but a 2.69.1 patch release — nothing that’s not already on trunk, >> cherry pick the changes needed to support the newer compilers (and >>

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2022-11-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D102107#3922842 , @dhruvachak wrote: > In D102107#3921948 , @jhuber6 wrote: > >> @dhruvachak Do you still need help updating the LLVM tests? > > If you go a few messages back, there

[PATCH] D137883: [clang-format][NFC] Improve documentation of FixNamespaceComments

2022-11-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/include/clang/Format/Format.h:2124-2126 + /// namespaces and fixes invalid existing ones. This is omitted for short + /// namespaces, what a short namespace is, is controlled by + /// "ShortNamespaceLines". Or

[PATCH] D137706: [clang][Interp] Implement IntegralToPointer casts

2022-11-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 474930. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137706/new/ https://reviews.llvm.org/D137706 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Opcodes.td clang/lib/AST/Interp/Pointer.cpp

[PATCH] D137706: [clang][Interp] Implement IntegralToPointer casts

2022-11-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 474929. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137706/new/ https://reviews.llvm.org/D137706 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/builtins.cpp clang/test/SemaCXX/constant-expression-cxx11.cpp

[clang] e864ac6 - [clang-format] Treats &/&& as reference when followed by ',' or ')'

2022-11-12 Thread Owen Pan via cfe-commits
Author: Micah Weston Date: 2022-11-12T00:58:58-08:00 New Revision: e864ac694540342d5e59f59c525c5082f2594fb8 URL: https://github.com/llvm/llvm-project/commit/e864ac694540342d5e59f59c525c5082f2594fb8 DIFF: https://github.com/llvm/llvm-project/commit/e864ac694540342d5e59f59c525c5082f2594fb8.diff

[PATCH] D137755: [clang-format] Treats &/&& as reference when followed by ',' or ')'.

2022-11-12 Thread Owen Pan 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 rGe864ac694540: [clang-format] Treats / as reference when followed by , or ) (authored by red1bluelost, committed by owenpan). Repository: rG LLVM

[PATCH] D137486: [clang-format] Correctly annotate function names before attributes

2022-11-12 Thread Owen Pan 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 rG96e23906b5e8: [clang-format] Correctly annotate function names before attributes (authored by owenpan). Repository: rG LLVM Github Monorepo

[clang] 96e2390 - [clang-format] Correctly annotate function names before attributes

2022-11-12 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-11-12T00:40:46-08:00 New Revision: 96e23906b5e80dc86b5d2431d30c9afc38ae4d20 URL: https://github.com/llvm/llvm-project/commit/96e23906b5e80dc86b5d2431d30c9afc38ae4d20 DIFF: https://github.com/llvm/llvm-project/commit/96e23906b5e80dc86b5d2431d30c9afc38ae4d20.diff

[PATCH] D137885: [modules] Support zstd in .pcm file

2022-11-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: aaron.ballman, jansvoboda11, rsmith. Herald added a subscriber: StephenFan. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Extend