[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-07-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D155627#4513433 , @cor3ntin wrote: > Note that you are probably need something like `SourceLocExprScopeGuard` to > make source_location actually work, , it might be worth doing in this patch. > The idea is to remember the loca

[clang] c3dd2f3 - [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Tomasz Kamiński via cfe-commits
Author: tomasz-kaminski-sonarsource Date: 2023-07-19T09:01:41+02:00 New Revision: c3dd2f35b876f9af39c01de49941a3920fd59a33 URL: https://github.com/llvm/llvm-project/commit/c3dd2f35b876f9af39c01de49941a3920fd59a33 DIFF: https://github.com/llvm/llvm-project/commit/c3dd2f35b876f9af39c01de49941a392

[PATCH] D155547: [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Tomasz Kamiński via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc3dd2f35b876: [analyzer] Model lifetime of a variable declared in for condition in CFG… (authored by tomasz-kaminski-sonarsource). Repository: rG

[PATCH] D154368: [Clang] Fix constraint checking of non-generic lambdas.

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 541858. cor3ntin marked 3 inline comments as done. cor3ntin added a comment. Address Aaron's feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154368/new/ https://reviews.llvm.org/D154368 Files: clang/

[PATCH] D154696: [Clang] Diagnose jumps into statement expressions

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. FYI, this can be relanded after https://reviews.llvm.org/D155342 is merged Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154696/new/ https://reviews.llvm.org/D154696 ___ cfe-com

[PATCH] D155674: [RISCV] Update zihintntl to 1p0

2023-07-19 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:149 // RUN: %clang -target riscv32-unknown-linux-gnu -menable-experimental-extensions \ -// RUN: -march=rv32izihintntl0p2 -x c -E -dM %s \ +// RUN: -march=rv32izihintntl1p0 -x c -E -dM

[PATCH] D125765: [RISCV] Add type aliases float16_t, float32_t and float64_t

2023-07-19 Thread Wang Pengcheng via Phabricator via cfe-commits
wangpc planned changes to this revision. wangpc added a comment. I don't have any thoughts on this patch now. In D125765#4511637 , @eopXD wrote: > Sorry for the late reply, I missed this in may mails. > > I see that the motivation start from where you sp

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-19 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt marked an inline comment as done. RIscRIpt added a comment. Thank you for your quick response. > Given that the intended use case is for usage behind the scenes in the > standard library... > I'd strongly prefer not to have a documented, user-visible attribute that > gives permissio

[PATCH] D155614: [clangd] Make an include always refer to itself. Background: clang-review expects all referents to have definition, declaration or reference(s).

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:1365 // Add the #include line to the references list. ReferencesResult::Reference Result; Result.Loc.range = i guess this patch is not needed anymore, but one comment about th

[PATCH] D151547: [RISCV] Remove experimental for zihintntl.

2023-07-19 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan added a comment. Herald added a subscriber: wangpc. ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151547/new/ https://reviews.llvm.org/D151547 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-07-19 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. Regarding the clang CI failure, libcxx's `__libcpp_is_constant_evaluated` always returns false under C++03 or earlier, where constexpr isn't available. (Code: https://github.com/llvm/llvm-project/blob/036a1b2202cb71aacfa72ef15145a88dc50a02cf/libcxx/include/__type_trait

[PATCH] D154509: [clang][analyzer] StdLibraryFunctionsChecker: Allow NULL buffer in `fread` and `fwrite` if size is zero.

2023-07-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:413-414 +using ValueConstraint::ValueConstraint; +ArgNo SizeArg1N; +std::optional SizeArg2N; +// This variable

[PATCH] D155547: [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added inline comments. Comment at: clang/test/Analysis/lifetime-cfg-output.cpp:1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-lifetime=true,cfg-temporary-dtors=false,cfg-rich-construc

[clang-tools-extra] c4fa97f - [clangd] Remove unused private field 'Opts' in UpdateIndexCallbacks (NFC)

2023-07-19 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2023-07-19T15:28:38+08:00 New Revision: c4fa97fca7e92c736fcb09779c84b42c25ffae70 URL: https://github.com/llvm/llvm-project/commit/c4fa97fca7e92c736fcb09779c84b42c25ffae70 DIFF: https://github.com/llvm/llvm-project/commit/c4fa97fca7e92c736fcb09779c84b42c25ffae70.diff LOG: [

[PATCH] D155674: [RISCV] Update zihintntl to 1p0

2023-07-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Looks like we have two patches for this now. D151547 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155674/new/ https://reviews.llvm.org/D155674 _

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-19 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta updated this revision to Diff 541866. xgupta added a comment. Add test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155457/new/ https://reviews.llvm.org/D155457 Files: clang/lib/Sema/SemaChecking.cpp clang/test/Sema/type-limit-com

[PATCH] D155547: [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/Analysis/lifetime-cfg-output.cpp:1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-lifetime=true,cfg-temporary-dtors=false,cfg-rich-constructors=false -analyz

[clang] 0d6ea6f - [NFC] [C++20] [Modules] Add a performance tip to the document

2023-07-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-07-19T15:49:56+08:00 New Revision: 0d6ea6fc3b137b92809be740544e2715a7b0ba65 URL: https://github.com/llvm/llvm-project/commit/0d6ea6fc3b137b92809be740544e2715a7b0ba65 DIFF: https://github.com/llvm/llvm-project/commit/0d6ea6fc3b137b92809be740544e2715a7b0ba65.diff LO

[PATCH] D142660: [AIX] supporting -X options for llvm-ranlib in AIX OS

2023-07-19 Thread James Henderson via Phabricator via cfe-commits
jhenderson added inline comments. Comment at: llvm/test/tools/llvm-ranlib/aix-X-option.test:3 +## Test the -X option. +## The option specifies the type of object file on which llvm-ranlib will operate. + Nit: trailing whitespace Comment at: l

[clang] e271049 - [clang][analyzer] StdLibraryFunctionsChecker: Allow NULL buffer in `fread` and `fwrite` if size is zero.

2023-07-19 Thread Balázs Kéri via cfe-commits
Author: Balázs Kéri Date: 2023-07-19T09:58:14+02:00 New Revision: e271049bc6a1408aa4e53771321117b3da6440ab URL: https://github.com/llvm/llvm-project/commit/e271049bc6a1408aa4e53771321117b3da6440ab DIFF: https://github.com/llvm/llvm-project/commit/e271049bc6a1408aa4e53771321117b3da6440ab.diff L

[PATCH] D154509: [clang][analyzer] StdLibraryFunctionsChecker: Allow NULL buffer in `fread` and `fwrite` if size is zero.

2023-07-19 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. balazske marked an inline comment as done. Closed by commit rGe271049bc6a1: [clang][analyzer] StdLibraryFunctionsChecker: Allow NULL buffer in `fread` and… (authored by

[PATCH] D155445: [analyzer][docs] Add CSA release notes

2023-07-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/docs/ReleaseNotes.rst:964 +- ``StdCLibraryFunctionArgs`` was merged into the ``StdCLibraryFunctions``. + The diagnostics of the ``StdCLibraryFunctions`` was improved. + (`4f0436dd1532

[PATCH] D154324: [C++20] [Modules] [ODRHash] Use CanonicalType for base classes

2023-07-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I filed an issue for the new issue: https://github.com/llvm/llvm-project/issues/63947 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154324/new/ https://reviews.llvm.org/D154324 __

[PATCH] D151547: [RISCV] Remove experimental for zihintntl.

2023-07-19 Thread Piyou Chen via Phabricator via cfe-commits
BeMg added inline comments. Comment at: llvm/docs/RISCVUsage.rst:214 +``zihintntl`` LLVM implements the `0.2 draft specification `__. zihintntl could add into `table:: Ratified E

[clang] 5e601ad - [NFC] Add a blank line after directives in StandardCPlusPlusModules.rst

2023-07-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-07-19T16:10:55+08:00 New Revision: 5e601ad3bcb9fbeb1336dc728ac0eed196bce698 URL: https://github.com/llvm/llvm-project/commit/5e601ad3bcb9fbeb1336dc728ac0eed196bce698 DIFF: https://github.com/llvm/llvm-project/commit/5e601ad3bcb9fbeb1336dc728ac0eed196bce698.diff LO

[PATCH] D151547: [RISCV] Remove experimental for zihintntl.

2023-07-19 Thread Piyou Chen via Phabricator via cfe-commits
BeMg added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:151 // RUN: -o - | FileCheck --check-prefix=CHECK-ZIHINTNTL-EXT %s // CHECK-ZIHINTNTL-EXT: __riscv_zihintntl 2000{{$}} The CHECK-ZIHINTNTL-EXT also need update. Reposito

[PATCH] D155614: [clangd] Remove redundant emptiness check in cross ref calculation for includes.

2023-07-19 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 541882. VitaNuo marked 2 inline comments as done. VitaNuo added a comment. Remove only one of the checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155614/new/ https://reviews.llvm.org/D155614 Files: cla

[PATCH] D155614: [clangd] Remove redundant emptiness check in cross ref calculation for includes.

2023-07-19 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo accepted this revision. VitaNuo added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/XRefs.cpp:1361-1362 }); - if (Results.References.empty()) -return std::nullopt; - usaxena95 wrote: > S

[clang-tools-extra] 22605f5 - [clangd] Make an include always refer to itself. Background: clang-review expects all referents to have definition, declaration or reference(s).

2023-07-19 Thread Viktoriia Bakalova via cfe-commits
Author: Viktoriia Bakalova Date: 2023-07-19T08:32:53Z New Revision: 22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd URL: https://github.com/llvm/llvm-project/commit/22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd DIFF: https://github.com/llvm/llvm-project/commit/22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd.diff

[PATCH] D155614: [clangd] Remove redundant emptiness check in cross ref calculation for includes.

2023-07-19 Thread Viktoriia Bakalova via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG22605f5f1bf8: [clangd] Make an include always refer to itself. Background: clang-review… (authored by VitaNuo). Repository: rG LLVM Github Monorep

[PATCH] D155457: [clang] Skip tautological comparison if the comparison involves the 'size_t' type

2023-07-19 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta added a comment. In D155457#4511652 , @aaron.ballman wrote: > In the x86 compilation: `sizeof(std::size_t) < sizeof(uint64_t)` is true, so > we test the other expression; because `Size` is greater than `__SIZE_MAX__` > the function returns false

[clang] c1873d8 - [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal driver For Arm.

2023-07-19 Thread Simi Pallipurath via cfe-commits
Author: Simi Pallipurath Date: 2023-07-19T09:37:40+01:00 New Revision: c1873d84a3316fa03326e9157e799b81f63d7a10 URL: https://github.com/llvm/llvm-project/commit/c1873d84a3316fa03326e9157e799b81f63d7a10 DIFF: https://github.com/llvm/llvm-project/commit/c1873d84a3316fa03326e9157e799b81f63d7a10.di

[PATCH] D154786: [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal driver For Arm.

2023-07-19 Thread Simi Pallipurath via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc1873d84a331: [Clang][Driver] Pass through the --be8 endian flag to linker in BareMetal… (authored by simpal01). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[clang-tools-extra] 92c0546 - Revert "[clangd] Always run preamble indexing on a separate thread"

2023-07-19 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2023-07-19T10:38:23+02:00 New Revision: 92c0546941190973e9201a08fa10edf27cb6992d URL: https://github.com/llvm/llvm-project/commit/92c0546941190973e9201a08fa10edf27cb6992d DIFF: https://github.com/llvm/llvm-project/commit/92c0546941190973e9201a08fa10edf27cb6992d.dif

[PATCH] D154755: [clang-format] Fix formatting of if statements with BlockIndent

2023-07-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. It looks like this was added in D109557: Adds a BlockIndent option to AlignAfterOpenBracket I'm trying to understand what bad stuff happens if you remove the "if" from `return !(Previous && Previous->is(tok::kw_for));` Reposit

[clang-tools-extra] d06af7a - Revert "[clangd] Remove unused private field 'Opts' in UpdateIndexCallbacks (NFC)"

2023-07-19 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2023-07-19T10:45:23+02:00 New Revision: d06af7a44eb3d72036c7c5e05e39d43609311dc5 URL: https://github.com/llvm/llvm-project/commit/d06af7a44eb3d72036c7c5e05e39d43609311dc5 DIFF: https://github.com/llvm/llvm-project/commit/d06af7a44eb3d72036c7c5e05e39d43609311dc5.dif

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:2441 bool Sema::CheckImmediateEscalatingFunctionDefinition( -FunctionDecl *FD, bool HasImmediateEscalatingExpression) { - if (!FD->hasBody() || !getLangOpts().CPlusPlus20 || - !FD->isImmediateE

[PATCH] D143617: [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options

2023-07-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/utils/perf-training/bolt.lit.cfg:12 +if config.clang_bolt_mode.lower() == "instrument": +clang_binary = "clang-bolt.inst" +else: # perf or LBR This name would ideally be passed through the generated `lit.site.c

[clang] 7db501a - [NFC] Adjust test for pr63595

2023-07-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-07-19T16:51:37+08:00 New Revision: 7db501a7385e62b342b393cba763205753b3cb89 URL: https://github.com/llvm/llvm-project/commit/7db501a7385e62b342b393cba763205753b3cb89 DIFF: https://github.com/llvm/llvm-project/commit/7db501a7385e62b342b393cba763205753b3cb89.diff LO

[PATCH] D154755: [clang-format] Fix formatting of if statements with BlockIndent

2023-07-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added inline comments. This revision now requires changes to proceed. Comment at: clang/unittests/Format/FormatTest.cpp:25504 + +#if 0 verifyFormat("if (quitelongarg !=\n" we don't do this. ==

[PATCH] D155273: [clang-format] Add TypeNames option to disambiguate types/objects

2023-07-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I used isSimpleTypeSpecifier() in the east/west const fixer, I think this could probably help there to catch more places too.. (you don't need to do that here) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155273/new

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 7 inline comments as done. cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:2441 bool Sema::CheckImmediateEscalatingFunctionDefinition( -FunctionDecl *FD, bool HasImmediateEscalatingExpression) { - if (!FD->hasBody() || !getLangOpts

[PATCH] D155610: [Clang][ExprConstant] Print integer instead of character on static assertion failure

2023-07-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. I think the discussion is getting derailed a bit. The original reason I was talking to Takuya about this is this: https://godbolt.org/z/GjsYrexT3 static_assert('a' == 100); For code like this, we print the it as `''a' == 100'`, but the AST contains a cast from the LH

[PATCH] D151547: [RISCV] Remove experimental for zihintntl.

2023-07-19 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan updated this revision to Diff 541904. jacquesguan added a comment. Address comment and rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151547/new/ https://reviews.llvm.org/D151547 Files: clang/include/clang/Basic/BuiltinsRISCV.

[PATCH] D151547: [RISCV] Remove experimental for zihintntl.

2023-07-19 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan marked 2 inline comments as done. jacquesguan added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:151 // RUN: -o - | FileCheck --check-prefix=CHECK-ZIHINTNTL-EXT %s // CHECK-ZIHINTNTL-EXT: __riscv_zihintntl 2000{{$}}

[clang] 061e855 - [clang][Docs] Added release note for D142609

2023-07-19 Thread Shivam Gupta via cfe-commits
Author: Shivam Gupta Date: 2023-07-19T15:00:24+05:30 New Revision: 061e855767dbe0821d81a8d47158f468dd00ae5f URL: https://github.com/llvm/llvm-project/commit/061e855767dbe0821d81a8d47158f468dd00ae5f DIFF: https://github.com/llvm/llvm-project/commit/061e855767dbe0821d81a8d47158f468dd00ae5f.diff

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:18441 SemaRef.Diag(ND->getLocation(), diag::note_declared_at); + if (auto Context = + SemaRef.InnermostDeclarationWithDelayedImmediateInvocations()) { cor3ntin wrote

[PATCH] D152003: [clang] Fix `static_cast` to array of unknown bound

2023-07-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 541915. Fznamznon added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152003/new/ https://reviews.llvm.org/D152003 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaType.cpp clang

[PATCH] D155610: [Clang][ExprConstant] Print integer instead of character on static assertion failure

2023-07-19 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D155610#4511547 , @tbaeder wrote: > What if you switch from `IgnoreParenImpCasts` at the top of > `DiagnoseStaticAssertDetails()` to just `IgnoreParens()`? That improve cases > where we simply compare a character literal to

[PATCH] D155452: [Flang] Add support for fsave-optimization-record

2023-07-19 Thread victorkingi via Phabricator via cfe-commits
victorkingi updated this revision to Diff 541930. victorkingi marked an inline comment as done. victorkingi added a comment. Fixed failing test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155452/new/ https://reviews.llvm.org/D155452 Files: cla

[PATCH] D155619: [clangd] Always run preamble indexing on a separate thread

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 541938. kadircet added a comment. Fix some tsan issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155619/new/ https://reviews.llvm.org/D155619 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-too

[PATCH] D155692: [clang][OpenMP] Add interop support for multiple depend clauses

2023-07-19 Thread Michael Halkenhäuser via Phabricator via cfe-commits
mhalk created this revision. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. mhalk requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, jplehr, sstefan1. Herald added a project: clang. This patch removes t

[PATCH] D155692: [clang][OpenMP] Add interop support for multiple depend clauses

2023-07-19 Thread Michael Halkenhäuser via Phabricator via cfe-commits
mhalk updated this revision to Diff 541942. mhalk added a comment. Fix accidental remove of `assert(...)`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155692/new/ https://reviews.llvm.org/D155692 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp cla

[PATCH] D155692: [clang][OpenMP] Add interop support for multiple depend clauses

2023-07-19 Thread Michael Halkenhäuser via Phabricator via cfe-commits
mhalk added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6986 +DependenceAddress = DependenciesArray.getPointer(); +CodeGenFunction::RunCleanupsScope LocalScope(*this); } Not sure if this is useful here. Saw this `RunCleanupsScope` i

[PATCH] D78038: [clangd] WIP: fix several bugs relating to include insertion

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, i think this LG. Comment at: clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp:1697-1698 + )cpp"); + TU.HeaderFilename = "Foo.h"; + auto Symbols = T

[PATCH] D155651: [SystemZ][z/OS] Add OpenFlags to CreateMissingDirectories path when creating temp files

2023-07-19 Thread Abhina Sree via Phabricator via cfe-commits
abhina.sreeskantharajan accepted this revision. abhina.sreeskantharajan added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155651/new/ https://reviews.llvm.org/D155651 _

[PATCH] D138263: [clang-format] Supress aligning of trailing namespace comments

2023-07-19 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 541959. HazardyKnusperkeks marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138263/new/ https://reviews.llvm.org/D138263 Files: clang/lib/Format/FormatToken.h clang/lib/Format/UnwrappedLineParser.cpp cl

[PATCH] D155694: [NFC][analyzer] Enable implicit destructor for cfg-lifetime tests

2023-07-19 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource created this revision. Herald added subscribers: manas, steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: All. tomasz-kaminski-sonarsource requested review of this revision.

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 541961. carlosgalvezp marked 3 inline comments as done. carlosgalvezp added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155625/new/ https://reviews.llvm.org/D155625 F

[PATCH] D155694: [NFC][analyzer] Enable implicit destructor for cfg-lifetime tests

2023-07-19 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added a comment. Updating this tests illustrated that we are missing a lot of coverage for the objects with trivial destructors, but I think this should be addressed as a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D151547: [RISCV] Remove experimental for zihintntl.

2023-07-19 Thread Piyou Chen via Phabricator via cfe-commits
BeMg added inline comments. Comment at: llvm/unittests/Support/RISCVISAInfoTest.cpp:376 EXPECT_EQ(Exts.count("zihintntl"), 1U); - auto MaybeISAInfo2 = RISCVISAInfo::parseArchString("rv64izihintntl0p2", true); + auto MaybeISAInfo2 = RISCVISAInfo::parseArchString("rv64izihint

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Using `hasSimpleCopyConstructor` and so on greatly simplifies the logic, great! Let me know if you are happy with it or I should go ahead and merge. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.cpp:9

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 541963. carlosgalvezp added a comment. Merge matchers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155625/new/ https://reviews.llvm.org/D155625 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.cpp:91-102 + Finder->addMatcher( + fieldDecl(unless(isMemberOfLambda()), +hasDeclContext(cxxRecordDecl(isCopyableOrMovable())), +

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. Looks fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155625/new/ https://reviews.llvm.org/D155625 ___ cfe-commits mailing list cfe-commits@

[clang-tools-extra] b70e6e9 - [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2023-07-19T12:05:15Z New Revision: b70e6e9681925ad06d9899462b9e43250be53f64 URL: https://github.com/llvm/llvm-project/commit/b70e6e9681925ad06d9899462b9e43250be53f64 DIFF: https://github.com/llvm/llvm-project/commit/b70e6e9681925ad06d9899462b9e43250be53f64.diff LOG:

[PATCH] D155625: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid-const-or-ref-members

2023-07-19 Thread Carlos Galvez via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb70e6e968192: [clang-tidy] Warn only for copyable/movable classes in cppcoreguidelines-avoid… (authored by carlosgalvezp). Repository: rG LLVM Git

[PATCH] D155692: [clang][OpenMP] Add interop support for multiple depend clauses

2023-07-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6986 +DependenceAddress = DependenciesArray.getPointer(); +CodeGenFunction::RunCleanupsScope LocalScope(*this); } mhalk wrote: > Not sure if this is useful here. > Saw this `

[PATCH] D155668: [RISCV] Upgrade Zvfh version to 1.0 and move out of experimental state.

2023-07-19 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. This revision is now accepted and ready to land. Should add a release note as well, but otherwise LGTM. My understanding is that all of the intrinsics this exposes have the same level of stability / finalisation as the other vector intrinsics, but

[PATCH] D151547: [RISCV] Remove experimental for zihintntl.

2023-07-19 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. I remain concerned about exposing the intrinsics if they're not yet agreed as finalised. I see there is now a PR to add them to riscv-c-api doc https://github.com/riscv-non-isa/riscv-c-api-doc/pull/47 I'd be OK with merging this now if the intrinsics were temporarily remove

[PATCH] D155446: [clang][dataflow] Eliminate duplication between `AggregateStorageLocation` and `StructValue`.

2023-07-19 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 541980. mboehme added a comment. Various changes in response to review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155446/new/ https://reviews.llvm.org/D155446 Files: clang/include/clang/Analysis/

[PATCH] D155446: [clang][dataflow] Eliminate duplication between `AggregateStorageLocation` and `StructValue`.

2023-07-19 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 16 inline comments as done. mboehme added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:337-338 + /// Returns the location of the result object that a prvalue `E` of record + /// type initializes. + ///

[PATCH] D155692: [clang][OpenMP] Add interop support for multiple depend clauses

2023-07-19 Thread Michael Halkenhäuser via Phabricator via cfe-commits
mhalk added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6986 +DependenceAddress = DependenciesArray.getPointer(); +CodeGenFunction::RunCleanupsScope LocalScope(*this); } ABataev wrote: > mhalk wrote: > > Not sure if this is useful h

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 541983. cor3ntin added a comment. Address Mariya & Aaron's feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155175/new/ https://reviews.llvm.org/D155175 Files: clang/include/clang/AST/RecursiveASTVisi

[PATCH] D155290: [PGO] Use Unique Profile Files when New Processes are Forked

2023-07-19 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 added a comment. Ping for review. Thanks!! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155290/new/ https://reviews.llvm.org/D155290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D155392: [clangd] add a config knob to disable modules

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/unittests/ModulesTests.cpp:34 +protected: + ModulesTest() : WithCfg(Config::Key, makeModuleConfig(GetParam())) {} +}; testing behaviour indirectly through config options cause some troubles in

[PATCH] D155547: [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/test/Analysis/lifetime-cfg-output.cpp:1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-lifetime=true,cfg-temporary-dtors=false,cfg-rich-constructors=false -analy

[PATCH] D142609: [Clang] Fix -Wconstant-logical-operand when LHS is a constant

2023-07-19 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. For the record, I have sent https://lore.kernel.org/20230718-nsecs_to_jiffies_timeout-constant-logical-operand-v1-0-36ed8fc8f...@kernel.org/ to address those warnings for the kernel. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D155385: [clangd] enable unused-include warnings for standard library headers

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:75-77 +if (tooling::stdlib::Header::named(Inc.Written)) return true; return false; ---

[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-07-19 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision as: libc++. ldionne added a comment. LGTM for libc++. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155064/new/ https://reviews.llvm.org/D155064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D152900: [clangd] Update symbol collector to use include-cleaner.

2023-07-19 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 542000. VitaNuo marked 9 inline comments as done. VitaNuo added a comment. Address the latest comment batch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152900/new/ https://reviews.llvm.org/D152900 Files:

[clang-tools-extra] 1f7c7d4 - [clangd] Update symbol collector to use include-cleaner.

2023-07-19 Thread Viktoriia Bakalova via cfe-commits
Author: Viktoriia Bakalova Date: 2023-07-19T13:47:02Z New Revision: 1f7c7d4bdd7b847d82b19bcd097029fabb449b90 URL: https://github.com/llvm/llvm-project/commit/1f7c7d4bdd7b847d82b19bcd097029fabb449b90 DIFF: https://github.com/llvm/llvm-project/commit/1f7c7d4bdd7b847d82b19bcd097029fabb449b90.diff

[PATCH] D152900: [clangd] Update symbol collector to use include-cleaner.

2023-07-19 Thread Viktoriia Bakalova via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1f7c7d4bdd7b: [clangd] Update symbol collector to use include-cleaner. (authored by VitaNuo). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D142967: [clangd] Introduce source.organizeImports code action.

2023-07-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet resigned from this revision. kadircet added a comment. Herald added a subscriber: kadircet. resigning in favor of https://reviews.llvm.org/D153769 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142967/new/ https://reviews.llvm.org/D142967

[PATCH] D155396: [Sema][ObjC] Propagating value-dependent errors into BlockExpr

2023-07-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Comment at: clang/lib/Sema/SemaExpr.cpp:16749-16753 + bool ContainsError = llvm::any_of(BSI->Returns, [](const ReturnStmt *Return) { +const auto *RetValExpr = Return->getRetValue(); +return RetValExpr && RetValExpr->containsErrors(); + }); +

[PATCH] D155547: [analyzer] Model lifetime of a variable declared in for condition in CFG correctly

2023-07-19 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource marked 2 inline comments as done. tomasz-kaminski-sonarsource added inline comments. Comment at: clang/test/Analysis/lifetime-cfg-output.cpp:1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG -analyzer-config

[clang-tools-extra] bd253a6 - [clangd] Fix -Wunused-variable of 'FIDIt' (NFC)

2023-07-19 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2023-07-19T21:59:53+08:00 New Revision: bd253a6a039937fbd0f2ba1f7dd5338a2920e24d URL: https://github.com/llvm/llvm-project/commit/bd253a6a039937fbd0f2ba1f7dd5338a2920e24d DIFF: https://github.com/llvm/llvm-project/commit/bd253a6a039937fbd0f2ba1f7dd5338a2920e24d.diff LOG: [

[PATCH] D155705: [clang] Fix specialization of non-templated member classes of class templates

2023-07-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Explicit specialization doesn't increase depth of template parameters, so need to be careful when gathering template par

[PATCH] D155706: Extend -fkeep-persistent-storage-variables to cover compiler generated artifacts with reasonable mangled names that have persistent storage

2023-07-19 Thread Zheng Qian via Phabricator via cfe-commits
qianzhen created this revision. Herald added a project: All. qianzhen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is a follow-up patch to https://reviews.llvm.org/D150221. It extends -fkeep-persistent-storage-variables to cover co

[PATCH] D155707: [clang][Interp] Handle CXXNoexceptExprs

2023-07-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 5 inline comments as done. cor3ntin added inline comments. Comment at: clang/test/SemaCXX/cxx2b-consteval-propagate.cpp:245-246 +void test() { +[[maybe_unused]] SS s; // expected-error {{call to immediate function 'DefaultedUse::SS::SS' is not a constant expr

[PATCH] D155710: [clang][Interp] Create a new local varible in VisitCXXDefaultArgExpr

2023-07-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If the argument is of composite type, we need a poin

[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-07-19 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:153 + static_assert(__builtin_LINE() == 152, ""); +} tbaeder wrote: > cor3ntin wrote: > > what is missing to enable the existing source location tests with the new > > intter

[PATCH] D154290: [Clang] Implement P2741R3 - user-generated static_assert messages

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 542022. cor3ntin marked 17 inline comments as done. cor3ntin added a comment. - Display a warning, defaulted as error, if the message cannot be evaluated in a static assertion that does not fail - Address Shafik's, Timm's and Aaron's feedbacks Repository:

[clang-tools-extra] 27ade4b - Reland "[clangd] Always run preamble indexing on a separate thread"

2023-07-19 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2023-07-19T16:30:46+02:00 New Revision: 27ade4b554774187d2c0afcf64cd16fa6d5f619d URL: https://github.com/llvm/llvm-project/commit/27ade4b554774187d2c0afcf64cd16fa6d5f619d DIFF: https://github.com/llvm/llvm-project/commit/27ade4b554774187d2c0afcf64cd16fa6d5f619d.dif

[PATCH] D155175: [Clang] Fix consteval propagation for aggregates and defaulted constructors

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2730-2734 +DEF_TRAVERSE_STMT(CXXDefaultInitExpr, { + if (getDerived().shouldVisitImplicitCode()) +TRY_TO(TraverseStmt(S->getExpr())); +}) + --

[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. This looks good to me modulo nitpicks. When you land that, please make an issue on github for the missing narrowing warning, it seems important. I'll wait before approving in case @aaron.ballman spot things i missed Comment at: clang/lib/Sema/SemaEx

[PATCH] D155627: [clang][Interp] Handle SourceLocExprs

2023-07-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:153 + static_assert(__builtin_LINE() == 152, ""); +} tbaeder wrote: > tbaeder wrote: > > cor3ntin wrote: > > > what is missing to enable the existing source location tests wi

[PATCH] D154869: [Flang] [FlangRT] Implement FlangRT library as solution to Flang's runtime LLVM integration

2023-07-19 Thread Paul Scoropan via Phabricator via cfe-commits
pscoro added inline comments. Comment at: flang/runtime/CMakeLists.txt:251 - INSTALL_WITH_TOOLCHAIN -) +if (DEFINED LLVM_ENABLE_RUNTIMES AND "flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES) + add_flang_library(FortranRuntime STATIC efriedma wrote: > pscoro wrote: > >

[PATCH] D155692: [clang][OpenMP] Add interop support for multiple depend clauses

2023-07-19 Thread Michael Halkenhäuser via Phabricator via cfe-commits
mhalk updated this revision to Diff 542032. mhalk added a comment. Rebase + removed `RunCleanupsScope` for preparation w.r.t. D137607 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155692/new/ https://reviews.llvm

  1   2   3   >