[PATCH] D145767: [Verifier][NFC] Refactor check for associated metadata to allow multiple operands on AIX

2023-03-16 Thread Ting Wang via Phabricator via cfe-commits
tingwang updated this revision to Diff 505709. tingwang added a comment. Add empty case in Verifier/associated-metadata-aix-xcoff.ll Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145767/new/ https://reviews.llvm.org/D145767 Files: clang/test/Cod

[PATCH] D146054: [RISCV] Add -print-supported-marchs and -march=help support

2023-03-16 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4231-4235 + // marchs and quits. + if (Args.getLastArg(options::OPT_print_supported_marchs)) { +RISCVMarchHelp(); +exit(0); + } Plz did the similar action like what OPT_print_sup

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3283 +Sets the current rounding mode. Encoding of the returned values is +same as the result of FLT_ROUNDS, specified by C standard: +0 - toward zero "Sets the current floating-point r

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 505714. mboehme added a comment. Added release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145906/new/ https://reviews.llvm.org/D145906 Files: clang-tools-extra/clang-tidy/utils/ExprSequence.cpp cl

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-16 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D145906#4193014 , @PiotrZSL wrote: > Looks good to me, consider adding info to Release notes, that this check has > been improved/fixed support for designated initializers. Good point, done! Repository: rG LLVM Github Mon

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-03-16 Thread Lu Weining via Phabricator via cfe-commits
SixWeining added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:66 + default: +return IsLA32 ? "ilp32d" : "lp64d"; + } Better to be `f`? (Probably most 32-bit hardwares do not support double-float? But I'm not sure about this.)

[PATCH] D142688: [Clang][Driver] Handle LoongArch multiarch tuples

2023-03-16 Thread Xi Ruoyao via Phabricator via cfe-commits
xry111 added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:66 + default: +return IsLA32 ? "ilp32d" : "lp64d"; + } SixWeining wrote: > Better to be `f`? (Probably most 32-bit hardwares do not support > double-float? But I'm not

[clang-tools-extra] ddbcd98 - [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-16 Thread Martin Braenne via cfe-commits
Author: Martin Braenne Date: 2023-03-16T08:15:13Z New Revision: ddbcd985602dcb5fe78fcf2246cf53922db1f3c3 URL: https://github.com/llvm/llvm-project/commit/ddbcd985602dcb5fe78fcf2246cf53922db1f3c3 DIFF: https://github.com/llvm/llvm-project/commit/ddbcd985602dcb5fe78fcf2246cf53922db1f3c3.diff LOG

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-16 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGddbcd985602d: [clang-tidy] Correctly handle evaluation order of designated initializers. (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D145906?vs=505714&id=505719#toc Reposit

[PATCH] D125095: [Clang][AIX] Add .ref in frontend for AIX XCOFF to support `-bcdtors:csect` linker option

2023-03-16 Thread Ting Wang via Phabricator via cfe-commits
tingwang updated this revision to Diff 505720. tingwang added a comment. As verifier change and baseline test cases have been moved into https://reviews.llvm.org/D145767, update this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125095/new/

[PATCH] D145906: [clang-tidy] Correctly handle evaluation order of designated initializers.

2023-03-16 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Regarding release-notes: I would probably wrote something like "fixed handling for designated initializers", nonene will understand things like "sequence point". If you decide to change this, the just commit this as an [NFC] without review. And checks in this section sho

[PATCH] D145883: [Flang][RISCV] Emit target features for RISC-V

2023-03-16 Thread Maya Amrami via Phabricator via cfe-commits
mamrami added inline comments. Comment at: flang/test/Driver/code-gen-rv64.f90:1 +! Test -emit-obj (RISC-V 64) + Hi :) It seems like the test fails: https://buildkite.com/llvm-project/premerge-checks/builds/141302#0186e55e-199e-401d-ab9f-9f3d47ec87af I see it in

[PATCH] D145883: [Flang][RISCV] Emit target features for RISC-V

2023-03-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/test/Driver/code-gen-rv64.f90:1 +! Test -emit-obj (RISC-V 64) + mamrami wrote: > Hi :) > It seems like the test fails: > https://buildkite.com/llvm-project/premerge-checks/builds/141302#0186e55e-199e-401d-ab9f-

[PATCH] D146202: [clang] Fix a UsingTemplate regression after 3e78fa860235431323aaf08c8fa922d75a7cfffa

2023-03-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added projects: clang, clang-tools-extra. TemplateName::getAsTemplateDecl() returns the underlying TemplateDecl for a UsingTemplate kind template name. We

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Herald added a subscriber: jplehr. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:128 + if (IsHostOffloadingAction) { +for (size_t i = 1; i < Inputs.size(); ++i) { + if (Inputs[i].getType() != types::TY_Nothing) What

[PATCH] D145883: [Flang][RISCV] Emit target features for RISC-V

2023-03-16 Thread Shao-Ce SUN via Phabricator via cfe-commits
sunshaoce added inline comments. Comment at: flang/test/Driver/code-gen-rv64.f90:1 +! Test -emit-obj (RISC-V 64) + awarzynski wrote: > mamrami wrote: > > Hi :) > > It seems like the test fails: > > https://buildkite.com/llvm-project/premerge-checks/builds/141302

[clang] b293c62 - [clang][Lexer] Fix crash/assert clang::HeaderSearch::search_dir_nth

2023-03-16 Thread Dmitry Polukhin via cfe-commits
Author: Dmitry Polukhin Date: 2023-03-16T02:19:11-07:00 New Revision: b293c6280d06f49c5ca7290855911341ab0bdffa URL: https://github.com/llvm/llvm-project/commit/b293c6280d06f49c5ca7290855911341ab0bdffa DIFF: https://github.com/llvm/llvm-project/commit/b293c6280d06f49c5ca7290855911341ab0bdffa.dif

[PATCH] D146156: [clang][Lexer] Fix crash/assert clang::HeaderSearch::search_dir_nth

2023-03-16 Thread Dmitry Polukhin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb293c6280d06: [clang][Lexer] Fix crash/assert clang::HeaderSearch::search_dir_nth (authored by DmitryPolukhin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D145639: [Coroutines] Fix premature conversion of return object

2023-03-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Reverting the RVO breaks some coroutine code we have. The short repro is https://gcc.godbolt.org/z/1543qc8Ee (code at the end of the post, very similar to the deleted constructor in `warn-throw-out-noexcept-coro.cpp`): The RVO seems to be mandated by the standard

[PATCH] D145639: [Coroutines] Fix premature conversion of return object

2023-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. The reproducer seems like what we're searching for tests in https://reviews.llvm.org/D145641. Reverting is common in Clang/LLVM. But let's wait for the response from @bruno temporarily. I think it makes sense to revert this one if @bruno don't response tomorrow. And w

[PATCH] D145639: [Coroutines] Fix premature conversion of return object

2023-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > The RVO seems to be mandated by the standard. Yeah, I thought so... But WG21 decided to not make it in a recent meeting... So we can only make it as a non-mandated compiler optimization. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D146202: [clang] Fix a UsingTemplate regression after 3e78fa860235431323aaf08c8fa922d75a7cfffa

2023-03-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a subscriber: ChuanqiXu. kadircet added a comment. This revision is now accepted and ready to land. FWIW, I believe this patch does the right thing by marking the `DeducedTemplateSpecializationType` as `using`. It's explicitly introduced into the g

[PATCH] D145639: [Coroutines] Fix premature conversion of return object

2023-03-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D145639#4198794 , @ChuanqiXu wrote: > Reverting is common in Clang/LLVM. But let's wait for the response from > @bruno temporarily. I think it makes sense to revert this one if @bruno don't > response tomorrow. And we c

[clang] 7a85aa9 - Emit const globals with constexpr destructor as constant LLVM values

2023-03-16 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2023-03-16T11:02:27+01:00 New Revision: 7a85aa918ccd7bba0e3be94436c62432c08d357a URL: https://github.com/llvm/llvm-project/commit/7a85aa918ccd7bba0e3be94436c62432c08d357a DIFF: https://github.com/llvm/llvm-project/commit/7a85aa918ccd7bba0e3be94436c62432c08d357a.diff

[PATCH] D145369: Emit const globals with constexpr destructor as constant LLVM values

2023-03-16 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hans marked an inline comment as done. Closed by commit rG7a85aa918ccd: Emit const globals with constexpr destructor as constant LLVM values (authored by hans). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D146194: NOT report the warning that unnamed bitfields are uninitialized.

2023-03-16 Thread Balázs Benics via Phabricator via cfe-commits
steakhal requested changes to this revision. steakhal added a comment. This revision now requires changes to proceed. Thanks for looking into this. I could not reproduce the issue with the following test code: https://godbolt.org/z/hsY9PTKGz struct A { unsigned x : 3; unsigned : 29;

[PATCH] D146202: [clang] Fix a UsingTemplate regression after 3e78fa860235431323aaf08c8fa922d75a7cfffa

2023-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. Yeah, this one should be correct. Modules techniques use `*::Profile` method to judge if two entities are the same extensively. So it would be best to add a test case for modules like we did in https://reviews.llvm.org/rG3e78fa8602354

[PATCH] D145639: [Coroutines] Fix premature conversion of return object

2023-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D145639#4198837 , @ilya-biryukov wrote: > In D145639#4198794 , @ChuanqiXu > wrote: > >>> ! In D145639#4198815 , @ChuanqiXu >>> wrote: >>>

[PATCH] D146211: Make globals used for array initialization codegen constant

2023-03-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. hans added a reviewer: efriedma. Herald added a project: All. hans requested review of this revision. Herald added a project: clang. As pointed out in D133835 these globals will never be written to (they're only used for trivially cop

[PATCH] D145369: Emit const globals with constexpr destructor as constant LLVM values

2023-03-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/lib/CodeGen/CGExprAgg.cpp:535 CGM.getModule(), C->getType(), - CGM.isTypeConstant(ArrayQTy, /* ExcludeCtorDtor= */ true), + CGM.isTypeConstant(ArrayQTy, /* ExcludeCtor= */ true, +

[PATCH] D126959: [C++20][Modules] Introduce an implementation module.

2023-03-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 505759. iains added a comment. rebased, and reworked for changes in main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126959/new/ https://reviews.llvm.org/D126959 Files: clang/include/clang/Basic/Module.h

[PATCH] D126959: [C++20][Modules] Introduce an implementation module.

2023-03-16 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. This was originally created (and @ChuanqiXu approved) for the work on module initialisers. I did not apply it then, since it was possible to determine the correct state for the initialisers without it. However, now we are trying to handle some of the details of different

[PATCH] D146194: NOT report the warning that unnamed bitfields are uninitialized.

2023-03-16 Thread Tang Wenyu via Phabricator via cfe-commits
Tedlion requested review of this revision. Tedlion added a comment. In D146194#4198870 , @steakhal wrote: > Thanks for looking into this. > > I could not reproduce the issue with the following test code: > https://godbolt.org/z/hsY9PTKGz > > struct A

[clang] 8e00934 - clang: Use ptrmask for pointer alignment

2023-03-16 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2023-03-16T07:16:41-04:00 New Revision: 8e009348e8a2e9c4577538eba6ca5c6cb286776f URL: https://github.com/llvm/llvm-project/commit/8e009348e8a2e9c4577538eba6ca5c6cb286776f DIFF: https://github.com/llvm/llvm-project/commit/8e009348e8a2e9c4577538eba6ca5c6cb286776f.diff

[PATCH] D142934: clang: Use ptrmask for pointer alignment

2023-03-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. 8e009348e8a2e9c4577538eba6ca5c6cb286776f CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142934/new/ https://reviews.llvm.org/D142934 __

[PATCH] D146202: [clang] Fix a UsingTemplate regression after 3e78fa860235431323aaf08c8fa922d75a7cfffa

2023-03-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the review. In D146202#4198904 , @ChuanqiXu wrote: > Yeah, this one should be correct. Modules techniques use `*::Profile` method > to judge if two entities are the same extensively. So it would be best to add > a tes

[clang-tools-extra] 1f5fdc2 - [clang] Fix a UsingTemplate regression after 3e78fa860235431323aaf08c8fa922d75a7cfffa

2023-03-16 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2023-03-16T12:59:26+01:00 New Revision: 1f5fdc22a26c46a11ce406b745291b3c03bc67e8 URL: https://github.com/llvm/llvm-project/commit/1f5fdc22a26c46a11ce406b745291b3c03bc67e8 DIFF: https://github.com/llvm/llvm-project/commit/1f5fdc22a26c46a11ce406b745291b3c03bc67e8.diff LO

[PATCH] D146202: [clang] Fix a UsingTemplate regression after 3e78fa860235431323aaf08c8fa922d75a7cfffa

2023-03-16 Thread Haojian Wu 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 rG1f5fdc22a26c: [clang] Fix a UsingTemplate regression after… (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146187: [docs] Update the status for coroutines

2023-03-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Should we also be updating InitPreprocessor.cpp at the same time, for non-Windows targets? I see we define: // TS features. if (LangOpts.Coroutines) Builder.defineMacro("__cpp_coroutines", "201703L"); but we don't define `__cpp_­impl_­coroutine`: http://e

[PATCH] D131307: [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

2023-03-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131307#4197789 , @erichkeane wrote: > In D131307#4197767 , @rsmith wrote: > >>> Based on feedback we will provide users to the ability to downgrade this >>> this diagnostic to

[PATCH] D145088: [RISCV] Add attribute(riscv_rvv_vector_bits(N)) based on AArch64 arm_sve_vector_bits.

2023-03-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:3897-3899 + } else if (T->getVectorKind() == VectorType::RVVFixedLengthDataVector) { +mangleRISCVFixedRVVVectorType(T); +return; craig.topper wrote: > aaron.ballman wrote: >

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + craig.topper wrote: > erichkeane wrote: > > craig.topper wrote: > > > erichkeane wrote: > > > > erichkeane wrote: > > > > > craig.topper wrote: > > > >

[PATCH] D146194: NOT report the warning that unnamed bitfields are uninitialized.

2023-03-16 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Okay, thanks for clarifying. So, it seems like it depends on the language flavor, but why does CSA behave differently in C and C++? This is necessary to understand if we need to fix that instead of patching this particular checker. I'd still add a test to the `clang/t

[PATCH] D146194: NOT report the warning that unnamed bitfields are uninitialized.

2023-03-16 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. BTW we request full context for git patches. That way the reviewer can scroll and see the context around your hunks. You can request git to emit the full context by passing the `-U99` commandline option. See

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. After a night of sleeping on it, the use of a AdjustConstraintDepth::Diff and AdjustConstraintDepth::Value feels like a hacky solution to SOMETHING here, though I'm not sure what yet. The depth of a template shouldn't change between the equality and constraint checki

[PATCH] D146148: Float_t and double_t types shouldn't be modified by #pragma clang fp eval_method

2023-03-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. These changes will also need a release note at some point. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:662-665 +def err_type_definition_cannot_be_modified : Error< + "%0 type definition cannot be modified inside a scope containi

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:128 + if (IsHostOffloadingAction) { +for (size_t i = 1; i < Inputs.size(); ++i) { + if (Inputs[i].getType() != types::TY_Nothing) awarzynski wrote: > What's the magic "1"

[PATCH] D146164: Fix nomerge attribute not working with __builtin_trap().

2023-03-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Since we're touching SelectionDAG, does GlobalISel also need updating? Comment at: clang/test/CodeGen/attr-nomerge.cpp:44 + + [[clang::nomerge]] __builtin_trap(); } Maybe do __debugbreak() too since that's also mentioned on the debug.

[PATCH] D144878: __builtin_FILE_NAME()

2023-03-16 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 a small formatting issue. Do you need someone to land this on your behalf? If so, what name and email address would you like used for patch attribution? ==

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @erichkeane , ok, let me think a bit a more about it / investigate further. It's unclear why we use AdjustConstraintDepth here in the first place, i.e. why the depth is incorrect in the first place. Regarding Diff/Value - TemplateDepth (despite its name)

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:779 +// The depths calculated for the declarations can be equal but they still +// may differ from the depths of types inside OldConstr and NewConstr. +OldConstr = ---

[clang] 60bbf27 - [ARM][NFC] Use FPUKind enum instead of unsigned

2023-03-16 Thread Michael Platings via cfe-commits
Author: Michael Platings Date: 2023-03-16T13:38:10Z New Revision: 60bbf271b568ab85ef90c92ff6014e06786217b9 URL: https://github.com/llvm/llvm-project/commit/60bbf271b568ab85ef90c92ff6014e06786217b9 DIFF: https://github.com/llvm/llvm-project/commit/60bbf271b568ab85ef90c92ff6014e06786217b9.diff L

[PATCH] D146141: [ARM] Use FPUKind enum instead of unsigned

2023-03-16 Thread Michael Platings 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 rG60bbf271b568: [ARM][NFC] Use FPUKind enum instead of unsigned (authored by michaelplatings). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D146178#4199263 , @erichkeane wrote: > After a night of sleeping on it, the use of a AdjustConstraintDepth::Diff and > AdjustConstraintDepth::Value feels like a hacky solution to SOMETHING here, > though I'm not sure what

[PATCH] D146194: NOT report the warning that unnamed bitfields are uninitialized.

2023-03-16 Thread Tang Wenyu via Phabricator via cfe-commits
Tedlion accepted this revision. Tedlion added a comment. I argee that the different CSA behavior between C and C++ should be checked. In D146194#4199257 , @steakhal wrote: > As per your proposed change, I think we should do something like this: > > for

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @erichkeane - ok, thanks a lot for the comments / help, I need a bit of time to play with the code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 ___

[PATCH] D146194: NOT report the warning that unnamed bitfields are uninitialized.

2023-03-16 Thread Tang Wenyu via Phabricator via cfe-commits
Tedlion updated this revision to Diff 505802. Tedlion edited the summary of this revision. Tedlion added a comment. Provide the full diff context instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146194/new/ https://reviews.llvm.org/D146194 F

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:128 + if (IsHostOffloadingAction) { +for (size_t i = 1; i < Inputs.size(); ++i) { + if (Inputs[i].getType() != types::TY_Nothing) agozillon wrote: > awarzynski wrote: >

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-16 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Can you add a summary, I realize folks can goto the release notes edit and see the bug report and then go look it up but at least a cursory summary is a little more reviewer friendly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-16 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added subscribers: hubert.reinterpretcast, cor3ntin. cor3ntin accepted this revision. cor3ntin added a comment. This revision is now accepted and ready to land. LGTM. Triple checking with @hubert.reinterpretcast for conformance but I'm pretty sure that's correct. Repository: rG LLVM

[PATCH] D146168: [Sema] Stop stripping CV quals from *this captures in lambdas

2023-03-16 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Can we also add the test from the bug report as a regression test, it looks like the existing test are basically covering the same thing but I have seen stranger bugs so it would be good to explicitly cover it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + erichkeane wrote: > craig.topper wrote: > > erichkeane wrote: > > > craig.topper wrote: > > > > erichkeane wrote: > > > > > erichkeane wrote: > > > >

[PATCH] D145069: [analyzer][NFC] Split the no state change logic and bug report suppression into two visitors

2023-03-16 Thread Gábor Spaits via Phabricator via cfe-commits
spaits added a comment. In D145069#4191046 , @xazax.hun wrote: > Do you plan to selectively enable warnings coming from the STL to catch > misuses of certain STL types? No. At first when we have found out that the Static Analyzer can reason about std::

[PATCH] D144878: __builtin_FILE_NAME()

2023-03-16 Thread Ilya Karapsin via Phabricator via cfe-commits
karapsinie marked an inline comment as done. karapsinie added a comment. In D144878#4199297 , @aaron.ballman wrote: > LGTM aside from a small formatting issue. Do you need someone to land this on > your behalf? If so, what name and email address would y

[PATCH] D146164: Fix nomerge attribute not working with __builtin_trap().

2023-03-16 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 505837. zequanwu marked 3 inline comments as done. zequanwu added a comment. - Add test case for __debugbreak(). - Handle named trap instructions and add test case for it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D146164: Fix nomerge attribute not working with __builtin_trap().

2023-03-16 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/CodeGen/attr-nomerge.cpp:44 + + [[clang::nomerge]] __builtin_trap(); } hans wrote: > Maybe do __debugbreak() too since that's also mentioned on the debug. The `__debugbreak()` is also emitted from `EmitTrap

[PATCH] D144976: [clangd] Add provider info on symbol hover.

2023-03-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks, left some comments on the unittest, I think we can make it simpler. Comment at: clang-tools-extra/clangd/Hover.cpp:1107 +if (!Matches.empty()) { + // Pick the best-ranked included provider + Result = Matches[0]->quote(); ---

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:128 + if (IsHostOffloadingAction) { +for (size_t i = 1; i < Inputs.size(); ++i) { + if (Inputs[i].getType() != types::TY_Nothing) awarzynski wrote: > agozillon wrote: > >

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon updated this revision to Diff 505842. agozillon added a comment. - [Flang][Driver] Try to fix failing omp-frontend-forwarding.f90 test - [Flang][Driver] Simplify omp-frontend-forwarding.f90 test - [Flang][Driver][Test] Delete flang-omp test from Clang and merge tests into omp-frontend-f

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Flang will also support OpenACC for offload. It is very similar to OpenMP. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145815/new/ https://reviews.llvm.org/D145815 ___ cfe-com

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added a comment. In D145815#4199848 , @tschuett wrote: > Flang will also support OpenACC for offload. It is very similar to OpenMP. You are correct, thank you for reminding me! No idea how I forgot it, my apologies. Repository: rG LLVM Git

[PATCH] D146234: [clang] Fix crash when handling nested immediate invocations

2023-03-16 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before this patch it was expected that if there was several immediate invocations they all belong to the same expression

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon updated this revision to Diff 505844. agozillon added a comment. - Readd missing newline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145815/new/ https://reviews.llvm.org/D145815 Files: clang/lib/Driver/ToolChains/Flang.cpp clang/li

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added a comment. Deleted the clang test that was forwarding to Flang and merged with the omp-frontend-forwarding.f90 test where relevant. Second push was because I forgot to add a missing newline, which I seem to do frequently... Repository: rG LLVM Github Monorepo CHANGES SINCE L

[clang] 4c8ee1a - [Debugify] Use ModuleAnalysisManager in instrumentation

2023-03-16 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2023-03-16T09:49:59-07:00 New Revision: 4c8ee1ac8221ef2d66b7f62b848a76d94196d87a URL: https://github.com/llvm/llvm-project/commit/4c8ee1ac8221ef2d66b7f62b848a76d94196d87a DIFF: https://github.com/llvm/llvm-project/commit/4c8ee1ac8221ef2d66b7f62b848a76d94196d87a.diff

[PATCH] D146244: [clangd] Show used symbols on #include line hover.

2023-03-16 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. VitaNuo requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: rG LLVM Github Monorepo http

[PATCH] D146089: [Sema] Fix null pointer dereference handleAlwaysInlineAttr.

2023-03-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Please add the test cases requested, plus a Release Note. Otherwise LGTM. Comment at: clang/test/Sema/attr-alwaysinline.cpp:36 +return x; +} + --

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

2023-03-16 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 505869. koops added a comment. Herald added subscribers: jplehr, sunshaoce. 1. formatting 2. Adding lit test 3. Removing bind clause from the set of clauses passed during bind(parallel) to the OMPForDirective and bind(teams) to the OMPDistributeDirective. CHA

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

2023-03-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/AST/StmtOpenMP.cpp:2362 +const HelperExprs &Exprs) { + this->LoopDirCrParmV = new LoopDirCrParam(C, StartLoc, EndLoc, CollapsedNum, +Clauses, AssociatedStmt, Exprs);

[PATCH] D146247: [clang-format] Support TypeScript satisfies operator

2023-03-16 Thread Taymon A. Beal via Phabricator via cfe-commits
taymonbeal created this revision. taymonbeal added reviewers: MyDeveloperDay, owenpan. Herald added a project: All. taymonbeal requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The satisfies operator was added in TypeScript 4.9. Repository:

[PATCH] D146234: [clang] Fix crash when handling nested immediate invocations

2023-03-16 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Thank you for the fix. Comment at: clang/lib/Sema/SemaExpr.cpp:17897 +if (SemaRef.FailedImmediateInvocations.contains(E)) + CurrentII->setInt(1); + } else { It is not obvious to me why this is correct, can you pleas

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:128 + if (IsHostOffloadingAction) { +for (size_t i = 1; i < Inputs.size(); ++i) { + if (Inputs[i].getType() != types::TY_Nothing) agozillon wrote: > awarzynski wrote: > > a

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Andrew Gozillon via Phabricator via cfe-commits
agozillon added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:128 + if (IsHostOffloadingAction) { +for (size_t i = 1; i < Inputs.size(); ++i) { + if (Inputs[i].getType() != types::TY_Nothing) jhuber6 wrote: > agozillon wrote: > > aw

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-16 Thread David Faust via Phabricator via cfe-commits
dfaust added a comment. In D143967#4197288 , @eddyz87 wrote: > ... > I think there are two sides to this: > > - conceptual: is it ok to allow annotations for CVR modifiers? Maybe someone more an expert in DWARF could chime in whether this is problematic

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Flang.cpp:128 + if (IsHostOffloadingAction) { +for (size_t i = 1; i < Inputs.size(); ++i) { + if (Inputs[i].getType() != types::TY_Nothing) agozillon wrote: > jhuber6 wrote: > > agoz

[PATCH] D143813: [ClangFE] Check that __sync builtins are naturally aligned.

2023-03-16 Thread Steven Johnson via Phabricator via cfe-commits
srj added a comment. > (I certainly agree everyone should be using __atomic and not __sync.) Halide still uses the `__sync` builtins for 32-bit targets, for reasons I don't have at hand now (IIRC there were downstream users with tooling issues, I will re-check). (I don't think we are using `__s

[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-03-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144981/new/ https://reviews.llvm.org/D144981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] a845aeb - [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-03-16 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2023-03-16T11:57:59-07:00 New Revision: a845aeb5d6c869146fa24194a7d0182a4787cad8 URL: https://github.com/llvm/llvm-project/commit/a845aeb5d6c869146fa24194a7d0182a4787cad8 DIFF: https://github.com/llvm/llvm-project/commit/a845aeb5d6c869146fa24194a7d0182a4787cad8.di

[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-03-16 Thread Volodymyr Sapsai 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 rGa845aeb5d6c8: [Driver] Allow to collect `-save-stats` data to a file specified in the… (authored by vsapsai). Repository: rG LLVM Github Monorepo

[PATCH] D146054: [RISCV] Add -print-supported-marchs and -march=help support

2023-03-16 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:153 + std::set TempSet(Cmp); + for (auto E : SupportedExtensions) +TempSet.insert(E); craig.topper wrote: > Question for the community. Should we maintain SupportedExtensions in the >

[PATCH] D146164: Fix nomerge attribute not working with __builtin_trap().

2023-03-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. FYI: this attribute appears to not work on (at least) x86 and arm currently, because the backend also does some merging: https://godbolt.org/z/d43M83oax Comment at: clang/lib/CodeGen/CGExpr.cpp:3626-3627 } - + if (InNoMergeAttributedStmt) +TrapC

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:1303 +OldTemplate->getTemplateParameters(), false, TPL_TemplateMatch, +SourceLocation(), false /* PartialOrdering */); bool SameReturnType = Context.hasSameType(Old->getDeclaredReturnTy

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. I also don't get what is going on here, either a more detailed summary or more inline comments should help. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146178/new/ https://reviews.llvm.org/D146178 ___

[PATCH] D146234: [clang] Fix crash when handling nested immediate invocations

2023-03-16 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:17897 +if (SemaRef.FailedImmediateInvocations.contains(E)) + CurrentII->setInt(1); + } else { shafik wrote: > It is not obvious to me why this is correct, can you pleas

[PATCH] D146165: docs: add some documentation on Windows SDK search

2023-03-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Nice, thanks for doing this! Comment at: clang/docs/UsersManual.rst:4537 + +TODO: This is not yet implemented. + But isn't this how clang-cl finds stuff when running in a "Visual Studio Command Prompt" / setenv / vcvars or whatever it

[PATCH] D146163: Experimental new python bindings for clang/llvm based on Cython

2023-03-16 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks resigned from this revision. aeubanks added a comment. not familiar enough with python, but there should probably be an RFC for this Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146163/new/ https://reviews.llvm.org/D146163 __

[PATCH] D146255: [clang] Unconditionally add autolink hints for frameworks.

2023-03-16 Thread Pete Cooper via Phabricator via cfe-commits
pete accepted this revision. pete 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/D146255/new/ https://reviews.llvm.org/D146255 ___ cfe

[PATCH] D143704: [flang] Feature list plugin

2023-03-16 Thread Ethan Luis McDonough via Phabricator via cfe-commits
elmcdonough added a comment. Herald added a subscriber: jplehr. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143704/new/ https://reviews.llvm.org/D143704 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-03-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. @shafik - it's a bit early to review this patch, this was the first attempt to fix the issue related to the current behavior of clang::Sema::TemplateParameterListsAreEqual that causes Clang to mishandle out-of-line definitions involving constraints (and

[PATCH] D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain

2023-03-16 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. LGTM, thanks for working on this! Would be great for somebody with a bit more experience with offloading to OK this as well :) @tschuett or perhaps @jhuber6 ? Commen

  1   2   >