[PATCH] D155809: [NFC] [Clang] Fix strict weak ordering in ItaniumVTableBuilder

2023-07-20 Thread Danila Kutenin via Phabricator via cfe-commits
danlark updated this revision to Diff 542492. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155809/new/ https://reviews.llvm.org/D155809 Files: clang/lib/AST/VTableBuilder.cpp Index: clang/lib/AST/VTableBuilder.cpp ==

[clang] eaadbcd - [clang][Interp] Implement __builtin_strcmp

2023-07-20 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-20T15:46:04+02:00 New Revision: eaadbcd5e06893f2536e643d5d08b161ecf8c7ec URL: https://github.com/llvm/llvm-project/commit/eaadbcd5e06893f2536e643d5d08b161ecf8c7ec DIFF: https://github.com/llvm/llvm-project/commit/eaadbcd5e06893f2536e643d5d08b161ecf8c7ec.diff LO

[PATCH] D149816: [clang][Interp] Implement __builtin_strcmp

2023-07-20 Thread Timm Bäder 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 rGeaadbcd5e068: [clang][Interp] Implement __builtin_strcmp (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D149816?vs=52123

[clang] 794928b - Update NATVIS visualizers for Clang

2023-07-20 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-07-20T09:53:44-04:00 New Revision: 794928b022e9432b3dd16ada2e71579b6532f15f URL: https://github.com/llvm/llvm-project/commit/794928b022e9432b3dd16ada2e71579b6532f15f DIFF: https://github.com/llvm/llvm-project/commit/794928b022e9432b3dd16ada2e71579b6532f15f.diff

[clang] a1c0e3b - [clang][Interp] Fix compound assign operator evaluation order

2023-07-20 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-20T15:58:01+02:00 New Revision: a1c0e3be6f09be1315c21911b646eb9ddc5048c4 URL: https://github.com/llvm/llvm-project/commit/a1c0e3be6f09be1315c21911b646eb9ddc5048c4 DIFF: https://github.com/llvm/llvm-project/commit/a1c0e3be6f09be1315c21911b646eb9ddc5048c4.diff LO

[PATCH] D149550: [clang][Interp] Fix compound assign operator evaluation order

2023-07-20 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa1c0e3be6f09: [clang][Interp] Fix compound assign operator evaluation order (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149550/new/

[PATCH] D155842: [NFC][clang] Fix static analyzer concerns

2023-07-20 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. HeaderInc

[PATCH] D153769: [clangd] Implement the 'Organize Imports' source action. Fix include-cleaner findings in batch.

2023-07-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. so as we were discussing offline (just to summarize it here) there's also the possibility of propagating context kind in selection, and making this code action fire when code actions are requested for "source code action kind" or the selection intersects with includes.

[PATCH] D144164: [clang][Interp] Handle PtrMemOps

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:213-214 + if (BO->isPtrMemOp()) +return this->visit(RHS); + tbaeder wrote: > aaron.ballman wrote: > > Do we need similar changes for unary operators, pointer arithmet

[clang] 53c936a - [clang][Interp] Add missing static_assert messages

2023-07-20 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-20T16:19:12+02:00 New Revision: 53c936a67c15bc5025ef9f7804399884ca73efa7 URL: https://github.com/llvm/llvm-project/commit/53c936a67c15bc5025ef9f7804399884ca73efa7 DIFF: https://github.com/llvm/llvm-project/commit/53c936a67c15bc5025ef9f7804399884ca73efa7.diff LO

[PATCH] D155716: [clang][CodeGen] Introduce `-frecord-command-line` for MachO

2023-07-20 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz accepted this revision. sgraenitz added a comment. This revision is now accepted and ready to land. Great! This LGTM. Let's keep the review open for a few days and see if there is more feedback. Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1424 +MCSe

[PATCH] D144829: [BPF] Add a few new insns under cpu=v4

2023-07-20 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. I tried adding a test similar to `assemble-disassemble.ll`: // RUN: llvm-mc -triple bpfel --mcpu=v4 --assemble --filetype=obj %s \ // RUN: | llvm-objdump -d --mattr=+alu32 - \ // RUN: | FileCheck %s // CHECK: d7 01 00 00 10 00 00 00 r1 = bswap16 r1 //

[clang] cf70e89 - [clang][Interp] Provide required c++14 warnings

2023-07-20 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-20T16:39:54+02:00 New Revision: cf70e89a8dd34514f1db9165f0e48be1d328b704 URL: https://github.com/llvm/llvm-project/commit/cf70e89a8dd34514f1db9165f0e48be1d328b704 DIFF: https://github.com/llvm/llvm-project/commit/cf70e89a8dd34514f1db9165f0e48be1d328b704.diff LO

[PATCH] D155846: [NFC][clang] Fix static analyzer concerns

2023-07-20 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Preproces

[PATCH] D154093: [clang-format] Break long strings in Verilog

2023-07-20 Thread sstwcw via Phabricator via cfe-commits
sstwcw marked an inline comment as done. sstwcw added a comment. Are there any more problems? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154093/new/ https://reviews.llvm.org/D154093 ___ cfe-commits ma

[PATCH] D144164: [clang][Interp] Handle PtrMemOps

2023-07-20 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:213-214 + if (BO->isPtrMemOp()) +return this->visit(RHS); + aaron.ballman wrote: > tbaeder wrote: > > aaron.ballman wrote: > > > D

[PATCH] D155847: [analyzer] Fix crash in GenericTaintChecker when propagatig taint to AllocaRegion

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

[PATCH] D155847: [analyzer] Fix crash in GenericTaintChecker when propagatig taint to AllocaRegion

2023-07-20 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added a comment. I belive this fix to be the correct approach, as it reduces the number of edge cases to deal with. We are using it on internal fork for over a year know, and haven't found any negative impact. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D155776: [NFC] Add checks for self-assignment.

2023-07-20 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. Hmm, it seems exceptionally unlikely for a move assignment operator to be invoked on an object with itself as the source argument. That would require an explicit use of `std::move()` as in: Value x = ...; x = std::move(x); Rather than protecting against that an

[PATCH] D155849: [NFC][clang] Fix static analyzer concerns

2023-07-20 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. OMPTransf

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-07-20 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: yaxunl, rjmccall, eli.friedman, arsenm, tra, jlebar. AlexVlx added a project: clang. Herald added a subscriber: ormris. Herald added a project: All. AlexVlx requested review of this revision. Herald added subscribers: cfe-commits, wdng. This

[clang] 9265f7c - [Clang] Fix failing test caused by non-portable diag message

2023-07-20 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2023-07-20T17:55:28+02:00 New Revision: 9265f7c40a0aedb79ba1c8c4728d109c47946fbe URL: https://github.com/llvm/llvm-project/commit/9265f7c40a0aedb79ba1c8c4728d109c47946fbe DIFF: https://github.com/llvm/llvm-project/commit/9265f7c40a0aedb79ba1c8c4728d109c47946fbe.diff

[PATCH] D155213: [HIP] Add `-fno-hip-uniform-block`

2023-07-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/Driver/Options.td:1092 ShouldParseIf; +defm hip_uniform_block : BoolFOption<"hip-uniform-block", + LangOpts<"HIPUniformBlock">, DefaultTrue, arsenm wrote: >

[PATCH] D153059: [-Wunsafe-buffer-usage] Group parameter fix-its

2023-07-20 Thread Rashmi Mudduluru via Phabricator via cfe-commits
t-rasmud added a comment. > I'm not sure it makes sense split it up now, probably depends on whether Jan > and Rashmi have the same troubles as me ^.^ I have to admit it is a difficult patch to follow. It also has a lot of clever ideas that deserve attention but might be lost because of the com

[clang] 8ef0448 - Reland "[CUDA][HIP] Use the same default language std as C++""

2023-07-20 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-07-20T12:02:33-04:00 New Revision: 8ef04488d128853715a55683f0181d6398d23c61 URL: https://github.com/llvm/llvm-project/commit/8ef04488d128853715a55683f0181d6398d23c61 DIFF: https://github.com/llvm/llvm-project/commit/8ef04488d128853715a55683f0181d6398d23c61.dif

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

2023-07-20 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. 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(); + }

[clang] 9dc391e - Revert "[IR] Mark add constant expressions as undesirable"

2023-07-20 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2023-07-20T18:09:17+02:00 New Revision: 9dc391e89c7984394e352ea1cbf948b4bbdcd8a8 URL: https://github.com/llvm/llvm-project/commit/9dc391e89c7984394e352ea1cbf948b4bbdcd8a8 DIFF: https://github.com/llvm/llvm-project/commit/9dc391e89c7984394e352ea1cbf948b4bbdcd8a8.diff

[clang] 9dc391e - Revert "[IR] Mark add constant expressions as undesirable"

2023-07-20 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2023-07-20T18:09:17+02:00 New Revision: 9dc391e89c7984394e352ea1cbf948b4bbdcd8a8 URL: https://github.com/llvm/llvm-project/commit/9dc391e89c7984394e352ea1cbf948b4bbdcd8a8 DIFF: https://github.com/llvm/llvm-project/commit/9dc391e89c7984394e352ea1cbf948b4bbdcd8a8.diff

[PATCH] D155847: [analyzer] Fix crash in GenericTaintChecker when propagatig taint to AllocaRegion

2023-07-20 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. Makes sense to me. Please, someone else also have a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155847/new/ https://reviews.llvm.org

[PATCH] D155849: [NFC][clang] Fix static analyzer concerns

2023-07-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155849/new/ https://reviews.llvm.org/D155849 ___

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

2023-07-20 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 542559. danix800 edited the summary of this revision. danix800 added a comment. Invalidate `BlockDecl` with implicit return type, in case any of the return value exprs is invalid. Propagating the error info up by replacing `BlockExpr` with a `RecoveryExpr`.

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Farid Zakaria via Phabricator via cfe-commits
fzakaria created this revision. Herald added a project: All. fzakaria requested review of this revision. Herald added subscribers: cfe-commits, wangpc. Herald added a project: clang. I noticed during the build that GCC would emit a ton of nonnull warnings. Example: /usr/local/google/home/fmza

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith requested changes to this revision. rsmith added a comment. This revision now requires changes to proceed. This branch doesn't look necessary or correct to me. We should never call this function on a lazy pointer in offset mode unless we have an external source that produced the offset, a

[clang-tools-extra] 608fc6d - [clang-tidy][NFC] Fix link in release notes

2023-07-20 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-20T16:31:55Z New Revision: 608fc6d2934b6d0b5aa3719ab3b2aad9cbaba31b URL: https://github.com/llvm/llvm-project/commit/608fc6d2934b6d0b5aa3719ab3b2aad9cbaba31b DIFF: https://github.com/llvm/llvm-project/commit/608fc6d2934b6d0b5aa3719ab3b2aad9cbaba31b.diff LOG: [

[PATCH] D155859: [Headers][doc] Add misc non-AVX2 intrinsic descriptions

2023-07-20 Thread Paul Robinson via Phabricator via cfe-commits
probinson created this revision. probinson added reviewers: pengfei, RKSimon, goldstein.w.n, craig.topper. Herald added a project: All. probinson requested review of this revision. Adds descriptions for adxintrin.h, bmi2intrin.h, clflushoptintrin.h, rdseedintrin.h, and xsavecintrin.h. Revises clze

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

2023-07-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D155694#4514322 , @tomasz-kaminski-sonarsource wrote: > 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] D155849: [NFC][clang] Fix static analyzer concerns

2023-07-20 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision. tahonermann added a comment. Looks good; the default implementations would definitely do the wrong thing, so this is a good find. My suggested edit is just to add a blank line. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1823-1826 + OMPT

[PATCH] D153156: [Clang] CWG1473: do not err on the lack of space after operator""

2023-07-20 Thread PoYao Chang via Phabricator via cfe-commits
rZhBoYao added a comment. Gentle ping :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153156/new/ https://reviews.llvm.org/D153156 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] 4a10069 - Fix a failing assertion when emitting a note diagnostic

2023-07-20 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-07-20T12:49:39-04:00 New Revision: 4a100690461022625dc5d2a21e2e028a926149d9 URL: https://github.com/llvm/llvm-project/commit/4a100690461022625dc5d2a21e2e028a926149d9 DIFF: https://github.com/llvm/llvm-project/commit/4a100690461022625dc5d2a21e2e028a926149d9.diff

[PATCH] D155861: [Headers][doc] Add SHA1/SHA256 intrinsic descriptions

2023-07-20 Thread Paul Robinson via Phabricator via cfe-commits
probinson created this revision. probinson added reviewers: pengfei, RKSimon, goldstein.w.n, craig.topper. Herald added a project: All. probinson requested review of this revision. I didn't include pseudo-code, because it would be long and complicated, probably not tell the whole story, and these

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-07-20 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. @nikic as per my GSoC project I am trying, under the guidance of @nlopes, a load attribute based approach to migrating uninitialized load to poison. The first attribute that I am working on is !freeze which effectively inserts a freeze poison if the load is uninitialize

[PATCH] D153906: [clang] Allow disassembly of multi-module bitcode files

2023-07-20 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. I don't like this doesn't write to the output file by `-o` too. I also think the output should just match `llvm-dis` output, instead of splitting into multiple files. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153906/new/ https://reviews.llvm.org/D153906

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

2023-07-20 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 added a comment. Ping for review. Thanks so much! 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

[clang] 27c1033 - [WIP][-Wunsafe-buffer-usage] Handle lambda expressions within a method.

2023-07-20 Thread Rashmi Mudduluru via cfe-commits
Author: Rashmi Mudduluru Date: 2023-07-20T10:00:16-07:00 New Revision: 27c10337831c94ef59f8790f6ca1c3d1b66b4494 URL: https://github.com/llvm/llvm-project/commit/27c10337831c94ef59f8790f6ca1c3d1b66b4494 DIFF: https://github.com/llvm/llvm-project/commit/27c10337831c94ef59f8790f6ca1c3d1b66b4494.di

[PATCH] D150386: [-Wunsafe-buffer-usage] Handle lambda expressions within a method.

2023-07-20 Thread Rashmi Mudduluru 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 rG27c10337831c: [WIP][-Wunsafe-buffer-usage] Handle lambda expressions within a method. (authored by t-rasmud). Herald added a project: clang. Herald a

[PATCH] D155580: [trivial-auto-var-init] Do not emit initialization code for empty class

2023-07-20 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a subscriber: jakubjelinek. serge-sans-paille added a comment. @jfb ok, makes sense. For the record it does show up in our profile but I have been able to workaround it without touching the compiler. This probably mean that the GCC implementation is having a small hole, @

cfe-commits@lists.llvm.org

2023-07-20 Thread Bing Yu via Phabricator via cfe-commits
yubing created this revision. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. yubing requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, MaskRay. Herald added projects: clang, LLVM. Repository: rG LLVM Github Monorepo https://review

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86 datalayouts

2023-07-20 Thread Trevor Gross via Phabricator via cfe-commits
tmgross added a comment. In D86310#4516911 , @hvdijk wrote: > In D86310#4516876 , @pengfei wrote: > >> Just FYI. There are a few reports about the compatibility issues, e.g., >> #41784

cfe-commits@lists.llvm.org

2023-07-20 Thread Bing Yu via Phabricator via cfe-commits
yubing updated this revision to Diff 542575. yubing added a comment. small fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155863/new/ https://reviews.llvm.org/D155863 Files: clang/include/clang/Basic/LangOptions.def clang/include/clang/Driv

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I agree with the analysis. My understanding is that we don't worsen the code quality for Clang to work around a GCC warning. And generally we care strongly about Clang warnings, but less about GCC warnings, especially in `.cpp` files. However, this is in a header and per

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D151587#4516772 , @efriedma wrote: > This seems to work: > > diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp > index 25d3535e..98b1e4d 100644 > --- a/clang/lib/AST/Expr.cpp > +++ b/clang/lib/AST/Exp

[clang] 8e0715e - Change a test case to be more generic; NFC

2023-07-20 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-07-20T13:29:01-04:00 New Revision: 8e0715e40e43aaadc5a9d3fdd0678e4474fe463b URL: https://github.com/llvm/llvm-project/commit/8e0715e40e43aaadc5a9d3fdd0678e4474fe463b DIFF: https://github.com/llvm/llvm-project/commit/8e0715e40e43aaadc5a9d3fdd0678e4474fe463b.diff

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Indeed, but I wonder why only do this when IsForRef == true (narrator: it's > not)? A MaterializeTemporaryExpr is an lvalue; it only makes sense in lvalue contexts. > Also, why for MaterializeTemporaryExpr manually force the ForRef parameter to > false? The operand

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

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This looks pretty good to me. Can you also add a release note for the fix to `clang/docs/ReleaseNotes.rst`? Comment at: clang/lib/Sema/SemaStmt.cpp:3733-3734 + BlockScopeInfo *CurBlock = dyn_cast(CurCap); + if (CurBlock && CurCap->HasImplicit

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86 datalayouts

2023-07-20 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D86310#4519549 , @tmgross wrote: > Does this happen on the clang side or the LLVM side? Definitely on the clang side, but... > I built rustc against LLVM with your patch ([link to > source](llvm.org/docs/LangRef.html#floating-

[PATCH] D144164: [clang][Interp] Handle PtrMemOps

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:213-214 + if (BO->isPtrMemOp()) +return this->visit(RHS); + tbaeder wrote: > aaron.ballman wrote: > > tbaeder wrote: > > > aaron.ballman wrote: > > > > Do we need sim

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-20 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: rjmccall, efriedma, yaxunl. AlexVlx added a project: clang. Herald added a subscriber: arichardson. Herald added a project: All. AlexVlx requested review of this revision. Herald added a subscriber: cfe-commits. Turns out that in https://rev

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D151587#4519700 , @efriedma wrote: >> It seems like perhaps we want to call EvaluateAsLValue in >> Expr::isConstantInitializer AFTER checking the statement class. Otherwise >> we're basically reimplementing that big s

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 542594. nickdesaulniers added a comment. - reorder the check for IsForRef relative to the switch on statement class - add @efriedma's suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151587/new/

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 542600. nickdesaulniers edited the summary of this revision. nickdesaulniers added a comment. - add more context to the commit description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151587/new/ https

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 542603. nickdesaulniers added a comment. - refactor common tail from IsForRef check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151587/new/ https://reviews.llvm.org/D151587 Files: clang/lib/AST/Exp

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. This seems to be close to a good state. Comment at: clang/lib/AST/Expr.cpp:3444 if (CE->getCastKind() == CK_NoOp || CE->getCastKind() == CK_LValueToRValue || CE->getCastKind() == CK_ToUnion || An CK_LValueToRValu

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/Expr.cpp:3462-3468 ->isConstantInitializer(Ctx, false, Culprit); case CXXDefaultArgExprClass: return cast(this)->getExpr() ->isConstantInitializer(Ctx, false, Culprit); case CXXDefaultInitEx

[PATCH] D154688: [clang] Show verify prefix in error messages

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D154688#4499797 , @tbaeder wrote: > In D154688#4498398 , @aaron.ballman > wrote: > >> In D154688#4497967 , @tbaeder >> wrote: >> >>> Wh

[PATCH] D155774: [NFC] Remove needless nullchecks.

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman 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/D155774/new/ https://reviews.llvm.org/D155774

[PATCH] D155846: [NFC][clang] Fix static analyzer concerns

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm not opposed, but the copy ctor and copy assignment operators are already deleted by default in this case (e.g., the class has data members with deleted copy constructors). So I agree this is an NFC change, but there's no bug being fixed which makes me think th

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 542607. nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. - force ForRef to false for CK_LValueToRValue CastExprs, as per @efriedma Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D155842: [NFC][clang] Fix static analyzer concerns

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman 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/D155842/new/ https://reviews.llvm.org/D155842

[PATCH] D154688: [clang] Show verify prefix in error messages

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The change looks great: (from `error: 'error' diagnostics seen but not expected:` to `error: 'expected-error' diagnostics seen but not expected`). When I read Clang tests, I was confused by what `error` meant. I eventually figured out `-verify` is special. The new diagno

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first

2023-07-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/Expr.cpp:3462-3468 ->isConstantInitializer(Ctx, false, Culprit); case CXXDefaultArgExprClass: return cast(this)->getExpr() ->isConstantInitializer(Ctx, false, Culprit); case CXXDefaultInitExprClass

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Farid Zakaria via Phabricator via cfe-commits
fzakaria updated this revision to Diff 542614. fzakaria added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Updated instead to disable it in CMake Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155857/new/ https:/

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Farid Zakaria via Phabricator via cfe-commits
fzakaria added a comment. @rsmith and @MaskRay thank you for the feedback. I think this is more in line with what we discussed on the #LLVM chat Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155857/new/ https:/

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-07-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma requested changes to this revision. efriedma added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5542 + if (!getLangOpts().HIPStdPar) +ErrorUnsupported(E, "builtin function"); This does

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-07-20 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 542618. jmciver added a comment. Remove reliance on TLI objects where only alloca instructions are processes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155773/new/ https://reviews.llvm.org/D155773 Files:

[PATCH] D152914: [Draft] Make __builtin_cpu builtins target-independent

2023-07-20 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:903-907 +// Load of a value provided by the system library at a fixed address. Used for +// accessing things like HWCAP word provided by GLIBC. +def int_fixed_addr_ld +: DefaultAttrsIntrinsic<[llvm

[PATCH] D150226: [Clang] Remove ability to downgrade warning on the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D150226#4516337 , @dblaikie wrote: > In D150226#4515843 , @aaron.ballman > wrote: > >> In D150226#4515783 , @dblaikie >> wrote: >> >>>

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-07-20 Thread Fred Fu via Phabricator via cfe-commits
capfredf updated this revision to Diff 542622. capfredf added a comment. handle cases where code completion in a function declaration Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154382/new/ https://reviews.llvm.org/D154382 Files: clang/include

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

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 542625. gedare added a comment. Do not apply BlockIndent to if conditionals. Address other comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154755/new/ https://reviews.llvm.org/D154755 Files: clang/lib

[clang] 54aca3f - [clang][NFC] Use a more accurate size type in the new operation

2023-07-20 Thread Aaron Ballman via cfe-commits
Author: CaprYang Date: 2023-07-20T14:54:51-04:00 New Revision: 54aca3f33f630d2b2955b225401efeb1b4225177 URL: https://github.com/llvm/llvm-project/commit/54aca3f33f630d2b2955b225401efeb1b4225177 DIFF: https://github.com/llvm/llvm-project/commit/54aca3f33f630d2b2955b225401efeb1b4225177.diff LOG:

[PATCH] D152160: [clang][NFC] Use a more accurate size type in the new operation, prevent issues when PointerWidth and the SizeType width are not same.

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG54aca3f33f63: [clang][NFC] Use a more accurate size type in the new operation (authored by CaprYang, committed by aaron.ballman). Herald added a project: clang. Herald added a subscriber: cfe-commits. Rep

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-07-20 Thread Fred Fu via Phabricator via cfe-commits
capfredf added inline comments. Comment at: clang/unittests/Interpreter/CodeCompletionTest.cpp:71 +Completer(std::string("void app("), 9); + EXPECT_EQ((size_t)0, out.length()); +} @v.g.vassilev The way I fixed this is a bit hacky. Do you have a better idea?

[PATCH] D76096: [clang] allow const structs to be constant expressions for C

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 542627. nickdesaulniers retitled this revision from "[clang] allow const structs to be constant expressions in initializer lists" to "[clang] allow const structs to be constant expressions for C". nickdesaulniers edited the summary of this revision. n

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

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare marked 3 inline comments as done. gedare added a comment. I have fixed the bug in a different way that avoids using `BlockIndent` on `if` conditionals. `AlwaysBreak` will continue to apply to `if` conditionals by default. I may propose a style option to control that behavior later. Repo

[PATCH] D76096: [clang] allow const structs to be constant expressions for C

2023-07-20 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/test/Sema/builtins.c:181-186 + ASSERT(!OPT(test17_c)); + ASSERT(!OPT(&test17_c[0])); + ASSERT(!OPT((char*)test17_c)); ASSERT(!OPT(test17_d));// expected-warning {{folding}} ASSERT(!OPT(&test17_d[0]));//

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Perhaps `-Wno-nonnull` should be GCC specific (i.e. not apply to Clang). This option will disable certain warnings related to Clang `_Nonnull` (seems unused in llvm-project) and `__attribute__((nonnull))` (used in a few places). Repository: rG LLVM Github Monorepo C

[clang] 04cc892 - Speculatively fix Clang build bots

2023-07-20 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-07-20T15:11:52-04:00 New Revision: 04cc892eedf579584f642670efd71a5e6fd1494d URL: https://github.com/llvm/llvm-project/commit/04cc892eedf579584f642670efd71a5e6fd1494d DIFF: https://github.com/llvm/llvm-project/commit/04cc892eedf579584f642670efd71a5e6fd1494d.diff

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Perhaps this can be placed beside `llvm/cmake/config-ix.cmake` `-Wmaybe-uninitialized`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155857/new/ https://reviews.llvm.org/D155857 __

[PATCH] D155857: [clang] fix nonnull warnings during build

2023-07-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision as: rsmith. rsmith added a comment. This revision is now accepted and ready to land. Seems reasonable to me. Given that this affects all of LLVM I'd like to wait a day or so to see if anyone has concerns. Comment at: llvm/cmake/modules/HandleLLVMO

[PATCH] D155635: [OpenMP] [Reduction] Allow PLUS (+) operator on reduction clauses in OMP > 52

2023-07-20 Thread Fazlay Rabbi via Phabricator via cfe-commits
mdfazlay added a comment. In D155635#4512243 , @ABataev wrote: > In D155635#4512188 , @mdfazlay > wrote: > >> In D155635#4512183 , @ABataev >> wrote: >> >>> Tests? >> >>

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

2023-07-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some questions about comments in the test. Comment at: clang/test/SemaTemplate/concepts.cpp:531 SingleDepthReferencesTopLambda(v); // FIXM

[PATCH] D155783: [clang-format] Fix variable lacks of blank when previous operator is star

2023-07-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Please provide a diff with the full context (`-U99` will do the trick). And another context is needed, just `x * y` will never be (meaningful) be formatted. At least a `;` is missing, and I'd argue if your example is just ... something ... x * y; ..

[PATCH] D154093: [clang-format] Break long strings in Verilog

2023-07-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Apart from that I'm okay. Comment at: clang/lib/Format/WhitespaceManager.cpp:1428 + // case, it is allowed if there is a replacement for the empty range + // between 2 tokens and another non-empty range at the start of the second +

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Everything is fine, I just need to know how the attribute stuff is formatted with plain LLVM style. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155239/new/ https://reviews.llvm.org/D155239 ___

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:16791 + verifyFormat("SomeType *__attribute__((attr)) *a = NULL;", Spaces); + verifyFormat("void __attribute__((naked)) foo(int bar)", Spaces); @HazardyKnusperkeks here. Reposit

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:16748 + verifyFormat("SomeType *__attribute__( ( attr ) ) *a = NULL;", Spaces); + verifyFormat("void __attribute__( ( naked ) ) foo( int bar )", Spaces); and here Repository:

[PATCH] D154357: [Driver] Recognize powerpc-unknown-eabi as a bare-metal toolchain

2023-07-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/baremetal.cpp:348 +// RUN: %clang %s -### --target=powerpc-unknown-eabi 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-PPCEABI %s MaskRay wrote: > Without a sysroot, we may pick up powerpc-unknown

[PATCH] D155239: [clang-format] Add SpacesInParens with SpacesInParensOptions

2023-07-20 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added a comment. In D155239#4520067 , @HazardyKnusperkeks wrote: > Everything is fine, I just need to know how the attribute stuff is formatted > with plain LLVM style. oh, sorry. plain llvm style. I will look for a good place to add that. Rep

[PATCH] D76096: [clang] allow const structs to be constant expressions for C

2023-07-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/test/Sema/builtins.c:181-186 + ASSERT(!OPT(test17_c)); + ASSERT(!OPT(&test17_c[0])); + ASSERT(!OPT((char*)test17_c)); ASSERT(!OPT(test17_d));// expected-warning {{folding}} ASSERT(!OPT(&test17_d[0]));// expect

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

2023-07-20 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D154324#4516964 , @alexfh wrote: > In D154324#4516917 , @ChuanqiXu > wrote: > >> Maybe we got something wrong with this. I'd like to revert this patch in >> case it breaks something. B

[PATCH] D155846: [NFC][clang] Fix static analyzer concerns

2023-07-20 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. > there's no bug being fixed which makes me think this should go back to the > static analysis vendor to report this as a false positive. I agree. I'll try to isolate a reproducible test case and report it to the vendor. Repository: rG LLVM Github Monorepo CHAN

<    1   2   3   >