[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-27 Thread Serge Pavlov via cfe-commits
spavloff wrote: Thanks! I will commit it in a couple of day, if no additional feedback is provided. https://github.com/llvm/llvm-project/pull/92699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/93417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread kadir çetinkaya via cfe-commits
@@ -42,7 +41,11 @@ #include #include -namespace clang::clangd { +namespace clang { + +class Module; kadircet wrote: this is not an "unnecessary" include, clangd requires a declaration of `clang::Module` in this file (even if incomplete) and we try not to h

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. https://github.com/llvm/llvm-project/pull/93417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Daniel Krupp via cfe-commits
dkrupp wrote: > The patch makes sense to me. Have you considered applying the same heuristic > to C++ array new allocations? > > I'll port this patch downstream to see how this would behave on the Juliet > C++ benchmark or on some real-world code. I will check C++ > The patch makes sense to

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Daniel Krupp via cfe-commits
dkrupp wrote: @NagyDonat , @steakhal I fixed the additional remarks. Is there anything else that's need to be done before merging? Thanks. https://github.com/llvm/llvm-project/pull/92420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [Clang] [Sema] Diagnose unexpanded parameter packs in attributes (PR #93482)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/93482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4b5e0a1 - [Clang] [Sema] Diagnose unexpanded parameter packs in attributes (#93482)

2024-05-27 Thread via cfe-commits
Author: Sirraide Date: 2024-05-27T18:17:07+02:00 New Revision: 4b5e0a1d12f0d624852c6d7c82207647ed5282aa URL: https://github.com/llvm/llvm-project/commit/4b5e0a1d12f0d624852c6d7c82207647ed5282aa DIFF: https://github.com/llvm/llvm-project/commit/4b5e0a1d12f0d624852c6d7c82207647ed5282aa.diff LOG:

[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

2024-05-27 Thread Daniel Krupp via cfe-commits
dkrupp wrote: > @NagyDonat , @steakhal I fixed the additional remarks. Is there anything else > that's need to be done before merging? Thanks. I see now, that there is still one unaddressed remark from @NagyDonat regarding a new testcase for array new allocations. I will be adding it tomorrow.

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

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

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread via cfe-commits
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr &Attr) { std::optional Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) { - auto BadExpr = [&]() { -Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type) -

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. One last minor comment, but other than that I think we’re good. This is a comparatively large pr, so while it’s possible that I missed something, I don’t think there is much to be gained from me staring at this for any longer than I alre

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread David Stone via cfe-commits
@@ -159,7 +159,8 @@ class APINotesManager { ArrayRef getCurrentModuleReaders() const { bool HasPublic = CurrentModuleReaders[ReaderKind::Public]; bool HasPrivate = CurrentModuleReaders[ReaderKind::Private]; -assert((!HasPrivate || HasPublic) && "private module req

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread David Stone via cfe-commits
@@ -42,7 +41,11 @@ #include #include -namespace clang::clangd { +namespace clang { + +class Module; davidstone wrote: Is that a clangd preference or llvm-wide? I see a lot of forward declarations in other parts of the code so I want to understand when I sh

[clang] [clang-tools-extra] [libcxx] [clang][Modules] Remove unnecessary includes of `Module.h` (PR #93417)

2024-05-27 Thread David Stone via cfe-commits
@@ -42,7 +41,11 @@ #include #include -namespace clang::clangd { +namespace clang { + +class Module; davidstone wrote: Specifically I'm following the guidance at: https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible https://github.com/l

[clang-tools-extra] Update identifier-length.rst (PR #93467)

2024-05-27 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/93467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

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

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread via cfe-commits
https://github.com/Sirraide commented: Just a few minor things I noticed https://github.com/llvm/llvm-project/pull/93430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread via cfe-commits
@@ -5813,6 +5813,24 @@ static TypoCorrection TryTypoCorrectionForCall(Sema &S, Expr *Fn, return TypoCorrection(); } +static bool isParenthetizedAndQualifiedAddressOfExpr(Expr *Fn) { + if (!isa(Fn)) +return false; + + Fn = Fn->IgnoreParens(); + auto *UO = dyn_cast(Fn)

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread via cfe-commits
@@ -5834,9 +5852,12 @@ Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, // C99 6.5.2.2p7 - the arguments are implicitly converted, as if by // assignment, to the types of the corresponding parameter, ... + + bool AddressOf = isParenthetizedAndQualifiedAddressOfExpr

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread via cfe-commits
@@ -209,6 +209,9 @@ C++23 Feature Support - Added a ``__reference_converts_from_temporary`` builtin, completing the necessary compiler support for `P2255R2: Type trait to determine if a reference binds to a temporary `_. +- Implemented `P2797R0:

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread via cfe-commits
@@ -16333,7 +16387,7 @@ ExprResult Sema::FixOverloadedFunctionReference(Expr *E, DeclAccessPair Found, assert(UnOp->getOpcode() == UO_AddrOf && "Can only take the address of an overloaded function"); if (CXXMethodDecl *Method = dyn_cast(Fn)) { - if (Met

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread via cfe-commits
@@ -7636,7 +7651,16 @@ Sema::AddMethodCandidate(CXXMethodDecl *Method, DeclAccessPair FoundDecl, // exist for each argument an implicit conversion sequence // (13.3.3.1) that converts that argument to the corresponding // parameter of F. - QualType Param

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-05-27 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/93365 >From 530eb982b9770190377bb0bd09c5cb715f34d484 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 15 Dec 2023 20:38:38 -0600 Subject: [PATCH 01/27] Add profiling functions to libomptarget

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > @dougsonos Just merged a pr that diagnoses unexpanded parameter packs when an > attribute is parsed, so could you double-check if that call to > `DiagnoseUnexpandedParameterPack` is still necessary? I just re-merged main to the branch and verified that the call to `Diagnose

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread Doug Wyatt via cfe-commits
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr &Attr) { std::optional Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) { - auto BadExpr = [&]() { -Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type) -

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread via cfe-commits
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr &Attr) { std::optional Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) { - auto BadExpr = [&]() { -Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type) -

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread via cfe-commits
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr &Attr) { std::optional Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) { - auto BadExpr = [&]() { -Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type) -

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread via cfe-commits
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr &Attr) { std::optional Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) { - auto BadExpr = [&]() { -Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type) -

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-27 Thread Louis Dionne via cfe-commits
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + ldionne wrote: It seems that we disagree on the approach take

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-27 Thread Louis Dionne via cfe-commits
@@ -1,82 +0,0 @@ -#===--===## ldionne wrote: `clang/utils/ci/run-buildbot` can be removed too, I think. https://github.com/llvm/llvm-project/pull/93318 __

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-27 Thread Doug Wyatt via cfe-commits
@@ -7525,25 +7525,21 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr &Attr) { std::optional Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) { - auto BadExpr = [&]() { -Diag(CondExpr->getExprLoc(), diag::err_attribute_argument_type) -

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-05-27 Thread via cfe-commits
gulfemsavrun wrote: Ok, thanks for your analysis @aaronmondal! https://github.com/llvm/llvm-project/pull/92865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-05-27 Thread Yaxun Liu via cfe-commits
@@ -368,7 +368,8 @@ CodeGenModule::CodeGenModule(ASTContext &C, IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth()); IntPtrTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getMaxPointerWidth()); - Int8PtrTy = llvm::PointerType::get(LL

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-27 Thread Joshua Cranmer via cfe-commits
jcranmer-intel wrote: Overall, I'm not opposed to this patch. This new macro should probably be mentioned somewhere in the clang user documentation. > The way this requirement is formulated indicates that it could be implemented > using preprocessor facility. Such implementation would require

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-05-27 Thread Alex Voicu via cfe-commits
@@ -368,7 +368,8 @@ CodeGenModule::CodeGenModule(ASTContext &C, IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth()); IntPtrTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getMaxPointerWidth()); - Int8PtrTy = llvm::PointerType::get(LL

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-05-27 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-05-27 Thread Björn Schäpers via cfe-commits
@@ -6157,6 +6157,12 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line, return !(Previous && (Previous->is(tok::kw_for) || Previous->isIf())); } + if (Left.isOneOf(tok::r_paren, TT_TrailingAnnotation) && HazardyKnusperkeks wrote: Is this

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-05-27 Thread Björn Schäpers via cfe-commits
@@ -803,6 +803,46 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, return !Tok.Previous->isOneOf(TT_CastRParen, tok::kw_for, tok::kw_while, tok::kw_switch); }; + // Detecting functions is brittle. It wo

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-05-27 Thread Björn Schäpers via cfe-commits
@@ -803,6 +803,46 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, return !Tok.Previous->isOneOf(TT_CastRParen, tok::kw_for, tok::kw_while, tok::kw_switch); }; + // Detecting functions is brittle. It wo

[clang] [clang-format]: Annotate colons found in inline assembly (PR #92617)

2024-05-27 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/92617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add LeftWithLastLine to AlignEscapedNewlines option (PR #93402)

2024-05-27 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. Nice https://github.com/llvm/llvm-project/pull/93402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-05-27 Thread Vadim D. via cfe-commits
vvd170501 wrote: Ping. @kadircet, can you merge this, please? Or are additional approvals required? https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-05-27 Thread via cfe-commits
@@ -368,7 +368,8 @@ CodeGenModule::CodeGenModule(ASTContext &C, IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth()); IntPtrTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getMaxPointerWidth()); - Int8PtrTy = llvm::PointerType::get(LL

[clang] [clang] Macro for constant rounding mode (PR #92699)

2024-05-27 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Oh, I somehow thought the macro was part of the spec; reading again, I guess it isn't, it's just an attempt to implement the spec. We probably want some feedback from libc implementers to check if this is what they want. I don't really want to end up in a situation where

[clang] fix(91536): clang 18.1 parser crash (PR #93490)

2024-05-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/93490 Fixes #91536 >From a20c395f5d44f98363172216256c8ce61e96ffbe Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 27 May 2024 23:25:53 +0300 Subject: [PATCH] fix(91536): skip explicit 'this' check in non-vali

[clang] fix(91536): clang 18.1 parser crash (PR #93490)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #91536 --- Full diff: https://github.com/llvm/llvm-project/pull/93490.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/lib/Sema/SemaExprCXX.cpp (+3-3) - (a

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Stone (davidstone) Changes --- Patch is 129.44 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/93493.diff 59 Files Affected: - (modified) clang/include/clang/APINotes/APINotesManager.h

<    1   2   3