[clang] [clang-repl] Keep the first llvm::Module empty to avoid invalid memory access. (PR #89031)

2024-04-19 Thread Jonas Hahnfeld via cfe-commits
@@ -364,6 +365,19 @@ IncrementalParser::Parse(llvm::StringRef input) { std::unique_ptr IncrementalParser::GenModule() { static unsigned ID = 0; if (CodeGenerator *CG = getCodeGen()) { +// Clang's CodeGen is designed to work with a single llvm::Module. In many +// ca

[clang-tools-extra] ce2f642 - [clangd] Fix shared-lib builds after 2cdbc9cff3b7ef262

2024-04-19 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2024-04-19T15:52:17+02:00 New Revision: ce2f6423f0168e945b6f29aa40a3054c1abe22a9 URL: https://github.com/llvm/llvm-project/commit/ce2f6423f0168e945b6f29aa40a3054c1abe22a9 DIFF: https://github.com/llvm/llvm-project/commit/ce2f6423f0168e945b6f29aa40a3054c1abe22a9.dif

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-19 Thread kadir çetinkaya via cfe-commits
kadircet wrote: Hi @zibi2, sorry for missing the breakage in the buildbot. ce2f6423f016 should fix it. https://github.com/llvm/llvm-project/pull/88381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Clang] Add support for scalable vectors in __builtin_reduce_* functions (PR #87750)

2024-04-19 Thread Lawrence Benson via cfe-commits
lawben wrote: @efriedma-quic @fhahn just a quick ping for this PR. is something still missing? https://github.com/llvm/llvm-project/pull/87750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] 9a07d7e - [Sema] Check if types are resolved before querying function description.

2024-04-19 Thread Dinar Temirbulatov via cfe-commits
Author: Dinar Temirbulatov Date: 2024-04-19T14:02:02Z New Revision: 9a07d7ea9b37a5b537fc8099cc5744f44da29abc URL: https://github.com/llvm/llvm-project/commit/9a07d7ea9b37a5b537fc8099cc5744f44da29abc DIFF: https://github.com/llvm/llvm-project/commit/9a07d7ea9b37a5b537fc8099cc5744f44da29abc.diff

[clang] 7d8616e - [analyzer] Fix stores through label locations (#89265)

2024-04-19 Thread via cfe-commits
Author: Balazs Benics Date: 2024-04-19T16:26:07+02:00 New Revision: 7d8616ed500f01b201667020c9be545d686950be URL: https://github.com/llvm/llvm-project/commit/7d8616ed500f01b201667020c9be545d686950be DIFF: https://github.com/llvm/llvm-project/commit/7d8616ed500f01b201667020c9be545d686950be.diff

[clang] [analyzer] Fix stores through label locations (PR #89265)

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

[clang] [clang-repl] Keep the first llvm::Module empty to avoid invalid memory access. (PR #89031)

2024-04-19 Thread Vassil Vassilev via cfe-commits
@@ -224,11 +228,8 @@ IncrementalParser::IncrementalParser(Interpreter &Interp, return; // PTU.takeError(); } - if (CodeGenerator *CG = getCodeGen()) { -std::unique_ptr M(CG->ReleaseModule()); -CG->StartModule("incr_module_" + std::to_string(P

[clang-tools-extra] [run-clang-tidy.py] Add -directory-filter option to run-clang-tidy.py (PR #89302)

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

[clang-tools-extra] [run-clang-tidy.py] Add -directory-filter option to run-clang-tidy.py (PR #89302)

2024-04-19 Thread Piotr Zegar via cfe-commits
@@ -307,6 +307,14 @@ def main(): "source files from compilation database to output " "diagnostics from.", ) +parser.add_argument( +"-directory-filter", +dest="directory_filter", +action="append", +default=[], +help

[clang-tools-extra] [run-clang-tidy.py] Add -directory-filter option to run-clang-tidy.py (PR #89302)

2024-04-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Personally I do not see use case for it, as source-filter also apply to directories, and better would be to just change source-filter to accept list of regexes. Other thing that directory-filter works as "exclude", not "includ

[clang-tools-extra] [run-clang-tidy.py] Add -directory-filter option to run-clang-tidy.py (PR #89302)

2024-04-19 Thread Piotr Zegar via cfe-commits
@@ -307,6 +307,14 @@ def main(): "source files from compilation database to output " "diagnostics from.", ) +parser.add_argument( +"-directory-filter", +dest="directory_filter", +action="append", +default=[], +help

[clang-tools-extra] [run-clang-tidy.py] Add -directory-filter option to run-clang-tidy.py (PR #89302)

2024-04-19 Thread Piotr Zegar via cfe-commits
@@ -514,7 +523,7 @@ def main(): # Fill the queue with files. for name in files: -if file_name_re.search(name): +if file_name_re.search(name) and not directory_filters_re.search(name): PiotrZSL wrote: to be honest those

[clang-tools-extra] [run-clang-tidy.py] Add -directory-filter option to run-clang-tidy.py (PR #89302)

2024-04-19 Thread Piotr Zegar via cfe-commits
@@ -307,6 +307,14 @@ def main(): "source files from compilation database to output " "diagnostics from.", ) +parser.add_argument( +"-directory-filter", PiotrZSL wrote: this basically work opposite to -source-filter, specially be

[clang] 5fa21e5 - [NFC][X86][Headers] Fix missing blank line

2024-04-19 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2024-04-19T07:35:55-07:00 New Revision: 5fa21e5fc7384069276e15dbb1c27986a6e86483 URL: https://github.com/llvm/llvm-project/commit/5fa21e5fc7384069276e15dbb1c27986a6e86483 DIFF: https://github.com/llvm/llvm-project/commit/5fa21e5fc7384069276e15dbb1c27986a6e86483.diff

[clang] 78dca4a - [ClangOffloadBundler] Add file size to header (#88827)

2024-04-19 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2024-04-19T10:40:16-04:00 New Revision: 78dca4af5a9fd77972f80e9f1ff33a00b95f669e URL: https://github.com/llvm/llvm-project/commit/78dca4af5a9fd77972f80e9f1ff33a00b95f669e DIFF: https://github.com/llvm/llvm-project/commit/78dca4af5a9fd77972f80e9f1ff33a00b95f669e.dif

[clang] [ClangOffloadBundler] Add file size to header (PR #88827)

2024-04-19 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/88827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Index] check `TemplateTypeParmTypeLoc ::getDecl()` against `nullptr` in `TypeIndexer` and `CursorVisitor` (PR #89392)

2024-04-19 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/89392 In the added testcase, which is invalid code, the result of `getDecl()` called on a `TemplateTypeParmTypeLoc` was a `nullptr`. However, `IndexingContext::handleReference` expects the parameter `D` to not be a `

[clang] [clang][Index] check `TemplateTypeParmTypeLoc ::getDecl()` against `nullptr` in `TypeIndexer` and `CursorVisitor` (PR #89392)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Julian Schmidt (5chmidti) Changes In the added testcase, which is invalid code, the result of `getDecl()` called on a `TemplateTypeParmTypeLoc` was a `nullptr`. However, `IndexingContext::handleReference` expects the parameter `D` to not

[clang] [clang][Index] check `TemplateTypeParmTypeLoc::getDecl()` against `nullptr` in `TypeIndexer` and `CursorVisitor` (PR #89392)

2024-04-19 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/89392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model conditional operator correctly. (PR #89213)

2024-04-19 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/89213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model conditional operator correctly. (PR #89213)

2024-04-19 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/89213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Model conditional operator correctly. (PR #89213)

2024-04-19 Thread Gábor Horváth via cfe-commits
@@ -657,17 +658,22 @@ class TransferVisitor : public ConstStmtVisitor { } void VisitConditionalOperator(const ConditionalOperator *S) { -// FIXME: Revisit this once flow conditions are added to the framework. For -// `a = b ? c : d` we can add `b => a == c && !b =

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-19 Thread via cfe-commits
zibi2 wrote: > Hi @zibi2, sorry for missing the breakage in the buildbot. > [ce2f642](https://github.com/llvm/llvm-project/commit/ce2f6423f0168e945b6f29aa40a3054c1abe22a9) > should fix it. Thank you for a quick fix. I confirm the fix resolved the issue. https://github.com/llvm/llvm-project/pu

[clang] 3a4bc11 - Reapply "[Clang][AArch64] Warn when calling non/streaming about vector size difference (#79842)"

2024-04-19 Thread Dinar Temirbulatov via cfe-commits
Author: Dinar Temirbulatov Date: 2024-04-19T14:51:11Z New Revision: 3a4bc11b675c0511319c2843221133e986825b3b URL: https://github.com/llvm/llvm-project/commit/3a4bc11b675c0511319c2843221133e986825b3b DIFF: https://github.com/llvm/llvm-project/commit/3a4bc11b675c0511319c2843221133e986825b3b.diff

[clang] [clang][Index] check `TemplateTypeParmTypeLoc::getDecl()` against `nullptr` in `TypeIndexer` and `CursorVisitor` (PR #89392)

2024-04-19 Thread Julian Schmidt via cfe-commits
5chmidti wrote: CC @hokein https://github.com/llvm/llvm-project/pull/89392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating CastRParen before unary && (PR #89346)

2024-04-19 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/89346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-19 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/89076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

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

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread via cfe-commits
https://github.com/mydeveloperday requested changes to this pull request. This doesn't feel correct to me... https://github.com/llvm/llvm-project/pull/89228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); -

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); +

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); +

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-04-19 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,97 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -target-cpu core2 %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple i686-linux-gnu -target-cpu core2

[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)

2024-04-19 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/89242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 64cc3fa - [Clang] Fix the mangling of lambdas (#89204)

2024-04-19 Thread via cfe-commits
Author: cor3ntin Date: 2024-04-19T17:44:12+02:00 New Revision: 64cc3fad53c8313ad2fb3f2ba2fd44f280e5babf URL: https://github.com/llvm/llvm-project/commit/64cc3fad53c8313ad2fb3f2ba2fd44f280e5babf DIFF: https://github.com/llvm/llvm-project/commit/64cc3fad53c8313ad2fb3f2ba2fd44f280e5babf.diff LOG:

[clang] [Clang] Fix the mangling of lambdas (PR #89204)

2024-04-19 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/89204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: Ilya is out on vacation, I'm able to test this and will get started on that now (apologies for delay & thanks for digging into this) https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: Ah, I still need to do that. https://github.com/llvm/llvm-project/pull/87953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 58323de2e5ed https://github.com/llvm/llvm-project/pull/87953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-19 Thread Steven Wu via cfe-commits
@@ -0,0 +1,25 @@ +// Check that a clang invocation can spawn and handshake with a module build daemon + +// RUN: %kill-process "-cc1modbuildd mbd-handshake" +// RUN: rm -rf mbd-handshake %t +// RUN: split-file %s %t + +//--- main.c +int main() {return 0;} + +// RUN: %clang -fmodu

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-19 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 58323de2e5ed https://github.com/llvm/llvm-project/actions/runs/8756326045 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-project/compare) https://github.c

[clang] [clang-format] Fix a regression in annotating BK_BracedInit (PR #87450)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 7c9c38eaa9b7 https://github.com/llvm/llvm-project/pull/87450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); +

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread Jannik Silvanus via cfe-commits
jasilvanus wrote: > This doesn't feel correct to me... I'd also be fine with just removing the comment. https://github.com/llvm/llvm-project/pull/89228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, &PredefinedStyle) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); -

[clang] [clang-format] Fix a regression in annotating BK_BracedInit (PR #87450)

2024-04-19 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 7c9c38eaa9b7 https://github.com/llvm/llvm-project/actions/runs/8756450944 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-project/compare) https://github.c

[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-19 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/87273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in ContinuationIndenter (PR #88414)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick d61edecbfd09 https://github.com/llvm/llvm-project/pull/88414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in ContinuationIndenter (PR #88414)

2024-04-19 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#89412 https://github.com/llvm/llvm-project/pull/88414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick a7f4576ff4e2 https://github.com/llvm/llvm-project/pull/86624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1b79a34 - [clang] Add flag to experiment with cold function attributes (#89298)

2024-04-19 Thread via cfe-commits
Author: Arthur Eubanks Date: 2024-04-19T09:30:47-07:00 New Revision: 1b79a34a56378f5b75fb0abd03bb7029ea1c60ec URL: https://github.com/llvm/llvm-project/commit/1b79a34a56378f5b75fb0abd03bb7029ea1c60ec DIFF: https://github.com/llvm/llvm-project/commit/1b79a34a56378f5b75fb0abd03bb7029ea1c60ec.diff

[clang] [clang] Add flag to experiment with cold function attributes (PR #89298)

2024-04-19 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/89298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-19 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @Amila-Rukshan please can you rebase this patch? merge is currently failing https://github.com/llvm/llvm-project/pull/87273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

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

2024-04-19 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#89415 https://github.com/llvm/llvm-project/pull/86624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: Yep. https://github.com/llvm/llvm-project/pull/89016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 29ecd6d50f14 https://github.com/llvm/llvm-project/pull/89016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits
https://github.com/Troy-Butler closed https://github.com/llvm/llvm-project/pull/89294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits
Troy-Butler wrote: > > Isn't the warning about a mismatch between declaration and definition, not > > call args? The InstCombine change does make the definition and declaration > > match. > > […](#) > > On Fri, Apr 19, 2024, at 17:07, Mehdi Amini wrote: _**@**_. commented > > on this pull

[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits
https://github.com/Troy-Butler reopened https://github.com/llvm/llvm-project/pull/89294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits
Troy-Butler wrote: > > Isn't the warning about a mismatch between declaration and definition, not > > call args? The InstCombine change does make the definition and declaration > > match. > > […](#) > > On Fri, Apr 19, 2024, at 17:07, Mehdi Amini wrote: _**@**_. commented > > on this pull

[clang] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

2024-04-19 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 29ecd6d50f14 https://github.com/llvm/llvm-project/actions/runs/8756865337 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-project/compare) https://github.c

[clang] [libclang] Compute the right spelling location (PR #72400)

2024-04-19 Thread Jan Svoboda via cfe-commits
@@ -1292,6 +1292,31 @@ void func() {} EXPECT_EQ(attrCount, 1); } +TEST_F(LibclangParseTest, clang_getSpellingLocation) { + std::string fileName = "main.c"; + WriteFile(fileName, "#define X(value) int x = value;\nX(42)\n"); + + ClangTU = clang_parseTranslationUnit(Index, f

[clang] Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (PR #89036)

2024-04-19 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/89036 >From 56c2b4f70735a6ef3b80cb8461a88ea51f2d02d7 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 16 Apr 2024 17:48:45 +0530 Subject: [PATCH 1/5] [Clang][Sema] placement new initializes typedef array with c

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-04-19 Thread Krishna Narayanan via cfe-commits
https://github.com/Krishna-13-cyber updated https://github.com/llvm/llvm-project/pull/89362 >From 4e649d105a2af038e6dbd0e93b457eebea2e543a Mon Sep 17 00:00:00 2001 From: Krishna-13-cyber Date: Fri, 19 Apr 2024 15:09:26 +0530 Subject: [PATCH 1/2] Add optimised LLVM IR for atomic increments/decre

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-04-19 Thread Krishna Narayanan via cfe-commits
https://github.com/Krishna-13-cyber ready_for_review https://github.com/llvm/llvm-project/pull/89362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Default -g to full debug info. (PR #89418)

2024-04-19 Thread via cfe-commits
https://github.com/abidh created https://github.com/llvm/llvm-project/pull/89418 Currently, -g defaults to line tables only. This PR changes that to full debug information. This will allow us to test/use the upcoming debug info changes. >From e0391084e9f8fad55c08cc642079afd8923b2729 Mon Sep 17

[clang] [flang] [flang] Default -g to full debug info. (PR #89418)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-flang-driver Author: None (abidh) Changes Currently, -g defaults to line tables only. This PR changes that to full debug information. This will allow us to test/use the upcoming debug info changes. --- Full diff: https://gith

[clang] [flang] [flang] Default -g to full debug info. (PR #89418)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (abidh) Changes Currently, -g defaults to line tables only. This PR changes that to full debug information. This will allow us to test/use the upcoming debug info changes. --- Full diff: https://github.com/llvm/llvm-project/pu

[clang] [Clang] Fix crash on invalid size in user-defined `static_assert` message (PR #89420)

2024-04-19 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/89420 This addresses two problems observed in #89407 wrt user-defined `static_assert` messages: 1. In `Expr::EvaluateCharRangeAsString`, we were calling `getExtValue()` instead of `getZExtValue()`, which would asser

[clang] [Clang] Fix crash on invalid size in user-defined `static_assert` message (PR #89420)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes This addresses two problems observed in #89407 wrt user-defined `static_assert` messages: 1. In `Expr::EvaluateCharRangeAsString`, we were calling `getExtValue()` instead of `getZExtValue()`, which would assert if

[clang] [Clang] Fix crash on invalid size in user-defined `static_assert` message (PR #89420)

2024-04-19 Thread via cfe-commits
cor3ntin wrote: The change LGTM but it does need a release note Thanks for fixing that! https://github.com/llvm/llvm-project/pull/89420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash on invalid size in user-defined `static_assert` message (PR #89420)

2024-04-19 Thread via cfe-commits
Sirraide wrote: > The change LGTM but it does need a release note. Oh, yeah, I somehow forgot about that because I got distracted by the second bug; will do. https://github.com/llvm/llvm-project/pull/89420 ___ cfe-commits mailing list cfe-commits@l

[clang] [llvm] [ARM] Armv8-R does not require fp64 or neon. (PR #88287)

2024-04-19 Thread Chris Copeland via cfe-commits
chrisnc wrote: I've updated the PR to use the proposed approach of making `"generic"` the default CPU for armv8r. Let me know if this is alright. I still need to fix up a few of the tests to match this new behavior. https://github.com/llvm/llvm-project/pull/88287 __

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/89425 When using Clang as a compiler, use Clang to normalize the triple that's used to construct path for runtime library build and install paths. This ensures that paths are consistent and avoids the issue where th

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread Petr Hosek via cfe-commits
petrhosek wrote: This is a re-upload of https://reviews.llvm.org/D140925, I plan to land this change if there are no objections. https://github.com/llvm/llvm-project/pull/89425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes When using Clang as a compiler, use Clang to normalize the triple that's used to construct path for runtime library build and install paths. This ensures that paths are consistent and avoids the issue where

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

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

[clang] [clang][modules] Only avoid pruning module maps when asked to (PR #89428)

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/89428 Pruning non-affecting module maps is useful even when passing module maps explicitly via `-fmodule-map-file=`. For this situation, this patch reinstates the behavior we had prior to #87849. For the situatio

[clang] [clang][modules] Only avoid pruning module maps when asked to (PR #89428)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes Pruning non-affecting module maps is useful even when passing module maps explicitly via `-fmodule-map-file=`. For this situation, this patch reinstates the behavior we had prior to #87849. For the

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-04-19 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,64 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -target-cpu core2 %s -S -emit-llvm -o - | FileCheck %s RKSimon wrote: Please can you add the i686

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: Unfortunately with this patch I'm still seeing the same source-location-exhausted error. I'm going to try to understand why... https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang-repl] Keep the first llvm::Module empty to avoid invalid memory access. (PR #89031)

2024-04-19 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89031 >From 3c9698f033c2349e698a5c98f227bfee8499e5b4 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Fri, 19 Apr 2024 07:51:17 + Subject: [PATCH] [clang-repl] Keep the first llvm::Module empty to avoid inv

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-19 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > Unfortunately with this patch I'm still seeing the same > source-location-exhausted error. I'm going to try to understand why... Damn I really thought that was going to be the one. If you have any way I could reproduce or better write a test that would be great. htt

[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)

2024-04-19 Thread Fangrui Song via cfe-commits
MaskRay wrote: > but since we only care about stdout/stderr, throw away the output file and > just write to /dev/null instead. Since `-emit-llvm-only` is now used, the commit message should be updated. https://github.com/llvm/llvm-project/pull/89242 ___

[clang] [llvm] [test] Avoid writing to a potentially write-protected dir (PR #89242)

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

[clang] [clang][modules] Only avoid pruning module maps when asked to (PR #89428)

2024-04-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Thank you! https://github.com/llvm/llvm-project/pull/89428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-19 Thread Richard Smith via cfe-commits
zygoloid wrote: > Unfortunately with this patch I'm still seeing the same > source-location-exhausted error. Can you try applying #89428 as well? I think we would need both in order to prune the module map from the serialized SLocEntries. https://github.com/llvm/llvm-project/pull/89005 __

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-19 Thread Sam McCall via cfe-commits
sam-mccall wrote: Hmm, I locally reverted https://github.com/llvm/llvm-project/pull/87849 and still see the same issue. I'll patch #89428 instead, but I don't see how it could do better - it's just putting the old and new behavior of #87849 behind a flag, right? In any case I'll try it, and th

[clang] 30b9537 - [Driver] Add m_Group to -m[no-]strict-align

2024-04-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-19T11:52:02-07:00 New Revision: 30b9537ff438366547f968c7909718e27d65c815 URL: https://github.com/llvm/llvm-project/commit/30b9537ff438366547f968c7909718e27d65c815 DIFF: https://github.com/llvm/llvm-project/commit/30b9537ff438366547f968c7909718e27d65c815.diff

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-04-19 Thread Eli Friedman via cfe-commits
@@ -8001,6 +8007,22 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +// SME functions may require SVE to be available for unwinding, as the +// value of VG needs to be preserved across streaming-mode changes. +if (CallerFD &

[clang] [clang-repl] Keep the first llvm::Module empty to avoid invalid memory access. (PR #89031)

2024-04-19 Thread Vassil Vassilev via cfe-commits
@@ -364,6 +365,19 @@ IncrementalParser::Parse(llvm::StringRef input) { std::unique_ptr IncrementalParser::GenModule() { static unsigned ID = 0; if (CodeGenerator *CG = getCodeGen()) { +// Clang's CodeGen is designed to work with a single llvm::Module. In many +// ca

[clang] [Clang] Update missing varargs arg extension warnings (PR #84520)

2024-04-19 Thread via cfe-commits
zibi2 wrote: @Sirraide, I noticed the following build issue when new compiler with this change (bootstrap compiler) is being used to build one of the files for `clangd`: ``` .../clang-tools-extra/clangd/unittests/FindTargetTests.cpp:430:29: error: passing no argument for the '...' parameter

[clang] [clang][modules] Only avoid pruning module maps when asked to (PR #89428)

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89428 >From baa15bb0f35e3f9845407c6b843b82c3a466369f Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 19 Apr 2024 10:28:33 -0700 Subject: [PATCH 1/2] [clang][modules] Only avoid pruning module maps when aske

[clang] [clang][modules] Only avoid pruning module maps when asked to (PR #89428)

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89428 >From baa15bb0f35e3f9845407c6b843b82c3a466369f Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 19 Apr 2024 10:28:33 -0700 Subject: [PATCH] [clang][modules] Only avoid pruning module maps when asked to

[clang] [clang][modules] Allow module map files with textual headers be non-affecting (PR #89441)

2024-04-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/89441 Depends on #89428. >From baa15bb0f35e3f9845407c6b843b82c3a466369f Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 19 Apr 2024 10:28:33 -0700 Subject: [PATCH 1/2] [clang][modules] Only avoid pruning mo

[clang] [clang][modules] Allow module map files with textual headers be non-affecting (PR #89441)

2024-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes Depends on #89428. --- Full diff: https://github.com/llvm/llvm-project/pull/89441.diff 8 Files Affected: - (modified) clang/include/clang/Driver/Options.td (+5) - (m

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-19 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: https://github.com/llvm/llvm-project/pull/89441 might be of interest too. https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang][modules] Allow module map files with textual headers be non-affecting (PR #89441)

2024-04-19 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: (Only commit c68b6468347e0a6141ff312139a82a3a8be9ce2e is relevant here, the other one is from #89428.) https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [llvm] [AMDGPU][WIP] Add support for i64/f64 readlane, writelane and readfirstlane operations. (PR #89217)

2024-04-19 Thread Vikram Hegde via cfe-commits
vikramRH wrote: Added/updated tests for readfirstlane and writelane ops https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >