[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

2024-06-13 Thread via cfe-commits
@@ -738,16 +738,47 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration( return nullptr; } -if (!Tok.is(tok::identifier)) { +Decl *UED = nullptr; + +if (Tok.is(tok::identifier)) { cor3ntin wrote: Line 723, `ParseOptionalCXXScopeSpecif

[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

2024-06-13 Thread via cfe-commits
@@ -738,16 +738,47 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration( return nullptr; } -if (!Tok.is(tok::identifier)) { +Decl *UED = nullptr; + +if (Tok.is(tok::identifier)) { cor3ntin wrote: This assumes that only 2 scenario will

[clang] [llvm] [MC/DC][Coverage] Loosen the limit of NumConds from 6 (PR #82448)

2024-06-13 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot approved this pull request. https://github.com/llvm/llvm-project/pull/82448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -mlink-builtin-bitcode option to fc1 (PR #94763)

2024-06-13 Thread Sergio Afonso via cfe-commits
@@ -223,9 +223,12 @@ class CodeGenAction : public FrontendAction { std::unique_ptr llvmCtx; std::unique_ptr llvmModule; - /// Embeds offload objects given with specified with -fembed-offload-object + /// Embeds offload objects specified with -fembed-offload-object voi

[clang-tools-extra] tidy (PR #95384)

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

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-06-13 Thread Zahira Ammarguellat via cfe-commits
@@ -14683,6 +14710,23 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { default: return false; + case Builtin::BI__builtin_frexp: + case Builtin::BI__builtin_frexpf: + case Builtin::BI__builtin_frexpl: { zahiraam wrote: You mean adding

[clang-tools-extra] tidy (PR #95384)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes - **[MLIR] Translate DIStringType. (#94480)** - **[clangd] Fix crash with null check for Token at Loc (#94528)** - **[flang][Transforms][NFC] Remove boilerplate

[clang] ffab938 - [clang][Interp] Handle BooleanToSignedIntegral casts

2024-06-13 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-13T13:49:20+02:00 New Revision: ffab938f50fa999f2218976f7de78cf8e4f70d4e URL: https://github.com/llvm/llvm-project/commit/ffab938f50fa999f2218976f7de78cf8e4f70d4e DIFF: https://github.com/llvm/llvm-project/commit/ffab938f50fa999f2218976f7de78cf8e4f70d4e.diff LO

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-06-13 Thread Zahira Ammarguellat via cfe-commits
@@ -3452,9 +3452,10 @@ def Fmod : FPMathTemplate, LibBuiltin<"math.h"> { def Frexp : FPMathTemplate, LibBuiltin<"math.h"> { zahiraam wrote: I have added `UnprefixedOnlyConstexprSince` to the class `LIBBUILTIN` so it will be unknow if I add it to this def. I w

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-06-13 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: All the LIT tests failing are due to the latest changes I made. I will edit them once I know that the latest implementation is correct. https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang] Catch missing format attributes (PR #70024)

2024-06-13 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70024 From f87e413ff9dcaa2e5ab73a565f168cc55dc54db0 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Fri, 5 Apr 2024 15:20:37 +0200 Subject: [PATCH] [clang] Catch missing format attribut

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-13 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I added a printf into `FindExternalVisibleDeclsByName` where it calls find on `MultiOnDiskHashTable` to see what names have been causing this and I can see that we stall on the first name we try to look up. The name `std` is the first one and was previously processed almos

[clang] [clang-format] Add DiagHandler for getStyle function (PR #91317)

2024-06-13 Thread via cfe-commits
https://github.com/pointhex updated https://github.com/llvm/llvm-project/pull/91317 >From 6c8cc11d2d4591b06514f5f16e88ffd30d149488 Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Tue, 7 May 2024 12:27:29 +0200 Subject: [PATCH] [clang-format] Add DiagHandler for getStyle function It allo

[clang] [clang-format] Add DiagHandler for getStyle function (PR #91317)

2024-06-13 Thread via cfe-commits
pointhex wrote: I used to redirect output. I guess that is enough. Maybe, you know a better solution for that. ```::testing::internal::CaptureStderr(); auto Style = getStyle("{invalid_key=invalid_value}", "a.h", "LLVM", "", &FS, false); ... const std::string output = ::testing::

[clang] [Clang][Sema] qualifier should be transformed (PR #94725)

2024-06-13 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Needs changes as discussed. > Needs changes as discussed. I am really appreciate for your guidance and I will check in the weekend. https://github.com/llvm/llvm-project/pull/94725 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,364 @@ +//===--- PrerequisiteModulesTests.cpp ---*- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifi

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: can you revert all of these changes? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -710,6 +710,7 @@ class ASTWorker { TUScheduler::ASTCache &IdleASTs; TUScheduler::HeaderIncluderCache &HeaderIncluders; const bool RunSync; + kadircet wrote: can you get rid of these new line changes as well? https://github.com/llvm/llvm-project/pull/

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: again can you revert these changes? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -112,6 +114,9 @@ class ClangdServer { /// This throttler controls which preambles may be built at a given time. clangd::PreambleThrottler *PreambleThrottler = nullptr; +/// Enable experimental support for modules. kadircet wrote: this isn't use

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -27,6 +27,9 @@ #include "Diagnostics.h" #include "FS.h" #include "Headers.h" + kadircet wrote: can you drop the extra new lines? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-co

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: again can you revert these changes? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: again can you revert these changes? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] (New) Add option to generate additional debug info for expression dereferencing pointer to pointers (PR #95298)

2024-06-13 Thread Paul T Robinson via cfe-commits
pogo59 wrote: You should have a look at [this imminent patch](https://github.com/llvm/llvm-project/pull/91724) which will affect your test. https://github.com/llvm/llvm-project/pull/95298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM. I didn't deeply analyze all the small details of the commit, but it is clearly NFC (builds better infrastructure for follow-up commits), the implementation is clear and elegant (slightly better quality than what I can write) and th

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/95128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/95128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,26 @@ +//=== ScanningProjectModules.h ---*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: can you rename this to `ScanningProjectModules.cpp` ? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,347 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,347 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,199 @@ +//===-- ProjectModules.h -*- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks, mostly LG. my biggest concern is around testing setup, PTAL. https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
kadircet wrote: again can you revert these changes? https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,347 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,347 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang] SourceLocIdentKind::Function should not be dependent (PR #94942)

2024-06-13 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/94942 >From 96f4e2a5c82296b61e53189135d88a2d2b0da9f4 Mon Sep 17 00:00:00 2001 From: Qizhi Hu <836744...@qq.com> Date: Mon, 10 Jun 2024 16:53:54 +0800 Subject: [PATCH] [clang] SourceLocIdentKind::Function should not be de

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -146,6 +146,8 @@ class Checker { ClangdLSPServer::Options Opts; // from buildCommand tooling::CompileCommand Cmd; + std::unique_ptr BaseCDB; + std::unique_ptr CDB; kadircet wrote: can you also construct a `ModulesBuilder` here and populate `Inputs`

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-13 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,347 @@ +//===- ModulesBuilder.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -434,6 +447,12 @@ class SMTSolver { virtual bool isFPSupported() = 0; virtual void print(raw_ostream &OS) const = 0; + + /// Sets the requested option. + virtual void setBoolParam(StringRef Key, bool Value) = 0; + virtual void setUnsignedParam(StringRef Key, unsigned

[clang] [libclang/python] Fix bugs in custom enum implementation and add tests (PR #95381)

2024-06-13 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/95381 >From a3da142b0db6581581ccb135800d77b09476f385 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Thu, 13 Jun 2024 10:43:52 +0100 Subject: [PATCH 1/2] [libclang/python] Fix bugs in custom enum implementatio

[clang] [libclang/python] Fix bugs in custom enum implementation and add tests (PR #95381)

2024-06-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/95381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Fix bugs in custom enum implementation and add tests (PR #95381)

2024-06-13 Thread Jannick Kremer via cfe-commits
@@ -0,0 +1,50 @@ +import unittest + +from clang.cindex import ( +CursorKind, +TemplateArgumentKind, +ExceptionSpecificationKind, +AvailabilityKind, +AccessSpecifier, +TypeKind, +RefQualifierKind, +LinkageKind, +TLSKind, +StorageClass, +) + +

[clang] ae73706 - [clang][Interp] Fix references to objects

2024-06-13 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-13T15:31:24+02:00 New Revision: ae73706075bb2ea4bbc87c4b33f3b681555f8dfb URL: https://github.com/llvm/llvm-project/commit/ae73706075bb2ea4bbc87c4b33f3b681555f8dfb DIFF: https://github.com/llvm/llvm-project/commit/ae73706075bb2ea4bbc87c4b33f3b681555f8dfb.diff LO

[clang] [llvm] [Driver] Add option to select compiler-rt arch suffix (PR #89775)

2024-06-13 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Abandoning this. We'll work around the brokenness in our downstream repo. https://github.com/llvm/llvm-project/pull/89775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Map /Ot to -O3 instead of -O2 (PR #95406)

2024-06-13 Thread via cfe-commits
https://github.com/zmodem created https://github.com/llvm/llvm-project/pull/95406 /Ot (which is also implied by /O2) is supposed to optimize for maximum speed, so -O3 seems like a better match. >From 90e7c202bd55fce943b77fd926f5fc4c5835dc3f Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: T

[clang] [libclang/python] Fix bugs in custom enum implementation and add tests (PR #95381)

2024-06-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Let me know when you think this is good to go. https://github.com/llvm/llvm-project/pull/95381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-13 Thread Iñaki Amatria Barral via cfe-commits
@@ -17,10 +17,6 @@ // GCNO-LOCATION: "-coverage-notes-file={{.*}}/foo/bar.gcno" // GCNO-LOCATION-REL: "-coverage-notes-file={{.*}}{{/|}}foo/bar.gcno" -/// GCC allows PWD to change the paths. -// RUN: %if system-linux %{ PWD=/proc/self/cwd %clang -### -c --coverage %s -o f

[clang] [libclang/python] Fix bugs in custom enum implementation and add tests (PR #95381)

2024-06-13 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: These were all the bugs I'd found, so I think it is https://github.com/llvm/llvm-project/pull/95381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-13 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: In both cases we are condensing `1105` on-disk hash tables, but it took seconds before and takes multiple minutes after the change. https://github.com/llvm/llvm-project/pull/92083 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [libclang/python] Fix bugs in custom enum implementation and add tests (PR #95381)

2024-06-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This depends on #95210 to pass the CI. Let's merge that first. https://github.com/llvm/llvm-project/pull/95381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver] Add option to select compiler-rt arch suffix (PR #89775)

2024-06-13 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/89775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kristóf Umann (Szelethus) Changes I intend to fix this checker up so that we can move it out of alpha. I made a bunch of analyses, and found many similar false positives: ```c++ int t[] = {1,2,3}; memcpy(dst, t, sizeof(t) / sizeof(t[0]));

[clang-tools-extra] [clang-doc][cmake] Copy assets to build directory (PR #95187)

2024-06-13 Thread Paul Kirth via cfe-commits
ilovepi wrote: > > @petrhosek I'm pretty sure there's a better way to spell this, but I think > > we need something similar to properly test clang-doc w/o an install step. > > cc: @PeterChou1 > > It looks like copy_directory_if_different is not available on windows Ugh. I forgot to check the m

[clang] [clang-cl] Map /Ot to -O3 instead of -O2 (PR #95406)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Hans (zmodem) Changes /Ot (which is also implied by /O2) is supposed to optimize for maximum speed, so -O3 seems like a better match. --- Full diff: https://github.com/llvm/llvm-project/pull/95406.diff

[clang] [clang-cl] Map /Ot to -O3 instead of -O2 (PR #95406)

2024-06-13 Thread via cfe-commits
zmodem wrote: @AaronBallman as discussed on https://discourse.llvm.org/t/clang-cl-optimization-option/79554 Also @nico who IIRC looked at these flags in recent times. https://github.com/llvm/llvm-project/pull/95406 ___ cfe-commits mailing list cfe-co

[clang-tools-extra] [clang-doc][cmake] Copy assets to build directory (PR #95187)

2024-06-13 Thread Paul Kirth via cfe-commits
@@ -25,3 +25,11 @@ install(FILES ../assets/clang-doc-default-stylesheet.css install(FILES ../assets/index.js DESTINATION "${CMAKE_INSTALL_DATADIR}/clang" COMPONENT clang-doc) + +add_custom_target(copy-clang-doc-assets ilovepi wrote: OK, I’ll take a pass at

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-06-13 Thread via cfe-commits
https://github.com/T-Gruber created https://github.com/llvm/llvm-project/pull/95409 Run PreStmt and PostStmt checker for GCCAsmStmt. Unittest to validate that corresponding callback functions are triggered. >From 8fb59a5ab510cbe9d2f6322cb1c6252c8e0b7343 Mon Sep 17 00:00:00 2001 From: T-Gruber

[clang] [clang][ARM] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-06-13 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc updated https://github.com/llvm/llvm-project/pull/91870 >From ef212138f895fb95df54798109375402c270c5da Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Sat, 11 May 2024 00:15:50 -0700 Subject: [PATCH] [clang][ARM] Fix warning for VFP function calls from interrupts

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus created https://github.com/llvm/llvm-project/pull/95408 I intend to fix this checker up so that we can move it out of alpha. I made a bunch of analyses, and found many similar false positives: ```c++ int t[] = {1,2,3}; memcpy(dst, t, sizeof(t) / sizeof(t[0])); // w

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Kristóf Umann (Szelethus) Changes I intend to fix this checker up so that we can move it out of alpha. I made a bunch of analyses, and found many similar false positives: ```c++ int t[] = {1,2,3}; memcpy(dst, t, sizeof(t

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -434,6 +447,12 @@ class SMTSolver { virtual bool isFPSupported() = 0; virtual void print(raw_ostream &OS) const = 0; + + /// Sets the requested option. + virtual void setBoolParam(StringRef Key, bool Value) = 0; + virtual void setUnsignedParam(StringRef Key, unsigned

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-13 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. It looks now OK at least to my knowledge. https://github.com/llvm/llvm-project/pull/93408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-fir-hlfir @llvm/pr-subscribers-flang-driver Author: David Truby (DavidTruby) Changes This patch implements the -mcmodel flag from clang, allowing the Code Model to be changed for the LLVM module. The same set of mcmodel flags are accepted as in cla

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-13 Thread Balázs Kéri via cfe-commits
balazske wrote: It should be possible in `StreamChecker` to perform the invalidations even if the `StreamState` is not found (stream was not opened). Another possible solution is that a generic invalidation support is added to `StdLibraryFunctionsChecker` that can be used for stream related an

[clang] [llvm] [ConstantFold] Drop gep of gep fold entirely (PR #95126)

2024-06-13 Thread via cfe-commits
agozillon wrote: Just landed the PR, so it should be good to land this PR now without causing issues with the flang+openmp+offload buildbot, however, if any other issues do arise, I am happy to look into them! But from testing this PR in conjunction with the one I just landed locally, it does

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

2024-06-13 Thread Pierre d'Herbemont via cfe-commits
pdherbemont wrote: So I found the cause of the regression: We used to parse the argument in an `Unevaluated` context in C++ mode. We now parse them in a `PotentiallyEvaluated` context. Switching to `Unevaluated` makes the C parsing code fail. A simple fix is to switch the context based on the

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

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

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

2024-06-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (T-Gruber) Changes Run PreStmt and PostStmt checker for GCCAsmStmt. Unittest to validate that corresponding callback functions are triggered. --- Patch is 89.28 KiB, truncated to 20.00 KiB

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [lld] [lldb] [llvm] [mlir] [openmp] [llvm-project] Fix typo "seperate" (PR #95373)

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

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-13 Thread Balazs Benics via cfe-commits
steakhal wrote: Thanks for the review! > LGTM. I didn't deeply analyze all the small details of the commit, but it is > clearly NFC (builds better infrastructure for follow-up commits), the > implementation is clear and elegant (slightly better quality than what I can > write) and the tests d

[clang] [clang] Clean up macOS version flags (PR #95374)

2024-06-13 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

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

[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)

2024-06-13 Thread David Truby via cfe-commits
https://github.com/DavidTruby created https://github.com/llvm/llvm-project/pull/95411 This patch implements the -mcmodel flag from clang, allowing the Code Model to be changed for the LLVM module. The same set of mcmodel flags are accepted as in clang and the same Code Model attributes are added

[clang] [clang] Clean up macOS version flags (PR #95374)

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

[clang] [llvm] [APFloat] Add APFloat support for FP4 data type (PR #95392)

2024-06-13 Thread Thomas Raoux via cfe-commits
https://github.com/ThomasRaoux approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/95392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-13 Thread Balazs Benics via cfe-commits
steakhal wrote: You can continue the review with #95129 - which is stacked on top of this one. https://github.com/llvm/llvm-project/pull/95128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] 69bc159 - [analyzer] Refine invalidation caused by `fread` (#93408)

2024-06-13 Thread via cfe-commits
Author: Balazs Benics Date: 2024-06-13T16:13:22+02:00 New Revision: 69bc159142c6e4ed168e32a6168392d396f891de URL: https://github.com/llvm/llvm-project/commit/69bc159142c6e4ed168e32a6168392d396f891de DIFF: https://github.com/llvm/llvm-project/commit/69bc159142c6e4ed168e32a6168392d396f891de.diff

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-13 Thread Balazs Benics via cfe-commits
steakhal wrote: Thanks for the green light! > Another possible solution is that a generic invalidation support is added to > `StdLibraryFunctionsChecker` that can be used for stream related and other > functions. Yes, that would be so nice. However, it's out of scope for me this time. https:

[clang] [flang] [mlir] [flang] Add basic -mtune support (PR #95043)

2024-06-13 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Thanks for the changes. LGTM, but wait for @banach-space to approve. https://github.com/llvm/llvm-project/pull/95043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] [APFloat] Add APFloat support for FP4 data type (PR #95392)

2024-06-13 Thread Thomas Raoux via cfe-commits
@@ -6907,6 +7028,42 @@ TEST(APFloatTest, ConvertE2M3FToE3M2F) { EXPECT_EQ(status, APFloat::opInexact); } +TEST(APFloatTest, ConvertDoubleToE2M1F) { + bool losesInfo; ThomasRaoux wrote: why is losesInfo not initialized in this case? https://github.com/llvm

[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)

2024-06-13 Thread Andrzej Warzyński via cfe-commits
@@ -2823,3 +2823,84 @@ void tools::addOffloadCompressArgs(const llvm::opt::ArgList &TCArgs, CmdArgs.push_back( TCArgs.MakeArgString(Twine("-compression-level=") + Arg->getValue())); } + +void tools::addMCModel(const Driver &D, const llvm::opt::ArgList &Args, --

[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)

2024-06-13 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/95411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)

2024-06-13 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. The high-level stuff makes sense to me, thanks! I'm not familiar with `-mcmodel`, so can't tell for sure whether the tests are correct 😅 Ideally one more person would take a look - @tblah or @pawosm-arm ? https://github.com/llvm/llvm

[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)

2024-06-13 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,16 @@ +! RUN: %flang_fc1 -triple aarch64 -emit-llvm -mcmodel=tiny %s -o - | FileCheck %s -check-prefix=CHECK-TINY banach-space wrote: [nit] IMHO, using `CHECK` for prefixes in a test with multiple prefixes is just noise. Why not drop `CHECK`? https:

[clang] cc2dc09 - Reapply [ConstantFold] Drop gep of gep fold entirely (#95126)

2024-06-13 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2024-06-13T17:03:35+02:00 New Revision: cc2dc0916ad6a00ebc9373a58854d77cf73af122 URL: https://github.com/llvm/llvm-project/commit/cc2dc0916ad6a00ebc9373a58854d77cf73af122 DIFF: https://github.com/llvm/llvm-project/commit/cc2dc0916ad6a00ebc9373a58854d77cf73af122.diff

[clang] a988373 - [clang] Fix include for 7ead2d8c7e

2024-06-13 Thread Dmitry Chernenkov via cfe-commits
Author: Dmitry Chernenkov Date: 2024-06-13T14:26:23Z New Revision: a9883739571f0adbe33219a74a934be7f8bd4f62 URL: https://github.com/llvm/llvm-project/commit/a9883739571f0adbe33219a74a934be7f8bd4f62 DIFF: https://github.com/llvm/llvm-project/commit/a9883739571f0adbe33219a74a934be7f8bd4f62.diff

[clang] [llvm] Fix silent truncation of inline ASM `srcloc` cookie when going through a `DiagnosticInfoSrcMgr` (PR #84559)

2024-06-13 Thread via cfe-commits
beetrees wrote: @statham-arm I've widened the `LocCookie` in `DiagnosticInfoDontCall` as requested. I also noticed the inline ASM example in the LangRef still used an `i32` `srcloc`: while that still works fine, I updated the example to use an `i64` so that readers would be aware of the increa

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-06-13 Thread via cfe-commits
@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase { /// \returns true if an error occurred, false otherwise. bool CheckTemplateArgumentList( TemplateDecl *Template, SourceLocation TemplateLoc, - TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateA

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

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

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-06-13 Thread Julian Brown via cfe-commits
https://github.com/jtb20 updated https://github.com/llvm/llvm-project/pull/92731 >From c06ce375baf4a73818a225ec806fe143bee730fa Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Wed, 1 May 2024 06:35:59 -0500 Subject: [PATCH] [OpenMP] OpenMP 5.1 "assume" directive parsing support This is a mini

[clang] [llvm] [analyzer][NFC] Reorganize Z3 report refutation (PR #95128)

2024-06-13 Thread Donát Nagy via cfe-commits
@@ -434,6 +447,12 @@ class SMTSolver { virtual bool isFPSupported() = 0; virtual void print(raw_ostream &OS) const = 0; + + /// Sets the requested option. + virtual void setBoolParam(StringRef Key, bool Value) = 0; + virtual void setUnsignedParam(StringRef Key, unsigned

[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

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

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -171,6 +174,17 @@ class MemRegion : public llvm::FoldingSetNode { Kind getKind() const { return kind; } + StringRef getKindStr() const { +switch (getKind()) { +#define REGION(Id, Parent) \ + case Id##Kind:

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -171,6 +174,17 @@ class MemRegion : public llvm::FoldingSetNode { Kind getKind() const { return kind; } + StringRef getKindStr() const { +switch (getKind()) { +#define REGION(Id, Parent) \ + case Id##Kind:

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Balazs Benics via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SValBuilder = St

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/95408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >