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

2023-07-21 Thread Farid Zakaria via Phabricator via cfe-commits
fzakaria added a comment. @rsmith -- sounds good. Please commit on my behalf when you are ready as I don't have commit access. Thank you for the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155857/new/ https://reviews.llvm.org/D155857 __

[PATCH] D155985: [clang][ASTDumper] Remove redundant dump of BlockDecl's ParmVarDecl

2023-07-21 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 543003. danix800 retitled this revision from "[clang][ASTDumper] Remove redundant dump of ParmVarDecl" to "[clang][ASTDumper] Remove redundant dump of BlockDecl's ParmVarDecl". danix800 edited the summary of this revision. danix800 added a comment. Update R

[PATCH] D155984: [Sema][ObjC] Invalidate BlockDecl with invalid ParmVarDecl

2023-07-21 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 543005. danix800 added a comment. Update ReleaseNotes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155984/new/ https://reviews.llvm.org/D155984 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaExpr.

[PATCH] D155890: [clang-tidy] Add folly::Optional to unchecked-optional-access

2023-07-21 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:62 +return N != nullptr && (isTopLevelNamespaceWithName(*N, "base") || +isTopLevelNamespaceWithName(*N, "folly")); } -

[PATCH] D155544: [AIX][TLS] Add -maix-small-local-exec-tls option.

2023-07-21 Thread Stefan Pintilie via Phabricator via cfe-commits
stefanp accepted this revision as: stefanp. stefanp added a comment. This revision is now accepted and ready to land. I think this patch makes sense to me. LGTM. Comment at: llvm/test/CodeGen/PowerPC/check-aix-small-local-exec-tls-opt.ll:15 + +; Make sure that the test was actu

[PATCH] D155794: [OpenMP][OpenMPIRBuilder] Migrate setPropertyExecutionMode() from Clang to OpenMPIRBuilder.

2023-07-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Mostly nits. One problem I have is the vector. I do not believe Flang will use the same for their "llvm.used" tracking. I think it makes more sense to provide a callback or just return the global and let the caller handle it. Comment at: llvm/includ

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 543007. nickdesaulniers marked an inline comment as done. nickdesaulniers added a comment. - add comments to test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76096/new/ https://reviews.llvm.org/D76096

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 543009. nickdesaulniers edited the summary of this revision. nickdesaulniers added a comment. - add link to issue tracker Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76096/new/ https://reviews.llvm.or

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

2023-07-21 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision. tahonermann added a comment. This revision is now accepted and ready to land. On second thought, and after having read https://stackoverflow.com/a/9322542/11634221, I think this change is fine. There are legitimate scenarios for which self move assignment shou

[PATCH] D155396: [Sema][ObjC] Invalidate BlockDecl with invalid return expr & its parent BlockExpr

2023-07-21 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 543010. danix800 retitled this revision from "[Sema][ObjC] Propagating value-dependent errors into BlockExpr" to "[Sema][ObjC] Invalidate BlockDecl with invalid return expr & its parent BlockExpr". danix800 added a comment. Fix testcase tag with `CHECK-NEXT

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:319 +// relevant. +__device__ inline _Float16 __llvm_amdgcn_rcp_f16(_Float16 x) { + return ((_Float16)1.0f) / x; arsenm wrote: > arsenm wrote: > > yaxunl wrote: > > > Ca

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

2023-07-21 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. > I agree. I'll try to isolate a reproducible test case and report it to the > vendor. Done. I'm ambivalent with regard to keeping or discarding the proposed change, but the static analysis issue should be triaged as a false positive. Repository: rG LLVM Github

[PATCH] D85917: [MSP430] Fix passing C structs and unions as function arguments

2023-07-21 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Herald added a project: All. Is there a reason this never landed? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85917/new/ https://reviews.llvm.org/D85917 ___ cfe-commits mailing

[PATCH] D155544: [AIX][TLS] Add -maix-small-local-exec-tls option.

2023-07-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. Patch should not land before back-end patch. I also suggest having the patch incorporate the new option into the Clang release notes before it lands. Comment at: llvm/lib/Target/PowerPC/PPC.td:324 + "Produce a faster ac

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 543025. arsenm added a comment. Add versioned deprecated macro CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155982/new/ https://reviews.llvm.org/D155982 Files: clang/lib/Headers/__clang_hip_libdevice_declares.h clang/test/Headers/__clang_hip_ma

[PATCH] D155544: [AIX][TLS] Add -maix-small-local-exec-tls option.

2023-07-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Driver/Options.td:4095 + HelpText<"Produce a faster access sequence for local-exec TLS variables " + "where the offset from the thread pointer value is encoded as an " + "immediate

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

2023-07-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > restore E->getStorageDuration() == SD_Static check to fix libcxx regressions Makes sense... but it would be nice to add a testcase for whatever construct was triggering this. Comment at: clang/lib/AST/Expr.cpp:3462-3468 ->isConstantInitializ

[PATCH] D85917: [MSP430] Fix passing C structs and unions as function arguments

2023-07-21 Thread Anton Korobeynikov via Phabricator via cfe-commits
asl added a comment. In D85917#4523503 , @arsenm wrote: > Is there a reason this never landed? Good question. @atrosinenko ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85917/new/ https://reviews.llvm.or

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D151587#4523571 , @efriedma wrote: >> restore E->getStorageDuration() == SD_Static check to fix libcxx regressions > > Makes sense... but it would be nice to add a testcase for whatever construct > was triggering this.

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/Expr.cpp:3444 if (CE->getCastKind() == CK_NoOp || CE->getCastKind() == CK_LValueToRValue || CE->getCastKind() == CK_ToUnion || efriedma wrote: > efriedma wrote: > > An CK_LVal

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

2023-07-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/Expr.cpp:3444 if (CE->getCastKind() == CK_NoOp || CE->getCastKind() == CK_LValueToRValue || CE->getCastKind() == CK_ToUnion || nickdesaulniers wrote: > efriedma wrote: > > efriedma w

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/Expr.cpp:3444 if (CE->getCastKind() == CK_NoOp || CE->getCastKind() == CK_LValueToRValue || CE->getCastKind() == CK_ToUnion || efriedma wrote: > nickdesaulniers wrote: > > efr

[PATCH] D148216: [UTC] Add fallback support for specific metadata, and check their defs

2023-07-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D148216#4486400 , @jdoerfert wrote: > I might pull this later today until a fix is available. It makes updates of > files with globals super cumbersome (you need to manually remove the > duplicates). FWIW, the duplication

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

2023-07-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. For the replacement part, I refer to @owenpan and/or @MyDeveloperDay hoping they have more insight. The rest look good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154093/new/ https://reviews.llvm.org/D1

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 543036. nickdesaulniers added a comment. - go back to Eli's sad (and boring) old way of doing things^U:wq Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151587/new/ https://reviews.llvm.org/D151587 File

[PATCH] D154007: Reland "Try to implement lambdas with inalloca parameters by forwarding without use of inallocas."

2023-07-21 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 543038. akhuang added a comment. another fix to function naming code (do the same thing as before except when the mangled name is a hash) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154007/new/ https://revie

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

2023-07-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma 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/D151587/new/ https://reviews.llvm.org/D151587 ___

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

2023-07-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. My primary concern here is making sure we don't actually blow up compile-time. D151587 fixes the dependency from CGExprConstant, which was the most complicated one, but there are other places that call into Evaluate(). Some of thos

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

2023-07-21 Thread Paul Robinson via Phabricator via cfe-commits
probinson created this revision. probinson added reviewers: dblaikie, aprantl. probinson added a project: debug-info. Herald added a project: All. probinson requested review of this revision. The DIFile cache was keyed on a string pointer instead of string content, which was causing misses and res

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

2023-07-21 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. The fix is straightforward but the test was surprisingly tricky; I had to add the -main-file-name option to keep one of the DIFile's from ending up as ``. I'm still befuddled about why there are two DIFile entries, when the DIFileCache clearly has only one. The metada

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 543048. nickdesaulniers retitled this revision from "[clang] allow const structs to be constant expressions for C" to "[clang] allow const structs/unions/arrays to be constant expressions for C". nickdesaulniers added a comment. - add moar tests for

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D76096#4523718 , @efriedma wrote: > My primary concern here is making sure we don't actually blow up > compile-time. D151587 fixes the > dependency from CGExprConstant, which was th

[PATCH] D155540: [clangd] Remove extra dependancies for clangd

2023-07-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. I don't have a strong opinion here (or solid understanding of dynamic linking!) I suppose the idea is that clangdMain has dependencies from the source files in this directory, and the cl

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 543051. nickdesaulniers added a comment. - use better identifiers in test - remove half baked comment from test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76096/new/ https://reviews.llvm.org/D76096

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

2023-07-21 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Thanks! The pre-merge check caught mistakes in the \param commands, which I fixed before pushing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155861/new/ https://reviews.llvm.org/D155861 ___ cfe-commits mailing

[PATCH] D155421: [clangd] Add BlockEnd comments for control flow statements

2023-07-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 3 inline comments as done. sammccall added inline comments. Comment at: clang-tools-extra/clangd/InlayHints.cpp:252 +// This is used to summarize e.g. the condition of a while loop. +std::string summarizeExpr(const Expr *E) { + struct Namer : ConstStmtVisitor {

[PATCH] D155992: [clangd] Use xxh3_64bits for background index file digests

2023-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: kadircet, sammccall. Herald added a subscriber: arphaman. Herald added a project: All. MaskRay requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang-tools-extra. Many sources sh

[PATCH] D132779: Enforce module decl-use restrictions and private header restrictions in textual headers

2023-07-21 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Hi @rsmith, this commit makes it possible for `HeaderInfo::LookupFile()` to be called with different `RequestingModule` within single `CompilerInstance`. This is problematic, since some modules may see headers other modules can't (due to `[no_undeclared_includes]`)

[PATCH] D155421: [clangd] Add BlockEnd comments for control flow statements

2023-07-21 Thread Sam McCall via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rGee032bccc934: [clangd] Add BlockEnd comments for control flow statements (authored by sammccall). Change

[clang-tools-extra] ee032bc - [clangd] Add BlockEnd comments for control flow statements

2023-07-21 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-21T22:57:46+02:00 New Revision: ee032bccc934d034909962a9306f7c9d1ca72759 URL: https://github.com/llvm/llvm-project/commit/ee032bccc934d034909962a9306f7c9d1ca72759 DIFF: https://github.com/llvm/llvm-project/commit/ee032bccc934d034909962a9306f7c9d1ca72759.diff LO

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D76096#4523750 , @nickdesaulniers wrote: > In D76096#4523718 , @efriedma wrote: > >> My primary concern here is making sure we don't actually blow up >> compile-time. D151587

[PATCH] D155898: [clangd] Fix go-to-type target location

2023-07-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:347 +void enhanceLocatedSymbolsFromIndex( +llvm::MutableArrayRef Result, +const llvm::DenseMap &ResultIndex, usaxena95 wrote: > nit

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

2023-07-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. OK, I see. The problem is that the canonical version of the type can be spelled in different ways in different translation units, due to us treating some expressions as being equivalent despite them not being the same under the ODR. For example, we consider these functio

[clang-tools-extra] d9d9a2c - [clangd] Use index for go-to-type

2023-07-21 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-21T23:10:33+02:00 New Revision: d9d9a2cb2f0db7a92eb7d5ef0c619fb41aa5c8a8 URL: https://github.com/llvm/llvm-project/commit/d9d9a2cb2f0db7a92eb7d5ef0c619fb41aa5c8a8 DIFF: https://github.com/llvm/llvm-project/commit/d9d9a2cb2f0db7a92eb7d5ef0c619fb41aa5c8a8.diff LO

[PATCH] D155898: [clangd] Fix go-to-type target location

2023-07-21 Thread Sam McCall via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rGd9d9a2cb2f0d: [clangd] Use index for go-to-type (authored by sammccall). Changed prior to commit: http

[PATCH] D132779: Enforce module decl-use restrictions and private header restrictions in textual headers

2023-07-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D132779#4523783 , @jansvoboda11 wrote: > Hi @rsmith, this commit makes it possible for `HeaderInfo::LookupFile()` to > be called with different `RequestingModule` within single `CompilerInstance`. > This is problematic, since

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

2023-07-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The idea would be looking for places we EvaluateAsRValue an array or struct. Not sure what that stack trace represents. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76096/new/ https://reviews.llvm.org/D76096 __

[PATCH] D155544: [AIX][TLS] Add -maix-small-local-exec-tls option.

2023-07-21 Thread Amy Kwan via Phabricator via cfe-commits
amyk added a comment. In D155544#4523536 , @hubert.reinterpretcast wrote: > Patch should not land before back-end patch. I also suggest having the patch > incorporate the new option into the Clang release notes before it lands. I'm currently addressing

[PATCH] D153946: [clangd] Add a flag to allow indexing of reserved identifiers

2023-07-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D153946#4521576 , @nridge wrote: > Yeah, I'm happy to go with D155381 instead. > > In D153946#4503585 , @sammccall > wrote: > >> (Stupid over-flexi

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-21 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann requested changes to this revision. tahonermann added a comment. This revision now requires changes to proceed. I think this is looking good. The only big thing I noticed is some code that looks like it should have been removed with the last set of changes. Otherwise, just some minor

[clang] 775d6df - [Headers][doc] Add SHA1/SHA256 intrinsic descriptions

2023-07-21 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2023-07-21T14:26:47-07:00 New Revision: 775d6df6a5f2fbe8d4ad6174badc2ef553ada6e3 URL: https://github.com/llvm/llvm-project/commit/775d6df6a5f2fbe8d4ad6174badc2ef553ada6e3 DIFF: https://github.com/llvm/llvm-project/commit/775d6df6a5f2fbe8d4ad6174badc2ef553ada6e3.diff

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

2023-07-21 Thread Paul Robinson 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 rG775d6df6a5f2: [Headers][doc] Add SHA1/SHA256 intrinsic descriptions (authored by probinson). Herald added a project: clang. Changed prior to commit:

[clang-tools-extra] 290a98c - [clangd] Allow indexing of __reserved_names outside system headers

2023-07-21 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2023-07-21T23:30:31+02:00 New Revision: 290a98c7b00899b6aba0fc892e8f29fecc00a82e URL: https://github.com/llvm/llvm-project/commit/290a98c7b00899b6aba0fc892e8f29fecc00a82e DIFF: https://github.com/llvm/llvm-project/commit/290a98c7b00899b6aba0fc892e8f29fecc00a82e.diff LO

[PATCH] D155381: [clangd] Allow indexing of __reserved_names outside system headers

2023-07-21 Thread Sam McCall 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 rG290a98c7b008: [clangd] Allow indexing of __reserved_names outside system headers (authored by sammccall). Changed prior to commit: https://reviews

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

2023-07-21 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Did you evaluate trying to use `StepsLeft` at all to limit the allocation? Should the limit be setable via the command line like what we do with steps via `-fconstexpr-steps`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

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

2023-07-21 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson created this revision. tejohnson added reviewers: aeubanks, nikic. Herald added subscribers: khei4, wlei, StephenFan, wenlei, hiraditya. Herald added a project: All. tejohnson requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: cfe-commits. S

[PATCH] D155998: Set default C++ level for Playstation to C++17.

2023-07-21 Thread Sunil Srivastava via Phabricator via cfe-commits
Sunil_Srivastava created this revision. Herald added a project: All. Sunil_Srivastava 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/D155998 Files: clang/lib/Basic/LangStan

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

2023-07-21 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/test/Lexer/case-insensitive-include-win.c:5-9 +// Note: We must use the real path here, because the logic to detect case +// mismatch relies on resolving the real path and checking that casing differs. +// If we use %t and we a

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

2023-07-21 Thread Paul Robinson via Phabricator via cfe-commits
probinson updated this revision to Diff 543075. probinson marked 4 inline comments as done. probinson added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155859/new/ https://reviews.llvm.org/D155859 Files: clang/lib/Headers/adxintrin.h clang/lib/

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

2023-07-21 Thread Paul Robinson via Phabricator via cfe-commits
probinson added inline comments. Comment at: clang/lib/Headers/rdseedintrin.h:56 +/// ELSE +/// Store16(__p, 0) +/// result := 0 pengfei wrote: > 32 Oops. Fixed. Comment at: clang/lib/Headers/rdseedintrin.h:84 +/// ELSE +/// Store16(__p,

[PATCH] D153946: [clangd] Add a flag to allow indexing of reserved identifiers

2023-07-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge abandoned this revision. nridge added a comment. Abandoning in favour of D155381 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153946/new/ https://reviews.llvm.org/D153946

[PATCH] D155544: [AIX][TLS] Add -maix-small-local-exec-tls option.

2023-07-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D155544#4523857 , @amyk wrote: > Wouldn't this patch need to land before the back-end patch, because I > introduce the option here, and then I use it in the backend patch? Please move the `llvm/` changes into t

[PATCH] D154923: [CodeGen] Support bitcode input containing multiple modules

2023-07-21 Thread Matthew Voss via Phabricator via cfe-commits
ormris added a comment. This is a good way to resolve the inconsistencies I was looking at in my own review. > I think whether a bitcode input file contains 2 modules (internal > implementation strategy) should not be a criterion to require an additional > driver option Agreed. Most users don

[PATCH] D155211: [NVPTX] Add initial support for '.alias' in PTX

2023-07-21 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf4381d464457: [NVPTX] Add initial support for '.alias' in PTX (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155211/new/ https://revie

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D76096#4523828 , @efriedma wrote: > The idea would be looking for places we EvaluateAsRValue an array or struct. > Not sure what that stack trace represents. Perhaps you mean calling `EvaluateAsRValue` with a `InitLis

[PATCH] D155998: Set default C++ level for Playstation(r) to C++17.

2023-07-21 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. The value of a separate test for PS4/PS5 is questionable, now that it's the same as the general Clang default. Probably better to delete `lang-std-sie.cpp` and remove the UNSUPPORTED from `lang-std.cpp` ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

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

2023-07-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The ones most likely to be a concern are InitListExpr and StringLiteral. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76096/new/ https://reviews.llvm.org/D76096 ___ cfe-commits

[PATCH] D154923: [CodeGen] Support bitcode input containing multiple modules

2023-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 543083. MaskRay edited the summary of this revision. MaskRay added a comment. rename a variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154923/new/ https://reviews.llvm.org/D154923 Files: clang/lib/Cod

[PATCH] D154923: [CodeGen] Support bitcode input containing multiple modules

2023-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 543084. MaskRay added a comment. rename a variable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154923/new/ https://reviews.llvm.org/D154923 Files: clang/lib/CodeGen/CodeGenAction.cpp clang/test/CodeGen/s

[PATCH] D155998: Set default C++ level for PlayStation(r) to C++17.

2023-07-21 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. (Also remove the now-incorrect comment from lang-std.cpp) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155998/new/ https://reviews.llvm.org/D155998 ___ cfe-commits mailing lis

[PATCH] D156000: Track the RequestingModule in the HeaderSearch LookupFile cache.

2023-07-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: jansvoboda11. Herald added a project: All. rsmith requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Different requesting modules can have different lookup results, so don't cache results

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

2023-07-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:15191 OverloadCandidateSet::iterator Best; switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { case OR_Success: shafik wrote: > @rsmith if `R.isAmbiguous()` should we ev

[PATCH] D154503: [Sema] Fix handling of functions that hide classes

2023-07-21 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thank you, this looks great, and I really appreciate that you found a way to make it work with just the single loop (in the typical case). CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D155998: Set default C++ level for PlayStation(r) to C++17.

2023-07-21 Thread Sunil Srivastava via Phabricator via cfe-commits
Sunil_Srivastava updated this revision to Diff 543088. Sunil_Srivastava added a comment. Deleted Sie specific test, now that the behavior is same as the default. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155998/new/ https://reviews.llvm.org/D155998 Files: clang/lib/Basic/LangStan

[PATCH] D146242: [ARM] Fixing ABI mismatch for packed structs passed as function arguments

2023-07-21 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Okay, LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146242/new/ https://reviews.llvm.org/D146242

[PATCH] D154658: Optimize emission of `dynamic_cast` to final classes.

2023-07-21 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154658/new/ https://reviews.llvm.org/D154658 ___

[PATCH] D155396: [Sema][ObjC] Invalidate BlockDecl with invalid return expr & its parent BlockExpr

2023-07-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Dropping the entire block from the AST on error would be unfortunate for some kinds of tooling, but as long as we maintain it with a `RecoveryExpr`, that seems like a fine approach to me. As a general rule, I think we should be tracking basically everything on the `Bl

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D76096#4524003 , @efriedma wrote: > The ones most likely to be a concern are InitListExpr and StringLiteral. Here's a reduced instance from the Linux kernel: struct timespec64 { long tv_sec; long tv_nsec; }

[PATCH] D155998: Set default C++ level for PlayStation(r) to C++17.

2023-07-21 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. Huh. It looks like someone else removed that stuff from lang-std.cpp recently. I'd have thought that would cause a failure on our bot, but whatever. LGTM. CHANGES SINCE LAST ACTION ht

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:13-15 +#if __has_include("hip/hip_version.h") +#include "hip/hip_version.h" +#endif // __has_include("hip/hip_version.h") pls condition this with ``` #if !defined(__HIP

[PATCH] D156003: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-21 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza created this revision. Herald added a project: All. lukasza requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Consider the test input below: struct [[clang::trivial_abi]] Trivial { Trivial() {} Trivial(Trivial&& other) {}

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

2023-07-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D76096#4524092 , @nickdesaulniers wrote: > In D76096#4524003 , @efriedma wrote: > >> The ones most likely to be a concern are InitListExpr and StringLiteral. > > Here's a reduced

[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

2023-07-21 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza marked 5 inline comments as done. lukasza added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:10325 - for (const auto *FD : RD.fields()) { -// Ill-formed if the field is an ObjectiveC pointer or of a type that is -// non-trivial for the purpose of

[PATCH] D156000: Track the RequestingModule in the HeaderSearch LookupFile cache.

2023-07-21 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM, thanks for the quick turnaround! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156000/new/ https://reviews.llvm.org/D156000 _

[PATCH] D156004: s/ #include / #include "llvm/ADT/SmallVector.h" /

2023-07-21 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza created this revision. Herald added a project: All. lukasza 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/D156004 Files: clang/lib/Sema/SemaDeclCXX.cpp Index: cl

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

2023-07-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Hmm, that kind of construct could run into issues with large global variables. If we "inline" a bunch of large global constants into initializers for arrays, we could significantly increase codesize. Not sure how likely that is in practice. We could maybe consider t

[PATCH] D156004: s/ #include / #include "llvm/ADT/SmallVector.h" /

2023-07-21 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza added a comment. https://llvm.org/docs/MyFirstTypoFix.html#updating-your-change told me to run `arc diff`... not sure if I should abandon the original revision and reupload a cleaned-up fix instead? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

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

2023-07-21 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Is the idea for the way forward here to ensure (i.e. adding code such) that > ConstExprEmitter can constant evaluate such Expr's? For that exact construct, EvaluateAsRValue will also fail, so there's no real regression. The issue would be for a constant global varia

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

2023-07-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I've done a pass through this file looking for places where we incorrectly add to the ODR hash a type that was written within some other entity than the one that we're ODR hashing, that could validly be spelled differently in different declarations of that other entity.

[PATCH] D153701: [WIP][Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-07-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:8901-8914 + // [P2718R0] Lifetime extension in range-based for loops. + // + // 6.7.7 [class.temporary] p5: + // There are four contexts in which temporaries are destroyed at a different + // point than

[PATCH] D155540: [clangd] Remove extra dependancies for clangd

2023-07-21 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir added a comment. Thank you for the review and your comments @sammccall and @mstorsjo. As I understand there is no strong opinion here either way. I think we can leave things as they are for now. I am going to abandon this patch. If someone else feels strongly about removing them, they ca

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-21 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. This change to lang-std.cpp causes it not to verify _which_ language standard is the default. It only verifies that cuda and hip don't _change_ it. If you run FileCheck on one of those output files, it would preserve that property. Repository: rG LLVM Github Monore

[clang] 7c5e4ef - Track the RequestingModule in the HeaderSearch LookupFile cache.

2023-07-21 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-07-21T15:49:47-07:00 New Revision: 7c5e4efb099e0badb4912467b7286938a4ed5011 URL: https://github.com/llvm/llvm-project/commit/7c5e4efb099e0badb4912467b7286938a4ed5011 DIFF: https://github.com/llvm/llvm-project/commit/7c5e4efb099e0badb4912467b7286938a4ed5011.diff

[PATCH] D156000: Track the RequestingModule in the HeaderSearch LookupFile cache.

2023-07-21 Thread Richard Smith - zygoloid 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 rG7c5e4efb099e: Track the RequestingModule in the HeaderSearch LookupFile cache. (authored by rsmith). Repository: rG LLVM Github Monorepo CHANGES

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

2023-07-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Thanks! Comment at: clang/test/Analysis/lifetime-cfg-output.cpp:6 +// that has non-trivial destructor. As the behavior for such types is different +// from ones with tr

[clang] 17f4f26 - Revert "Reapply [IR] Mark and constant expressions as undesirable"

2023-07-21 Thread Nathan Chancellor via cfe-commits
Author: Nathan Chancellor Date: 2023-07-21T15:57:03-07:00 New Revision: 17f4f262fc5c4361cf43e91f2137ff7b2dcadc62 URL: https://github.com/llvm/llvm-project/commit/17f4f262fc5c4361cf43e91f2137ff7b2dcadc62 DIFF: https://github.com/llvm/llvm-project/commit/17f4f262fc5c4361cf43e91f2137ff7b2dcadc62.d

[PATCH] D155540: [clangd] Remove extra dependancies for clangd

2023-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `llvm/cmake/modules/HandleLLVMOptions.cmake` passes `-Wl,-z,defs`. `-DBUILD_SHARED_LIBS=on` builds get checking from the linker option (https://maskray.me/blog/2021-06-13-dependency-related-linker-options#z-defs). This is similar Bazel's layering_check. For a dependenc

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

2023-07-21 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @rsmith, thanks for the suggestions! Could you go over `ODRHash::AddTemplateName` suggest how to fix it to address https://reviews.llvm.org/D153003 and https://reviews.llvm.org/D41416#4496451? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 543109. RIscRIpt marked 5 inline comments as done. RIscRIpt added a comment. Address review comments, rebase onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. Thanks to your suggestion of testing different types, I realized clang does not support MSVC macros with `u`, `u8`, and `U` prefixes in addition to `L__FUNCDNAME`. By the way, clang replicates MSVC behavior a little bit incorrectly: `L__FUNCTION__` is not a valid token

<    1   2   3   >