[PATCH] D156326: [OpenMP][Docs] Update 'loop' directive status in OpenMP support.

2023-07-26 Thread David Pagan via Phabricator via cfe-commits
ddpagan created this revision. ddpagan added reviewers: jdoerfert, jhuber6, jplehr. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. ddpagan requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Update

[clang] b41bf9d - [OpenMP][Docs] Update 'loop' directive status in OpenMP support.

2023-07-26 Thread Dave Pagan via cfe-commits
Author: Dave Pagan Date: 2023-07-26T08:34:01-05:00 New Revision: b41bf9d8576f44e30726e42d31f760032c08333d URL: https://github.com/llvm/llvm-project/commit/b41bf9d8576f44e30726e42d31f760032c08333d DIFF: https://github.com/llvm/llvm-project/commit/b41bf9d8576f44e30726e42d31f760032c08333d.diff LO

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

2023-07-26 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. FYI this is a 0.5% compile-time regression on `O0` builds (https://llvm-compile-time-tracker.com/compare.php?from=69593aa5c054cec6be6b822c073ccdc63748a68d&to=7abb5fc618cec66841a8280d2a099a4c9c8cb91b&stat=instructions:u). Is that expected? Repository: rG LLVM Github Mon

[PATCH] D156261: [NFC] Cast unchecked return values to void.

2023-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think the cast to void is unneeded in these cases. We typically add a cast to void when the function exists to compute a result but also has side effects. e.g., you typically call `malloc()` because you want the returned pointer, but if for some reason you don't

[PATCH] D156330: [hexagon] restore library path arguments

2023-07-26 Thread Brian Cain via Phabricator via cfe-commits
bcain created this revision. bcain added reviewers: sidneym, kparzysz, MaskRay. Herald added a project: All. bcain requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before applying this fix, clang would not include the specified library path

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

2023-07-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D138263#3936536 , @HazardyKnusperkeks wrote: > In D138263#3936007 , @owenpan wrote: > >> I suppose it's fairly easy to annotate the `l_brace` of a namespace? If so, >> then wou

[PATCH] D155878: [clangd] Loose include-cleaner matching for verbatim headers

2023-07-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks! Comment at: clang-tools-extra/clangd/Hover.cpp:1250 const SourceManager &SM = AST.getSourceManager(); - const auto &ConvertedMainFileIncludes = - convert

[PATCH] D142327: [clang][RISCV] Fix ABI handling of empty structs with hard FP calling conventions in C++

2023-07-26 Thread Alex Bradbury via Phabricator via cfe-commits
asb updated this revision to Diff 544349. asb added a comment. I've updated the patch to fix the reported issue (adding an additional check to detectFPCCEligibleStruct). What I haven't been able to do so far is to extract a test case that shows the issue indicated by @SixWeining without relying

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

2023-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 544345. yaxunl retitled this revision from "[HIP] Add `-fno-hip-uniform-block`" to "[HIP] Add `-fno-offload-uniform-block`". yaxunl edited the summary of this revision. yaxunl added a comment. rename the option CHANGES SINCE LAST ACTION https://reviews.llv

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

2023-07-26 Thread serge via Phabricator via cfe-commits
serge-sans-paille abandoned this revision. serge-sans-paille added a comment. gcc bug filled as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110816 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155580/new/ https://reviews.llvm.org/D155580 ___

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

2023-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping I renamed the option as `-fno-offload-uniform-block`. I switched to `offload` instead of `gpu` because I think in the long run offloading toolchains are not limited to GPUs, therefore sooner or later we will feel `-fgpu-` options are awkward. I did not use `--no-of

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9866 + (CGM.getLangOpts().OpenMP >= 51 && + needsTaskBasedThreadLimit(D.getDirectiveKind()) && + D.hasClausesOfKind()); I think you don't need needsTaskBasedThreadLi

[PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 544364. ymandel marked an inline comment as done. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156254/new/ https://reviews.llvm.org/D156254 Files: clang/include/cla

[PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 544367. ymandel marked 4 inline comments as done. ymandel added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156254/new/ https://reviews.llvm.org/D156254 Files: clang/include/clan

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

2023-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. `__dynamic_cast` is part of standard C++ library. If we ever implement it for GPU, chances are we will use libc++abi with the same signature as other targets, i.e., the 2nd and 3rd arguments are generic pointers. I feel it is safer to do an address space cast when callin

[PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 3 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:261-265 + using ::llvm::Expected; + + Expected Context = ControlFlowContext::build(FuncDecl); + if (!Context) +return Context

[PATCH] D156336: [clang][docs][OpenMP] Update status of OMPT support.

2023-07-26 Thread Michael Halkenhäuser via Phabricator via cfe-commits
mhalk created this revision. mhalk added a reviewer: dhruvachak. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. mhalk requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, jplehr, sstefan1. Herald added a p

[PATCH] D156336: [clang][docs][OpenMP] Update status of OMPT support.

2023-07-26 Thread Michael Halkenhäuser via Phabricator via cfe-commits
mhalk added a comment. Please, take a look as I've also marked the EMI callbacks as done and if the other added/changed descriptions match. Just want to point out: the lower section is `5.1` (I was a bit confused as many people talked about 5.2). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D152932: [ARM] Adding precommit tests for D146242

2023-07-26 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas accepted this revision. pratlucas 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/D152932/new/ https://reviews.llvm.org/D152932

[PATCH] D156255: [clang-tidy] Update unchecked-optional-access-check to use convenience function for diagnosing `FunctionDecl`s.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 544370. ymandel added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156255/new/ https://reviews.llvm.org/D156255 Files: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAcces

[PATCH] D155574: [clang][ASTImporter] Fix import of recursive field initializer.

2023-07-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 544371. balazske added a comment. Added check for duplicate import of initializer. Added more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155574/new/ https://reviews.llvm.org/D155574 Files: clang/l

[PATCH] D156337: [clang] Allow setting the uninitialized attribute on record

2023-07-26 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: jfb, aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This attrib

[PATCH] D156326: [OpenMP][Docs] Update 'loop' directive status in OpenMP support.

2023-07-26 Thread David Pagan via Phabricator via cfe-commits
ddpagan closed this revision. ddpagan added a comment. https://github.com/llvm/llvm-project/commit/b41bf9d8576f44e30726e42d31f760032c08333d Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156326/new/ https://reviews.llvm.org/D156326

[PATCH] D142569: [OpenMP] Introduce kernel environment

2023-07-26 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 544381. tianshilei1992 added a comment. rebase and prepare for landing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142569/new/ https://reviews.llvm.org/D142569 Files: clang/lib/CodeGen/CGOpenMPRunti

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

2023-07-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a subscriber: var-const. Mordante added a comment. In D152003#4534963 , @Fznamznon wrote: >> What do you mean with libstdc++ is fine? > > What I mean is when I do (current patch is applied to clang): > > source/llvm-project/build/bin/clan

[clang] 6c412b6 - [BPF] Add a few new insns under cpu=v4

2023-07-26 Thread Yonghong Song via cfe-commits
Author: Yonghong Song Date: 2023-07-26T08:37:30-07:00 New Revision: 6c412b6c6faa2dabd8602d35d3f5e796fb1daf80 URL: https://github.com/llvm/llvm-project/commit/6c412b6c6faa2dabd8602d35d3f5e796fb1daf80 DIFF: https://github.com/llvm/llvm-project/commit/6c412b6c6faa2dabd8602d35d3f5e796fb1daf80.diff

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

2023-07-26 Thread Yonghong Song 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 rG6c412b6c6faa: [BPF] Add a few new insns under cpu=v4 (authored by yonghong-song). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2023-07-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG, address the nits below please. Comment at: clang/lib/CodeGen/CodeGenModule.h:1017 +return LLVMCompilerUsed; + } + Unused now. ==

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

2023-07-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The list of bugs I shared was meant to illustrate the problem, it's not meant to be exhaustive. I am not sure there is a need to rush and fix them before the release, it is just a signal that makes us worried about the feature. The bugs are niche, and likely not a

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

2023-07-26 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 544386. yronglin added a comment. Try implement Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153701/new/ https://reviews.llvm.org/D153701 Files: clang/include/clang/AST/ExprCXX.h clang/include/clang/Sema

[clang] cb63fa0 - [NFC][clang] Fix static analyzer concerns

2023-07-26 Thread via cfe-commits
Author: Podchishchaeva, Mariya Date: 2023-07-26T08:40:40-07:00 New Revision: cb63fa00d1f723e3b4e2fb5e6645595eb0a6e84c URL: https://github.com/llvm/llvm-project/commit/cb63fa00d1f723e3b4e2fb5e6645595eb0a6e84c DIFF: https://github.com/llvm/llvm-project/commit/cb63fa00d1f723e3b4e2fb5e6645595eb0a6e

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

2023-07-26 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcb63fa00d1f7: [NFC][clang] Fix static analyzer concerns (authored by Fznamznon). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156222/new/ https://reviews.l

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

2023-07-26 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. Thanks for your comments and sorry for the very late reply, I have been investigating how to achieve it these days. Comment at: clang/lib/Sema/SemaExprCXX.cpp:8901-8914 + // [P2718R0] Lifetime extension in range-based for loops. + // + // 6.7.7 [cl

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

2023-07-26 Thread Yurong via Phabricator via cfe-commits
yronglin added a comment. This is a very early implement, please give me some time to add and fix tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153701/new/ https://reviews.llvm.org/D153701 ___ cfe

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

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

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

2023-07-26 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. At first, it sounded to me like the option that would best suit Google's needs is `-fno-coroutines`. However: - I see that Google does have some limited use of coroutines; perhaps that could be enabled on a per-TU or project basis by the build system? However... - T

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

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

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

2023-07-26 Thread Stephen Peckham via Phabricator via cfe-commits
stephenpeckham accepted this revision. stephenpeckham added a comment. This revision is now accepted and ready to land. I don't see any reason to check the OBJECT_MODE environment variable if the -X flag is used. What would the error be: "You specified a valid -X flag, but by the way, OBJECT_M

[PATCH] D147283: [Sema] Search template parameter scopes before searching namespace/file scopes when performing unqualified name lookup

2023-07-26 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147283/new/ https://reviews.llvm.org/D147283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-26 Thread Wang Pengcheng via Phabricator via cfe-commits
wangpc added a comment. In D112921#4532378 , @Mordante wrote: > In D112921#4530916 , @wangpc wrote: > >> In D112921#4529182 , @Mordante >> wrote: >> >>> I noticed some of

[clang] 16902df - [ARM] Adding precommit tests for D146242

2023-07-26 Thread Jirui Wu via cfe-commits
Author: Jirui Wu Date: 2023-07-26T17:31:59+01:00 New Revision: 16902df6f25aea2bc10de37297691fcf1d0b89cc URL: https://github.com/llvm/llvm-project/commit/16902df6f25aea2bc10de37297691fcf1d0b89cc DIFF: https://github.com/llvm/llvm-project/commit/16902df6f25aea2bc10de37297691fcf1d0b89cc.diff LOG:

[PATCH] D152932: [ARM] Adding precommit tests for D146242

2023-07-26 Thread Jirui Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG16902df6f25a: [ARM] Adding precommit tests for D146242 (authored by JiruiWu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152932/new/ https://reviews.llvm

[PATCH] D156321: [Clang][RISCV] Remove RVV intrinsics `vread_csr`,`vwrite_csr`

2023-07-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper 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/D156321/new/ https://reviews.llvm.org/D156321 ___

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

2023-07-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D156247#4535664 , @tahonermann wrote: > At first, it sounded to me like the option that would best suit Google's > needs is `-fno-coroutines`. However: > > - I see that Google does have some limited use of coroutines; p

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

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

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

2023-07-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. This should be named -foffload*, it should not use HIP in the description, and it should apply to OpenMP as well. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155213/new/ https://reviews.llvm.org/D155213 ___ cfe-c

[PATCH] D156255: [clang-tidy] Update unchecked-optional-access-check to use convenience function for diagnosing `FunctionDecl`s.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 544415. ymandel added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156255/new/ https://reviews.llvm.org/D156255 Files: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCh

[clang] 1429240 - [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-07-26T17:12:29Z New Revision: 1429240ed63b05991e175e623b3fa5b72e59dc5b URL: https://github.com/llvm/llvm-project/commit/1429240ed63b05991e175e623b3fa5b72e59dc5b DIFF: https://github.com/llvm/llvm-project/commit/1429240ed63b05991e175e623b3fa5b72e59dc5b.diff

[clang] e9570d1 - [clang-tidy] Update unchecked-optiona-access-check to use convenience function for diagnosing `FunctionDecl`s.

2023-07-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-07-26T17:12:29Z New Revision: e9570d1e59ba381ea55327b5cbed0b5bc05677fe URL: https://github.com/llvm/llvm-project/commit/e9570d1e59ba381ea55327b5cbed0b5bc05677fe DIFF: https://github.com/llvm/llvm-project/commit/e9570d1e59ba381ea55327b5cbed0b5bc05677fe.diff

[PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. ymandel marked an inline comment as done. Closed by commit rG1429240ed63b: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and… (authored by

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

2023-07-26 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. If there is consensus we need to do _something_, I would prefer that solution as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156247/new/ https://reviews.llvm.org/D156247 ___

[PATCH] D156255: [clang-tidy] Update unchecked-optional-access-check to use convenience function for diagnosing `FunctionDecl`s.

2023-07-26 Thread Yitzhak Mandelbaum 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 rGe9570d1e59ba: [clang-tidy] Update unchecked-optiona-access-check to use convenience function… (authored by ymandel). Repository: rG LLVM Github M

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

2023-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D155457#4526168 , @xgupta wrote: > In D155457#4523388 , @cor3ntin > wrote: > >> I'm not sure I understand the motivation for this change. Sure, people do >> that but they also m

[PATCH] D155356: [clang][Interp] Implement __builtin_nan family of functions

2023-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:45 + /// The current interpreter does not accept this, but it should. + constexpr float NaN2 = __builtin_nans([](){return "0xAE98";}()); // ref-error {{must be initialized by a constan

[PATCH] D155545: [clang][Interp] Pass CallExpr to builtin functions

2023-07-26 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155545/new/ https://reviews.llvm.org/D155545 ___ cfe-commits mailing lis

[PATCH] D154911: Enabling fstack_clash_protection for arm32 bit, thumb and thumb2 mode

2023-07-26 Thread Tamar Christina via Phabricator via cfe-commits
tnfchris added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3460 + } else if (EffectiveTriple.isArm() || EffectiveTriple.isThumb()) { +CmdArgs.push_back("-mstack-probe-size=1024"); + } efriedma wrote: > Why 1024? 1024 was experimentall

[PATCH] D156330: [hexagon] restore library path arguments

2023-07-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Tip: use `%clang -fdriver-only -Werror -v` to test that a command produces no warning or error and has an exit code of 0. Without it your `Args.ClaimAllArgs(options::OPT_L);` change is untes

[PATCH] D142569: [OpenMP] Introduce kernel environment

2023-07-26 Thread Shilei Tian 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 rG10068cd65440: [OpenMP] Introduce kernel environment (authored by tianshilei1992). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D155356: [clang][Interp] Implement __builtin_nan family of functions

2023-07-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:53 + constexpr char f[] = {'0', 'x', 'A', 'E', '\0'}; + constexpr double NaN6 = __builtin_nan(f); // ref-error {{must be initialized by a constant expression}} + aaron.ballm

Re: [PATCH] D156254: [clang][dataflow] Add convenience function for analysing and `FunctionDecl` and diagnosing it.

2023-07-26 Thread Yitzhak Mandelbaum via cfe-commits
This broke one of the builds. https://lab.llvm.org/buildbot/#/builders/121/builds/32939/steps/4/logs/stdio. Working on a fix now. On Wed, Jul 26, 2023 at 1:12 PM Yitzhak Mandelbaum via Phabricator < revi...@reviews.llvm.org> wrote: > This revision was landed with ongoing or failed builds. > This

[clang] 75abfa2 - Fix build breakages in rG1429240ed63b.

2023-07-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-07-26T17:37:05Z New Revision: 75abfa2474da663f22e33e63d34bb843ef01d12b URL: https://github.com/llvm/llvm-project/commit/75abfa2474da663f22e33e63d34bb843ef01d12b DIFF: https://github.com/llvm/llvm-project/commit/75abfa2474da663f22e33e63d34bb843ef01d12b.diff

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

2023-07-26 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D155870#4535425 , @yaxunl wrote: > `__dynamic_cast` is part of standard C++ library. If we ever implement it for > GPU, chances are we will use libc++abi with the same signature as other > targets, i.e., the 2nd and 3rd argum

[PATCH] D155356: [clang][Interp] Implement __builtin_nan family of functions

2023-07-26 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! Comment at: clang/test/AST/Interp/builtin-functions.cpp:53 + constexpr char f[] = {'0', 'x', 'A', 'E', '\0'}; + constexpr double NaN6 = __builtin_nan(f);

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-26 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 544428. koops added a comment. Moving the variable MappedDirective into structure SharingMapTy. Enough comments have been put in place to explain. Modified some of the loop_bind tests to cater to windows and debian platform. CHANGES SINCE LAST ACTION https:

[PATCH] D156344: Disable call to fma for soft-float

2023-07-26 Thread Kishan Parmar via Phabricator via cfe-commits
long5hot updated this revision to Diff 544432. long5hot added a comment. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. After clang release/16.x there is a regression that -mabi=elfv1 or -mabi=elfv2 are being unused and throws warning. But clang-trunk throws error f

[PATCH] D155356: [clang][Interp] Implement __builtin_nan family of functions

2023-07-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/AST/Interp/builtin-functions.cpp:53 + constexpr char f[] = {'0', 'x', 'A', 'E', '\0'}; + constexpr double NaN6 = __builtin_nan(f); // ref-error {{must be initialized by a constant expression}} + aaron.ballm

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

2023-07-26 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. > You are absolutely right, -fno-coroutines would totally work for us, had it > been available. Good. Gcc handles `-fcoroutines` and `-fno-coroutines` as I would expect (h

[PATCH] D155356: [clang][Interp] Implement __builtin_nan family of functions

2023-07-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 544435. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155356/new/ https://reviews.llvm.org/D155356 Files: clang/lib/AST/Interp/InterpBuiltin.cpp clang/test/AST/Interp/builtin-functions.cpp Index: clang/test/AST/Interp/builtin-functions.cpp =

[PATCH] D156344: Disable call to fma for soft-float

2023-07-26 Thread Kishan Parmar via Phabricator via cfe-commits
long5hot updated this revision to Diff 544437. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156344/new/ https://reviews.llvm.org/D156344 Files: llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/test/CodeGen/PowerPC/ppcsoftops.ll llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn

[PATCH] D156344: Disable call to fma for soft-float

2023-07-26 Thread Kishan Parmar via Phabricator via cfe-commits
long5hot updated this revision to Diff 544438. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156344/new/ https://reviews.llvm.org/D156344 Files: llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/test/CodeGen/PowerPC/ppcsoftops.ll Index: llvm/test/CodeGen/PowerPC/ppcsoftops.ll ==

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2023-07-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D112921#4535716 , @wangpc wrote: > In D112921#4532378 , @Mordante > wrote: > >> In D112921#4530916 , @wangpc wrote: >> >>> In D112921#4529182

[PATCH] D156351: clang driver throws error for -mabi=elfv2 or elfv2

2023-07-26 Thread Kishan Parmar via Phabricator via cfe-commits
long5hot created this revision. Herald added a project: All. long5hot requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. After clang release/16.x there is a regression that -mabi=elfv1 or -mabi=elfv2 are being unused and throws warning

[PATCH] D154911: Enabling fstack_clash_protection for arm32 bit, thumb and thumb2 mode

2023-07-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3460 + } else if (EffectiveTriple.isArm() || EffectiveTriple.isThumb()) { +CmdArgs.push_back("-mstack-probe-size=1024"); + } tnfchris wrote: > efriedma wrote: > > Why 1024? >

[PATCH] D156344: Disable call to fma for soft-float

2023-07-26 Thread Kishan Parmar via Phabricator via cfe-commits
long5hot added a comment. Apologies for updating diff too many times, used arcanist first time. Won't happend again! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156344/new/ https://reviews.llvm.org/D156344 ___ cfe-commits mailing list cfe-

[PATCH] D156352: [OpenMP][Sema] Fix directive name modifier/if-clause/'target teams loop'

2023-07-26 Thread David Pagan via Phabricator via cfe-commits
ddpagan created this revision. ddpagan added reviewers: ABataev, jdoerfert, ronlieb. ddpagan added projects: OpenMP, clang. Herald added subscribers: sunshaoce, guansong, yaxunl. Herald added a project: All. ddpagan requested review of this revision. Herald added subscribers: cfe-commits, jplehr, s

[PATCH] D156277: [Parser][ObjC] Stop parsing on eof

2023-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseObjc.cpp:749 + if (!Tok.is(tok::eof)) +ConsumeToken(); break; danix800 wrote: > tbaeder wrote: > > Why is there a `ConsumeToken()` call at all here? The token is already >

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

2023-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D156247#4536034 , @tahonermann wrote: >> You are absolutely right, -fno-coroutines would totally work for us, had it >> been available. > > Good. Gcc handles `-fcoroutines` and `-fno-coroutines` as I would expect > (ht

[PATCH] D156352: [OpenMP][Sema] Fix directive name modifier/if-clause/'target teams loop'

2023-07-26 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/D156352/new/ https://reviews.llvm.org/D156352 ___

[PATCH] D156307: [clang][DeclPrinter] Fix AST print of curly constructor initializers

2023-07-26 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Maybe add a designated init test in there as well e.g. struct A { int x {}; }; struct B { B() : a({.x = 1}) { } A a; }; Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156307/new/ https://revie

[clang] 7cb9698 - [OpenMP][Sema] Fix directive name modifier/if-clause/'target teams loop'

2023-07-26 Thread Dave Pagan via cfe-commits
Author: Dave Pagan Date: 2023-07-26T13:19:56-05:00 New Revision: 7cb9698374ac2eb4cb01dd1a866339e8aa409834 URL: https://github.com/llvm/llvm-project/commit/7cb9698374ac2eb4cb01dd1a866339e8aa409834 DIFF: https://github.com/llvm/llvm-project/commit/7cb9698374ac2eb4cb01dd1a866339e8aa409834.diff LO

[PATCH] D156352: [OpenMP][Sema] Fix directive name modifier/if-clause/'target teams loop'

2023-07-26 Thread David Pagan 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 rG7cb9698374ac: [OpenMP][Sema] Fix directive name modifier/if-clause/'target teams loop' (authored by ddpagan). Repository: rG LLVM Github Monorepo

[PATCH] D156307: [clang][DeclPrinter] Fix AST print of curly constructor initializers

2023-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/AST/ast-print-method-decl.cpp:65 + // CHECK-NEXT: CurlyCtorInit() : a1({}), a2{}, b{} { + CurlyCtorInit() : a1({}), a2{}, b{} { + // CHECK-NEXT: } Can you add another ctor that uses round parens for t

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:291 + /// the frontend. + OpenMPDirectiveKind prevMappedDirective; + OpenMPDirectiveKind PrevMappedDirective = llvm::omp::OMPD_unknown; Comment at: clang/include/

[PATCH] D156274: [NFC] Avoid potential dereferencing of nullptr.

2023-07-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:1659 mangleCXXDtorType(Dtor_Complete); +assert(ND); writeAbiTags(ND, AdditionalAbiTags); aaron.ballman wrote: > This seems incorrect -- if the declaration name is a destru

[PATCH] D156274: [NFC] Avoid potential dereferencing of nullptr.

2023-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:1659 mangleCXXDtorType(Dtor_Complete); +assert(ND); writeAbiTags(ND, AdditionalAbiTags); efriedma wrote: > aaron.ballman wrote: > > This seems incorrect -- if the dec

[PATCH] D156175: [clang][ConstExprEmitter] handle NullToPointer ImplicitCastExpr

2023-07-26 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/D156175/new/ https://reviews.llvm.org/D156175 ___

[PATCH] D156277: [Parser][ObjC] Stop parsing on eof

2023-07-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Parse/ParseObjc.cpp:749 + if (!Tok.is(tok::eof)) +ConsumeToken(); break; aaron.ballman wrote: > danix800 wrote: > > tbaeder wrote: > > > Why is there a `ConsumeToken()` call at all here? Th

[PATCH] D156277: [Parser][ObjC] Stop parsing on eof

2023-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseObjc.cpp:749 + if (!Tok.is(tok::eof)) +ConsumeToken(); break; aaron.ballman wrote: > danix800 wrote: > > tbaeder wrote: > > > Why is there a `ConsumeToken()` call at all her

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

2023-07-26 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D76096#4533497 , @efriedma wrote: > Basically, I don't want order-of-magnitude compile-time regressions with > large global variables. There are basically two components to that: > > - That the fast path for emitting g

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

2023-07-26 Thread Tristan Labelle via Phabricator via cfe-commits
MrTrillian added a comment. Ping. Any brave reviewer to help here? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154130/new/ https://reviews.llvm.org/D154130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D156357: clang: Add elementwise bitreverse builtin

2023-07-26 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 created this revision. Herald added a subscriber: Anastasia. Herald added a project: All. bob80905 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add codegen for llvm bitreverse elementwise builtin The bitreverse elementwise built

[PATCH] D156357: clang: Add elementwise bitreverse builtin

2023-07-26 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 544463. bob80905 added a comment. Herald added subscribers: wangpc, luke, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook,

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

2023-07-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:10339-10343 + if (RT->getDecl()->isAnonymousStructOrUnion()) { +FieldsToCheck.append(RT->getDecl()->field_begin(), + RT->getDecl()->field_end()); +continue; +

[PATCH] D155529: [clang-format] Add SpaceInParensOption for __attribute__ keyword

2023-07-26 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 544466. gedare added a comment. Rebase to 18 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155529/new/ https://reviews.llvm.org/D155529 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/ReleaseNotes.

[PATCH] D156277: [Parser][ObjC] Stop parsing on eof

2023-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseObjc.cpp:749 + if (!Tok.is(tok::eof)) +ConsumeToken(); break; rjmccall wrote: > aaron.ballman wrote: > > aaron.ballman wrote: > > > danix800 wrote: > > > > tbaeder wrote: >

[PATCH] D154911: Enabling fstack_clash_protection for arm32 bit, thumb and thumb2 mode

2023-07-26 Thread Tamar Christina via Phabricator via cfe-commits
tnfchris added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3460 + } else if (EffectiveTriple.isArm() || EffectiveTriple.isThumb()) { +CmdArgs.push_back("-mstack-probe-size=1024"); + } efriedma wrote: > tnfchris wrote: > > efriedma wro

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-26 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:263 State.StartOfStringLiteral = 0; + State.NoLineBreak = false; State.StartOfLineLevel = 0; jp4a50 wrote: > HazardyKnusperkeks wrote: > > Was this uninitialize

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

2023-07-26 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D138263#4535269 , @MyDeveloperDay wrote: > In D138263#3936536 , > @HazardyKnusperkeks wrote: > >> In D138263#3936007 , @owenpan >

[PATCH] D156277: [Parser][ObjC] Stop parsing on eof

2023-07-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Parse/ParseObjc.cpp:749 + if (!Tok.is(tok::eof)) +ConsumeToken(); break; aaron.ballman wrote: > rjmccall wrote: > > aaron.ballman wrote: > > > aaron.ballman wrote: > > > > danix800 wrote: >

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

2023-07-26 Thread Łukasz Anforowicz via Phabricator via cfe-commits
lukasza updated this revision to Diff 544476. lukasza added a comment. Added support for `-fclang-abi-compat=17` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155895/new/ https://reviews.llvm.org/D155895 Files: clang/include/clang/Basic/LangOptions.h clang/lib/Frontend/CompilerInvo

<    1   2   3   >