[clang] [clang][analyzer] Split NullDereferenceChecker into a modeling and checker part (PR #122139)

2025-01-09 Thread Balázs Kéri via cfe-commits
@@ -155,22 +155,27 @@ static bool isDeclRefExprToReference(const Expr *E) { void DereferenceChecker::reportBug(DerefKind K, ProgramStateRef State, const Stmt *S, CheckerContext &C) const { + if (!CheckNullDereference) { +C.addSink(); ---

[clang] [clang] Refine the temporay object member access filtering for GSL pointer (PR #122088)

2025-01-09 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/122088 >From 8c4f9bcb00c56f564abf6cfa115854681b48f7d9 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 17 Dec 2024 14:28:00 +0100 Subject: [PATCH 1/2] [clang] Refine the temporay object member access filtering for

[clang] [clang] Refine the temporay object member access filtering for GSL pointer (PR #122088)

2025-01-09 Thread Haojian Wu via cfe-commits
@@ -806,3 +806,31 @@ std::string_view test2(int c, std::string_view sv) { } } // namespace GH120206 + +namespace GH120543 { +struct S { + std::string_view sv; + std::string s; +}; +struct Q { + const S* get() const [[clang::lifetimebound]]; +}; +void test1() { + std::strin

[clang] [clang] Refine the temporay object member access filtering for GSL pointer (PR #122088)

2025-01-09 Thread Haojian Wu via cfe-commits
@@ -1103,6 +1094,8 @@ shouldLifetimeExtendThroughPath(const IndirectLocalPath &Path) { for (auto Elem : Path) { if (Elem.Kind == IndirectLocalPathEntry::DefaultInit) return PathLifetimeKind::Extend; +if (Elem.Kind == IndirectLocalPathEntry::MemberExpr) + c

[clang] 397ac44 - [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (#112724)

2025-01-09 Thread via cfe-commits
Author: NAKAMURA Takumi Date: 2025-01-09T17:11:07+09:00 New Revision: 397ac44f623f891d8f05d6673a95984ac0a26671 URL: https://github.com/llvm/llvm-project/commit/397ac44f623f891d8f05d6673a95984ac0a26671 DIFF: https://github.com/llvm/llvm-project/commit/397ac44f623f891d8f05d6673a95984ac0a26671.dif

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2025-01-09 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/112724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/15 >From 586f1fa8fb02431a962ca606fd546c2310427c80 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 8 Jan 2025 23:19:56 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/15 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Clang] Adjust pointer-overflow sanitizer for N3322 (PR #120719)

2025-01-09 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/120719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4847395 - [Clang] Adjust pointer-overflow sanitizer for N3322 (#120719)

2025-01-09 Thread via cfe-commits
Author: Nikita Popov Date: 2025-01-09T09:23:23+01:00 New Revision: 4847395c5459f9c476808f9337abdae7fbd78a23 URL: https://github.com/llvm/llvm-project/commit/4847395c5459f9c476808f9337abdae7fbd78a23 DIFF: https://github.com/llvm/llvm-project/commit/4847395c5459f9c476808f9337abdae7fbd78a23.diff

[clang] [clang-format] Stop fixing indentation on namespace closing brace (PR #122234)

2025-01-09 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/122234 Fixes #119790. >From 38b8ebca922a7511d9f2bc048f3df0c9863cafc8 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 9 Jan 2025 00:16:30 -0800 Subject: [PATCH] [clang-format] Stop fixing indentation on namespace clo

[clang] [clang-format] Stop fixing indentation on namespace closing brace (PR #122234)

2025-01-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #119790. --- Full diff: https://github.com/llvm/llvm-project/pull/122234.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineFormatter.cpp (+1-1) - (modified) clang/unittests/Format/

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/15 >From 586f1fa8fb02431a962ca606fd546c2310427c80 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 8 Jan 2025 23:19:56 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/15 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-01-09 Thread Matt Arsenault via cfe-commits
@@ -446,10 +448,11 @@ ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const { // The structure is passed as an unextended integer, a float, or a double. if (isFPArgumentType(SingleElementTy)) { - assert(Size == 32 || Size == 64); + assert(Size =

[clang] [llvm] [BasicAA] Do not decompose past casts with different index width (PR #119365)

2025-01-09 Thread Björn Pettersson via cfe-commits
bjope wrote: But isn't it still a bit weird that if I change the datalayout to set the same pointer size for the two address spaces, then BasicAA is able to derive that there is NoAlias (https://godbolt.org/z/vhcG4jx7a), and the same goes even if using same address space for both accesses (htt

[clang] [Headers][X86] amxintrin.h - fix attributes according to Intel SDM (PR #122204)

2025-01-09 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/122204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqciint (Interrupts) extension (PR #122256)

2025-01-09 Thread Sudharsan Veeravalli via cfe-commits
@@ -742,8 +742,8 @@ Error RISCVISAInfo::checkDependency() { bool HasZvl = MinVLen != 0; bool HasZcmt = Exts.count("zcmt") != 0; static constexpr StringLiteral XqciExts[] = { - {"xqcia"}, {"xqciac"}, {"xqcicli"}, {"xqcicm"}, - {"xqcics"}, {"xqcicsr"}, {"xqcilsm

[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-09 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar commented: Note that now we also have a new type for string tables: https://github.com/llvm/llvm-project/pull/119488 which doesn't result in relocations https://github.com/llvm/llvm-project/pull/122366 ___ cfe-commits mailing

[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-09 Thread via cfe-commits
@@ -57,7 +57,7 @@ class DeclarationFragments { Keyword, Attribute, NumberLiteral, -StringLiteral, +StringRef, QuietMisdreavus wrote: This is an unnecessary find-and-replace. This enum constant specifically references a string literal, not

[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-09 Thread Benoit Jacob via cfe-commits
@@ -57,7 +57,7 @@ class DeclarationFragments { Keyword, Attribute, NumberLiteral, -StringLiteral, +StringRef, bjacob wrote: good catch! i'll pore over the actual diff line by line to catch more things like this, but I wanted to first see i

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2025-01-09 Thread Ian Anderson via cfe-commits
@@ -8265,6 +8265,11 @@ def internal_externc_isystem : Separate<["-"], "internal-externc-isystem">, "implicit extern \"C\" semantics; these are assumed to not be " "user-provided and are used to model system and standard headers' " "paths.">; +d

[clang] [CMake] Add a cache file for building a highly-optimized LLVM toolchain (PR #117802)

2025-01-09 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/117802 >From 3bddb3c6d25efbfcc901a42a8367be85599d1f7e Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 23 Sep 2024 13:34:46 + Subject: [PATCH 1/4] [CMake] Add a cache file for building a highly-optimized LL

[clang] [CMake] Add a cache file for building a highly-optimized LLVM toolchain (PR #117802)

2025-01-09 Thread Tom Stellard via cfe-commits
@@ -0,0 +1,17 @@ +# Stage 1 +# * Build an LTO optimized libcxx, so we can staticially link it into stage 2 +# clang. + + +set(CMAKE_BUILD_TYPE Release CACHE STRING "") +set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "") +set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libu

[clang] [clang][OpenMP] Add 'align' modifier for 'allocate' clause (PR #121814)

2025-01-09 Thread David Pagan via cfe-commits
https://github.com/ddpagan updated https://github.com/llvm/llvm-project/pull/121814 >From c2c2c4c46c3ea615e86484b9f9a14a74fab21295 Mon Sep 17 00:00:00 2001 From: Dave Pagan Date: Fri, 22 Nov 2024 10:35:40 -0600 Subject: [PATCH 1/6] [clang][OpenMP] Add 'align' modifier for 'allocate' clause Th

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2025-01-09 Thread Julian Schmidt via cfe-commits
@@ -139,6 +150,12 @@ Options function, and an optional reason, separated by comma. For more information, see :ref:`Custom functions`. +.. option:: ShowFullyQualifiedNames + +When `true`, the fully qualified name of all functions matched by the custom +function

[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-09 Thread Benoit Jacob via cfe-commits
@@ -57,7 +57,7 @@ class DeclarationFragments { Keyword, Attribute, NumberLiteral, -StringLiteral, +StringRef, bjacob wrote: Thanks for the heads up -- will fix one by one. Also, note to self: let's leep `StringLiteral` around as deprecate

[clang] [sanitizer] Parse weighted sanitizer args and -fsanitize-skip-hot-cutoff (PR #121619)

2025-01-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/121619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the HLSL distance intrinsic (PR #122357)

2025-01-09 Thread Farzon Lotfi via cfe-commits
@@ -871,6 +871,34 @@ float3 degrees(float3); _HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees) float4 degrees(float4); +//===--===// +// distance builtins +//===--

[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-09 Thread Nikita Popov via cfe-commits
@@ -57,7 +57,7 @@ class DeclarationFragments { Keyword, Attribute, NumberLiteral, -StringLiteral, +StringRef, nikic wrote: Generally a lot of clang changes are wrong. There's a StringLiteral AST node, without relation to StringRef... http

[clang] Fix print module manifest file for macos (PR #122370)

2025-01-09 Thread Bill Hoffman via cfe-commits
https://github.com/billhoffman created https://github.com/llvm/llvm-project/pull/122370 This commit fixes -print-library-module-manifest-path on macos. Currently, this only works on linux systems. This is because on macos systems the library and header files are installed in a different locati

[clang] [HLSL] Implement the HLSL distance intrinsic (PR #122357)

2025-01-09 Thread Joshua Batista via cfe-commits
@@ -871,6 +871,34 @@ float3 degrees(float3); _HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees) float4 degrees(float4); +//===--===// +// distance builtins +//===--

[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)

2025-01-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/14377 Here is

[clang] [llvm] [HLSL] Reapply Move length support out of the DirectX Backend (#121611) (PR #122337)

2025-01-09 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 d01ae567742c4d83b67483e15eb74c0ecd2e8270 7173a486d82a3959fc6157a58488b10ece492821 --e

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-09 Thread Bill Wendling via cfe-commits
@@ -1060,238 +1061,331 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-09 Thread Bill Wendling via cfe-commits
@@ -1060,238 +1061,331 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-09 Thread Bill Wendling via cfe-commits
@@ -1343,6 +1430,12 @@ CodeGenFunction::emitBuiltinObjectSize(const Expr *E, unsigned Type, assert(Ptr->getType()->isPointerTy() && "Non-pointer passed to __builtin_object_size?"); + if (IsDynamic) bwendling wrote: At this point, we know that `Em

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-09 Thread Bill Wendling via cfe-commits
@@ -1060,238 +1061,331 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-09 Thread Bill Wendling via cfe-commits
@@ -1060,238 +1061,331 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [InstrProf] Add frontend temporal profiling flag (PR #122385)

2025-01-09 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg created https://github.com/llvm/llvm-project/pull/122385 As discussed in https://github.com/llvm/llvm-project/pull/121514 add the frontent flag `-fprofile-generate-temporal-instrumentation` to enable temporal profiling (https://discourse.llvm.org/t/rfc-temporal-prof

[clang] Deprecate order file instrumentation (PR #121514)

2025-01-09 Thread Ellis Hoag via cfe-commits
@@ -8010,15 +8010,19 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } - if (Args.hasArg(options::OPT_forder_file_instrumentation)) { - CmdArgs.push_back("-forder-file-instrumentation"); - // Enable order file instrumentation when ThinLTO is

[clang] [InstrProf] Add frontend temporal profiling flag (PR #122385)

2025-01-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ellis Hoag (ellishg) Changes As discussed in https://github.com/llvm/llvm-project/pull/121514 add the frontent flag `-fprofile-generate-temporal-instrumentation` to enable temporal profiling (https://discourse.llvm.org/t/rfc-temporal-pro

[clang] [InstrProf] Add frontend temporal profiling flag (PR #122385)

2025-01-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Ellis Hoag (ellishg) Changes As discussed in https://github.com/llvm/llvm-project/pull/121514 add the frontent flag `-fprofile-generate-temporal-instrumentation` to enable temporal profiling (https://discourse.llvm.org/t/rfc-tempo

[clang] [libclang] Allow using PrintingPolicy with types (PR #122386)

2025-01-09 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/122386 This allows controlling pretty-printing of types the same way it works with cursors. >From a96fbe38f697f77c12c712f5573c2158072a8d2f Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 17 Dec 2024 17:4

[clang] [libclang] Allow using PrintingPolicy with types (PR #122386)

2025-01-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes This allows controlling pretty-printing of types the same way it works with cursors. --- Full diff: https://github.com/llvm/llvm-project/pull/122386.diff 6 Files Affected: - (modified) clang/binding

[clang] [clang] fix wrong result of pointers comparison between unknown and stack (PR #122404)

2025-01-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Exile (mzyKi) Changes Related Issue #122403 --- Full diff: https://github.com/llvm/llvm-project/pull/122404.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Core/SimpleSValBuilde

[clang] [clang] fix wrong result of pointers comparison between unknown and stack (PR #122404)

2025-01-09 Thread via cfe-commits
https://github.com/mzyKi created https://github.com/llvm/llvm-project/pull/122404 Related Issue #122403 >From 777965f3149c0ec09bc9e71424e7d42e5721d11f Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Fri, 10 Jan 2025 09:55:20 +0800 Subject: [PATCH] [clang] fix wrong result of pointers compari

[clang] [sanitizer] Parse weighted sanitizer args and -fsanitize-skip-hot-cutoff (PR #121619)

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

[clang] [sanitizer] Parse weighted sanitizer args and -fsanitize-skip-hot-cutoff (PR #121619)

2025-01-09 Thread Fangrui Song via cfe-commits
@@ -14,10 +14,35 @@ #include "llvm/ADT/Hashing.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringSwitch.h" +#include "llvm/Support/Format.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Support/raw_ostream.h" +#include +#include using namespace clang;

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/15 >From 586f1fa8fb02431a962ca606fd546c2310427c80 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 8 Jan 2025 23:19:56 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Probably from the prev patch I have: ``` /usr/local/google/home/vitalybuka/src/llvm.git/llvm-project/clang/test/Frontend/ftime-report-template-decl.cpp:155:15: error: CHECK-DAG: expected string not found in input // CHECK-DAG: Code Generation Time ^ :75:32: note:

[clang] 186bd8e - [CodeGen] Restore CodeGenerationTime

2025-01-09 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2025-01-09T21:47:20-08:00 New Revision: 186bd8e4cd8d239be67172448c53e92be396359a URL: https://github.com/llvm/llvm-project/commit/186bd8e4cd8d239be67172448c53e92be396359a DIFF: https://github.com/llvm/llvm-project/commit/186bd8e4cd8d239be67172448c53e92be396359a.diff

[clang] 76fac9c - [sanitizer] Parse weighted sanitizer args and -fsanitize-skip-hot-cutoff (#121619)

2025-01-09 Thread via cfe-commits
Author: Thurston Dang Date: 2025-01-09T21:52:30-08:00 New Revision: 76fac9c01736b1254e42427f8e0910c0f1d01fba URL: https://github.com/llvm/llvm-project/commit/76fac9c01736b1254e42427f8e0910c0f1d01fba DIFF: https://github.com/llvm/llvm-project/commit/76fac9c01736b1254e42427f8e0910c0f1d01fba.diff

[clang] [clang-tools-extra] [clang][Sema] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nathan Ridge (HighCommander4) Changes Fixes https://github.com/llvm/llvm-project/issues/121310 **EDIT**: See accompanying RFC at https://discourse.llvm.org/t/rfc-upstream-heuristicresolver-from-clangd-to-libsema/84004 --- Ful

[clang] [sanitizer] Parse weighted sanitizer args and -fsanitize-skip-hot-cutoff (PR #121619)

2025-01-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/121619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][Sema] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review https://github.com/llvm/llvm-project/pull/121314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Parse weighted sanitizer args and -fsanitize-skip-hot-cutoff (PR #121619)

2025-01-09 Thread Thurston Dang via cfe-commits
@@ -14,10 +14,35 @@ #include "llvm/ADT/Hashing.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringSwitch.h" +#include "llvm/Support/Format.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Support/raw_ostream.h" +#include +#include using namespace clang;

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Fangrui Song via cfe-commits
@@ -1346,14 +1344,30 @@ static void runThinLTOBackend( } } -void clang::EmitBackendOutput( -DiagnosticsEngine &Diags, const HeaderSearchOptions &HeaderOpts, -const CodeGenOptions &CGOpts, const clang::TargetOptions &TOpts, -const LangOptions &LOpts, StringRef TDe

[clang] [clang-tools-extra] [clang][Sema] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/121314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Probably from the prev patch I have: > > ``` > /usr/local/google/home/vitalybuka/src/llvm.git/llvm-project/clang/test/Frontend/ftime-report-template-decl.cpp:155:15: > error: CHECK-DAG: expected string not found in input > // CHECK-DAG: Code Generation Time > ^ >

[clang] [clang-tools-extra] [clang][Sema] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Now that the dependent PR #121313 has merged, I've posted an RFC at https://discourse.llvm.org/t/rfc-upstream-heuristicresolver-from-clangd-to-libsema/84004, and I'm publishing this PR for review. https://github.com/llvm/llvm-project/pull/121314 __

[clang] [nfc][ubsan] Use O1 in test to remove more unrelated stuff (PR #122408)

2025-01-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/122408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2025-01-09 Thread Fangrui Song via cfe-commits
@@ -81,6 +81,16 @@ using namespace Fortran::frontend; +static constexpr llvm::StringLiteral timingIdParse = "Parse"; MaskRay wrote: constexpr at namespace level implies static https://github.com/llvm/llvm-project/pull/107270

[clang] [flang] [flang][Driver] Preliminary support for -ftime-report (PR #107270)

2025-01-09 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,22 @@ +! Check that -ftime-report flag is passed as-is to fc1. The value of the flag +! is only checked there. This behavior intentionally mirrors that of clang. +! +! RUN: %flang -### -c -ftime-report %s 2>&1 | FileCheck %s --check-prefix=CHECK-DRIVER

[clang] [HLSL] Implement D3DCOLORtoUBYTE4 intrinsic (PR #122202)

2025-01-09 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/122202 >From 07112471edfc569eb12b2a6178ddc28b4f3a36d5 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Thu, 9 Jan 2025 01:14:52 + Subject: [PATCH 1/5] Implement D3DCOLORtoUBYTE4 intrinsic --- clang/lib/Headers/hl

[clang] [clang] Rename ReadPCHAndPreprocessAction (NFC) (PR #122390)

2025-01-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Steven Wu (cachemeifyoucan) Changes Rename `ReadPCHAndPreprocessAction` class. This frontend action is used for dependency scanning only and the current name is confusing for what it actually does. Rename the class to `DependencyScanningFro

[clang] [clang] Rename ReadPCHAndPreprocessAction (NFC) (PR #122390)

2025-01-09 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan created https://github.com/llvm/llvm-project/pull/122390 Rename `ReadPCHAndPreprocessAction` class. This frontend action is used for dependency scanning only and the current name is confusing for what it actually does. Rename the class to `DependencyScanningFro

[clang] [clang] Rename ReadPCHAndPreprocessAction (NFC) (PR #122390)

2025-01-09 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 c1c50c7a3ef9ced4a9b01e0afd83b83d7060fff9 1796a6e4fa0492b9676637245a394d3029474d4e --e

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #118580)

2025-01-09 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/118580 >From f98e5113bc83cae2118552466288a874d5e5d63d Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 18 Oct 2024 10:49:18 -0700 Subject: [PATCH 1/8] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic -

[clang] [clang] Rename ReadPCHAndPreprocessAction (NFC) (PR #122390)

2025-01-09 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan updated https://github.com/llvm/llvm-project/pull/122390 >From 1796a6e4fa0492b9676637245a394d3029474d4e Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Thu, 9 Jan 2025 15:46:06 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [HLSL] Implement D3DCOLORtoUBYTE4 intrinsic (PR #122202)

2025-01-09 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/122202 >From 5610b225e76b046e911c1a7a0c1e4ccc128d35a1 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Thu, 9 Jan 2025 01:14:52 + Subject: [PATCH] [HLSL] Implement the D3DCOLORtoUBYTE4 intrinsic --- clang/lib/Hea

[clang] [analyzer] Widen loops: Augment assignment note when values invalidated at the start of a loop (PR #122398)

2025-01-09 Thread via cfe-commits
https://github.com/dgg5503 created https://github.com/llvm/llvm-project/pull/122398 This PR attempts to improve the value assignment diagnostic specifically for the case where `widen-loops` is enabled during Clang static analysis. The motivation behind this diagnostic is the fact that the curr

[clang] [analyzer] Widen loops: Augment assignment note when values invalidated at the start of a loop (PR #122398)

2025-01-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Douglas (dgg5503) Changes This PR attempts to improve the value assignment diagnostic specifically for the case where `widen-loops` is enabled during Clang static analysis. The motivation behin

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-09 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/122379 >From d021c2ba6a5b3f501b2f87317cb9072781069d73 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Wed, 8 May 2024 14:31:36 -0700 Subject: [PATCH 1/2] [SYCL] AST support for SYCL kernel entry point functions.

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-01-09 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: Thanks for help - I think I found the way to enable the building of these functions - patch updated. I could now (for the first time? :D ) compile and run a program on SystemZ with _Float16 variables, by using `--rtlib=compiler-rt `with clang. As I am not the expert on FP sem

[clang] [analyzer] Widen loops: Augment assignment note when values invalidated at the start of a loop (PR #122398)

2025-01-09 Thread via cfe-commits
@@ -1353,6 +1353,49 @@ static void showBRDefaultDiagnostics(llvm::raw_svector_ostream &OS, OS << " to "; SI.Dest->printPretty(OS); } + + // If the value was part of a loop widening node and its value was + // invalidated (i.e. replaced with a conjured symbol) then

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-09 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/122379 >From d021c2ba6a5b3f501b2f87317cb9072781069d73 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Wed, 8 May 2024 14:31:36 -0700 Subject: [PATCH 1/2] [SYCL] AST support for SYCL kernel entry point functions.

[clang] [clang][AST] Assert that DependentNameType::Name is not null (PR #122418)

2025-01-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Context: I was confused by the comment above `DependentNameType::getIdentifier()`, which suggested the function only sometimes returns non-null, but I couldn't find any case where it would. It turns out the comment dates back to a time when the type stored a `PointerUnio

[clang] [clang][AST] Assert that DependentNameType::Name is not null (PR #122418)

2025-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/122418 Also clarify the comment above DependentNameType::getIdentifier() >From a1e3dcc6063cafa2f79aed88090dcc6f14be0ed7 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 9 Jan 2025 23:55:35 -0500 Subject:

[clang] [clang][AST] Assert that DependentNameType::Name is not null (PR #122418)

2025-01-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes Also clarify the comment above DependentNameType::getIdentifier() --- Full diff: https://github.com/llvm/llvm-project/pull/122418.diff 1 Files Affected: - (modified) clang/include/clang/AST/Type.h (

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2025-01-09 Thread Matt Arsenault via cfe-commits
@@ -94,43 +94,43 @@ typedef double __attribute__((ext_vector_type(16))) double16; // CHECK-LABEL: @local_memory_alignment_global( // CHECK: store volatile i8 0, ptr addrspace(3) @local_memory_alignment_global.lds_i8, align 1 // CHECK: store volatile <2 x i8> zeroinitializer,

[clang] [InstrProf] Add frontend temporal profiling flag (PR #122385)

2025-01-09 Thread David Li via cfe-commits
@@ -3035,6 +3035,38 @@ indexed format, regardeless whether it is produced by frontend or the IR pass. overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported by the target, or ``single`` otherwise. +.. option:: -fprofile-generate-temporal

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2025-01-09 Thread Matt Arsenault via cfe-commits
@@ -52,6 +52,12 @@ class AMDGPUABIInfo final : public DefaultABIInfo { void computeInfo(CGFunctionInfo &FI) const override; RValue EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty, AggValueSlot Slot) const override; + + llvm::FixedVectorTy

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2025-01-09 Thread Matt Arsenault via cfe-commits
@@ -1,77 +0,0 @@ -// RUN: %clang_cc1 %s -emit-llvm -o - -triple spir-unknown-unknown -fpreserve-vec3-type | FileCheck %s - -typedef char char3 __attribute__((ext_vector_type(3))); arsenm wrote: I'm not sure we have adequate coverage of the 3 element vector types

[clang] [clang-tools-extra] [clang][Sema] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/121314 >From 4f0e828af34144412c42d8dda6e6a91c44f6b1fa Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Thu, 26 Dec 2024 00:40:48 -0500 Subject: [PATCH] [clang][Sema] Upstream HeuristicResolver from clangd Fixe

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2025-01-09 Thread Matt Arsenault via cfe-commits
@@ -52,6 +52,14 @@ class AMDGPUABIInfo final : public DefaultABIInfo { void computeInfo(CGFunctionInfo &FI) const override; RValue EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty, AggValueSlot Slot) const override; + + llvm::FixedVectorTy

[clang] [clang-tools-extra] [clang][Sema] Upstream HeuristicResolver from clangd (PR #121314)

2025-01-09 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Rebased. https://github.com/llvm/llvm-project/pull/121314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2025-01-09 Thread Matt Arsenault via cfe-commits
@@ -52,6 +52,14 @@ class AMDGPUABIInfo final : public DefaultABIInfo { void computeInfo(CGFunctionInfo &FI) const override; RValue EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty, AggValueSlot Slot) const override; + + llvm::FixedVectorTy

[clang] a4394d9 - [NFC][ubsan] Rename prefixes in test

2025-01-09 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2025-01-09T21:12:36-08:00 New Revision: a4394d9d42fb6e60e3702588fb56bec243038c49 URL: https://github.com/llvm/llvm-project/commit/a4394d9d42fb6e60e3702588fb56bec243038c49 DIFF: https://github.com/llvm/llvm-project/commit/a4394d9d42fb6e60e3702588fb56bec243038c49.diff L

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-01-09 Thread Matt Arsenault via cfe-commits
@@ -446,10 +448,11 @@ ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const { // The structure is passed as an unextended integer, a float, or a double. if (isFPArgumentType(SingleElementTy)) { - assert(Size == 32 || Size == 64); + assert(Size =

[clang] [Darwin][Driver][clang] arm64-apple-none-macho is missing the Apple macros from arm-apple-none-macho (PR #122427)

2025-01-09 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/122427 arm-apple-none-macho uses DarwinTargetInfo which provides several Apple specific macros. arm64-apple-none-macho however just uses the generic AArch64leTargetInfo and doesn't get any of those macros. I

[clang] [Darwin][Driver][clang] arm64-apple-none-macho is missing the Apple macros from arm-apple-none-macho (PR #122427)

2025-01-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm Author: Ian Anderson (ian-twilightcoder) Changes arm-apple-none-macho uses DarwinTargetInfo which provides several Apple specific macros. arm64-apple-none-macho however just uses the generic AArch64leTargetInfo and doesn't get any of those

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #118580)

2025-01-09 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/118580 >From f98e5113bc83cae2118552466288a874d5e5d63d Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 18 Oct 2024 10:49:18 -0700 Subject: [PATCH 1/7] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic -

[clang] [ubsan] Assert that each check only has one SanitizerKind (PR #122392)

2025-01-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/122392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-09 Thread Johannes Doerfert via cfe-commits
@@ -2761,6 +2761,47 @@ etc.). Query for this feature with ``__has_builtin(__builtin_assume_separate_storage)``. +``__builtin_assume_dereferenceable`` +- + +``__builtin_assume_dereferenceable`` is used to provide the optimizer with the +kno

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-09 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert approved this pull request. LG, one suggestion for the docs. https://github.com/llvm/llvm-project/pull/121789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-09 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert edited https://github.com/llvm/llvm-project/pull/121789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Assert that each check only has one SanitizerKind (PR #122392)

2025-01-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/122392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Assert that each check only has one SanitizerKind (PR #122392)

2025-01-09 Thread Vitaly Buka via cfe-commits
@@ -3603,6 +3603,8 @@ void CodeGenFunction::EmitCheck( llvm::Value *TrapCond = nullptr; bool NoMerge = false; for (int i = 0, n = Checked.size(); i < n; ++i) { vitalybuka wrote: Maybe instead switch SanitizerMask -> SanitizerOrdinal? https://github.com/

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #118580)

2025-01-09 Thread Tom Stellard via cfe-commits
@@ -44,7 +44,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup ccache -uses: hendrikmuhs/ccache-action@v1 +uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2 --

  1   2   3   4   5   6   >