[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-13 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/81662 >From 120bade6c7077eb37222e125952befe53a9fb8cc Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 13 Feb 2024 12:26:17 -0500 Subject: [PATCH] [clang][Sema] Improve error recovery for id-expressions re

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-13 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/88602 Fixes https://github.com/llvm/llvm-project/issues/88522 This PR introduce a new diagnostic to report apply AST consume actions on LLVM IR. >From a180c067d36b731cbd075651ca4ecd903a643ffa Mon Sep 17 00:00:00 200

[clang] [Clang] Diagnose apply AST consume actions on LLVM IR (PR #88602)

2024-04-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes Fixes https://github.com/llvm/llvm-project/issues/88522 This PR introduce a new diagnostic to report apply AST consume actions on LLVM IR. --- Full diff: https://github.com/llvm/llvm-project/pull/88602.diff 3 Fi

[clang] Add new flag -Wpointer-integer-ordered-compare (PR #88489)

2024-04-13 Thread via cfe-commits
https://github.com/vincent-mailhol edited https://github.com/llvm/llvm-project/pull/88489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add new flag -Wpointer-integer-ordered-compare (PR #88489)

2024-04-13 Thread via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -Wno-pointer-integer-compare -Wpointer-integer-ordered-compare -fsyntax-only -verify=pointer-integer-ordered %s +// RUN: %clang_cc1 -Wpointer-integer-compare -Wno-pointer-integer-ordered-compare -fsyntax-only -verify=pointer-integer %s + +vo

[clang] Add new flag -Wpointer-integer-ordered-compare (PR #88489)

2024-04-13 Thread via cfe-commits
https://github.com/vincent-mailhol commented: Thanks for taking care of the issue I created. For what it is worth, here is my review. I am not a contributor of the llvm project, so I only left superficial nitpicks. https://github.com/llvm/llvm-project/pull/88489 ___

[clang] Add new flag -Wpointer-integer-ordered-compare (PR #88489)

2024-04-13 Thread via cfe-commits
@@ -714,10 +714,11 @@ def HeaderHygiene : DiagGroup<"header-hygiene">; def DuplicateDeclSpecifier : DiagGroup<"duplicate-decl-specifier">; def CompareDistinctPointerType : DiagGroup<"compare-distinct-pointer-types">; def GNUUnionCast : DiagGroup<"gnu-union-cast">; +def PointerI

[clang] Add new flag -Wpointer-integer-ordered-compare (PR #88489)

2024-04-13 Thread via cfe-commits
@@ -245,6 +245,12 @@ Modified Compiler Flags f3 *c = (f3 *)x; } +- Added a new diagnostic flag ``-Wpointer-integer-ordered-compare`` which is + grouped under ``-Wpointer-integer-compare`` and moved previously + ungrouped diagnostics ``ext_typecheck_ordered_compa

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-13 Thread via cfe-commits
h-vetinari wrote: I'm surprised about the "compiler-rt is not supported on windows" comment - in our distribution, we've been building compiler-rt on windows for years, and I don't remember significant issues. It's true that `__divsc3` is not available _without_ compiler-rt (i.e. just relyin

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Kim Gräsman via cfe-commits
kimgr wrote: Thanks! Could you add this DeclPrinterTest unittest for regression? ``` TEST(DeclPrinter, TestTemplateFinal) { ASSERT_TRUE(PrintedDeclCXX11Matches( "template" "class FinalTemplate final {};", classTemplateDecl(hasName("FinalTemplate")).bind("id"), "template class

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88611 This patch touches a number of tests that run in C++98 mode that have been using array size as a context that requires a constant expression, replacing it with a `static_assert` backported via a macro. This redu

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch touches a number of tests that run in C++98 mode that have been using array size as a context that requires a constant expression, replacing it with a `static_assert` backported via a macro.

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR removes a FIXME since it doesn't make sense anymore in that particular context. I created issue #88608 out of it to make sure we don't lose track of it. https://github.com/llvm/llvm-project/pull/88611 ___ cfe-commits mailing li

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-04-13 Thread via cfe-commits
no92 wrote: Ping https://github.com/llvm/llvm-project/pull/87845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread via cfe-commits
https://github.com/Sirraide commented: I remember thinking that using array sizes for this was a bit outdated the last time I saw a test that did this, so it’s nice to see them refactored. https://github.com/llvm/llvm-project/pull/88611 ___ cfe-commit

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread via cfe-commits
@@ -5,6 +5,17 @@ // RUN: %clang_cc1 -std=c++11 -verify=expected,cxx98-14,cxx98-17,cxx98-20,cxx11-14,since-cxx11 -triple %itanium_abi_triple %s -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++98 -verify=expected,cxx98-14,cxx98-17,cxx98-20,cxx98 -tripl

[clang] 0412a86 - [clang] Add missing documentation entry for `__is_pointer_interconvertible_base_of()`

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-13T13:10:42+03:00 New Revision: 0412a8651aa6cbdd697e904a758e0f95e6635cee URL: https://github.com/llvm/llvm-project/commit/0412a8651aa6cbdd697e904a758e0f95e6635cee DIFF: https://github.com/llvm/llvm-project/commit/0412a8651aa6cbdd697e904a758e0f95e6635cee.

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
@@ -5,6 +5,17 @@ // RUN: %clang_cc1 -std=c++11 -verify=expected,cxx98-14,cxx98-17,cxx98-20,cxx11-14,since-cxx11 -triple %itanium_abi_triple %s -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++98 -verify=expected,cxx98-14,cxx98-17,cxx98-20,cxx98 -tripl

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

2024-04-13 Thread via cfe-commits
@@ -2193,6 +2193,41 @@ struct FormatStyle { /// \version 3.7 bool BreakBeforeTernaryOperators; + /// Different ways to Break Between Chevrons. + enum BreakChevronOperatorStyle : int8_t { +/// Break using ColumnLimit rules. +/// \code +/// os << "a" << "

[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

2024-04-13 Thread via cfe-commits
@@ -5598,10 +5598,34 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, // FIXME: Breaking after newlines seems useful in general. Turn this into an // option and recognize more cases like endl etc, and break independent of // what comes after operator le

[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

2024-04-13 Thread via cfe-commits
https://github.com/mydeveloperday updated https://github.com/llvm/llvm-project/pull/88490 >From 1c11c3edd0005a729561d84b9a815279b356e8db Mon Sep 17 00:00:00 2001 From: mydeveloperday Date: Fri, 12 Apr 2024 10:32:19 +0100 Subject: [PATCH 1/7] [clang-format] revery to string << string handling ba

[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

2024-04-13 Thread via cfe-commits
https://github.com/mydeveloperday updated https://github.com/llvm/llvm-project/pull/88490 >From 1c11c3edd0005a729561d84b9a815279b356e8db Mon Sep 17 00:00:00 2001 From: mydeveloperday Date: Fri, 12 Apr 2024 10:32:19 +0100 Subject: [PATCH 1/8] [clang-format] revery to string << string handling ba

[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

2024-04-13 Thread via cfe-commits
@@ -5598,10 +5598,34 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, // FIXME: Breaking after newlines seems useful in general. Turn this into an // option and recognize more cases like endl etc, and break independent of // what comes after operator le

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88611 >From c436fe6b0883577f434ee456fdffb224191108e0 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 13 Apr 2024 12:46:32 +0300 Subject: [PATCH 1/4] [clang] Migrate DR tests to `static_assert` --- clang/

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

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

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Kim Gräsman via cfe-commits
kimgr wrote: > With .PolishForDeclaration=true, there are NO final specifiers (which is what > we want to produce forward decls in IWYU) This is actually a regression in this PR, and it breaks the clangd test added here: https://github.com/llvm/llvm-project/commit/9f57b65a272817752aa00e2fb941

[clang] cbfcfdf - [clang][NFC] Add a test for CWG2254 to `is_pointer_interconvertible_base_of` tests

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-13T15:17:04+03:00 New Revision: cbfcfdf75e9939bc47ac7a7c11d2122a6ad426ed URL: https://github.com/llvm/llvm-project/commit/cbfcfdf75e9939bc47ac7a7c11d2122a6ad426ed DIFF: https://github.com/llvm/llvm-project/commit/cbfcfdf75e9939bc47ac7a7c11d2122a6ad426ed.

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > (especially considering you said you’re going to refactor more tests than > just these) @Sirraide I didn't say that originally, but you reminded me that I indeed forgot about all the uses of arrays that don't trigger diagnostics. I went over all of them, and decided to includ

[clang] [Clang][Sema] Fix issue on requires expression with templated base class member function (PR #85198)

2024-04-13 Thread Qizhi Hu via cfe-commits
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, } if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl)) -if (Method->isImplicitObjectMemberFunction()) +if (!isa(CurContext) && jcsxky wrote: Do you mean that

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/88600 >From bcd04db735a78b4d7df93e88229ea4e2491fc09e Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 13 Apr 2024 06:39:34 + Subject: [PATCH] Fix the double space and double attribute printing of the f

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > With .PolishForDeclaration=true, there are NO final specifiers (which is > > what we want to produce forward decls in IWYU) > > This is actually a regression in this PR, and it breaks the clangd test added > here: > [9f57b65](https://github.com/llvm/llvm-project/commit/9

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Kim Gräsman via cfe-commits
kimgr wrote: Thank you. I believe this should cover both cases, added some attempt at rationale in comments: ```diff diff --git a/clang/unittests/AST/DeclPrinterTest.cpp b/clang/unittests/AST/DeclPrinterTest.cpp index f2b027a25621..8691a6c38f16 100644 --- a/clang/unittests/AST/DeclPrinterTest.

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: IIUC, the PolishForDeclaration option is supposed to `When true, do certain refinement needed for producing proper declaration tag; such as, do not print attributes attached to the declaration. `. If the intent is to produce a forward declaration the `final` keyword cannot be

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-13 Thread James Y Knight via cfe-commits
jyknight wrote: To get back to my previous point about the semantics implemented by this patch being unfortunate -- the upshot is that, now: ``` #include #define NDEBUG #import ``` will include assert.h twice (even though the latter is an "import") _only_ if modules are enabled. If modules ar

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/88600 >From c68344d2d2f22f88ef386f655cc7698759fb551c Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 13 Apr 2024 06:39:34 + Subject: [PATCH] Fix the double space and double attribute printing of the f

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: I've put a fix that fixes the cases that you mentioned... https://github.com/llvm/llvm-project/pull/88600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/88600 >From cb3da95dd80c5ed991c5342e655e0f170eab16eb Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 13 Apr 2024 06:39:34 + Subject: [PATCH] Fix the double space and double attribute printing of the f

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/88600 >From 9b2bb9068cbefcfffd0931fbbee46b1a0f536a4f Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sat, 13 Apr 2024 06:39:34 + Subject: [PATCH] Fix the double space and double attribute printing of the f

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Kim Gräsman via cfe-commits
kimgr wrote: > If the intent is to produce a forward declaration the final keyword cannot be > attached to a forward declaration. So I am not sure what's the "right" fix > here... I don't believe that's the intent of `DeclPrinter` or `PolishForDeclaration` -- * Clangd uses `PolishForDeclarati

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Kim Gräsman via cfe-commits
@@ -252,16 +252,19 @@ static DeclPrinter::AttrPosAsWritten getPosAsWritten(const Attr *A, return DeclPrinter::AttrPosAsWritten::Right; } -void DeclPrinter::prettyPrintAttributes(const Decl *D, +// returns true if an attribute was printed. +bool DeclPrinter::prettyPrintAttri

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > * IWYU uses `PolishForDeclaration` to get a valid _declaration_, and then > does [some very hacky heuristic > post-processing](https://github.com/include-what-you-use/include-what-you-use/blob/125341c412ceee9233ece8973848b49e770a9b82/iwyu_output.cc#L469) > to turn it into a

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Kim Gräsman via cfe-commits
kimgr wrote: Current PR passes all my tests, both Clang (`ninja ASTTests`), Clangd (`ninja ClangdTests`) and IWYU end-to-end tests -- thanks! https://github.com/llvm/llvm-project/pull/88600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] Update FormatTest.cpp (PR #88628)

2024-04-13 Thread Edward Bottom via cfe-commits
https://github.com/edwardbottom created https://github.com/llvm/llvm-project/pull/88628 None >From 22ae52878602dfc79ab90bbc6e9dea508c3762e2 Mon Sep 17 00:00:00 2001 From: Edward Bottom <31777866+edwardbot...@users.noreply.github.com> Date: Sat, 13 Apr 2024 08:49:47 -0700 Subject: [PATCH] Update

[clang] Update FormatTest.cpp (PR #88628)

2024-04-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Update FormatTest.cpp (PR #88628)

2024-04-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Edward Bottom (edwardbottom) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/88628.diff 1 Files Affected: - (modified) clang/unittests/Format/FormatTest.cpp (+4-4) ``diff diff --git a/clang/unittests/

[clang] [Clang Format] Fixing erroneous statements in tests; nsc (PR #88628)

2024-04-13 Thread Edward Bottom via cfe-commits
https://github.com/edwardbottom edited https://github.com/llvm/llvm-project/pull/88628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)

2024-04-13 Thread Kim Gräsman via cfe-commits
kimgr wrote: > I am wondering if that'd be interesting and if so, maybe we can share it > between both projects via upstreaming to Clang... That sounds fantastic, but mostly because I don't have anything to offer, and everything to benefit :) I was just thinking about adding a `.ForwardDeclar

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-13 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/87361 >From b8a626116b0719c1acf75e9e7300df8e2bf82f99 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 2 Apr 2024 18:00:05 +0200 Subject: [PATCH 1/3] [Clang] Reduce the size of Decl and classes derived from

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

2024-04-13 Thread Alexandre Ganea via cfe-commits
aganea wrote: I think in the short term @jansvoboda11's suggestion should be good enough. Bit if we want `Statistics` to be always cheap, we should make them `thread_local` instead, not atomic. `getValue()` could do the "collection" of data over all active, or past threads. It would also need

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-04-13 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/86402 >From 4434ceeef152b95998ebd0a3b09a56d105490c4d Mon Sep 17 00:00:00 2001 From: Anubhab Ghosh Date: Sat, 23 Mar 2024 15:13:57 + Subject: [PATCH 1/2] [clang-repl] Support wasm execution. This commit introduc

[clang] [analyzer] Harden security.cert.env.InvalidPtr checker fn matching (PR #88536)

2024-04-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/88536 >From 915ab37028067fb38ffa69ae5c9726bb8c971436 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Fri, 12 Apr 2024 19:07:49 +0200 Subject: [PATCH 1/2] [analyzer] Harden security.cert.env.InvalidPtr checker fn m

[clang] [clang][docs] fix whitespace in AttrDocs.td (PR #88631)

2024-04-13 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc created https://github.com/llvm/llvm-project/pull/88631 None >From 40d774ab8c598f0dfb76dcd087f1af17c7fdd01d Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Fri, 12 Apr 2024 23:42:32 -0700 Subject: [PATCH] [clang][docs] fix whitespace in AttrDocs.td --- clang/in

[clang] [clang][docs] fix whitespace in AttrDocs.td (PR #88631)

2024-04-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang][docs] fix whitespace in AttrDocs.td (PR #88631)

2024-04-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris Copeland (chrisnc) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/88631.diff 1 Files Affected: - (modified) clang/include/clang/Basic/AttrDocs.td (+16-16) ``diff diff --git a/clang/include/clang/Basic

[clang] [clang][docs] fix whitespace in AttrDocs.td (PR #88631)

2024-04-13 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc edited https://github.com/llvm/llvm-project/pull/88631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] fix whitespace in AttrDocs.td (PR #88631)

2024-04-13 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc updated https://github.com/llvm/llvm-project/pull/88631 >From d3e993c34e9d05f149b2670502794eaf93dee89a Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Fri, 12 Apr 2024 23:42:32 -0700 Subject: [PATCH] [clang][docs] fix whitespace in AttrDocs.td --- clang/include/

[clang] [clang][docs] fix whitespace in AttrDocs.td (PR #88631)

2024-04-13 Thread Chris Copeland via cfe-commits
chrisnc wrote: @cachemeifyoucan @cyndyishida for review? https://github.com/llvm/llvm-project/pull/88631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] fad3752 - [clang-tidy] Export fixes from check_clang_tidy.py (#88186)

2024-04-13 Thread via cfe-commits
Author: Edwin Vane Date: 2024-04-13T21:01:06+02:00 New Revision: fad37526a3ea7d669af621342968029085862281 URL: https://github.com/llvm/llvm-project/commit/fad37526a3ea7d669af621342968029085862281 DIFF: https://github.com/llvm/llvm-project/commit/fad37526a3ea7d669af621342968029085862281.diff LO

[clang-tools-extra] [clang-tidy] Export fixes from check_clang_tidy.py (PR #88186)

2024-04-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/88186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] fix whitespace in AttrDocs.td (PR #88631)

2024-04-13 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM. Thanks for fixing. https://github.com/llvm/llvm-project/pull/88631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore deleted ctor in `bugprone-forwarding-reference-overload` (PR #88138)

2024-04-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Missing release notes entry, except that looks fine. https://github.com/llvm/llvm-project/pull/88138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/87521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-13 Thread Balazs Benics via cfe-commits
@@ -2836,6 +2836,10 @@ bool RangeConstraintManager::canReasonAbout(SVal X) const { return false; } + // Non-integer types are not supported. + if (X.getAs()) +return false; + steakhal wrote: My problem with this is that I think LCVs shouldn't eve

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-13 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 %s \ +// RUN: -analyzer-checker=alpha.cplusplus.InvalidatedIterator \ +// RUN: -analyzer-config aggressive-binary-operation-simplification=true \ +// RUN: 2>&1 + +struct node {}; +struct prop : node {}; +struct bitvec : node { +

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-13 Thread Balazs Benics via cfe-commits
@@ -57,10 +57,14 @@ ProgramStateRef SimpleConstraintManager::assumeAux(ProgramStateRef State, // We cannot reason about SymSymExprs, and can only reason about some // SymIntExprs. if (!canReasonAbout(Cond)) { -// Just add the constraint to the expression without tryi

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-13 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 %s \ steakhal wrote: I think you should put this test without the RUN lines into the `clang/test/Analysis/invalidated-iterator.cpp` to have them at one place. https://github.com/llvm/llvm-project/pull/87521 _

[clang] [analyzer] `canReasonAbout` does not support `nonloc::LazyCompoundVal` (PR #87521)

2024-04-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. https://github.com/llvm/llvm-project/pull/87521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference (PR #87954)

2024-04-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/87954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference (PR #87954)

2024-04-13 Thread Piotr Zegar via cfe-commits
@@ -22,8 +21,15 @@ class FunctionParmMutationAnalyzer; /// a given statement. class ExprMutationAnalyzer { public: + friend class FunctionParmMutationAnalyzer; + struct Cache { +llvm::DenseMaphttps://github.com/llvm/llvm-project/pull/87954

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference (PR #87954)

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

[clang] [clang] Introduce `SemaCUDA` (PR #88559)

2024-04-13 Thread Florian Hahn via cfe-commits
fhahn wrote: Is it possible that this broke this bot failing with the error below? ``` usr/local/clang-17.0.2/bin/clang++ -DGTEST_HAS_RTTI=0 -D_CINDEX_LIB_ -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LARGE_FILE_API -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/powerllvm/

[clang] [Clang Format] Fixing erroneous statements in tests; nsc (PR #88628)

2024-04-13 Thread Emilia Kond via cfe-commits
https://github.com/rymiel closed https://github.com/llvm/llvm-project/pull/88628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-13 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: @sopyb Check is for modernize, not performance, so: - Add entry in documentation that due to need of copy object into initialization list check may cause performance degradation, add entry that using std::ref, std::cref is recommended in such case: `b = std::max({std::ref(i), s

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-13 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/84758 >From f28fc3aa917b24063707f99dd6545512630f48e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Sun, 10 Mar 2024 18:17:48 +0100 Subj

[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

2024-04-13 Thread Björn Schäpers via cfe-commits
@@ -5598,10 +5598,34 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, // FIXME: Breaking after newlines seems useful in general. Turn this into an // option and recognize more cases like endl etc, and break independent of // what comes after operator le

[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

2024-04-13 Thread Björn Schäpers via cfe-commits
@@ -2193,6 +2193,41 @@ struct FormatStyle { /// \version 3.7 bool BreakBeforeTernaryOperators; + /// Different ways to Break Between Chevrons. + enum BreakChevronOperatorStyle : int8_t { +/// Break using ColumnLimit rules. +/// \code +/// os << "a" << "

[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

2024-04-13 Thread Björn Schäpers via cfe-commits
@@ -5598,11 +5598,45 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, // FIXME: Breaking after newlines seems useful in general. Turn this into an // option and recognize more cases like endl etc, and break independent of // what comes after operator le

[clang] [clang][docs] fix whitespace in AttrDocs.td (PR #88631)

2024-04-13 Thread Chris Copeland via cfe-commits
chrisnc wrote: Ready to merge, but I'm not able to myself. https://github.com/llvm/llvm-project/pull/88631 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-13 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 created https://github.com/llvm/llvm-project/pull/88636 This PR aims to expand the list of classes that are considered to be "strings" by `readability-string-compare` check. 1. Currently `readability-string-compare` only checks `std::string;:compare`, but `std::s

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-13 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 edited https://github.com/llvm/llvm-project/pull/88636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix an issue where clang++ and clang uses enormous amounts of memory (PR #88637)

2024-04-13 Thread via cfe-commits
https://github.com/term-est created https://github.com/llvm/llvm-project/pull/88637 Henlo frens! 🍓 We folks at Armelsan Defense has been using LLVM for quite some time. Recently we encountered an issue with clangd where it tries to allocate 137 gigs of memory in one of our template heavy cod

[clang] Fix an issue where clang++ and clang uses enormous amounts of memory (PR #88637)

2024-04-13 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Fix an issue where clang++ and clang uses enormous amounts of memory (PR #88637)

2024-04-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (term-est) Changes Henlo frens! 🍓 We folks at Armelsan Defense has been using LLVM for quite some time. Recently we encountered an issue with clangd where it tries to allocate 137 gigs of memory in one of our template heavy codebas

[clang] Fix an issue where clang++ and clangd uses enormous amounts of memory (PR #88637)

2024-04-13 Thread via cfe-commits
https://github.com/term-est edited https://github.com/llvm/llvm-project/pull/88637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-13 Thread via cfe-commits
https://github.com/komalverma04 updated https://github.com/llvm/llvm-project/pull/87268 >From 9b5781108081565e4009c3809eab623387655f1c Mon Sep 17 00:00:00 2001 From: komalverma04 Date: Mon, 1 Apr 2024 22:43:10 +0530 Subject: [PATCH 1/7] [clang-tidy] Add ignoringParenImpCasts in hasAnyArgument

[clang] Fix an issue where clang++ and clangd uses enormous amounts of memory (PR #88637)

2024-04-13 Thread via cfe-commits
https://github.com/term-est edited https://github.com/llvm/llvm-project/pull/88637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-13 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/88636 >From 91eccdd291fa4f0753aa8e9970fa146516823e22 Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Sat, 13 Apr 2024 23:36:12 +0300 Subject: [PATCH] readability-string-compare: check std::string_view, allow custo

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-13 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/88636 >From b63dd11ea87cd504c8972de6ed29330d6702abca Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Sat, 13 Apr 2024 23:36:12 +0300 Subject: [PATCH] readability-string-compare: check std::string_view, allow custo

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-13 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/88636 >From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Sat, 13 Apr 2024 23:36:12 +0300 Subject: [PATCH] readability-string-compare: check std::string_view, allow custo

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-13 Thread Vadim D. via cfe-commits
@@ -7,42 +7,70 @@ //===--===// #include "StringCompareCheck.h" -#include "../utils/FixItHintUtils.h" +#include "../utils/OptionsUtils.h" #include "clang/AST/ASTContext.h" #include "clang/ASTMatchers/ASTMatc

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-13 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 ready_for_review https://github.com/llvm/llvm-project/pull/88636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Vadim D. (vvd170501) Changes This PR aims to expand the list of classes that are considered to be "strings" by `readability-string-compare` check. 1. Currently only `std::string;:compare` is checked, but `std::string_view` has a si

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Vadim D. (vvd170501) Changes This PR aims to expand the list of classes that are considered to be "strings" by `readability-string-compare` check. 1. Currently only `std::string;:compare` is checked, but `std::string_view` h

[clang] [clang-format] New clang-format-indent-mode for Emacs (PR #78904)

2024-04-13 Thread Amy Grinn via cfe-commits
amygrinn wrote: ping https://github.com/llvm/llvm-project/pull/78904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix an issue where clang++ and clangd uses enormous amounts of memory (PR #88637)

2024-04-13 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

  1   2   >