[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-05-30 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 HEAD~1...HEAD clang/bindings/python/clang/cindex.py `` View the diff from dark

[clang] [clang][SPIRV] Fix build issue after c474f8f (PR #141954)

2025-05-30 Thread Nathan Gauër via cfe-commits
Keenuts wrote: thanks! https://github.com/llvm/llvm-project/pull/141954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIRV] Fix build issue after c474f8f (PR #141954)

2025-05-30 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts closed https://github.com/llvm/llvm-project/pull/141954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

2025-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: LGTM aside from a request for another test https://github.com/llvm/llvm-project/pull/139429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Separate implicit int conversion on negation sign to new diagnostic group (PR #139429)

2025-05-30 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,46 @@ +// RUN: %clang_cc1 %s -verify=expected -Wimplicit-int-conversion +// RUN: %clang_cc1 %s -verify=none -Wimplicit-int-conversion -Wno-implicit-int-conversion-on-negation + +// none-no-diagnostics + +char test_char(char x) { + return -x; // expected-warning {{impl

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-30 Thread Samarth Narang via cfe-commits
@@ -0,0 +1,29 @@ +/// Invalid output path (%t is a file, not a directory). +// RUN: rm -rf %t && touch %t +// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck %s +// CHECK: clang-doc error: +// CHECK: {{(Not a directory|no such file or directory)}} + +/// Invalid format op

[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)

2025-05-30 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/141699 >From f0b3184f2d4342eb0aacf3a77671556ac2e57650 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Tue, 27 May 2025 21:32:41 -0400 Subject: [PATCH 01/14] [clang-doc] Refactor error handling to use ExitOnError

[clang] [clang-format] Handle bit-field colon of non-numeric-constant size (PR #142110)

2025-05-30 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/142110 Fix #142050 >From 9cf70104e03372be9122d44a87694cd04b9b34c9 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 30 May 2025 01:52:31 -0700 Subject: [PATCH] [clang-format] Handle bit-field colon of non-numeric-cons

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-05-30 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll this is an attempt at implementing what we've discussed previously: defining the library function signatures only in a single place in a way that serves both as type annotations for the library functions and registering the correct library function types on the lib

[clang-tools-extra] [clang-reorder-fields] Use expanded location for macros (PR #142147)

2025-05-30 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] [llvm] [PowerPC] frontend get target feature from backend with cpu name (PR #137670)

2025-05-30 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/137670 >From 97f10e6a0fb4c158359e79e24650f8fdf4d23ef2 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 25 Apr 2025 13:09:47 + Subject: [PATCH 1/7] implement getting target features from backend for clang fronte

[clang-tools-extra] [clang-reorder-fields] Use expanded location for macros (PR #142147)

2025-05-30 Thread Vladimir Vuksanovic via cfe-commits
https://github.com/vvuksanovic created https://github.com/llvm/llvm-project/pull/142147 Fixes macros being replaced instead of their expansion. Closes #52632 >From 82f35e120d075eb0f55d02ff2a4d750e6e352475 Mon Sep 17 00:00:00 2001 From: Vladimir Vuksanovic Date: Fri, 30 May 2025 05:41:09 -0700

[clang] [flang] [mlir] [flang] Add support for -mprefer-vector-width= (PR #142073)

2025-05-30 Thread Cameron McInally via cfe-commits
mcinally wrote: Thanks, @tarunprabhu! https://github.com/llvm/llvm-project/pull/142073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Move Diags.isIgnored check later in checkForRedundantLoop (PR #141470)

2025-05-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/141470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4d650ef - [Sema] Fix type mismatch error when arguments to elementwise math builtin have different qualifiers, which should be well-formed (#141485)

2025-05-30 Thread via cfe-commits
Author: Acthink Yang Date: 2025-05-30T07:09:20-07:00 New Revision: 4d650ef4b3d7a0f21f8681e73586d0319fc3953b URL: https://github.com/llvm/llvm-project/commit/4d650ef4b3d7a0f21f8681e73586d0319fc3953b DIFF: https://github.com/llvm/llvm-project/commit/4d650ef4b3d7a0f21f8681e73586d0319fc3953b.diff

[clang] [Sema] Fix type mismatch error when arguments to elementwise math builtin have different qualifiers, which should be well-formed (PR #141485)

2025-05-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/141485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Declare builtins used in #pragma intrinsic (PR #138205)

2025-05-30 Thread Nick Sarnie via cfe-commits
sarnex wrote: Sure, I was hoping I could find an easy fix really quickly but just reproing took me a while, I'll revert immediately in the future, thanks. https://github.com/llvm/llvm-project/pull/138205 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-05-30 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,209 @@ +#include "clang/AST/RecordLayout.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/Analyses/ThreadSafetyTIL.h" +#include "clang/Basic/LLVM.h" +#include "clang/Basic/TargetInfo.h" +#include "llvm/ABI/Types.h" +#include "llvm/Support/Alignment.h" +#include

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-05-30 Thread Nikita Popov via cfe-commits
nikic wrote: We should include the license file header in the newly created files: https://llvm.org/docs/CodingStandards.html#file-headers https://github.com/llvm/llvm-project/pull/140112 ___ cfe-commits mailing list

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-30 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan edited https://github.com/llvm/llvm-project/pull/140556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-30 Thread Kiran Chandramohan via cfe-commits
@@ -111,6 +111,13 @@ int main(int argc, const char **argv) { } } + llvm::StringSet<> SavedStrings; + // Handle FCC_OVERRIDE_OPTIONS, used for editing a command line behind the + // scenes. + if (const char *OverrideStr = ::getenv("FCC_OVERRIDE_OPTIONS"))

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-30 Thread Kiran Chandramohan via cfe-commits
@@ -111,6 +111,13 @@ int main(int argc, const char **argv) { } } + llvm::StringSet<> SavedStrings; kiranchandramohan wrote: ```suggestion llvm::StringSet<> savedStrings; ``` https://github.com/llvm/llvm-project/pull/140556 __

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-30 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/140556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-05-30 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,209 @@ +#include "clang/AST/RecordLayout.h" +#include "clang/AST/Type.h" +#include "clang/Analysis/Analyses/ThreadSafetyTIL.h" +#include "clang/Basic/LLVM.h" +#include "clang/Basic/TargetInfo.h" +#include "llvm/ABI/Types.h" +#include "llvm/Support/Alignment.h" +#include

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-05-30 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,260 @@ +#ifndef LLVM_ABI_TYPES_H +#define LLVM_ABI_TYPES_H + +#include "llvm/ADT/APFloat.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/Support/Alignment.h" +#include "llvm/Support/Allocator.h" +#include "llvm/Support/TypeSize.h" +#include +#include + +namespace l

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-05-30 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,78 @@ +#ifndef LLVM_ABI_QUALTYPE_MAPPER_H +#define LLVM_ABI_QUALTYPE_MAPPER_H nikic wrote: Outdated header guard. https://github.com/llvm/llvm-project/pull/140112 ___ cfe-commits mailing list cfe-commits@lis

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-05-30 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,78 @@ +#ifndef LLVM_ABI_QUALTYPE_MAPPER_H +#define LLVM_ABI_QUALTYPE_MAPPER_H + +#include "llvm/IR/DerivedTypes.h" +#include "llvm/Support/Allocator.h" +#include +#include +#include +#include +#include + +// Specialization for QualType +template <> struct llvm::Den

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-05-30 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,260 @@ +#ifndef LLVM_ABI_TYPES_H +#define LLVM_ABI_TYPES_H + +#include "llvm/ADT/APFloat.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/Support/Alignment.h" +#include "llvm/Support/Allocator.h" +#include "llvm/Support/TypeSize.h" +#include +#include --

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-05-30 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,78 @@ +#ifndef LLVM_ABI_QUALTYPE_MAPPER_H +#define LLVM_ABI_QUALTYPE_MAPPER_H + +#include "llvm/IR/DerivedTypes.h" +#include "llvm/Support/Allocator.h" +#include +#include +#include +#include +#include nikic wrote: Should always use `""` for non-s

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-05-30 Thread Nikita Popov via cfe-commits
nikic wrote: I think this should be part of the clang/CodeGen library, not a new one. https://github.com/llvm/llvm-project/pull/140112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-30 Thread Abid Qadeer via cfe-commits
@@ -614,3 +614,30 @@ nvfortran defines `-fast` as - `-Mcache_align`: there is no equivalent flag in Flang or Clang. - `-Mflushz`: flush-to-zero mode - when `-ffast-math` is specified, Flang will link to `crtfastmath.o` to ensure denormal numbers are flushed to zero. + + +#

[clang-tools-extra] [clangd] Log the paths of loaded config files without --log=verbose (PR #142063)

2025-05-30 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/142063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Revert "[clangd] [Modules] Fixes to correctly handle module dependencies" (PR #142162)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang-tools-extra Author: None (fleeting-xx) Changes Reverts llvm/llvm-project#142090 due to build failures on [arm64 windows](https://lab.llvm.org/buildbot/#/builders/161). I'll need someone with commit permission to apply

[clang] [clang] Rename diag notes that assumed precompiled dependencies are pch's, NFCI (PR #142161)

2025-05-30 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 HEAD~1 HEAD --extensions cpp,c -- clang/lib/Serialization/ASTReader.cpp clang/test/Mo

[clang-tools-extra] [clang-doc] add tags to Mustache namespace template (PR #142045)

2025-05-30 Thread Erick Velez via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=mustache --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/MyNamespace/index.html + +namespace MyNamespace { + class Foo; +} + +// CHECK: +// CHECK-NEXT: +// CHECK-NEXT:

[clang-tools-extra] [clangd] [Modules] Fixes to correctly handle module dependencies (PR #142090)

2025-05-30 Thread via cfe-commits
@@ -430,21 +429,21 @@ class CachingProjectModules : public ProjectModules { /// Collect the directly and indirectly required module names for \param /// ModuleName in topological order. The \param ModuleName is guaranteed to /// be the last element in \param ModuleNames. -llvm:

[clang] [clang][Frontend] Add overload to ASTPrinter that doesn't own output stream (PR #142163)

2025-05-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/142163 We're planning on using the ASTPrinter in LLDB for AST dumping. But it currently takes the output stream via `unique_ptr`. In LLDB we don't have the output stream available in this form and instead it would

[clang] [clang][Frontend] Add overload to ASTPrinter that doesn't own output stream (PR #142163)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Buch (Michael137) Changes We're planning on using the ASTPrinter in LLDB for AST dumping. But it currently takes the output stream via `unique_ptr`. In LLDB we don't have the output stream available in this form and instead it wou

[clang-tools-extra] Revert "[clangd] [Modules] Fixes to correctly handle module dependencies" (PR #142162)

2025-05-30 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 HEAD~1 HEAD --extensions cpp -- clang-tools-extra/clangd/ModulesBuilder.cpp `

[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #142166)

2025-05-30 Thread Vladislav Dzhidzhoev via cfe-commits
https://github.com/dzhidzhoev created https://github.com/llvm/llvm-project/pull/142166 This commit was split from https://github.com/llvm/llvm-project/pull/119001 commit chain after the discussion with @jmorse. It can be merged before the fixed version of https://github.com/llvm/llvm-project/p

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-05-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `amdgpu-offload-ubuntu-22-cmake-build-only` running on `rocm-docker-ubu-22` while building `clang,flang,llvm` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/203/builds/12089 Her

[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #142166)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Author: Vladislav Dzhidzhoev (dzhidzhoev) Changes This commit was split from https://github.com/llvm/llvm-project/pull/119001 commit chain after the discussion with @jmorse. It can be merged before the fixed version of https://github.com/llvm

[clang] [Clang] Improve infrastructure for libstdc++ workarounds (PR #141977)

2025-05-30 Thread Erich Keane via cfe-commits
@@ -979,3 +979,50 @@ Preprocessor::EvaluateDirectiveExpression(IdentifierInfo *&IfNDefMacro, return EvaluateDirectiveExpression(IfNDefMacro, Tok, EvaluatedDefined, CheckForEoD); } + +static std::optional +getCXXStandardLibraryVersion(Prep

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Vladimir Vuksanovic (vvuksanovic) Changes Initializer lists with designators, missing elements or omitted braces can now be rewritten. Any missing designators are added and they get sorted according to the new order. ``` stru

[clang-tools-extra] [clang-reorder-fields] Prevent rewriting unsupported cases (PR #142149)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Vladimir Vuksanovic (vvuksanovic) Changes Add checks to prevent rewriting when doing so might result in incorrect code. The following cases are checked: - There are multiple field declarations in one statement like `int a, b` -

[clang] [clang][Frontend] Add overload to ASTPrinter that doesn't own output stream (PR #142163)

2025-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/142163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #142166)

2025-05-30 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 HEAD~1 HEAD --extensions cpp,h -- clang/test/CodeGenCXX/debug-info-local-types.cpp c

[clang-tools-extra] [clangd] [Modules] Fixes to correctly handle module dependencies (PR #142090)

2025-05-30 Thread via cfe-commits
fleeting-xx wrote: Thank you @ChuanqiXu9 for the review. Looks like this is causing failures on [arm64 windows builds](https://lab.llvm.org/buildbot/#/builders/161). Not quite sure why. Relevant log contains: ``` # | I[14:07:36.383] Built preamble of size 842464 for file C:\Users\tcwg\llvm-wo

[clang-tools-extra] Revert "[clangd] [Modules] Fixes to correctly handle module dependencies" (PR #142162)

2025-05-30 Thread via cfe-commits
https://github.com/fleeting-xx created https://github.com/llvm/llvm-project/pull/142162 Reverts llvm/llvm-project#142090 due to build failures on [arm64 windows](https://lab.llvm.org/buildbot/#/builders/161). I'll need someone with commit permission to apply this revert. >From 39fe26a200155ba

[clang] [clang] Rename diag notes that assumed precompiled dependencies are pch's, NFCI (PR #142161)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/142161.diff 6 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSerializationKinds.td (+2-2) - (modified) clang/lib/Serializati

[clang-tools-extra] [clang-doc] add tags to Mustache namespace template (PR #142045)

2025-05-30 Thread Erick Velez via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=mustache --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/index.html + +enum Color { + RED, + BLUE, + GREEN +}; + +class Foo; + +// CHECK: +// CHECK-NEXT:

[clang] [lldb] [lldb] Add filter option to AST dump command (PR #142164)

2025-05-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/142164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Add filter option to AST dump command (PR #142164)

2025-05-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/142164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Add filter option to AST dump command (PR #142164)

2025-05-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/142164 Depends on https://github.com/llvm/llvm-project/pull/142163 This patch makes the `-ast-dump-filter` Clang option available to the `target modules dump ast` command. This allows us to selectively dump parts of

[clang] [flang] [mlir] [flang] Add support for -mprefer-vector-width= (PR #142073)

2025-05-30 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: @mcinally, It looks like the buildbot failure is because a test is written expecting a single attribute, but two are present, although the attribute being checked for is present. https://github.com/llvm/llvm-project/pull/142073 _

[clang] [lldb] [lldb] Add filter option to AST dump command (PR #142164)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Buch (Michael137) Changes Depends on https://github.com/llvm/llvm-project/pull/142163 This patch makes the `-ast-dump-filter` Clang option available to the `target modules dump ast` command. This allows us to selectively dump parts

[clang] [lldb] [lldb] Add filter option to AST dump command (PR #142164)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes Depends on https://github.com/llvm/llvm-project/pull/142163 This patch makes the `-ast-dump-filter` Clang option available to the `target modules dump ast` command. This allows us to selectively dump parts

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-05-30 Thread via cfe-commits
github-actions[bot] wrote: @fanju110 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build

[clang] [libcxx] [llvm] [Clang] Add warnings when mixing different charN_t types (PR #138708)

2025-05-30 Thread James Y Knight via cfe-commits
jyknight wrote: I like the idea of this warning, but I'm afraid the diagnostic wording isn't sufficient to result in correct fixes to code. Instead, it seems to result in simply adding explicit casts to make the compiler shut up. Even from people who know what they're doing w.r.t. Unicode. Th

[clang] [clang] Rename diag notes that assumed precompiled dependencies are pch's, NFCI (PR #142161)

2025-05-30 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/142161 None >From fbd695a22e88f977c8512b4cdc298dbbed7e2534 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 29 May 2025 20:39:19 -0700 Subject: [PATCH] [clang] Rename diagnostic notes that assumed precompile

[clang] [clang] Rename diag notes that assumed precompiled dependencies are pch's, NFCI (PR #142161)

2025-05-30 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/142161 >From 6229f515af60a2b04e8599a66f036217fbc98f20 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Fri, 30 May 2025 07:53:51 -0700 Subject: [PATCH] [clang] Rename diag notes that assumed precompiled dependenc

[clang] [CIR] Skip generation of a continue block when flattening TernaryOp (PR #142165)

2025-05-30 Thread Morris Hafner via cfe-commits
https://github.com/mmha created https://github.com/llvm/llvm-project/pull/142165 We used to insert a continue Block at the end of a flattened ternary op that only contained a branch to the remaing operation of the remaining Block. This patch removes that continue block and changes the true/fals

[clang] [CIR] Skip generation of a continue block when flattening TernaryOp (PR #142165)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Morris Hafner (mmha) Changes We used to insert a continue Block at the end of a flattened ternary op that only contained a branch to the remaing operation of the remaining Block. This patch removes that continue block and changes the tr

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-30 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,250 @@ +// RUN: cp %s %t +// RUN: %clang_cc1 -x c++ -Wunused-lambda-capture -Wno-unused-value -std=c++1z -fixit %t +// RUN: grep -v CHECK %t | FileCheck %s + + +#define MACRO_CAPTURE(...) __VA_ARGS__ +int main() { +int a = 0, b = 0, c = 0; +auto F0 = [a, &b]()

[clang-tools-extra] [clang-doc] add tags to Mustache namespace template (PR #142045)

2025-05-30 Thread Erick Velez via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=mustache --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/index.html + +enum Color { + RED, + BLUE, + GREEN +}; + +class Foo; + +// CHECK: +// CHECK-NEXT:

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-30 Thread Oliver Hunt via cfe-commits
@@ -972,6 +972,12 @@ class Sema final : public SemaBase { /// Calls \c Lexer::getLocForEndOfToken() SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset = 0); + /// Calls \c Lexer::findNextToken() to find the next token, and if the + /// locations of bo

[clang] [clang][Frontend] Add overload to ASTPrinter that doesn't own output stream (PR #142163)

2025-05-30 Thread Michael Buch via cfe-commits
Michael137 wrote: thanks for the quick review! https://github.com/llvm/llvm-project/pull/142163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Add filter option to AST dump command (PR #142164)

2025-05-30 Thread Michael Buch via cfe-commits
@@ -2235,11 +2235,22 @@ class CommandObjectTargetModulesDumpClangAST : CommandObjectTargetModulesModuleAutoComplete( interpreter, "target modules dump ast", "Dump the clang ast for a given module's symbol file.", -//"target modules dump

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-30 Thread Abid Qadeer via cfe-commits
@@ -0,0 +1,17 @@ +! RUN: env FCC_OVERRIDE_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-### " %flang -target x86_64-unknown-linux-gnu %s -O2 b -O3 2>&1 | FileCheck %s abidh wrote: Indeed. Thanks for catching this. Fixed now. https://github.co

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-30 Thread Abid Qadeer via cfe-commits
https://github.com/abidh updated https://github.com/llvm/llvm-project/pull/140556 >From 5d20af48673adebc2ab3e1a6c8442f67d84f1847 Mon Sep 17 00:00:00 2001 From: Abid Qadeer Date: Mon, 19 May 2025 15:21:25 +0100 Subject: [PATCH 1/7] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. This PR add fun

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-30 Thread Oliver Hunt via cfe-commits
@@ -2164,15 +2164,29 @@ ExprResult Sema::BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, bool IsLast = (I + 1) == LSI->NumExplicitCaptures; SourceRange FixItRange; if (CaptureRange.isValid()) { +auto GetTrailingEndLocat

[clang] [lldb] [lldb] Add filter option to AST dump command (PR #142164)

2025-05-30 Thread Michael Buch via cfe-commits
@@ -2235,11 +2235,22 @@ class CommandObjectTargetModulesDumpClangAST : CommandObjectTargetModulesModuleAutoComplete( interpreter, "target modules dump ast", "Dump the clang ast for a given module's symbol file.", -//"target modules dump

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-05-30 Thread Oliver Hunt via cfe-commits
@@ -84,6 +84,21 @@ SourceLocation Sema::getLocForEndOfToken(SourceLocation Loc, unsigned Offset) { return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts); } +SourceRange Sema::getRangeForNextToken(SourceLocation Loc, + bool

[clang-tools-extra] [clang-doc] add tags to Mustache namespace template (PR #142045)

2025-05-30 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/142045 >From 7d94cff0737804c8d91712e7758439eb0cc07ff3 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Thu, 29 May 2025 14:44:29 -0700 Subject: [PATCH 1/2] [clang-doc] add tags to Mustache namespace template namespace

[clang] [lldb] [lldb] Add filter option to AST dump command (PR #142164)

2025-05-30 Thread Michael Buch via cfe-commits
@@ -8511,8 +8512,16 @@ TypeSystemClang::dump(lldb::opaque_compiler_type_t type) const { } #endif -void TypeSystemClang::Dump(llvm::raw_ostream &output) { - GetTranslationUnitDecl()->dump(output); +void TypeSystemClang::Dump(llvm::raw_ostream &output, +

[clang] [clang] Rename diag notes that assumed precompiled dependencies are pch's, NFCI (PR #142161)

2025-05-30 Thread Jan Svoboda via cfe-commits
@@ -24,8 +24,9 @@ def err_fe_ast_file_modified : Error< DefaultFatal; def err_fe_pch_file_overridden : Error< "file '%0' from the precompiled header has been overridden">; -def note_pch_required_by : Note<"'%0' required by '%1'">; -def note_pch_rebuild_required : Note<"

[clang] [clang] Rename diag notes that assumed precompiled dependencies are pch's, NFCI (PR #142161)

2025-05-30 Thread Cyndy Ishida via cfe-commits
@@ -24,8 +24,9 @@ def err_fe_ast_file_modified : Error< DefaultFatal; def err_fe_pch_file_overridden : Error< "file '%0' from the precompiled header has been overridden">; -def note_pch_required_by : Note<"'%0' required by '%1'">; -def note_pch_rebuild_required : Note<"

[clang] [Doc][NFC] Fix a typo in SanitizerSpecialCaseList doc. (PR #142168)

2025-05-30 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/142168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Doc][NFC] Fix a typo in SanitizerSpecialCaseList doc. (PR #142168)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qinkun Bao (qinkunbao) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/142168.diff 1 Files Affected: - (modified) clang/docs/SanitizerSpecialCaseList.rst (+1-1) ``diff diff --git a/clang/docs/SanitizerSpecia

[clang] [clang][Parser] Fix lookup of builtins with pragma intrinsic (PR #142019)

2025-05-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/142019 >From 3cf1fcb8cc722bd60a91034d9ef47240bea6a751 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Fri, 30 May 2025 08:09:45 -0700 Subject: [PATCH] Reapply "[clang][Sema] Declare builtins used in #pragma intrins

[clang] [clang][NFC] Move Diags.isIgnored check later in checkForRedundantLoop (PR #141470)

2025-05-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/141470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ccb6b0d - [clang][NFC] Move Diags.isIgnored check later in checkForRedundantLoop (#141470)

2025-05-30 Thread via cfe-commits
Author: Timm Baeder Date: 2025-05-30T17:26:30+02:00 New Revision: ccb6b0dafda22360edea8dbf515f78db3c31e807 URL: https://github.com/llvm/llvm-project/commit/ccb6b0dafda22360edea8dbf515f78db3c31e807 DIFF: https://github.com/llvm/llvm-project/commit/ccb6b0dafda22360edea8dbf515f78db3c31e807.diff L

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-30 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks Abid. LGTM. https://github.com/llvm/llvm-project/pull/140556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Add parsing of filter enum for StaticSampler (PR #140294)

2025-05-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `bolt-x86_64-ubuntu-nfc` running on `bolt-worker` while building `clang,llvm` at step 8 "test-build-bolt-check-bolt". Full details are available at: https://lab.llvm.org/buildbot/#/builders/92/builds/19697 Here is the releva

[clang] [clang-format][NFC] Clean up AnnotatingParser::consumeToken() (PR #142104)

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

[clang] 3f0a530 - [clang-format][NFC] Clean up AnnotatingParser::consumeToken() (#142104)

2025-05-30 Thread via cfe-commits
Author: Owen Pan Date: 2025-05-30T01:51:23-07:00 New Revision: 3f0a5305b483560275fa494d2c1b117c6ebe350a URL: https://github.com/llvm/llvm-project/commit/3f0a5305b483560275fa494d2c1b117c6ebe350a DIFF: https://github.com/llvm/llvm-project/commit/3f0a5305b483560275fa494d2c1b117c6ebe350a.diff LOG:

[clang] [clang-format][NFC] Clean up AnnotatingParser::consumeToken() (PR #142104)

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

[clang] 5483190 - [RISCV] Add shlcofideleg extension (#141572)

2025-05-30 Thread via cfe-commits
Author: Ying Chen Date: 2025-05-30T16:52:08+08:00 New Revision: 5483190216cb0ff3b9f0e1a3ca901ad1b259ba82 URL: https://github.com/llvm/llvm-project/commit/5483190216cb0ff3b9f0e1a3ca901ad1b259ba82 DIFF: https://github.com/llvm/llvm-project/commit/5483190216cb0ff3b9f0e1a3ca901ad1b259ba82.diff LOG

[clang] [clang-format] Handle bit-field colon of non-numeric-constant size (PR #142110)

2025-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix #142050 --- Full diff: https://github.com/llvm/llvm-project/pull/142110.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+3-1) - (modified) clang/unittests/Format/TokenAnnota

[clang] [llvm] [RISCV] Add shlcofideleg extension (PR #141572)

2025-05-30 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp closed https://github.com/llvm/llvm-project/pull/141572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UBSan][Ignorelist] Expanding =sanitize to fun. (PR #142074)

2025-05-30 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao updated https://github.com/llvm/llvm-project/pull/142074 >From e12e5dfc241bcc9eb28f616e96cc9eebba918b7c Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Fri, 30 May 2025 01:21:37 + Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?UT

[clang] [NoSanitizeList][NFI] Add containsPrefix to remove duplicated logics. (PR #142027)

2025-05-30 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao closed https://github.com/llvm/llvm-project/pull/142027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-30 Thread Abid Qadeer via cfe-commits
https://github.com/abidh updated https://github.com/llvm/llvm-project/pull/140556 >From 5d20af48673adebc2ab3e1a6c8442f67d84f1847 Mon Sep 17 00:00:00 2001 From: Abid Qadeer Date: Mon, 19 May 2025 15:21:25 +0100 Subject: [PATCH 1/5] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. This PR add fun

[clang] 2a3afa2 - [NoSanitizeList][NFI] Add containsPrefix to remove duplicated logics. (#142027)

2025-05-30 Thread via cfe-commits
Author: Qinkun Bao Date: 2025-05-30T05:26:41-04:00 New Revision: 2a3afa2feb90844ad0f8b0bc57663e2aec06cd0a URL: https://github.com/llvm/llvm-project/commit/2a3afa2feb90844ad0f8b0bc57663e2aec06cd0a DIFF: https://github.com/llvm/llvm-project/commit/2a3afa2feb90844ad0f8b0bc57663e2aec06cd0a.diff LO

[clang] [flang] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (PR #140556)

2025-05-30 Thread Abid Qadeer via cfe-commits
https://github.com/abidh updated https://github.com/llvm/llvm-project/pull/140556 >From 5d20af48673adebc2ab3e1a6c8442f67d84f1847 Mon Sep 17 00:00:00 2001 From: Abid Qadeer Date: Mon, 19 May 2025 15:21:25 +0100 Subject: [PATCH 1/6] [flang][driver] Introduce FCC_OVERRIDE_OPTIONS. This PR add fun

[clang] [flang] [mlir] [flang] Add support for -mrecip[=] (PR #142172)

2025-05-30 Thread Eugene Epshteyn via cfe-commits
@@ -1251,6 +1251,164 @@ static bool parseIntegerOverflowArgs(CompilerInvocation &invoc, return true; } +/// This is a helper function for validating the optional refinement step +/// parameter in reciprocal argument strings. Return false if there is an error +/// parsing th

[clang] [flang] [mlir] [flang] Add support for -mrecip[=] (PR #142172)

2025-05-30 Thread Eugene Epshteyn via cfe-commits
@@ -1251,6 +1251,164 @@ static bool parseIntegerOverflowArgs(CompilerInvocation &invoc, return true; } +/// This is a helper function for validating the optional refinement step +/// parameter in reciprocal argument strings. Return false if there is an error +/// parsing th

[clang] [flang] [mlir] [flang] Add support for -mrecip[=] (PR #142172)

2025-05-30 Thread Slava Zakharin via cfe-commits
https://github.com/vzakhari commented: LGTM, though, I think we'd better reuse the code from `Clang.cpp`. `flangFrontend` already depends on `clangDriver`, so we just need to export `ParseMRecip` and `getRefinementStep` from `clangDriver` (and probably replace their `Driver` argument with a `

[clang-tools-extra] [clang-doc] add tags to Mustache namespace template (PR #142045)

2025-05-30 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/142045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 45218e0 - [NFC] Tweak docs for unique-object-duplication warning (#142158)

2025-05-30 Thread via cfe-commits
Author: Devon Loehr Date: 2025-05-30T11:54:44-04:00 New Revision: 45218e01d69ecb6428afcff19c9dde2cc792cdd6 URL: https://github.com/llvm/llvm-project/commit/45218e01d69ecb6428afcff19c9dde2cc792cdd6 DIFF: https://github.com/llvm/llvm-project/commit/45218e01d69ecb6428afcff19c9dde2cc792cdd6.diff L

  1   2   3   4   >