[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff c6a65e4b0c80245d766ae2f2f7305b5371d096f5 b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e --

[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-03-25 Thread Petr Hosek via cfe-commits
petrhosek wrote: > @petrhosek Is there a way to pass flags only to the runtimes portion of the > build within the normal workflow? I know we have > `-DRUNTIMES_x86_64-unknown-linux-gnu_CMAKE_CXX_COMPILE_FLAGS=` that might > work, but I don't think this is respected if we're using the

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The protocol part (PR #85497)

2024-03-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/85497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] c6a65e4 - [clangd] Support go-to-definition on type hints. The protocol part (#85497)

2024-03-25 Thread via cfe-commits
Author: Younan Zhang Date: 2024-03-26T12:57:09+08:00 New Revision: c6a65e4b0c80245d766ae2f2f7305b5371d096f5 URL: https://github.com/llvm/llvm-project/commit/c6a65e4b0c80245d766ae2f2f7305b5371d096f5 DIFF: https://github.com/llvm/llvm-project/commit/c6a65e4b0c80245d766ae2f2f7305b5371d096f5.diff

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-25 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,87 @@ +//===--- MathMissingParenthesesCheck.cpp - clang-tidy -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-25 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,87 @@ +//===--- MathMissingParenthesesCheck.cpp - clang-tidy -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-25 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,87 @@ +//===--- MathMissingParenthesesCheck.cpp - clang-tidy -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-25 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy updated https://github.com/llvm/llvm-project/pull/84481 >From 8fdf6306085ed4cf0f77b7e718e374e9f65fedf9 Mon Sep 17 00:00:00 2001 From: 11happy Date: Fri, 8 Mar 2024 19:02:47 +0530 Subject: [PATCH 1/7] add clang-tidy check readability-math-missing-parentheses

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-25 Thread Bhuminjay Soni via cfe-commits
@@ -0,0 +1,25 @@ +.. title:: clang-tidy - readability-math-missing-parentheses + +readability-math-missing-parentheses + + +Check for missing parentheses in mathematical expressions that involve operators +of different priorities. Parentheses

[clang] [X86_32][C++] fix 0 sized struct case in vaarg. (PR #86388)

2024-03-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If you implement #86075 like I suggested, the inconsistency here also goes away, I think: if va_arg queries classifyArgumentType, you get the same result as argument lowering, so clang becomes self-consistent. (Whether that's gcc-compatible is a different question...)

[clang] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-25 Thread Takuto Ikuta via cfe-commits
atetubou wrote: Thank you for your review and merge! https://github.com/llvm/llvm-project/pull/83961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in annotating TrailingReturnArrow (PR #86624)

2024-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #86559. --- Full diff: https://github.com/llvm/llvm-project/pull/86624.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+2) - (modified)

[clang] [clang-format] Fix a regression in annotating TrailingReturnArrow (PR #86624)

2024-03-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/86624 Fixes #86559. >From 5ba6a0adcf9de7035dd195f0b83ada39019b7e12 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 25 Mar 2024 21:13:04 -0700 Subject: [PATCH] [clang-format] Fix a regression in annotating

[clang-tools-extra] [clangd] Support outgoing calls in call hierarchy (PR #77556)

2024-03-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I think other than the review it would be 100% done? I mean, no big further > modifications would be involved? In terms of functionality, I'd say the patch is complete. In terms of performance (and specifically memory usage), it's a matter of judgment of what we

[clang] [HLSL] Enable -fconvergent-functions by default (PR #86571)

2024-03-25 Thread via cfe-commits
aniplcc wrote: Requesting review, @llvm-beanz https://github.com/llvm/llvm-project/pull/86571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle C++ Core Guidelines suppression tags (PR #86458)

2024-03-25 Thread Owen Pan via cfe-commits
@@ -4827,6 +4827,10 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine , Right.is(TT_TemplateOpener)) { return true; } +if (Left.is(tok::identifier) && Right.is(tok::numeric_constant) && +Right.TokenText[0] == '.') {

[clang] [clang][CodeComplete] Handle deref operator in getApproximateType (PR #86466)

2024-03-25 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/86466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Handle deref operator in getApproximateType (PR #86466)

2024-03-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/86466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bc31be7 - [clang][CodeComplete] Handle deref operator in getApproximateType (#86466)

2024-03-25 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-03-25T23:54:40-04:00 New Revision: bc31be7949a3d5382be0e15e3957fa957da9de45 URL: https://github.com/llvm/llvm-project/commit/bc31be7949a3d5382be0e15e3957fa957da9de45 DIFF: https://github.com/llvm/llvm-project/commit/bc31be7949a3d5382be0e15e3957fa957da9de45.diff

[clang] [clang][CodeComplete] Handle deref operator in getApproximateType (PR #86466)

2024-03-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/86466 >From 73d2082c164ba629babec3cc3dc9b1d06b41ec60 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 25 Mar 2024 02:14:00 -0400 Subject: [PATCH] [clang][CodeComplete] Handle deref operator in

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The protocol part (PR #85497)

2024-03-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/85497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-03-25 Thread Joseph Huber via cfe-commits
jhuber6 wrote: @petrhosek Is there a way to pass flags only to the runtimes portion of the build within the normal workflow? I know we have `-DRUNTIMES_x86_64-unknown-linux-gnu_CMAKE_CXX_COMPILE_FLAGS=` that might work, but I don't think this is respected if we're using the `default` target.

[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-03-25 Thread Joseph Huber via cfe-commits
jhuber6 wrote: What's the suggested way to handle this in a standard build? The documents state to use `-DCMAKE_CXX_FLAGS=--gcc-isntall-dir=` but that doesn't work if you build LLVM with `gcc` initially. You'd need to somehow only pass that flag to the invocations that use `clang`. We also

[clang] [C++20] [Modules] Introduce -fmodules-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce -fmodules-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-03-25 Thread Ye Luo via cfe-commits
ye-luo wrote: The term deprecated refers to a functionality that still exists in software whose use is not recommended. Contradictorily, GCC_INSTALL_PREFIX got me fatal error now without a clear message explaining how to keep it working. I had to dig deep to figure it out. Will "temporary"

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Do I miss something? The performance and file size is similar with and > without `-fgen-reduced-bmi`. To reproduce clone > https://github.com/koplas/clang-modules-test and run `build.sh` and > `build_thin_bmi.sh`. Currently, the Reduced BMI will only remove function

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Using `-fgen-reduced-bmi` currently fails for me with a case that looks like > this: > > ```c++ > // a.hpp > template > void ignore(T const &) noexcept {} > > inline void resultCheck(char const *message) { > ignore(message); > } > > // b.cppm >

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @iains @dwblaikie Understood. And I thought the major problem is that there are a lot flags from clang modules. And it is indeed confusing. But given we have to introduce new flags in this case, probably we can only try to make it more clear by better documents.

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 93f9fb2c825dba48db64d5f726b54bcbd4766009 527b69efe66961aa7d7febcdda66f042f50adf2b --

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
@@ -3031,6 +3032,11 @@ defm skip_odr_check_in_gmf : BoolOption<"f", "skip-odr-check-in-gmf", "Perform ODR checks for decls in the global module fragment.">>, Group; +def gen_reduced_bmi : Flag<["-"], "fgen-reduced-bmi">, ChuanqiXu9 wrote: Done

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,53 @@ +// It is annoying to handle different slash direction +// in Windows and Linux. So we disable the test on Windows +// here. +// REQUIRES: !system-windows ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/pull/85050

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From 5fcccd75d0823ff11a4e385565cad65034d0def7 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Introduce -fgen-reduced-bmi ---

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-25 Thread Chris B via cfe-commits
llvm-beanz wrote: > I'm a bit confused. Are you saying that as I've expressed it, `autocrlf=true` > won't work correctly? I _think_ you're saying you're in favour of this patch > _in principal_, but I need to fix the mixed line endings case? Sorry for being unclear. I meant to express that

[clang] [llvm] [InstallAPI] Add *umbrella-header options (PR #86587)

2024-03-25 Thread Juergen Ributzka via cfe-commits
@@ -424,6 +448,56 @@ InstallAPIContext Options::createContext() { if (!Glob->didMatch()) Diags->Report(diag::warn_glob_did_not_match) << Glob->str(); + // Mark any explicit or inferred umbrella headers. If one exists, move + // that to the beginning of the input

[clang] [llvm] [InstallAPI] Add *umbrella-header options (PR #86587)

2024-03-25 Thread Juergen Ributzka via cfe-commits
@@ -424,6 +448,56 @@ InstallAPIContext Options::createContext() { if (!Glob->didMatch()) Diags->Report(diag::warn_glob_did_not_match) << Glob->str(); + // Mark any explicit or inferred umbrella headers. If one exists, move + // that to the beginning of the input

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-03-25 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 0fa8f07c722f9d7f80a90824f961ae6e9c5bdef7 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 1/2] implement wraps attribute Signed-off-by: Justin Stitt

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Justin Stitt (JustinStitt) Changes ## Intro This attribute would allow for more granular control over what expressions can emit integer overflow warnings or integer overflow sanitizer errors. Here are some examples:

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-03-25 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt created https://github.com/llvm/llvm-project/pull/86618 ## Intro This attribute would allow for more granular control over what expressions can emit integer overflow warnings or integer overflow sanitizer errors. Here are some examples: _copy-pasted from

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

2024-03-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @dwblaikie Feel free to checkout this patch locally and see if it resolves the original issue - I won't merge it until you confirm it works or discover another issue that goes beyond the scope of this patch. (e.g. another aforementioned issue)

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-03-25 Thread via cfe-commits
Sirraide wrote: > because there’s one header in LibCL that uses `__attribute__((assume))` Specifically, [libclc/generic/include/clc/clcfunc.h](https://github.com/llvm/llvm-project/blob/main/libclc/generic/include/clc/clcfunc.h). https://github.com/llvm/llvm-project/pull/84934

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-03-25 Thread Chuanqi Xu via cfe-commits
@@ -418,39 +448,60 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema , VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); - CallExpr *AwaitSuspend = cast_or_null( - BuildSubExpr(ACT::ACT_Suspend, "await_suspend", CoroHandle));

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

2024-03-25 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > Hmm, actually - does this fix address /other/ ways a pack could appear, like > this? https://godbolt.org/z/oez8TbGqM > > Presumably a pack could appear in a variety of expressions, not just wrapped > in parens - could be in a function call (as in the above example), or nested

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-03-25 Thread via cfe-commits
Sirraide wrote: > Have you had a chat with OpenMP folks? @alexey-bataev has been commenting on this matter since the original assume pr, and according to them, `[[omp::assume]]` is the only spelling of the attribute mandated by the OpenMP standard, and we’ve already added that one in #84582.

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-25 Thread Chuanqi Xu via cfe-commits
@@ -761,6 +761,13 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { } } + // FIXME: Hack: We're out of bits in FunctionDeclBits, so always + // add this even though it's 0 in the vast majority of cases. We + // might really want to consider storing this in

[clang] [X86_32][C++] fix 0 sized struct case in vaarg. (PR #86388)

2024-03-25 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker edited https://github.com/llvm/llvm-project/pull/86388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-25 Thread via cfe-commits
@@ -761,6 +761,13 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { } } + // FIXME: Hack: We're out of bits in FunctionDeclBits, so always + // add this even though it's 0 in the vast majority of cases. We + // might really want to consider storing this in

[clang] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-25 Thread Fangrui Song via cfe-commits
@@ -166,8 +167,9 @@ class SemaPPCallbacks : public PPCallbacks { } case ExitFile: if (!IncludeStack.empty()) { -if (llvm::timeTraceProfilerEnabled()) - llvm::timeTraceProfilerEnd(); +if (llvm::timeTraceProfilerEnabled()) { +

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-25 Thread via cfe-commits
cor3ntin wrote: The last bullet point of your todo list should be done as a follow up PR. everything else can/should be done here. I agree that back-porting this feature seems reasonable https://github.com/llvm/llvm-project/pull/86526 ___ cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-25 Thread YAMAMOTO Takashi via cfe-commits
yamt wrote: > I'm not sure about the common practice in this repo, but Github in general > supports merge workflows much better. Especially in a long-running large PRs, > if you force-push, it's hard for the reviewers to know what has changed since > their last review, because all the history

[clang] [llvm] [cmake] Remove custom linker flag check function (PR #86602)

2024-03-25 Thread Keith Smiley via cfe-commits
https://github.com/keith created https://github.com/llvm/llvm-project/pull/86602 Since LLVM now requires a minimum cmake version of 3.20.0, we no longer need this abstraction and can use the built in version directly as we do for the other feature check functions. >From

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-25 Thread Chris B via cfe-commits
llvm-beanz wrote: > This ^ seems a bit problematic to me, though (where the contents of the repo > isn't representative of the bits we want - but perhaps it's schrodinger's > line endings & it doesn't matter if it's always checked out as crlf - though > if we one day converted to another

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread via cfe-commits
https://github.com/overmighty updated https://github.com/llvm/llvm-project/pull/86577 >From 82bf133c52fc7e8a11dbaa3b60966bc99f0c2579 Mon Sep 17 00:00:00 2001 From: OverMighty Date: Mon, 25 Mar 2024 20:56:54 + Subject: [PATCH 1/3] [clang] Implement constexpr support for

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-25 Thread Chris B via cfe-commits
llvm-beanz wrote: > I am not saying this isn't a problem at all, but how often has anyone done a > one line change and caused a 50k diff, and submitted it without noticing? Way more often than you would hope. I don't have numbers but if you search through the git history for `crlf` or

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-25 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: @amy-kwan Thanks for your note and sorry for the long delay. There were so many unrelated buildbot failures today, that I didn't catch this one. I think it was fixed meanwhile with https://github.com/llvm/llvm-project/commit/cb994d41c3afb2bd0b25a4c5b2ac48978bf1b23d

[clang] [llvm] AMDGPU: Rename intrinsics and remove f16/bf16 versions for load transpose (PR #86313)

2024-03-25 Thread Sirish Pande via cfe-commits
https://github.com/srpande approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/86313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-03-25 Thread via cfe-commits
https://github.com/js324 updated https://github.com/llvm/llvm-project/pull/86586 >From 1df201fabc67e252a665338934334490e1849359 Mon Sep 17 00:00:00 2001 From: Jin S Date: Mon, 25 Mar 2024 17:19:41 -0400 Subject: [PATCH] [BitInt] Expose a _BitInt literal suffix in C++ ---

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-25 Thread Sam Clegg via cfe-commits
sbc100 wrote: Is this good to land now? @yamt do you have commit access or should @aheejin or myself land this? https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread Nick Desaulniers via cfe-commits
@@ -12367,8 +12368,17 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, BuiltinOp != Builtin::BI__lzcnt && BuiltinOp != Builtin::BI__lzcnt64; -if (ZeroIsUndefined && !Val) - return Error(E); +

[clang] [clang][modules] Avoid calling expensive `SourceManager::translateFile()` (PR #86216)

2024-03-25 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/86216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread Nick Desaulniers via cfe-commits
@@ -12410,12 +12420,22 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, case Builtin::BI__builtin_ctz: case Builtin::BI__builtin_ctzl: case Builtin::BI__builtin_ctzll: - case Builtin::BI__builtin_ctzs: { + case Builtin::BI__builtin_ctzs: + case

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread Nick Desaulniers via cfe-commits
@@ -12367,8 +12368,17 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, BuiltinOp != Builtin::BI__lzcnt && BuiltinOp != Builtin::BI__lzcnt64; -if (ZeroIsUndefined && !Val) - return Error(E); +

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread Nick Desaulniers via cfe-commits
@@ -12367,8 +12368,17 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, BuiltinOp != Builtin::BI__lzcnt && BuiltinOp != Builtin::BI__lzcnt64; -if (ZeroIsUndefined && !Val) - return Error(E); +

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread Nick Desaulniers via cfe-commits
@@ -12367,8 +12368,17 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, BuiltinOp != Builtin::BI__lzcnt && BuiltinOp != Builtin::BI__lzcnt64; -if (ZeroIsUndefined && !Val) - return Error(E); +

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread via cfe-commits
@@ -12367,8 +12368,17 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, BuiltinOp != Builtin::BI__lzcnt && BuiltinOp != Builtin::BI__lzcnt64; -if (ZeroIsUndefined && !Val) - return Error(E); +

[clang] [Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (PR #86526)

2024-03-25 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/86526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/86577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread Nick Desaulniers via cfe-commits
@@ -12367,8 +12368,17 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, BuiltinOp != Builtin::BI__lzcnt && BuiltinOp != Builtin::BI__lzcnt64; -if (ZeroIsUndefined && !Val) - return Error(E); +

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/86577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/86577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread Nick Desaulniers via cfe-commits
@@ -12367,8 +12368,17 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, BuiltinOp != Builtin::BI__lzcnt && BuiltinOp != Builtin::BI__lzcnt64; -if (ZeroIsUndefined && !Val) - return Error(E); +

[clang-tools-extra] [clang-tidy] Fix fix-it overlaps in readability-static-definition-in-anonymous-namespace (PR #86599)

2024-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Because check emitted multiple warnings for every template instance fix-it couldn't be applied due to overlaps. Using TK_IgnoreUnlessSpelledInSource and restricting check to C++ only. --- Full diff:

[clang-tools-extra] [clang-tidy] Fix fix-it overlaps in readability-static-definition-in-anonymous-namespace (PR #86599)

2024-03-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/86599 Because check emitted multiple warnings for every template instance fix-it couldn't be applied due to overlaps. Using TK_IgnoreUnlessSpelledInSource and restricting check to C++ only. >From

[clang] [clang][modules] Avoid calling expensive `SourceManager::translateFile()` (PR #86216)

2024-03-25 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/86216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Avoid calling expensive `SourceManager::translateFile()` (PR #86216)

2024-03-25 Thread Jan Svoboda via cfe-commits
@@ -71,6 +71,7 @@ // CHECK-NEXT: "context-hash": "{{.*}}", // CHECK-NEXT: "file-deps": [ // CHECK-NEXT: "[[PREFIX]]/first/module.modulemap", +// CHECK-NEXT: "[[PREFIX]]/second/module.modulemap", jansvoboda11 wrote: This is a

[clang] Match against all plugins when parsing microsoft attributes (PR #86426)

2024-03-25 Thread via cfe-commits
https://github.com/apache-hb updated https://github.com/llvm/llvm-project/pull/86426 >From 245a21512d8658225b17b91b8af4764f54084e01 Mon Sep 17 00:00:00 2001 From: Elliot <35050275+apache...@users.noreply.github.com> Date: Sun, 24 Mar 2024 03:03:47 -0400 Subject: [PATCH 1/5] Match against all

[clang] [clang][modules] Avoid calling expensive `SourceManager::translateFile()` (PR #86216)

2024-03-25 Thread Jan Svoboda via cfe-commits
@@ -1337,9 +1337,24 @@ static bool compileModule(CompilerInstance , // Get or create the module map that we'll use to build this module. ModuleMap = ImportingInstance.getPreprocessor().getHeaderSearchInfo().getModuleMap(); + SourceManager =

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-03-25 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/85684 >From b843c2f71a1a43cb897b557f783d60c6bf26f687 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Mon, 18 Mar 2024 10:45:20 -0700 Subject: [PATCH] Check if Coroutine await_suspend type returns the right

[clang-tools-extra] [clang-tidy] Improve performance of google-runtime-int (PR #86596)

2024-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Piotr Zegar (PiotrZSL) Changes Main problem with performance of this check is caused by hasAncestor matcher, and to be more precise by an llvm::DenseSet and std::deque in matchesAnyAncestorOf. To reduce impact of this

[clang-tools-extra] [clang-tidy] Improve performance of google-runtime-int (PR #86596)

2024-03-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/86596 Main problem with performance of this check is caused by hasAncestor matcher, and to be more precise by an llvm::DenseSet and std::deque in matchesAnyAncestorOf. To reduce impact of this matcher, multiple

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/84184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/84184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-25 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,74 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-25 Thread John McCall via cfe-commits
@@ -0,0 +1,74 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-25 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,74 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [HLSL] prevent generation of double intrinsics via the builtins (PR #86555)

2024-03-25 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/86555 >From 29a8e760f348c5a3e4fbd0fa25b2711e12eab301 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Mon, 25 Mar 2024 14:10:07 -0400 Subject: [PATCH 1/2] [HLSL] prevent generation of double intrinsics via the

[clang-tools-extra] [clangd] Prevent printing huge initializer lists in hover definitions (PR #79746)

2024-03-25 Thread Raoul Wols via cfe-commits
https://github.com/rwols updated https://github.com/llvm/llvm-project/pull/79746 >From 8187a249ac02d01b39bc583c37440a9eb6cbd7e7 Mon Sep 17 00:00:00 2001 From: Raoul Wols Date: Sat, 10 Feb 2024 20:52:03 +0100 Subject: [PATCH] [clangd] Do not render large initializer expressions from the

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-25 Thread via cfe-commits
@@ -12367,8 +12368,17 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, BuiltinOp != Builtin::BI__lzcnt && BuiltinOp != Builtin::BI__lzcnt64; -if (ZeroIsUndefined && !Val) - return Error(E); +

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-03-25 Thread via cfe-commits
@@ -12,6 +12,7 @@ #include #include "config.h" +#ifndef __wasm__ EricWF wrote: It seems like we simply don't want this file to build under WASM. https://github.com/llvm/llvm-project/pull/79667 ___ cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-03-25 Thread via cfe-commits
@@ -12,6 +12,7 @@ #ifndef __LIBUNWIND_EXT__ #define __LIBUNWIND_EXT__ +#ifndef __wasm__ EricWF wrote: This feels like the wrong way to do this. We don't typically just if-def out a header for a particular platform. Maybe track down the users of this

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-03-25 Thread via cfe-commits
https://github.com/EricWF requested changes to this pull request. I think there are some pretty non-idiomatic workarounds for WASM here. I think in general this approach could use a more structured approach to handling where WASM differs. Also, I know we have the mandatory code-formatter now,

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-03-25 Thread via cfe-commits
https://github.com/EricWF edited https://github.com/llvm/llvm-project/pull/79667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-25 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/85340 >From 74a869a282d532ec426dbc1c954779ec2972aa5c Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 14 Mar 2024 17:04:12 -0700 Subject: [PATCH 01/17] add test --- .../clang/Basic/DiagnosticDriverKinds.td

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-03-25 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,50 @@ +//===--- ExceptionRethrowCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [llvm] [HLSL][DXIL] implement `sqrt` intrinsic (PR #86560)

2024-03-25 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/86560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4cea2d0 - [HLSL][DXIL] implement `sqrt` intrinsic (#86560)

2024-03-25 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-03-25T18:02:30-04:00 New Revision: 4cea2d049f511d16cbc4605f7ecc908c851e169e URL: https://github.com/llvm/llvm-project/commit/4cea2d049f511d16cbc4605f7ecc908c851e169e DIFF: https://github.com/llvm/llvm-project/commit/4cea2d049f511d16cbc4605f7ecc908c851e169e.diff

[clang] [llvm] [DXIL] Add Float `Dot` Intrinsic Lowering (PR #86071)

2024-03-25 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/86071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 060df78 - [DXIL] Add Float `Dot` Intrinsic Lowering (#86071)

2024-03-25 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-03-25T18:01:46-04:00 New Revision: 060df78cdbbf70d5a6dfff3af1d435a5a811b886 URL: https://github.com/llvm/llvm-project/commit/060df78cdbbf70d5a6dfff3af1d435a5a811b886 DIFF: https://github.com/llvm/llvm-project/commit/060df78cdbbf70d5a6dfff3af1d435a5a811b886.diff

[clang] [llvm] [DXIL] Add Float `Dot` Intrinsic Lowering (PR #86071)

2024-03-25 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy approved this pull request. https://github.com/llvm/llvm-project/pull/86071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Refactor ConstantArrayType size storage (PR #85716)

2024-03-25 Thread Eli Friedman via cfe-commits
@@ -3182,34 +3182,100 @@ class ArrayType : public Type, public llvm::FoldingSetNode { /// For example, the canonical type for 'int A[4 + 4*100]' is a /// ConstantArrayType where the element type is 'int' and the size is 404. class ConstantArrayType final -: public

  1   2   3   4   5   >