[PATCH] D156244: [clang] Do not crash on use of a variadic overloaded operator

2023-07-28 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/SemaCXX/overloaded-operator-decl.cpp:64 +class E {}; +void operator+(E, ...) {} // expected-error{{overloaded 'operator+' cannot be variadic}} +void d() { E() + E(); } aaron.ballman wrote: > I think it migh

[PATCH] D151625: [clang] Add `clang::equality_operator_compares_members_lexicographically`

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D151625#4534850 , @AMP999 wrote: >> Any chance you can provide some more details about why the problem is a bug >> in Clang (Slack seems to require signing up in order to see what's behind >> the link)? > > Sure, I just

[PATCH] D154328: [AST] Add API to iterate already loaded specializations

2023-07-28 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Right, it's not ideal to land APIs without usage in Clang itself... The context is, once again, ROOT and the Cling interpreter (where we are already using this API via downstream patches): When unloading a "transaction" (now `PartialTranslationUnit` in `clang-repl`) we

[PATCH] D154568: [Clang][OpenMP] GPU simd directive code generation

2023-07-28 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In D154568#4528274 , @efwright wrote: > Dropping off a simple test case. If this looks about what you would expect > for the tests I have a couple more involved ones that I can repurpose and add > in. For more complex tests we

[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D155572#4541403 , @tbaeder wrote: > In D155572#4539457 , @aaron.ballman > wrote: > >> Is this intended to not handle all the binary operators in this patch? > > Yes, just a subse

[PATCH] D156542: [Clang] Fix constexpr alloc tests on 32 bits platforms

2023-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a project: All. cor3ntin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some bots were broken by 45ab2b48bd55 Repository:

[PATCH] D154588: [CSKY] Optimize implementation of intrinsic 'llvm.cttz.i32'

2023-07-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 545152. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154588/new/ https://reviews.llvm.org/D154588 Files: llvm/lib/Target/CSKY/CSKYISelLowering.cpp llvm/lib/Target/CSKY/CSKYInstrInfo.td llvm/test/CodeGen

[PATCH] D156542: [Clang] Fix constexpr alloc tests on 32 bits platforms

2023-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGcdfb3d93e394: [Clang] Fix constexpr alloc tests on 32 bits platfor

[PATCH] D156524: [flang][nfc] Simplify option forwarding

2023-07-28 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thanks for taking a look! Comment at: clang/lib/Driver/ToolChains/Flang.cpp:146-147 + + Args.AddAllArgs(CmdArgs, {options::OPT_flang_experimental_hlfir, +options::OPT_flang_experimental_polymorphism}); }

[PATCH] D154189: [clang][Interp] Implement zero-init of record types

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1240 + // Fields + for (const Record::Field &Field : R->fields()) { +const Descriptor *D = Field.Desc; tbaeder wrote: > aaron.ballman wrote: > > It looks like you're n

[clang] cdfb3d9 - [Clang] Fix constexpr alloc tests on 32 bits platforms

2023-07-28 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2023-07-28T16:22:26+02:00 New Revision: cdfb3d93e394a6f03082558e3c6abbe71bb1df6f URL: https://github.com/llvm/llvm-project/commit/cdfb3d93e394a6f03082558e3c6abbe71bb1df6f DIFF: https://github.com/llvm/llvm-project/commit/cdfb3d93e394a6f03082558e3c6abbe71bb1df6f.diff

[PATCH] D156524: [flang][nfc] Simplify option forwarding

2023-07-28 Thread Andrzej Warzynski 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 rGe88ff8a79b8b: [flang][nfc] Simplify option forwarding (authored by awarzynski). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[clang] e88ff8a - [flang][nfc] Simplify option forwarding

2023-07-28 Thread Andrzej Warzynski via cfe-commits
Author: Andrzej Warzynski Date: 2023-07-28T14:23:58Z New Revision: e88ff8a79b8bee3cfb654d8fc716677669ce8e0d URL: https://github.com/llvm/llvm-project/commit/e88ff8a79b8bee3cfb654d8fc716677669ce8e0d DIFF: https://github.com/llvm/llvm-project/commit/e88ff8a79b8bee3cfb654d8fc716677669ce8e0d.diff

[PATCH] D155955: [Clang] Improve the handling of large arrays evaluation.

2023-07-28 Thread antoine moynault via Phabricator via cfe-commits
antmo added a comment. Hi, clang-armv8-quick bot now fails on Clang::cxx2a-constexpr-dynalloc-limits.cpp https://lab.llvm.org/buildbot/#/builders/245/builds/11764 Could you please look at this ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155

[PATCH] D156533: [clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body

2023-07-28 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! When you land, please be sure to add `Fixes https://github.com/llvm/llvm-project/issues/62996` to the commit message so the issue is automatically closed (and it makes it e

[PATCH] D156523: [clang][DeclPrinter] Fix AST print to suppress output of implicit (non-written) constructor initializers

2023-07-28 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/D156523/new/ https://reviews.llvm.org/D156523

[PATCH] D154588: [CSKY] Optimize implementation of intrinsic 'llvm.cttz.i32'

2023-07-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 545158. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154588/new/ https://reviews.llvm.org/D154588 Files: llvm/lib/Target/CSKY/CSKYISelLowering.cpp llvm/lib/Target/CSKY/CSKYInstrInfo.td llvm/test/CodeGen/CSKY/intrinsic.ll Index: llvm/test/C

[PATCH] D154588: [CSKY] Optimize implementation of intrinsic 'llvm.cttz.i32'

2023-07-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked 2 inline comments as done. benshi001 added inline comments. Comment at: clang/test/CodeGen/CSKY/csky-builtins.c:67 + return __builtin_bswap64(x); +} zixuan-wu wrote: > Those are target-independent intrinsics/builtins. I think it's no more need

[PATCH] D154588: [CSKY] Optimize implementation of intrinsic 'llvm.cttz.i32'

2023-07-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: llvm/test/CodeGen/CSKY/intrinsic.ll:36 +define i16 @bswap16(i16 %x) { +; CHECK-LABEL: bswap16: +; CHECK: # %bb.0: # %entry zixuan-wu wrote: > Again. It's related to cttz? I have made another patch for these addit

[PATCH] D156509: [clang][Interp] Diagnose unknown parameter values

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/Interp.cpp:550-554 + if (isa(D)) { +S.FFDiag(E, diag::note_constexpr_function_param_value_unknown) << D; +S.Note(D->getLocation(), diag::note_declared_at) << D->getSourceRange(); +return false; +

[PATCH] D155955: [Clang] Improve the handling of large arrays evaluation.

2023-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D155955#4542531 , @antmo wrote: > Hi, clang-armv8-quick bot now fails on > Clang::cxx2a-constexpr-dynalloc-limits.cpp > > https://lab.llvm.org/buildbot/#/builders/245/builds/11764 > > Could you please look at this ? I land

[PATCH] D155955: [Clang] Improve the handling of large arrays evaluation.

2023-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. It seems to have done the trick! https://lab.llvm.org/buildbot/#/builders/245/builds/11766 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155955/new/ https://reviews.llvm.org/D155955 __

[PATCH] D156533: [clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body

2023-07-28 Thread Timo Stripf 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 rGa3da6284c23a: [clang][DeclPrinter] Fix missing semicolon in AST print for methods that are… (authored by strimo378). Repository: rG LLVM Github Mo

[clang] a3da628 - [clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body

2023-07-28 Thread Timo Stripf via cfe-commits
Author: Timo Stripf Date: 2023-07-28T14:50:17Z New Revision: a3da6284c23affdd9092b2641017e99d85c2d89b URL: https://github.com/llvm/llvm-project/commit/a3da6284c23affdd9092b2641017e99d85c2d89b DIFF: https://github.com/llvm/llvm-project/commit/a3da6284c23affdd9092b2641017e99d85c2d89b.diff LOG: [

[PATCH] D156368: [OpenMP] Do not always emit unused extern variables

2023-07-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 545168. jhuber6 added a comment. Add OpenMP runtime test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156368/new/ https://reviews.llvm.org/D156368 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/Co

[PATCH] D156201: [ASTImporter] Fix corrupted RecordLayout introduced by circular referenced fields

2023-07-28 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7418 + + return UO; } balazske wrote: > Why is it better to use `CreateEmpty` instead of the old code? Does `Create` > do something that does not work at this situation (probably getting

[PATCH] D156172: [clang][CodeGen] Emit annotations for function declarations.

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D156172#4540025 , @brendandahl wrote: > I looked into the above issue with mixing declarations and definitions and I > think I can fix that by leaving the AddGlobalAnnotations call in > EmitGlobalFunctionDefinition and

[PATCH] D156546: Experimental implementation of packed data member declaration

2023-07-28 Thread Zenong Zhang via Phabricator via cfe-commits
SlaterLatiao created this revision. Herald added a project: All. SlaterLatiao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D156546 Files: clang/lib/Sema/SemaTemplateInsta

[PATCH] D156511: [clang][Interp] Diagnose more unkonwn DeclRefExprs

2023-07-28 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. LG aside from a nit. Comment at: clang/lib/AST/Interp/Interp.cpp:558-561 + if (VD->getType()->isIntegralOrEnumerationType()) +S.FFDiag(E, diag::not

[PATCH] D156368: [OpenMP] Do not always emit unused extern variables

2023-07-28 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. I think this is reasonable. Comment at: clang/test/OpenMP/declare_target_codegen.cpp:264 -// CHECK-DAG: !{i32 1, !"aaa", i32 0, i32 {{[0-9]+}}} -// CHECK-DAG: !{i32 1, !"ccc", i32 0, i32 {{[0-9]+}}} // CHECK-DAG: !{{{.+}}virtual_foo

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

2023-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/SemaCXX/vartemplate-lambda.cpp:17 +// expected-note{{cannot be used in a constant expression}} \ +// expected-er

[PATCH] D156368: [OpenMP] Do not always emit unused extern variables

2023-07-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/declare_target_codegen.cpp:264 -// CHECK-DAG: !{i32 1, !"aaa", i32 0, i32 {{[0-9]+}}} -// CHECK-DAG: !{i32 1, !"ccc", i32 0, i32 {{[0-9]+}}} // CHECK-DAG: !{{{.+}}virtual_foo tianshilei1992 wrote: > Si

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:240 +return Initializing ? this->visitInitializer(SubExpr) +: this->visit(SubExpr); tbaeder wrote: > This pattern shows up a few times, so it m

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

2023-07-28 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. FYI i think this is fine but I'm waiting for progress on the PRs that would allow us to enable more tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155627/new/ https://reviews.llvm.org/D155627 ___ cfe-commits m

[PATCH] D155234: [SystemZ][z/OS] Forward headers to z/os system headers

2023-07-28 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155234/new/ https://reviews.llvm.org/D155234 ___ cfe-

[PATCH] D155165: [clang][Interp] Fully serialize Floatings to bytes

2023-07-28 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 small nits. Comment at: clang/lib/AST/Interp/Source.h:63-64 /// Pointer into the code owned by a function. +public: const std::byte *

[PATCH] D155568: [clang][Interp] Make sure we push integers of the correct size

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D155568#4525488 , @tbaeder wrote: > This patch is missing the `Ret` part in `InterpBuiltin()` in the > same file. That needs to change to the correct type as well. > > I can do that in a follow-up commit. @aaron.ballman

[PATCH] D156247: [Clang] Add a warning on uses of coroutine keywords

2023-07-28 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D156247#4541756 , @ilya-biryukov wrote: > In D156247#4540228 , @Mordante > wrote: > >> 2. My biggest concern is the timing of this patch. The date of the branching >> is know upfron

[PATCH] D156247: [Clang] Add a warning on uses of coroutine keywords

2023-07-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D156247#4542155 , @aaron.ballman wrote: > Given the views expressed on this thread, I think this requires a wider > community discussion to determine whether we want to support this idea or > not, regardless of -cc1 or

[PATCH] D153693: [clang][Interp] Handle InitListExprs of composite type

2023-07-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder abandoned this revision. tbaeder added a comment. Abandoning in favor of https://reviews.llvm.org/D156027 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153693/new/ https://reviews.llvm.org/D153693 __

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. We should probably write this code to work properly in case we add a target that makes `__builtin_alloca` return a pointer in the private address space. Could you recover the target AS from the type of the expression instead of assuming `LangAS::Default`? Repository

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D156539#4542836 , @rjmccall wrote: > We should probably write this code to work properly in case we add a target > that makes `__builtin_alloca` return a pointer in the private address space. > Could you recover the target AS

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:3540 + return RValue::get(Builder.CreateAddrSpaceCast(AI, CGM.Int8PtrTy)); +else + return RValue::get(AI); No return after else Comment at: clang/lib/CodeGe

[PATCH] D156509: [clang][Interp] Diagnose unknown parameter values

2023-07-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 545193. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156509/new/ https://reviews.llvm.org/D156509 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/Interp.cpp clang/lib/AST/Interp/Interp.h clang/lib/AST/Interp/Opcodes.td

[PATCH] D156509: [clang][Interp] Diagnose unknown parameter values

2023-07-28 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/Interp.cpp:550-554 + if (isa(D)) { +S.FFDiag(E, diag::note_constexpr_function_param_value_unknown) << D; +S.Note(D->getLocation(), diag::note_declared_at) << D->getS

[clang] 141c4e7 - [OpenMP] Do not always emit unused extern variables

2023-07-28 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-07-28T11:52:05-05:00 New Revision: 141c4e7a9403fed46d84c7f0429295bd28c89368 URL: https://github.com/llvm/llvm-project/commit/141c4e7a9403fed46d84c7f0429295bd28c89368 DIFF: https://github.com/llvm/llvm-project/commit/141c4e7a9403fed46d84c7f0429295bd28c89368.diff

[PATCH] D156368: [OpenMP] Do not always emit unused extern variables

2023-07-28 Thread Joseph Huber 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 rG141c4e7a9403: [OpenMP] Do not always emit unused extern variables (authored by jhuber6). Herald added a project: OpenMP. Herald added a subscriber: o

[PATCH] D152093: [clang][Analysis] Handle && and || against variable and its negation as tautology

2023-07-28 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 545213. hazohelet added a comment. Address comments from Aaron - Reworded diagnostic message CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152093/new/ https://reviews.llvm.org/D152093 Files: clang/docs/ReleaseNotes.rst clang/include/clang/An

[PATCH] D152093: [clang][Analysis] Handle && and || against variable and its negation as tautology

2023-07-28 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet marked 2 inline comments as done. hazohelet added a comment. Thanks for the review Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9743-9748 +def warn_tautological_negation_and_compare: Warning< + "'&&' against a variable and its negation always evaluate

[PATCH] D154366: [clang][ExprConstant] Print template arguments when describing stack frame

2023-07-28 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 545216. hazohelet added a comment. Added missing tests for method function templates before landing this CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154366/new/ https://reviews.llvm.org/D154366 Files: clang/docs/ReleaseNotes.rst clang/lib/A

[PATCH] D155991: [DWARF] Make sure file entry for artificial functions has an MD5 checksum

2023-07-28 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. > Any memory usage measurements to check this doesn't have a significant > adverse impact by copying all the strings? Not actual measurements, no; but intuitively the size should not be much greater than the size of the filename entries in the .debug_line section for

[PATCH] D154130: [lit][clang] Avoid realpath on Windows due to MAX_PATH limitations

2023-07-28 Thread Tristan Labelle via Phabricator via cfe-commits
MrTrillian updated this revision to Diff 545218. MrTrillian marked 4 inline comments as done. MrTrillian added a comment. Reverted some `os.path.abspath` that had been converted to `abs_path_preserve_drive` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154130/new/ https://reviews.llvm.

[PATCH] D154130: [lit][clang] Avoid realpath on Windows due to MAX_PATH limitations

2023-07-28 Thread Tristan Labelle via Phabricator via cfe-commits
MrTrillian added inline comments. Comment at: clang/lib/Basic/FileManager.cpp:663 +} else { + llvm::sys::path::remove_dots(AbsPathBuf, /*remove_dot_dot=*/true); + CanonicalName = AbsPathBuf.str().copy(CanonicalNameStorage); benlangmuir wrote: > MrTr

[PATCH] D154130: [lit][clang] Avoid realpath on Windows due to MAX_PATH limitations

2023-07-28 Thread Tristan Labelle via Phabricator via cfe-commits
MrTrillian marked an inline comment as done. MrTrillian added inline comments. Comment at: llvm/utils/lit/lit/LitConfig.py:192 f = f.f_back.f_back -file = os.path.abspath(inspect.getsourcefile(f)) +file = lit.util.abs_path_preserve_drive(inspect.getsource

[PATCH] D155997: [Phase Ordering] Don't speculate in SimplifyCFG before PGO annotation

2023-07-28 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: llvm/test/Transforms/PhaseOrdering/simplifycfg-speculate-blocks.ll:1 +;; Check that SimplifyCFG does not attempt speculation until after PGO is +;; annotated in the IR, and then does not perform it when unprofitable. hm

[PATCH] D154130: [lit][clang] Avoid realpath on Windows due to MAX_PATH limitations

2023-07-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM other than my suggestion to add a comment. @tahonermann are all your comments addressed at this point? Comment at: clang/lib/Basic/FileManager.cpp:663 +}

[PATCH] D155997: [Phase Ordering] Don't speculate in SimplifyCFG before PGO annotation

2023-07-28 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. I'm not a fan of the PGO conditional behavior here. I'd prefer to disable speculation unconditionally if that is feasible. This is basically what D153392 did. While the specific test case there was addressed in a different way, if we tak

[PATCH] D141918: WIP: [Clang] Emit 'unwindabort' when applicable.

2023-07-28 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5391 if (FPtr->hasFnAttribute(llvm::Attribute::NoUnwind)) CannotThrow = true; + Is there coverage for a nounwind callee + an unwindabort call? Repository: rG LLVM Github

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-07-28 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D105759#4541813 , @cor3ntin wrote: > In D105759#4540716 , > @hubert.reinterpretcast wrote: > >>> I hope this patch may allow to gather some data on that. >> >> @cor3ntin

[PATCH] D156277: [Parser][ObjC] Fix parser crash on nested top-level block with better recovery path

2023-07-28 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/docs/ReleaseNotes.rst:125 + out early in case next top-level block occurs as if the previous one is + properly finished. + `Issue 64065 `_ "Fixed a crash when

[PATCH] D156533: [clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body

2023-07-28 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. This breaks Darwin bots: https://green.lab.llvm.org/green/job/clang-stage1-RA/35102/testReport/junit/Clang/AST/ast_print_method_decl_cpp/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156533/new/ https://reviews.llvm.org

[PATCH] D156533: [clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body

2023-07-28 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. error: aliases are not supported on darwin Maybe create a different testcase that is not supported on Darwin? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156533/new/ https://reviews.llvm.org/D156533

[PATCH] D155997: [Phase Ordering] Don't speculate in SimplifyCFG before PGO annotation

2023-07-28 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D155997#4543156 , @nikic wrote: > I'm not a fan of the PGO conditional behavior here. I'd prefer to disable > speculation unconditionally if that is feasible. This is basically what > D153392

[clang] c14c34d - [clang][Interp] Implement __builtin_fmin

2023-07-28 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-28T20:18:57+02:00 New Revision: c14c34de4571cf3268e3599f5d1fc7318c42aac7 URL: https://github.com/llvm/llvm-project/commit/c14c34de4571cf3268e3599f5d1fc7318c42aac7 DIFF: https://github.com/llvm/llvm-project/commit/c14c34de4571cf3268e3599f5d1fc7318c42aac7.diff LO

[PATCH] D155546: [clang][Interp] Implement __builtin_fmin

2023-07-28 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 rGc14c34de4571: [clang][Interp] Implement __builtin_fmin (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D155546?vs=544691&

[PATCH] D156492: [clang][deps] Make the C++ API more type-safe

2023-07-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:175 std::vector PrebuiltModuleDeps; - llvm::MapVector> + llvm::MapVect

[PATCH] D156515: [RemarkUtil] Refactor llvm-remarkutil to include size-diff

2023-07-28 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg accepted this revision. thegameg added a comment. This revision is now accepted and ready to land. Clean, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156515/new/ https://reviews.llvm.org/D156515 __

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D105759#4543184 , @hubert.reinterpretcast wrote: > In D105759#4541813 , @cor3ntin > wrote: > >> In D105759#4540716 , >> @hubert.reinte

[PATCH] D156533: [clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body

2023-07-28 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This breaks tests on Mac: http://45.33.8.238/macm1/65934/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156533/new/ https://reviews.llvm.org/D15653

Re: [PATCH] D156533: [clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body

2023-07-28 Thread Timo Stripf via cfe-commits
Sry for breaking builds. Can someone please revert it, I am currently not at work. Am 28.07.2023 20:27 schrieb Nico Weber via Phabricator : thakis added a comment. This breaks tests on Mac: http://45.33.8.238/macm1/65934/step_7.txt Please take a look and revert for now if it takes a while to f

[clang] 4098e13 - Revert "[clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body"

2023-07-28 Thread Steven Wu via cfe-commits
Author: Steven Wu Date: 2023-07-28T11:39:46-07:00 New Revision: 4098e13a71464cc4747528edd8a41e5a4eaa1b23 URL: https://github.com/llvm/llvm-project/commit/4098e13a71464cc4747528edd8a41e5a4eaa1b23 DIFF: https://github.com/llvm/llvm-project/commit/4098e13a71464cc4747528edd8a41e5a4eaa1b23.diff LOG

[PATCH] D156533: [clang][DeclPrinter] Fix missing semicolon in AST print for methods that are definitions without having a body

2023-07-28 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. Reverted in 4098e13a7146 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156533/new/ https://reviews.llvm.org/D156533 _

[PATCH] D156563: [clang][deps] Remove `ModuleDeps::ImportedByMainFile`

2023-07-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: benlangmuir. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This information is already expos

[PATCH] D86154: AMDGPU: Add llvm.amdgcn.{read,readfirst,write}lane2 intrinsics with type overloads

2023-07-28 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm requested changes to this revision. arsenm added a comment. This revision now requires changes to proceed. Herald added subscribers: nlopes, StephenFan. Herald added a project: All. Should be obsoleted by D147732 Repository: rG LLVM Github Monorepo CH

[clang] 8ad9dcb - [clang][Interp] Implement __builtin_isnan()

2023-07-28 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-28T20:49:45+02:00 New Revision: 8ad9dcb3869394e3a4ecb01631646237074723fe URL: https://github.com/llvm/llvm-project/commit/8ad9dcb3869394e3a4ecb01631646237074723fe DIFF: https://github.com/llvm/llvm-project/commit/8ad9dcb3869394e3a4ecb01631646237074723fe.diff LO

[PATCH] D155369: [clang][Interp] Implement __builtin_isnan()

2023-07-28 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 rG8ad9dcb38693: [clang][Interp] Implement __builtin_isnan() (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D155145: [X86] Add AVX-VNNI-INT16 instructions.

2023-07-28 Thread Anna Thomas via Phabricator via cfe-commits
anna added a comment. We see a crash bisected to this patch about using an illegal instruction. Here's the CPUInfo for the machine: CPU info: current cpu id: 22 total 32(physical cores 16) (assigned logical cores 32) (assigned physical cores 16) (assigned_sockets:2 of 2) (8 cores per cpu,

[clang] 9016514 - Revert "[clang][Interp] Implement __builtin_isnan()"

2023-07-28 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-07-28T20:59:38+02:00 New Revision: 9016514c6bc34330b89dadfcd00e803a44b3cbc8 URL: https://github.com/llvm/llvm-project/commit/9016514c6bc34330b89dadfcd00e803a44b3cbc8 DIFF: https://github.com/llvm/llvm-project/commit/9016514c6bc34330b89dadfcd00e803a44b3cbc8.diff LO

[PATCH] D156563: [clang][deps] Remove `ModuleDeps::ImportedByMainFile`

2023-07-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. This flag was always weird to me, thanks for cleaning it up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156563/new/ https://reviews

[clang] 8a077cf - [clang][deps] Make the C++ API more type-safe

2023-07-28 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-07-28T12:03:54-07:00 New Revision: 8a077cfe23e3856d406bd3633e1a3026609f3537 URL: https://github.com/llvm/llvm-project/commit/8a077cfe23e3856d406bd3633e1a3026609f3537 DIFF: https://github.com/llvm/llvm-project/commit/8a077cfe23e3856d406bd3633e1a3026609f3537.diff L

[PATCH] D156492: [clang][deps] Make the C++ API more type-safe

2023-07-28 Thread Jan Svoboda 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 rG8a077cfe23e3: [clang][deps] Make the C++ API more type-safe (authored by jansvoboda11). Changed prior to commit: https://reviews.llvm.org/D156492?

[clang] c75b331 - [clang][deps] Remove `ModuleDeps::ImportedByMainFile`

2023-07-28 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-07-28T12:04:35-07:00 New Revision: c75b331fc23192a8249dc5e95e053258f5fb5194 URL: https://github.com/llvm/llvm-project/commit/c75b331fc23192a8249dc5e95e053258f5fb5194 DIFF: https://github.com/llvm/llvm-project/commit/c75b331fc23192a8249dc5e95e053258f5fb5194.diff L

[PATCH] D156563: [clang][deps] Remove `ModuleDeps::ImportedByMainFile`

2023-07-28 Thread Jan Svoboda 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 rGc75b331fc231: [clang][deps] Remove `ModuleDeps::ImportedByMainFile` (authored by jansvoboda11). Changed prior to commit: https://reviews.llvm.org/

[PATCH] D156565: Diagnose use of VLAs in C++ by default

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, erichkeane, clang-language-wg, hubert.reinterpretcast, shafik, jyknight. Herald added subscribers: mattd, pmatos, asb, asavonic, jdoerfert, sbc100, dschuff. Herald added a project: All. aaron.ballman requested review of t

[PATCH] D156565: Diagnose use of VLAs in C++ by default

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: ABataev, clang-vendors. aaron.ballman added a comment. The patch seems large and scary, but that's because of how often we've had to test VLA behavior in C++ code. The OpenMP test cases are mostly opting out of VLA warnings mechanically (I verified with @ABataev

[PATCH] D156565: Diagnose use of VLAs in C++ by default

2023-07-28 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. Given GCC defines GNU C++ and regards this as a feature (unless you use things like -pedantic to ask for ISO C++), does it make sense to enable this for GNU C++? Every deviation from GCC is a point of friction for adopting Clang over GCC. Repository: rG LLVM Github M

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-28 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:2090 + assert(Initializing); + if (!isa(E)) { +if (!this->emitDupPtr(E)) aaron.ballman wrote: > And if it is a member c

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

2023-07-28 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked an inline comment as done. HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2964-2965 if (FormatTok->is(tok::l_brace)) { +FormatToken *LBrace = FormatTok; +LBrace->setFinalizedType(TT_NamespaceLBra

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

2023-07-28 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin updated this revision to Diff 545247. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142660/new/ https://reviews.llvm.org/D142660 Files: clang/lib/Driver/OffloadBundler.cpp clang/test/lit.cfg.py clang/tools/clang-offload-packager/Clan

[PATCH] D156247: [Clang] Add a warning on uses of coroutine keywords

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D156247#4542769 , @ilya-biryukov wrote: > In D156247#4542155 , @aaron.ballman > wrote: > >> Given the views expressed on this thread, I think this requires a wider >> community

[PATCH] D156357: clang: Add elementwise bitreverse builtin

2023-07-28 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 545251. bob80905 added a comment. - add float4 test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156357/new/ https://reviews.llvm.org/D156357 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNo

[PATCH] D156357: clang: Add elementwise bitreverse builtin

2023-07-28 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added inline comments. Comment at: clang/docs/LanguageExtensions.rst:634 the most negative integer remains the most negative integer - T __builtin_elementwise_fma(T x, T y, T z) fused multiply add, (x * y) + z.

[PATCH] D154130: [lit][clang] Avoid realpath on Windows due to MAX_PATH limitations

2023-07-28 Thread Tristan Labelle via Phabricator via cfe-commits
MrTrillian updated this revision to Diff 545250. MrTrillian marked an inline comment as done. MrTrillian added a comment. @benlangmuir I made the root-preserving canonicalization logic Windows-only now that I found how to test for that. It changes the code shape a little but I think it's an impr

[PATCH] D154130: [lit][clang] Avoid realpath on Windows due to MAX_PATH limitations

2023-07-28 Thread Tristan Labelle via Phabricator via cfe-commits
MrTrillian marked an inline comment as done. MrTrillian added inline comments. Comment at: clang/lib/Basic/FileManager.cpp:663 +} else { + llvm::sys::path::remove_dots(AbsPathBuf, /*remove_dot_dot=*/true); + CanonicalName = AbsPathBuf.str().copy(CanonicalNameStorage

[PATCH] D156565: Diagnose use of VLAs in C++ by default

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D156565#4543414 , @jrtc27 wrote: > Given GCC defines GNU C++ and regards this as a feature (unless you use > things like -pedantic to ask for ISO C++), does it make sense to enable this > for GNU C++? I think GCC shoul

[PATCH] D156571: [DebugInfo] Alternate MD5 fix, NFC

2023-07-28 Thread Paul Robinson via Phabricator via cfe-commits
probinson created this revision. probinson added reviewers: dblaikie, nikic. probinson added a project: debug-info. Herald added a subscriber: StephenFan. Herald added a project: All. probinson requested review of this revision. Should have lower memory and time cost than D155991

[PATCH] D155991: [DWARF] Make sure file entry for artificial functions has an MD5 checksum

2023-07-28 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. See https://reviews.llvm.org/D156571 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155991/new/ https://reviews.llvm.org/D155991 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D155387: [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases

2023-07-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. This looks good to me. I think we can further refine the handling of duplicate diagnostics but I don't think that needs to be done as part of this bugfix. Comment at: clang/

[PATCH] D154130: [lit][clang] Avoid realpath on Windows due to MAX_PATH limitations

2023-07-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Basic/FileManager.cpp:663 +} else { + llvm::sys::path::remove_dots(AbsPathBuf, /*remove_dot_dot=*/true); + CanonicalName = AbsPathBuf.str().copy(CanonicalNameStorage); MrTrillian wrote: > benl

[PATCH] D105759: Implement P2361 Unevaluated string literals

2023-07-28 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D105759#4543246 , @aaron.ballman wrote: > I'd recommend we change the diagnostic to be a warning that defaults to an > error so that users who are caught by the changes can still disable the > diagnostic rathe

<    1   2   3   >