[PATCH] D135128: [clang][cli] Remove repetitive macro invocations

2022-10-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Since we now only support Visual Studio 2019 16.7 and newer, we're able to

[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

2022-10-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. Thanks for working on this! A few nits inline Comment at: clang/include/clang/Basic/LangOptions.h:369 + enum class StrictFlexArraysLevelKind { +/// Any trailing array memeber is a FAM. +Default = 0, typo: member

[PATCH] D135128: [clang][cli] Remove repetitive macro invocations

2022-10-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 464889. jansvoboda11 added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Actually add the MSVC flag after confirming the failure in CI. tools\clang\include\clang/Driver/Options.inc(7003): warning C4003: not enough

[PATCH] D133457: Add Clang driver flags equivalent to cl's /MD, /MT, /MDd, /MTd.

2022-10-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. @akhuang I noticed that https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/MSVC.cpp#L199-L200 has got an explicit check for `Args.hasArg(options::OPT__SLASH_MD, options::OPT__SLASH_MDd)` - I think that this would need to be amended to handle

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I think this should be reverted. It's moving in the backward direction. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135076/new/ https://reviews.llvm.org/D135076 ___

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D135076#3830914 , @MaskRay wrote: > Single-dash long options starting with `-o` conflict with the short option > `-o` so I am unsure I like this direction. > >> However, if a user uses a single dash it will instead name a

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D135076#3830914 , @MaskRay wrote: > Single-dash long options starting with `-o` conflict with the short option > `-o` so I am unsure I like this direction. > >> However, if a user uses a single dash it will instead name a

[PATCH] D134671: [Driver] Prevent Mips specific code from claiming -mabi argument on other targets.

2022-10-03 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. In D134671#3828197 , @craig.topper wrote: > In D134671#3824644 , > @nickdesaulniers wrote: > >> I don't think it's an issue for us to work around downstream, but this did >>

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. There are traditionally some single-dash long options (perhaps classical Mac OS style) which conflict with short options. I think nowadays we try to avoid such single-dash short options. (For example, GNU ld now requires all new long options to use two-dashes, after

[PATCH] D134788: [ARM64EC][clang-cl] Add /arm64EC flag

2022-10-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Missing testcase for the case where the warning is triggered? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134788/new/ https://reviews.llvm.org/D134788 ___ cfe-commits mailing

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D135076#3830972 , @MaskRay wrote: > There are traditionally some single-dash long options (perhaps classical Mac > OS style) which conflict with short options. I think nowadays we try to avoid > such single-dash short

[PATCH] D134947: [analyzer] Fix liveness of Symbols for values in regions reffered by LazyCompoundVal

2022-10-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. If we end up going with this approach, I wonder if it would be a great time to update some of the docs here: https://clang.llvm.org/docs/analyzer/developer-docs/RegionStore.html Usually, we are not doing a great job keeping these documentations up to date. I think

[PATCH] D134947: [analyzer] Fix liveness of Symbols for values in regions reffered by LazyCompoundVal

2022-10-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. I also like the approach, but wait for @NoQ, he has the most experience in this area :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134947/new/ https://reviews.llvm.org/D134947

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added reviewers: mizvekov, rsmith, erichkeane, aaron.ballman. Herald added a project: All. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As @mizvekov suggested in D134772

[PATCH] D135011: Add sin and cos llvm builtins

2022-10-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Please clarify the commit message (review description) to better explain what it is you're doing here, the purpose/etc as well as the documentation requested by @fhahn This also needs release notes. Comment at:

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D135076#3831298 , @MaskRay wrote: > We really want these `--offload-*` users to stick with one canonical form, > not `-offload-*` in some places while `--offload-*` in other places. > > Another angle is that people find

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D135076#3831363 , @MaskRay wrote: > My idea is to just disallow `Joined` `-o` when targeting a specific > environment (e.g. when offloading toolchain is used). This seems difficult as we only know which offloading toolchains

[PATCH] D135011: Add sin and cos llvm builtins

2022-10-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Does these support scalable vector types from ARM SVE or RISC-V? I can't remember what the rest of the __builtin_elementwise do. I ask because the backends will probably crash for them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D119209: [clang] Add cc1 option -fctor-dtor-return-this

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:495 +/// Modify C++ ABI to returning `this` pointer from constructors and +/// non-deleting destructors. (No effect on Microsoft ABI.) Modify `Itanium C++ ABI` and delete `

[PATCH] D119209: [clang] Add cc1 option -fctor-dtor-return-this

2022-10-03 Thread Shu-Chun Weng via Phabricator via cfe-commits
scw marked an inline comment as done. scw added inline comments. Comment at: clang/include/clang/Driver/Options.td:5608 +def fctor_dtor_return_this : Flag<["-"], "fctor-dtor-return-this">, + HelpText<"Change the C++ ABI to returning `this` pointer from constructors " +

[PATCH] D134688: MSVC AArch64 ABI: Homogeneous aggregates

2022-10-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Ping on this Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134688/new/ https://reviews.llvm.org/D134688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D135025: [clang][Interp] Support base class constructors

2022-10-03 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. I realize it is not directly related but I don't see it in the test suite (maybe I missed it) but also delegating constructors, default member initializaers Vs mem-init list (mem-init list has priority) and mem-init list items out of order of initialization.

[PATCH] D133586: [clang] initialize type qualifiers for FunctionNoProtoType

2022-10-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the explanation, it is good to know the reasons for the current direction. Though it still feels like fixing a symptom and not the root cause. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133586/new/

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Ah, I'd forgotten we had a bunch of elementwise builtins already. I wouldn't be surprised if I asked for that in that patch, actually, especially because the existing ones include some functions like `max` and `min` where you could easily imagine them being

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 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. This looks right enough to me with the 1 nit, but let Matheus take a look before committing. Comment at: clang/lib/AST/ASTContext.cpp:699

[PATCH] D135091: Load the `_cmd` selector for generated getters/setters of `direct` Objective-C properties.

2022-10-03 Thread Michael Wyman via Phabricator via cfe-commits
mwyman created this revision. mwyman added reviewers: ahatanak, plotfi, dmaclach. mwyman added a project: clang. Herald added a project: All. mwyman requested review of this revision. Herald added a subscriber: cfe-commits. This fixes a bug from https://reviews.llvm.org/D131424 that removed the

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D135076#3831340 , @MaskRay wrote: > In D135076#3831307 , @jhuber6 wrote: > >> In D135076#3831298 , @MaskRay >> wrote: >> >>> We really want

[PATCH] D119209: [clang] Add cc1 option -fctor-dtor-return-this

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Driver/Options.td:5608 +def fctor_dtor_return_this : Flag<["-"], "fctor-dtor-return-this">, + HelpText<"Change the C++ ABI to

[PATCH] D133499: [clang]: Add DeclContext::dumpAsDecl().

2022-10-03 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann closed this revision. tahonermann marked 2 inline comments as done. tahonermann added a comment. Pushed, but I forgot to add the `Differential Revision` tag to the commit, so closing manually. The changes landed as commit 4247cdb568eca4c31b14d91105fe5ee140225036

[clang] 3933c43 - [clang] Add cc1 option -fctor-dtor-return-this

2022-10-03 Thread Shu-Chun Weng via cfe-commits
Author: Shu-Chun Weng Date: 2022-10-03T14:28:06-07:00 New Revision: 3933c43d9008bb1b151156da92827a109e7963b6 URL: https://github.com/llvm/llvm-project/commit/3933c43d9008bb1b151156da92827a109e7963b6 DIFF: https://github.com/llvm/llvm-project/commit/3933c43d9008bb1b151156da92827a109e7963b6.diff

[PATCH] D135045: [Frontend] Recognize environment variable SOURCE_DATE_EPOCH

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 464815. MaskRay added a comment. Use `%if clang-target-64-bits` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135045/new/ https://reviews.llvm.org/D135045 Files: clang/docs/ReleaseNotes.rst

[PATCH] D135107: [clang][NFC] Use enum for -fstrict-flex-arrays

2022-10-03 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: efriedma, kees, serge-sans-paille. Herald added subscribers: steakhal, martong. Herald added a reviewer: NoQ. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber:

[PATCH] D134507: [Clang] add missing ClangABICompat check

2022-10-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. DRs do not modify existing language versions. We can decide as a vendor whether to apply DRs to existing language versions. The fact that this is a language semantics change makes me think that we should not in this case. Repository: rG LLVM Github Monorepo

[PATCH] D134788: [ARM64EC][clang-cl] Add /arm64EC flag

2022-10-03 Thread chenglin.bi via Phabricator via cfe-commits
bcl5980 added a comment. In D134788#3830987 , @efriedma wrote: > Missing testcase for the case where the warning is triggered? Based on David's comment I remove the test case with specified target. Not going to catch much in this change but if

[PATCH] D134788: [ARM64EC][clang-cl] Add /arm64EC flag

2022-10-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I think we want to test both that the warning isn't triggered when --target isn't specified, and that the warning is triggered when --target is specified. Comment at: clang/test/Driver/cl-options.c:787 +// ARM64EC: "-triple"

[clang] 1fb728e - [c++] implements tentative DR1432 for partial ordering of function template

2022-10-03 Thread Yuanfang Chen via cfe-commits
Author: Yuanfang Chen Date: 2022-10-03T16:30:27-07:00 New Revision: 1fb728e95c74bf72698c00094f18fa8d2eb42cda URL: https://github.com/llvm/llvm-project/commit/1fb728e95c74bf72698c00094f18fa8d2eb42cda DIFF: https://github.com/llvm/llvm-project/commit/1fb728e95c74bf72698c00094f18fa8d2eb42cda.diff

[PATCH] D133683: [c++] implements tentative DR1432 for partial ordering of function template

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1fb728e95c74: [c++] implements tentative DR1432 for partial ordering of function template (authored by ychen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D135099: [C2x] Implement support for nullptr and nullptr_t

2022-10-03 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:8730 + // result also has that type. + if (LHSTy->isNullPtrType() && Context.hasSameType(LHSTy, RHSTy)) +return ResTy; erichkeane wrote: > what does this do with the GNU ternary-thing?

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5745-5746 + if (TypeConstraintConcept) { +Canon = getAutoTypeInternal(QualType(), Keyword, false, IsPack, nullptr, +{}, true); // Find the insert

[PATCH] D128745: [c++] implements DR692, DR1395 and tentatively DR1432, about partial ordering of variadic template partial specialization or function template

2022-10-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Pinging this thread because it has more reviewers who probably have opinions about this. https://reviews.llvm.org/D134507 is a patch that adds `-fclang-abi-compat` support around the breaking change here, which basically means that targets using old

[PATCH] D134507: [Clang] add missing ClangABICompat check

2022-10-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I left a comment on the old review thread; probably best to center the conversation there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134507/new/ https://reviews.llvm.org/D134507

[PATCH] D135011: Add sin and cos llvm intrinsics

2022-10-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Could you update the title to make it clear this adds new Clang builtins, not intrinsics (they are lowered to LLVM intrinsics). The behavior of the new builtins should be specified in `LanguageExtensions.rst`

[PATCH] D134478: BareMetal: detect usr/include/c++/v1 path in sysroot

2022-10-03 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. friendly ping for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134478/new/ https://reviews.llvm.org/D134478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. We really want these `--offload-*` users to stick with one canonical form, not `-offload-*` in some places while `--offload-*` in other places. Another angle is that people find `-offload-*` working with a new clang may try `-offload-*` on an old clang and get `-o

[PATCH] D134507: [Clang] add missing ClangABICompat check

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. ping. To avoid confusion, note that this and D128745 are not about C++20 or newer language versions. They are implementing DRs which should apply to all language versions >= C++11 since the variadic template is involved.

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-10-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 464767. jhuber6 added a comment. Moving test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130096/new/ https://reviews.llvm.org/D130096 Files: clang/lib/CodeGen/CodeGenAction.cpp

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Another idea is to reject multiple `-o` if some are used as the `Joined` form. Note: multiple `Separate` `-o` should be allowed. It will not catch `-offload-*` when `-o output` is not specified, but is probably useful enough. Repository: rG LLVM Github Monorepo

[PATCH] D133586: [clang] initialize type qualifiers for FunctionNoProtoType

2022-10-03 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. In D133586#3831618 , @vsapsai wrote: > How correct is it to access `isConst`, `isVolatile`, `isRestrict` for > `FunctionNoProtoType`? Yes, we can provide some default value but I'm curious > if accessing that default value is

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-10-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/CodeGen/amdgcn-control-constants.c:8 + +// GFX90A: @__oclc_daz_opt = linkonce_odr hidden local_unnamed_addr addrspace(4) constant i8 0, align 1 +// GFX90A: @__oclc_wavefrontsize64 = linkonce_odr hidden local_unnamed_addr

[PATCH] D133817: MSVC ABI: Looks like even non-aarch64 uses the MSVC/14 definition for pod/aggregate passing

2022-10-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133817/new/ https://reviews.llvm.org/D133817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D133817: MSVC ABI: Looks like even non-aarch64 uses the MSVC/14 definition for pod/aggregate passing

2022-10-03 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao resigned from this revision. ayzhao added a comment. Removing myself as a reviewer as I'm not really familiar with this area. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133817/new/ https://reviews.llvm.org/D133817

[PATCH] D135110: [NFC] [HLSL] Move common metadata to LLVMFrontend

2022-10-03 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: llvm/include/llvm/Frontend/HLSL/HLSLResource.h:35 + GlobalVariable *getGlobalVariable(); + StringRef getSourceType(); + Constant *getID(); Could we save things like shape and component type instead of a StringRef

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5730-5732 if (TypeConstraintConcept) TypeConstraintConcept = TypeConstraintConcept->getCanonicalDecl(); Pre-existing problem: This was not good to begin with, since we would not

[PATCH] D135011: Add sin and cos llvm builtins

2022-10-03 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D135011#3831949 , @rjmccall wrote: > The titled of this patch should be something like "Add > __builtin_elementwise_sin and __builtin_elementwise_cos". > > Can you explain why this uses a new builtin name instead of

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 464858. ychen added a comment. - remove dead code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135088/new/ https://reviews.llvm.org/D135088 Files: clang/lib/AST/ASTContext.cpp

[PATCH] D135118: [clang/Sema] Fix non-deterministic order for certain kind of diagnostics

2022-10-03 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 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135118/new/ https://reviews.llvm.org/D135118

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-10-03 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel added inline comments. Comment at: clang/lib/AST/Interp/Floating.h:27-29 + template struct Repr; + template <> struct Repr<32> { using Type = float; }; + template <> struct Repr<64> { using Type = double; }; tbaeder wrote: > jcranmer-intel

[PATCH] D119209: Implement -fctor_dtor_return_this ABI option.

2022-10-03 Thread Shu-Chun Weng via Phabricator via cfe-commits
scw updated this revision to Diff 464793. scw retitled this revision from "Implement -mctor_dtor_return_this ABI option. " to "Implement -fctor_dtor_return_this ABI option.". scw edited the summary of this revision. scw added a comment. - Made the option

[PATCH] D119209: [clang] Add cc1 option -fctor-dtor-return-this

2022-10-03 Thread Shu-Chun Weng via Phabricator via cfe-commits
scw updated this revision to Diff 464809. scw marked 2 inline comments as done. scw retitled this revision from "Implement -fctor_dtor_return_this ABI option." to "[clang] Add cc1 option -fctor-dtor-return-this". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D134478: BareMetal: detect usr/include/c++/v1 path in sysroot

2022-10-03 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. LGTM. Comment at: clang/test/Driver/baremetal.cpp:77 +// RUN: mkdir -p %T/baremetal_cxx_sysroot/usr/include/c++/v1 +// RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o

[PATCH] D134947: [analyzer] Fix liveness of Symbols for values in regions reffered by LazyCompoundVal

2022-10-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Wow thanks!! Yeah this matches my understanding of the problem. I still encourage you to test it on real-world code before committing, and carefully investigate every change in diagnostics, because symbol reaper is very convoluted and filled with insane cornercases.

[PATCH] D134454: [Driver][Distro] Fix ArchLinux sysroot detection

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. - This patch should be abandoned. Inferring sysroot from gcc-toolchain is backward. - The D644 (`Support Sourcery CodeBench MIPS toolchain`) `computeSysRoot` should not be used by new support. - `--gcc-toolchain=` is discouraged. - New

[PATCH] D130513: [Flang] Add -fconvert option to swap endianness for unformatted files

2022-10-03 Thread Jonathon Penix via Phabricator via cfe-commits
jpenix-quic updated this revision to Diff 464849. jpenix-quic added a comment. Add /*overwrite=*/ comment I missed previously, move Runtime/environment-defaults.h to Lower/EnvironmentDefault.h CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130513/new/ https://reviews.llvm.org/D130513

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5736-5737 llvm::FoldingSetNodeID ID; AutoType::Profile(ID, *this, DeducedType, Keyword, IsDependent, TypeConstraintConcept, TypeConstraintArgs); if (AutoType *AT =

[PATCH] D134820: [LTO][clang] Teaching Clang to Pass Plugin Options to the AIX Linker

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. LGTM Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:72 +CmdArgs.push_back(Args.MakeArgString( +Twine(PluginOptPrefix) + Twine("-pass-remarks=") + A->getValue())); Adding `Twine` to one operand of `+` suffices.

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:8664-8668 + if (QualType RT = FD->getDeclaredReturnType(); + DCK == DefaultedComparisonKind::ThreeWay && + RT->getContainedDeducedType() && + (!Context.hasSameType(RT,

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5745-5746 + if (TypeConstraintConcept) { +Canon = getAutoTypeInternal(QualType(), Keyword, false, IsPack, nullptr, +{}, true); // Find the insert

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 464865. ychen marked an inline comment as done. ychen added a comment. - Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135088/new/ https://reviews.llvm.org/D135088 Files:

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen marked an inline comment as done. ychen added a comment. @mizvekov Thanks for the review! Comment at: clang/lib/AST/ASTContext.cpp:5768-5769 if (!IsCanon) { if (DeducedType.isNull()) { - SmallVector CanonArgs; - bool AnyNonCanonArgs = -

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen marked an inline comment as done. ychen added a comment. In D135088#3831183 , @erichkeane wrote: > This looks right enough to me with the 1 nit, but let Matheus take a look > before committing. Thanks for the quick review. Repository: rG

[PATCH] D134702: [Clang] Don't warn if deferencing void pointers in unevaluated context

2022-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:14539 LangOptions LO = S.getLangOpts(); -if (LO.CPlusPlus || !(LO.C99 && IsAfterAmp)) +if (LO.CPlusPlus || !(LO.C99 && (IsAfterAmp || S.isUnevaluatedContext( S.Diag(OpLoc,

[PATCH] D131424: Remove the unused/undefined _cmd parameter to objc_direct methods.

2022-10-03 Thread Michael Wyman via Phabricator via cfe-commits
mwyman added a comment. In D131424#3828656 , @mwyman wrote: > In D131424#3828647 , @ahatanak > wrote: > >> `-fobjc-arc` is needed to see the assertion fail. > > Oops, yep I'll send a patch. Sent

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D135076#3831307 , @jhuber6 wrote: > In D135076#3831298 , @MaskRay wrote: > >> We really want these `--offload-*` users to stick with one canonical form, >> not `-offload-*` in some

[PATCH] D134874: [Concepts] Fix Concepts on generic lambda in a VarTemplateSpecDecl

2022-10-03 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. I think this looks good. I took more time to compare with the current code and it looks to me like behavioral consistency is maintained where desired. I added one comments

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D135076#3831371 , @jhuber6 wrote: > In D135076#3831363 , @MaskRay wrote: > >> My idea is to just disallow `Joined` `-o` when targeting a specific >> environment (e.g. when offloading

[PATCH] D133468: [clang] Implement divergence for TypedefType and UsingType

2022-10-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 464774. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133468/new/ https://reviews.llvm.org/D133468 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/JSONNodeDumper.h

[PATCH] D135012: [clang][Interp] Implement bitwise and operations

2022-10-03 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/Interp/Integral.h:215 + static bool band(Integral A, Integral B, unsigned OpBits, Integral *R) { +*R = Integral(A.V & B.V); Maybe `bitAnd`? Comment at:

[PATCH] D134874: [Concepts] Fix Concepts on generic lambda in a VarTemplateSpecDecl

2022-10-03 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:255-258 +/// \param ForConstraintInstantiation when collecting arguments, +/// ForConstraintInstantiation indicates we should continue looking when +/// encountering a lambda generic call

[PATCH] D131963: [libc++] Add custom clang-tidy checks

2022-10-03 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D131963#3811811 , @ldionne wrote: > I'd be fine with this as-is if it works in the CI. > > IIUC, the current blocker for this is that the `ClangConfig.cmake` installed > by LLVM is not robust to the dev packages missing. If

[PATCH] D130096: [Clang][AMDGPU] Emit AMDGPU library control constants in clang

2022-10-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGen/amdgcn-control-constants.c:8 + +// GFX90A: @__oclc_daz_opt = linkonce_odr hidden local_unnamed_addr addrspace(4) constant i8 0, align 1 +// GFX90A: @__oclc_wavefrontsize64 = linkonce_odr hidden local_unnamed_addr

[clang] 69a6417 - [clang] Implement divergence for TypedefType and UsingType

2022-10-03 Thread Matheus Izvekov via cfe-commits
Author: Matheus Izvekov Date: 2022-10-03T23:23:58+02:00 New Revision: 69a6417406a1b0316a1fa6aeb63339d0e1d2abbd URL: https://github.com/llvm/llvm-project/commit/69a6417406a1b0316a1fa6aeb63339d0e1d2abbd DIFF:

[PATCH] D133468: [clang] Implement divergence for TypedefType and UsingType

2022-10-03 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG69a6417406a1: [clang] Implement divergence for TypedefType and UsingType (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133468/new/

[PATCH] D135076: [Clang] Make offloading flags accept '-' and '--'

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Sorry, but I'll revert this patch shortly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135076/new/ https://reviews.llvm.org/D135076 ___ cfe-commits mailing list

[PATCH] D133817: MSVC ABI: Looks like even non-aarch64 uses the MSVC/14 definition for pod/aggregate passing

2022-10-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. lgtm In D133817#3794429 , @dblaikie wrote: > So, I could leave a test case and some comments, or follow-up with a separate > fix for the homogenous aggregate issue? I guess it comes down to writing that > separate function to do

[PATCH] D134507: [Clang] add missing ClangABICompat check

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D134507#3831951 , @rjmccall wrote: > DRs do not modify existing language versions. We can decide as a vendor > whether to apply DRs to existing language versions. The fact that this is a > language semantics change makes me

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5745-5746 + if (TypeConstraintConcept) { +Canon = getAutoTypeInternal(QualType(), Keyword, false, IsPack, nullptr, +{}, true); // Find the insert

[PATCH] D135011: Add sin and cos llvm builtins

2022-10-03 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 464739. bob80905 added a comment. - add docs, add new line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 Files: clang/docs/LanguageExtensions.rst

[PATCH] D135011: Add sin and cos llvm builtins

2022-10-03 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 464744. bob80905 edited the summary of this revision. bob80905 added a comment. - add release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 Files:

[PATCH] D135045: [Frontend] Recognize environment variable SOURCE_DATE_EPOCH

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. The Windows premerge failure looks relevant. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135045/new/ https://reviews.llvm.org/D135045 ___ cfe-commits mailing list

[PATCH] D134874: [Concepts] Fix Concepts on generic lambda in a VarTemplateSpecDecl

2022-10-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:255-258 +/// \param ForConstraintInstantiation when collecting arguments, +/// ForConstraintInstantiation indicates we should continue looking when +/// encountering a lambda generic call

[PATCH] D135099: [C2x] Implement support for nullptr and nullptr_t

2022-10-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/AST/PrettyPrinter.h:68 SuppressDefaultTemplateArgs(true), Bool(LO.Bool), -Nullptr(LO.CPlusPlus11), Restrict(LO.C99), Alignof(LO.CPlusPlus11), +Nullptr(LO.CPlusPlus11),

[PATCH] D111000: [clang-format] allow clang-format to be passed a file of filenames so we can add a regression suite of "clean clang-formatted files" from LLVM

2022-10-03 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. Response files should work for all our tools, I think? Keeping the option is fine with me, but the description needs some improvement. @ychen Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111000/new/

[clang] 4247cdb - [clang]: Add DeclContext::dumpAsDecl().

2022-10-03 Thread Tom Honermann via cfe-commits
Author: Tom Honermann Date: 2022-10-03T17:25:44-04:00 New Revision: 4247cdb568eca4c31b14d91105fe5ee140225036 URL: https://github.com/llvm/llvm-project/commit/4247cdb568eca4c31b14d91105fe5ee140225036 DIFF: https://github.com/llvm/llvm-project/commit/4247cdb568eca4c31b14d91105fe5ee140225036.diff

[clang] f679705 - Revert D135076 "[Clang] Make offloading flags accept '-' and '--'"

2022-10-03 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-10-03T14:34:16-07:00 New Revision: f6797056fc4163e6fe5bd57bebd19aa7fd83a778 URL: https://github.com/llvm/llvm-project/commit/f6797056fc4163e6fe5bd57bebd19aa7fd83a778 DIFF: https://github.com/llvm/llvm-project/commit/f6797056fc4163e6fe5bd57bebd19aa7fd83a778.diff

[PATCH] D135093: Revert D135076 "[Clang] Make offloading flags accept '-' and '--'"

2022-10-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay abandoned this revision. MaskRay added a comment. Pushed in f6797056fc4163e6fe5bd57bebd19aa7fd83a778 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135093/new/ https://reviews.llvm.org/D135093

[PATCH] D135110: [NFC] [HLSL] Move common metadata to LLVMFrontend

2022-10-03 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: python3kgae, tschuett, jdoerfert, bogner, pow2clk, tex3d, Anastasia, efriedma. Herald added a subscriber: hiraditya. Herald added a project: All. beanz requested review of this revision. Herald added projects: clang, LLVM. This change pulls

[PATCH] D135088: [Clang] make canonical AutoType constraints-free

2022-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 464731. ychen added a comment. - address @erichkeane's comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135088/new/ https://reviews.llvm.org/D135088 Files: clang/lib/AST/ASTContext.cpp

[clang] 1721404 - [Driver] Remove unneeded RenderAsInput flag

2022-10-03 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-10-03T10:58:34-07:00 New Revision: 1721404b542a7eb120c2aa64c80cb83463291bcd URL: https://github.com/llvm/llvm-project/commit/1721404b542a7eb120c2aa64c80cb83463291bcd DIFF: https://github.com/llvm/llvm-project/commit/1721404b542a7eb120c2aa64c80cb83463291bcd.diff

[PATCH] D134928: [Sema] Don't treat a non-null template argument as if it were null.

2022-10-03 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/temp/temp.arg/temp.arg.nontype/p1-11.cpp:31 IP<> ip7; // expected-error{{non-type template argument of type 'int *' is not a constant expression}} +IP<(int*)1> ip8; // expected-error {{non-type template argument does not

[PATCH] D135099: [C2x] Implement support for nullptr and nullptr_t

2022-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: jyknight, efriedma, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. This introduces support for `nullptr` and `nullptr_t` in C2x mode. The proposal

  1   2   >