[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Very strange. I did not see a lot of platforms failing. If we decide to keep that commit, is there a way to disable this test for exactly that platform? https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list cfe

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Dan Liew via cfe-commits
https://github.com/delcypher requested changes to this pull request. @pdherbemont thanks for working on this. It looks pretty good and its great to see the late parsing support I added gaining new users. I just have some nits about missing test cases. https://github.com/llvm/llvm-project/pull/

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Dan Liew via cfe-commits
@@ -29,6 +29,13 @@ struct LOCKABLE Mutex {}; struct Foo { struct Mutex *mu_; + int a_value GUARDED_BY(mu_); delcypher wrote: @pdherbemont I think you should be checking **both** late and regular parsing for all attributes that you're adding support for.

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Dan Liew via cfe-commits
@@ -3330,6 +3340,112 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// GuardedBy attributes (e.g., guarded_by): +/// AttrName '(' expression ')' +void Parser::ParseGuardedByAttribute( +IdentifierInfo &AttrName, SourceLocation AttrNameLoc, +ParsedAttrib

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/94216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Dan Liew via cfe-commits
@@ -3330,6 +3340,112 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// GuardedBy attributes (e.g., guarded_by): +/// AttrName '(' expression ')' +void Parser::ParseGuardedByAttribute( +IdentifierInfo &AttrName, SourceLocation AttrNameLoc, +ParsedAttrib

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Dan Liew via cfe-commits
@@ -3330,6 +3340,112 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// GuardedBy attributes (e.g., guarded_by): +/// AttrName '(' expression ')' +void Parser::ParseGuardedByAttribute( +IdentifierInfo &AttrName, SourceLocation AttrNameLoc, +ParsedAttrib

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Dan Liew via cfe-commits
@@ -3330,6 +3340,112 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// GuardedBy attributes (e.g., guarded_by): +/// AttrName '(' expression ')' +void Parser::ParseGuardedByAttribute( +IdentifierInfo &AttrName, SourceLocation AttrNameLoc, +ParsedAttrib

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Dan Liew via cfe-commits
@@ -3330,6 +3340,112 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// GuardedBy attributes (e.g., guarded_by): +/// AttrName '(' expression ')' +void Parser::ParseGuardedByAttribute( +IdentifierInfo &AttrName, SourceLocation AttrNameLoc, +ParsedAttrib

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Dan Liew via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety -Wthread-safety-beta %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety -Wthread-safety-beta -fexperimental-late-parse-attributes %s delcypher wrote: @pdherbemont We should prob

[clang] [Clang][Sema][TemplateDeduction] Skip pack expansion type at the end of default template argument list if unneeded (PR #94659)

2024-06-06 Thread via cfe-commits
https://github.com/yozhu created https://github.com/llvm/llvm-project/pull/94659 If default argument list has one more element than actual argument list and the last default argument is a pack expansion, we can ignore it. This is to fix a failed assertion: clang: llvm-project/clang/lib/Sema/S

[clang] [Clang][Sema][TemplateDeduction] Skip pack expansion type at the end of default template argument list if unneeded (PR #94659)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yozhu) Changes If default argument list has one more element than actual argument list and the last default argument is a pack expansion, we can ignore it. This is to fix a failed assertion: clang: llvm-project/clang/lib/Sema/Sema

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-06 Thread Eli Friedman via cfe-commits
@@ -1830,6 +1830,9 @@ void ItaniumCXXABI::emitVTableDefinitions(CodeGenVTables &CGVT, if (VTable->hasInitializer()) return; + if (RD->shouldEmitInExternalSource()) +return; efriedma-quic wrote: This check seems like it's at the wrong level; if we

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-06 Thread Eli Friedman via cfe-commits
@@ -6853,6 +6853,13 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { if (ES->hasExternalDefinitions(D) == ExternalASTSource::EK_Never) DI->completeUnusedClass(*CRD); } +// If we're emitting a dynamic class from the importable module we're +// emi

[clang] [RISCV] Unify all the code that adds unaligned-scalar/vector-mem to Features vector. (PR #94660)

2024-06-06 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/94660 Instead of having multiple places insert into the Features vector independently, check all the conditions in one place. This avoids a subtle ordering requirement that -mstrict-align processing had to be done af

[clang] [RISCV] Unify all the code that adds unaligned-scalar/vector-mem to Features vector. (PR #94660)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Craig Topper (topperc) Changes Instead of having multiple places insert into the Features vector independently, check all the conditions in one place. This avoids a subtle ordering requirement that -mstrict-align processing had to

[clang] [RISCV] Unify all the code that adds unaligned-scalar/vector-mem to Features vector. (PR #94660)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Craig Topper (topperc) Changes Instead of having multiple places insert into the Features vector independently, check all the conditions in one place. This avoids a subtle ordering requirement that -mstrict-align processing had to be don

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > Not sure, nothing in cmake cmd: > > ``` > cmake -DLLVM_APPEND_VC_REV=OFF -GNinja -DCMAKE_BUILD_TYPE=Release > -DLLVM_CCACHE_BUILD=ON -DLLVM_USE_LINKER=lld -DLLVM_ENABLE_ASSERTIONS=ON > -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF > -DCMAKE_C_COMPILER=/b/sanitizer-aarch64-linux

[clang] [clang-format][NFC] Remove an else after a return statement (PR #94548)

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

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #94664)

2024-06-06 Thread Andrew Ng via cfe-commits
https://github.com/nga888 created https://github.com/llvm/llvm-project/pull/94664 When dropping DLL attributes, ensure that the most recent declaration is being checked. >From 05175ee44ce0b796b641beb34b18d7974c8355d2 Mon Sep 17 00:00:00 2001 From: Andrew Ng Date: Fri, 31 May 2024 17:17:18 +01

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #94664)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andrew Ng (nga888) Changes When dropping DLL attributes, ensure that the most recent declaration is being checked. --- Full diff: https://github.com/llvm/llvm-project/pull/94664.diff 2 Files Affected: - (modified) clang/lib/CodeGen/Cod

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-06 Thread Björn Schäpers via cfe-commits
@@ -1457,6 +1457,11 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) { !Current.isOneOf(tok::colon, tok::comment)) { return ContinuationIndent; } + if (Style.isCpp() && Current.is(tok::arrow) && HazardyKnusperkeks wrote:

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-06 Thread Björn Schäpers via cfe-commits
@@ -22858,6 +22858,31 @@ TEST_F(FormatTest, FormatsLambdas) { " //\n" "});"); + verifyFormat("int main() {\n" HazardyKnusperkeks wrote: Get yourself a style with a lower column limit `auto Style = getLLVMStyleWithColumnLimit(40);` and u

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)

2024-06-06 Thread Andrew Ng via cfe-commits
nga888 wrote: Closing this PR in favour of PR #94664. https://github.com/llvm/llvm-project/pull/93302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix loss of `dllexport` for exported template specialization (PR #93302)

2024-06-06 Thread Andrew Ng via cfe-commits
https://github.com/nga888 closed https://github.com/llvm/llvm-project/pull/93302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Pick up input headers by directory traversal (PR #94508)

2024-06-06 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/94508 >From c547d990aca29ecfe6f51d37c5c3f8712dfc5e44 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Fri, 10 May 2024 09:19:22 -0700 Subject: [PATCH 1/2] [InstallAPI] Pick up input headers by directory traversal

[clang] [clang-format] Fix a bug in `AlignAfterOpenBracket: DontAlign` (PR #94561)

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

[clang] [libcxx] pr branch (PR #94669)

2024-06-06 Thread via cfe-commits
https://github.com/EricWF created https://github.com/llvm/llvm-project/pull/94669 - Add contracts keywords - Add parsing for pre contracts up to Expr - add contracts builtin prototypes - add contracts to FunctionDecl - propagate contracts up to emit function - add constexpr contract failure - ad

[clang] [libcxx] pr branch (PR #94669)

2024-06-06 Thread via cfe-commits
https://github.com/EricWF closed https://github.com/llvm/llvm-project/pull/94669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

2024-06-06 Thread Björn Schäpers via cfe-commits
@@ -187,7 +187,6 @@ TEST(ConfigParseTest, ParsesConfigurationBools) { CHECK_PARSE_BOOL(RemoveSemicolon); CHECK_PARSE_BOOL(SkipMacroDefinitionBody); CHECK_PARSE_BOOL(SpacesInSquareBrackets); - CHECK_PARSE_BOOL(SpaceInEmptyBlock); HazardyKnusperkeks wrote:

[clang-tools-extra] [llvm] [clang][clang-doc] Add basic e2e test to clang-doc (PR #93928)

2024-06-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 98714866830f505d7bb87de6b92a28f280a34b9b...4a3c4d98156b9f0d9355980108c453c56ef0e353 clang

[clang] Fix #pragma (packed, n) not emitting the alignment in debug info (PR #94673)

2024-06-06 Thread Augusto Noronha via cfe-commits
https://github.com/augusto2112 created https://github.com/llvm/llvm-project/pull/94673 Debug info generation won't emit the alignment of types that have a standard alignment. It was not taking into account the that case. rdar://127785973 >From 8fd0e9dcfd915367db1b66001daab47415406302 Mon Sep

[clang] Fix #pragma (packed, n) not emitting the alignment in debug info (PR #94673)

2024-06-06 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 3716a3c1bce4af81db6a95eee30e35b5b923e319 8fd0e9dcfd915367db1b66001daab47415406302 --

[clang] Fix #pragma (packed, n) not emitting the alignment in debug info (PR #94673)

2024-06-06 Thread Augusto Noronha via cfe-commits
https://github.com/augusto2112 updated https://github.com/llvm/llvm-project/pull/94673 >From 3bf273f06fc82a5ca699d64b57dbc734f05fd896 Mon Sep 17 00:00:00 2001 From: Augusto Noronha Date: Thu, 6 Jun 2024 12:29:05 -0700 Subject: [PATCH] Fix #pragma (packed, n) not emitting the alignment in debug

[clang] [InstallAPI] Pick up input headers by directory traversal (PR #94508)

2024-06-06 Thread Zixu Wang via cfe-commits
@@ -97,6 +97,14 @@ class HeaderFile { Other.Excluded, Other.Extra, Other.Umbrella); } + + bool operator<(const HeaderFile &Other) const { zixu-w wrote: What's the reasoning

[clang] [InstallAPI] Pick up input headers by directory traversal (PR #94508)

2024-06-06 Thread Cyndy Ishida via cfe-commits
@@ -97,6 +97,14 @@ class HeaderFile { Other.Excluded, Other.Extra, Other.Umbrella); } + + bool operator<(const HeaderFile &Other) const { cyndyishida wrote: I could infer, b

[clang] [clang] require arg list in type specifiers using template kw (PR #94674)

2024-06-06 Thread Erick Velez via cfe-commits
https://github.com/evelez7 created https://github.com/llvm/llvm-project/pull/94674 Require a template argument list after a name prefixed by the template keyword in nested name specifiers. Addresses [CWG 96](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96) which was supersede

[clang] [clang] require arg list in type specifiers using template kw (PR #94674)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erick Velez (evelez7) Changes Require a template argument list after a name prefixed by the template keyword in nested name specifiers. Addresses [CWG 96](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96) which was supers

[clang] Fix #pragma (packed, n) not emitting the alignment in debug info (PR #94673)

2024-06-06 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] require arg list in type specifiers using template kw (PR #94674)

2024-06-06 Thread Erick Velez via cfe-commits
evelez7 wrote: I'm also preparing a patch for deprecating the use of template kw without an arg list for alias and class templates. Decided to split that up since a lot of tests require deprecation messages. https://github.com/llvm/llvm-project/pull/94674 __

[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)

2024-06-06 Thread Amy Huang via cfe-commits
amykhuang wrote: nevermind, that example is working as intended https://github.com/llvm/llvm-project/pull/91699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema][TemplateDeduction] Skip pack expansion type at the end of default template argument list if unneeded (PR #94659)

2024-06-06 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov requested changes to this pull request. Please include test case. https://github.com/llvm/llvm-project/pull/94659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-06-06 Thread Michal Paszkowski via cfe-commits
https://github.com/michalpaszkowski approved this pull request. @AlexVlx LGTM! Thank you! https://github.com/llvm/llvm-project/pull/89796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > @vitalybuka could it be a ccache glitch? Technically can, but I would not count on hash collision :) Also there are two machines running same config consistently fail. https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commi

[clang] [clang][OpenMP][NFC] Remove unnecessary nullptr check (PR #94680)

2024-06-06 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 created https://github.com/llvm/llvm-project/pull/94680 Static verifier reports unchecked use of pointer after explicitly checking earlier in the function. It appears the pointer won't be a nullptr, so remove the unneeded check for consistency. >From 476c5a8580

[clang] [clang][OpenMP][NFC] Remove unnecessary nullptr check (PR #94680)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mike Rice (mikerice1969) Changes Static verifier reports unchecked use of pointer after explicitly checking earlier in the function. It appears the pointer won't be a nullptr, so remove the unneeded check for consistency. --- Full diff:

[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

2024-06-06 Thread Mats Petersson via cfe-commits
https://github.com/Leporacanthicus updated https://github.com/llvm/llvm-project/pull/92430 >From 629f5785738fdc52d4dc8d193aa43b3d011b1039 Mon Sep 17 00:00:00 2001 From: Mats Petersson Date: Fri, 19 Apr 2024 18:00:58 +0100 Subject: [PATCH 1/6] Fix for changed code at the end of AllocaIP. Some o

[clang-tools-extra] [llvm] [clang][clang-doc] Add basic e2e test to clang-doc (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
@@ -1,370 +1,363 @@ -// RUN: mkdir -p %T/clang-doc/build -// RUN: mkdir -p %T/clang-doc/include -// RUN: mkdir -p %T/clang-doc/src -// RUN: mkdir -p %T/clang-doc/docs -// RUN: sed 's|$test_dir|%/T/clang-doc|g' %S/Inputs/clang-doc-project1/database_template.json > %T/clang-doc/bu

[clang-tools-extra] [llvm] [clang][clang-doc] Add basic e2e test to clang-doc (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
@@ -1,370 +1,363 @@ -// RUN: mkdir -p %T/clang-doc/build -// RUN: mkdir -p %T/clang-doc/include -// RUN: mkdir -p %T/clang-doc/src -// RUN: mkdir -p %T/clang-doc/docs -// RUN: sed 's|$test_dir|%/T/clang-doc|g' %S/Inputs/clang-doc-project1/database_template.json > %T/clang-doc/bu

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Try `// UNSUPPORTED: hwasan` https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Actually I will try myself, as I have access to the bot. https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang][clang-doc] Add basic e2e test to clang-doc (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi requested changes to this pull request. Screen shots don't belong in the commit message. Public URLs are often OK for reference to LLVM source or a standards doc, but do make sure those are permalinks, and not pointed to somein on say the `main` brnach, which will ch

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-06-06 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/77359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-06-06 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM with some wording/namiung nits. https://github.com/llvm/llvm-project/pull/77359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-06-06 Thread Artem Belevich via cfe-commits
@@ -9013,6 +9013,12 @@ def err_cuda_ovl_target : Error< "cannot overload %select{__device__|__global__|__host__|__host__ __device__}2 function %3">; def note_cuda_ovl_candidate_target_mismatch : Note< "candidate template ignored: target attributes do not match">; +def wa

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-06-06 Thread Artem Belevich via cfe-commits
@@ -9013,6 +9013,12 @@ def err_cuda_ovl_target : Error< "cannot overload %select{__device__|__global__|__host__|__host__ __device__}2 function %3">; def note_cuda_ovl_candidate_target_mismatch : Note< "candidate template ignored: target attributes do not match">; +def wa

[clang-tools-extra] [llvm] [clang][clang-doc] Add basic e2e test to clang-doc (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/93928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang][clang-doc] Add basic e2e test to clang-doc (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
ilovepi wrote: Also, I just noticed that the first comment has an `@` in it. The first comment in Github is special, as its really the body of the commit message, and will become that when you hit `Squash and merge`. Your question for @petrhosek may not even have been sent, as I don't know how

[clang] 12ccc24 - [clang] Fix flag typo in comment

2024-06-06 Thread via cfe-commits
Author: Dave Lee Date: 2024-06-06T14:22:12-07:00 New Revision: 12ccc245f195695c8bac9156c75e5b70044882fa URL: https://github.com/llvm/llvm-project/commit/12ccc245f195695c8bac9156c75e5b70044882fa DIFF: https://github.com/llvm/llvm-project/commit/12ccc245f195695c8bac9156c75e5b70044882fa.diff LOG:

[clang-tools-extra] [llvm] [clang][clang-doc] Add basic e2e test to clang-doc (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
ilovepi wrote: A few meta comments on the particulars of the commit title and message: 1. Please change the title to only have the [clang-doc] tag. This doesn't impact `clang` at all. We use the`[tag] Title` convention to make it easy to understand where the changes are, and what they affect. H

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/93928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/93928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Unify all the code that adds unaligned-scalar/vector-mem to Features vector. (PR #94660)

2024-06-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/94660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
@@ -69,8 +70,15 @@ clang_tidy_headers = os.path.join( config.test_source_root, "clang-tidy", "checkers", "Inputs", "Headers" ) + config.substitutions.append(("%clang_tidy_headers", clang_tidy_headers)) +clang_doc_install = os.path.join( +os.path.dirname(shutil.which(

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread via cfe-commits
@@ -69,8 +70,15 @@ clang_tidy_headers = os.path.join( config.test_source_root, "clang-tidy", "checkers", "Inputs", "Headers" ) + config.substitutions.append(("%clang_tidy_headers", clang_tidy_headers)) +clang_doc_install = os.path.join( +os.path.dirname(shutil.which(

[clang-tools-extra] 21f5ee0 - [clang-tidy]fix crashing when self include cycles for misc-header-include-cycle (#94636)

2024-06-06 Thread via cfe-commits
Author: Congcong Cai Date: 2024-06-07T07:02:45+08:00 New Revision: 21f5ee014db5df4fcf3dfe4350fe9c6627f799ad URL: https://github.com/llvm/llvm-project/commit/21f5ee014db5df4fcf3dfe4350fe9c6627f799ad DIFF: https://github.com/llvm/llvm-project/commit/21f5ee014db5df4fcf3dfe4350fe9c6627f799ad.diff

[clang-tools-extra] [clang-tidy]fix crashing when self include cycles for misc-header-include-cycle (PR #94636)

2024-06-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/94636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] Fix error handling of the adjust_args clause (PR #94696)

2024-06-06 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 created https://github.com/llvm/llvm-project/pull/94696 Static verifier noticed the current code has logically dead code parsing the clause where IsComma is assigned. Fix this and improve the error message received when a bad adjust-op is specified. This will n

[clang-tools-extra] [clang-tidy] refactor misc-header-include-cycle (PR #94697)

2024-06-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/94697 1. merge valid check 2. use range base loop >From 8104085685772f93bcc595858821f839636ada9e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 7 Jun 2024 07:06:37 +0800 Subject: [PATCH] [clang-tidy] refa

[clang] [clang][OpenMP] Fix error handling of the adjust_args clause (PR #94696)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mike Rice (mikerice1969) Changes Static verifier noticed the current code has logically dead code parsing the clause where IsComma is assigned. Fix this and improve the error message received when a bad adjust-op is specified. This will

[clang-tools-extra] [clang-tidy] refactor misc-header-include-cycle (PR #94697)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes 1. merge valid check 2. use range base loop --- Full diff: https://github.com/llvm/llvm-project/pull/94697.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/misc/HeaderInclu

[clang] [llvm] [clang][CodeGen] `used` globals are fake (PR #93601)

2024-06-06 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/93601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #86923)

2024-06-06 Thread Mike Rice via cfe-commits
@@ -201,14 +211,26 @@ template <> struct DominatingValue { class saved_type { enum Kind { ScalarLiteral, ScalarAddress, AggregateLiteral, AggregateAddress, ComplexAddress }; - -llvm::Value *Value; -llvm::Type *ElementType; +union { + struc

[clang] Fix spurious non-strict availability warning (PR #94377)

2024-06-06 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak approved this pull request. https://github.com/llvm/llvm-project/pull/94377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-06-06 Thread Artem Dergachev via cfe-commits
@@ -3328,3 +3300,63 @@ void clang::checkUnsafeBufferUsage(const Decl *D, } } } + +void clang::checkUnsafeBufferUsage(const Decl *D, + UnsafeBufferUsageHandler &Handler, + bool EmitSuggestions) { +#ifndef

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
@@ -69,8 +70,15 @@ clang_tidy_headers = os.path.join( config.test_source_root, "clang-tidy", "checkers", "Inputs", "Headers" ) + config.substitutions.append(("%clang_tidy_headers", clang_tidy_headers)) +clang_doc_install = os.path.join( +os.path.dirname(shutil.which(

[clang] [llvm] [CMake][Release] Use the TXZ cpack generator for binaries (PR #90138)

2024-06-06 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/90138 >From 0d0484ac99affdc8ccb9bc3a1eff827cf996c51c Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 24 Apr 2024 07:54:41 -0700 Subject: [PATCH 1/3] [CMake][Release] Use the TGZ cpack generator for binaries --

[clang] Skip auto-init on scalar vars that have a non-constant Init and no self-ref (PR #94642)

2024-06-06 Thread Jan Voung via cfe-commits
https://github.com/jvoung ready_for_review https://github.com/llvm/llvm-project/pull/94642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Skip auto-init on scalar vars that have a non-constant Init and no self-ref (PR #94642)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Jan Voung (jvoung) Changes In that scalar case, the Init should initialize the auto var before use. The Init might use uninitialized memory from other sources (e.g., heap) but auto-init did not help us in

[clang] 5e0fc93 - [clang-format] Fix a bug in `AlignAfterOpenBracket: DontAlign` (#94561)

2024-06-06 Thread via cfe-commits
Author: Owen Pan Date: 2024-06-06T17:25:46-07:00 New Revision: 5e0fc93d01c216544c12b60c30fe8ac6c9931eb9 URL: https://github.com/llvm/llvm-project/commit/5e0fc93d01c216544c12b60c30fe8ac6c9931eb9 DIFF: https://github.com/llvm/llvm-project/commit/5e0fc93d01c216544c12b60c30fe8ac6c9931eb9.diff LOG:

[clang] [clang-format] Fix a bug in `AlignAfterOpenBracket: DontAlign` (PR #94561)

2024-06-06 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/94561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-06 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From fac45476736cd04f044f046fd0df9e59450a926b Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH 1/2] [clang][AST] fix ast-print of `extern ` with >=2 decl

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: All of the changes related to allowing a different path belong in their own PR, or if they're invasive, perhaps multiple PRs. https://github.com/llvm/llvm-project/pull/93928 ___ cfe-commits mailing list cfe-commit

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/93928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 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 98714866830f505d7bb87de6b92a28f280a34b9b 5a647f015051a572a36af6418fadb424db470cec --

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-06 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 5f243b3fffca42ed320529a54aefd86087aa85f8 db1eb9b69f2ed961a586d15d165acd000bb728c4 --

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-06 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko updated https://github.com/llvm/llvm-project/pull/93913 >From fac45476736cd04f044f046fd0df9e59450a926b Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH 1/2] [clang][AST] fix ast-print of `extern ` with >=2 decl

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-06 Thread Artem Yurchenko via cfe-commits
temyurchenko wrote: This is a relanding of #93131. The first commit is the same, the second commit presents and fixes the issue from the linked discussion. cc @erichkeane, @AaronBallman, @gulfemsavrun. (I can't set the reviewers myself) https://github.com/llvm/llvm-project/pull/93913 ___

[clang] [clang] Skip auto-init on scalar vars that have a non-constant Init and no self-ref (PR #94642)

2024-06-06 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/94642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][LoongArch] Enable -fasynchronous-unwind-tables by default on Linux (PR #94711)

2024-06-06 Thread via cfe-commits
https://github.com/wangleiat created https://github.com/llvm/llvm-project/pull/94711 This could improve user experience for stack unwinding, and also this is enabled by default by LoongArch GCC. Similar to commit be437f3bb8b657f4d2de4603734f24daa624d204 >From 819f126473b34014bb3ad946f78b4e86b

[clang] [clang][LoongArch] Enable -fasynchronous-unwind-tables by default on Linux (PR #94711)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: wanglei (wangleiat) Changes This could improve user experience for stack unwinding, and also this is enabled by default by LoongArch GCC. Similar to commit be437f3bb8b657f4d2de4603734f24daa624d204 --- Full diff: https://github.com/llvm/l

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
@@ -131,6 +135,12 @@ std::string GetExecutablePath(const char *Argv0, void *MainAddr) { return llvm::sys::fs::getMainExecutable(Argv0, MainAddr); } +inline bool ends_with(std::string const & value, std::string const & ending) +{ +if (ending.size() > value.size()) return

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
@@ -186,19 +196,36 @@ Example usage for a project using a compile commands database: std::string ClangDocPath = GetExecutablePath(argv[0], MainAddr); llvm::SmallString<128> NativeClangDocPath; llvm::sys::path::native(ClangDocPath, NativeClangDocPath); -llvm::Sm

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
@@ -186,19 +196,36 @@ Example usage for a project using a compile commands database: std::string ClangDocPath = GetExecutablePath(argv[0], MainAddr); llvm::SmallString<128> NativeClangDocPath; llvm::sys::path::native(ClangDocPath, NativeClangDocPath); -llvm::Sm

[clang] 2d65097 - [RISCV] Unify all the code that adds unaligned-scalar/vector-mem to Features vector. (#94660)

2024-06-06 Thread via cfe-commits
Author: Craig Topper Date: 2024-06-06T18:12:07-07:00 New Revision: 2d65097b4ff18f99e4baf18e2e0b155ecf478b0a URL: https://github.com/llvm/llvm-project/commit/2d65097b4ff18f99e4baf18e2e0b155ecf478b0a DIFF: https://github.com/llvm/llvm-project/commit/2d65097b4ff18f99e4baf18e2e0b155ecf478b0a.diff

[clang] [RISCV] Unify all the code that adds unaligned-scalar/vector-mem to Features vector. (PR #94660)

2024-06-06 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/94660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang-doc] Add basic e2e test (PR #93928)

2024-06-06 Thread Paul Kirth via cfe-commits
ilovepi wrote: Also, the current PR only has tests for the HTML output. Please file separate bugs for the other formats, and be sure to follow up with more tests for those formats. https://github.com/llvm/llvm-project/pull/93928 ___ cfe-commits maili

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-06 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/94560 >From 624e74b3066930a5a2bb15d6c0b2ddb4f94d3b79 Mon Sep 17 00:00:00 2001 From: c8ef Date: Thu, 6 Jun 2024 10:44:57 +0800 Subject: [PATCH 1/2] fix incorrectly indents lambda trailing return --- clang/lib/Format/Conti

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-06 Thread via cfe-commits
@@ -22858,6 +22858,31 @@ TEST_F(FormatTest, FormatsLambdas) { " //\n" "});"); + verifyFormat("int main() {\n" c8ef wrote: Done. https://github.com/llvm/llvm-project/pull/94560 ___ cfe-commits

[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

2024-06-06 Thread via cfe-commits
@@ -1457,6 +1457,11 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) { !Current.isOneOf(tok::colon, tok::comment)) { return ContinuationIndent; } + if (Style.isCpp() && Current.is(tok::arrow) && c8ef wrote: Exactly, than

<    1   2   3   4   5   >