[clang-tools-extra] aa1ac2a - [clangd] Flush stderr after signal handlers run, so we always get the full stack/crash info

2021-10-25 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2021-10-26T01:08:36+02:00 New Revision: aa1ac2ae451e54dfa19dce2794800bbd034e2194 URL: https://github.com/llvm/llvm-project/commit/aa1ac2ae451e54dfa19dce2794800bbd034e2194 DIFF: https://github.com/llvm/llvm-project/commit/aa1ac2ae451e54dfa19dce2794800bbd034e2194.diff LO

[PATCH] D112498: [Lex] Remove timer from #pragma clang __debug crash handler

2021-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: kadircet, aganea. sammccall requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This seems to be temporary code for testing 28ad9fc20823678881baa0d723834b88ea9e8e3a

[PATCH] D108696: [Coroutines] [Frontend] Lookup in std namespace first

2021-10-25 Thread Lewis Baker via Phabricator via cfe-commits
lewissbaker added a comment. So am I correct in understanding that the main issue with the chicken/egg problem for updating both the compiler to use the new stdlib facilities and updating the stdlib facilities is that we don't want to issue warnings about using `` and telling users to use `` in

[PATCH] D112498: [Lex] Remove timer from #pragma clang __debug crash handler

2021-10-25 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. This Timer is actually the test coverage for that commit. If we don’t want it here, I guess you could move it to the Support unit tests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112498/new/ https://reviews.llvm.org/D11

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2021-10-25 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 382155. void added a comment. Count sub/super registers as "uses" in terminating instructions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 Files: clang/include/cla

[PATCH] D112498: [Lex] Remove timer from #pragma clang __debug crash handler

2021-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D112498#3086029 , @aganea wrote: > This Timer is actually the test coverage for that commit. Ah, our issue is that it runs in production as well as in the tests. Each time the parser sees the crash pragma it dumps a bunch o

[PATCH] D110092: [clang][NFC] encapsulate global method list in GlobalMethodPool

2021-10-25 Thread Richard Howell via Phabricator via cfe-commits
rmaz abandoned this revision. rmaz added a comment. Abandoning in favor of D110123 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110092/new/ https://reviews.llvm.org/D110092 __

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-10-25 Thread Richard Howell via Phabricator via cfe-commits
rmaz abandoned this revision. rmaz added a comment. @vsapsai i'll abandon this diff then, thanks for your extensive feedback on the approach. Is D110123 shippable already, or are there some more corner cases to cover? Repository: rG LLVM Github Monorepo CH

Re: [clang] 2edb89c - Lex arguments for __has_cpp_attribute and friends as expanded tokens

2021-10-25 Thread Nico Weber via cfe-commits
Was this reviewed anywhere? I'll note that some internal project apparently used to check `#if __has_attribute(__unsafe_unretained)`. That used to silently (and incorrectly I think) always return 0 as far as I can tell, but now it fails with: ``` $ out/gn/bin/clang -c foo.mm foo.mm:1:21: error: m

Re: [clang] 2edb89c - Lex arguments for __has_cpp_attribute and friends as expanded tokens

2021-10-25 Thread Nico Weber via cfe-commits
Looks like the reason for this check was that https://github.com/llvm/llvm-project/blob/3b42fc8a07c37e47efae80c931eff7e63103e0e9/clang/include/clang/Basic/Attr.td#L1946 contains __unsafe_unretained despite it just being a macro here: http://llvm-cs.pcc.me.uk/tools/clang/lib/Frontend/InitPreprocesso

[PATCH] D112399: Get Bazel building `//clang` on Windows with clang-cl.

2021-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:1059 +#undef strcasecmp +#undef strncasecmp + Why do we need this with bazel but not with other windows builds? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112399/new/ h

[PATCH] D112498: [Lex] Remove timer from #pragma clang __debug crash handler

2021-10-25 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. That sounds right. You can test that scenario in a debugger, by putting a breakpoint before BuryPointer in clang/tools/driver/driver.cpp and verifying that the TimerGroup still has a pointer to the deleted stack frames, after the CrashRecoveryContext has successfully cat

[PATCH] D112399: Get Bazel building `//clang` on Windows with clang-cl.

2021-10-25 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:1059 +#undef strcasecmp +#undef strncasecmp + thakis wrote: > Why do we need this with bazel but not with other windows builds? I don't know how this never was hit by other builde

[PATCH] D112504: [OpenMP] Wrap (v)printf in the new RT and use same handling for AMD

2021-10-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: JonChesterfield, tianshilei1992, jhuber6. Herald added subscribers: guansong, bollu, yaxunl. jdoerfert requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added projects: clang, OpenMP. To support `p

[PATCH] D109506: [clangd] Print current request context along with the stack trace

2021-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This doesn't build on windows: http://45.33.8.238/win/47615/step_4.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109506/new/ https://reviews.llvm.org/D10

[PATCH] D108696: [Coroutines] [Frontend] Lookup in std namespace first

2021-10-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D108696#3086011 , @lewissbaker wrote: > So am I correct in understanding that the main issue with the chicken/egg > problem for updating both the compiler to use the new stdlib facilities and > updating the stdlib faciliti

[clang-tools-extra] ba94b8b - [clangd] Attempt to fix buildbots

2021-10-25 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2021-10-25T20:16:59-07:00 New Revision: ba94b8bdffb4c65d5475746a6ba43d279683e5bd URL: https://github.com/llvm/llvm-project/commit/ba94b8bdffb4c65d5475746a6ba43d279683e5bd DIFF: https://github.com/llvm/llvm-project/commit/ba94b8bdffb4c65d5475746a6ba43d279683e5bd.diff

[PATCH] D109506: [clangd] Print current request context along with the stack trace

2021-10-25 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D109506#3086183 , @thakis wrote: > This doesn't build on windows: http://45.33.8.238/win/47615/step_4.txt > > Please take a look and revert for now if it takes a while to fix. I pushed rGba94b8bdffb4

[PATCH] D112504: [OpenMP] Wrap (v)printf in the new RT and use same handling for AMD

2021-10-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 382171. jdoerfert added a comment. Actually use the new wrapper for OpenMP offload targeting AMD (and the new RT) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112504/new/ https://reviews.llvm.org/D112504 Fi

[clang] 1ff1bca - [AIX][ZOS] Disable tests due to lack of Objective-C support

2021-10-25 Thread Jake Egan via cfe-commits
Author: Jake Egan Date: 2021-10-25T23:32:13-04:00 New Revision: 1ff1bcab970afaef49e2ab8ab7681a12d11ad17d URL: https://github.com/llvm/llvm-project/commit/1ff1bcab970afaef49e2ab8ab7681a12d11ad17d DIFF: https://github.com/llvm/llvm-project/commit/1ff1bcab970afaef49e2ab8ab7681a12d11ad17d.diff LOG

[PATCH] D112390: [AIX][ZOS] Disable tests due to lack of Objective-C support

2021-10-25 Thread Jake Egan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1ff1bcab970a: [AIX][ZOS] Disable tests due to lack of Objective-C support (authored by Jake-Egan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112390/new/

[clang-tools-extra] b43a2ae - [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables

2021-10-25 Thread Carlos Galvez via cfe-commits
Author: Carlos Galvez Date: 2021-10-26T05:45:25Z New Revision: b43a2aee4ee946d8897880e824f4b09fe4c46143 URL: https://github.com/llvm/llvm-project/commit/b43a2aee4ee946d8897880e824f4b09fe4c46143 DIFF: https://github.com/llvm/llvm-project/commit/b43a2aee4ee946d8897880e824f4b09fe4c46143.diff LOG:

[PATCH] D112334: [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables

2021-10-25 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Thanks for the review! I forgot to mention the Differential Revision in the commit message after pushing so this review stays open, is there any way I can add it now in some other way? I suppose we don't want force-push? CHANGES SINCE LAST ACTION https://review

[PATCH] D111866: [RISCV] Support Zfhmin extension

2021-10-25 Thread Shao-Ce SUN via Phabricator via cfe-commits
achieveartificialintelligence updated this revision to Diff 382195. achieveartificialintelligence added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111866/new/ https://reviews.llvm.org/D111866 Files: clang/test/Driver/riscv-a

[PATCH] D112504: [OpenMP] Wrap (v)printf in the new RT and use same handling for AMD

2021-10-25 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. That's an interesting approach. Do you happen to know where I can find details of the data format behind that void*? Have been meaning to look at writing printf for amdgpu as host side decoding of that buffer. If the compiler knows how long it is, that would be

[PATCH] D112284: [Clang][NFC] Clang CUDA codegen: a dyn_cast -> cast instance + clang-tidy fixes

2021-10-25 Thread Uday Bondhugula via Phabricator via cfe-commits
bondhugula marked an inline comment as done. bondhugula added a comment. In D112284#3085086 , @tra wrote: > The description is a bit misleading. The dyn_cast->cast appears to be a minor > part of this patch. > I'd separate clang-tidy cleanups into a sepa

[PATCH] D112284: [Clang][NFC] Clang CUDA codegen clean-up

2021-10-25 Thread Uday Bondhugula via Phabricator via cfe-commits
bondhugula updated this revision to Diff 382201. bondhugula marked an inline comment as done. bondhugula retitled this revision from "[Clang][NFC] Clang CUDA codegen: a dyn_cast -> cast instance + clang-tidy fixes" to "[Clang][NFC] Clang CUDA codegen clean-up". bondhugula edited the summary of th

[PATCH] D112481: [Sema] fix nondeterminism in ASTContext::getDeducedTemplateSpecializationType

2021-10-25 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a reviewer: bruno. bruno added a comment. Nice catch, thanks for working on this! Comment at: clang/lib/AST/ASTContext.cpp:5640 + DeducedTemplateSpecializationType::Profile( + ID, Template, DeducedType, IsDependent || Template.isDependent()); if (DeducedTem

[PATCH] D112284: [Clang][NFC] Clang CUDA codegen clean-up

2021-10-25 Thread Uday Bondhugula via Phabricator via cfe-commits
bondhugula added a comment. @tra While on this, I also wanted to ask as to why clang cuda codegen is using an argument on the global ctor and the dtor it's generating. The argument is unused and I couldn't find any code comments to support it in either `CGCUDANV.cpp` or `CodeGenModule.cpp`. I

[PATCH] D110618: [HIPSPV][2/4] Add HIPSPV tool chain

2021-10-25 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki updated this revision to Diff 381854. linjamaki added a comment. Rebase and use SPIRV::constructTranslateCommand() to contruct the LLVM-SPIR-V translation command. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110618/new/ https://reviews.

[PATCH] D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP

2021-10-25 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki updated this revision to Diff 381855. linjamaki added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110622/new/ https://reviews.llvm.org/D110622 Files: clang/include/clang/Basic/Cuda.h clang/include/clang/Basic/Dia

[PATCH] D110685: [HIPSPV][4/4] Add option to use llc to emit SPIR-V

2021-10-25 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki updated this revision to Diff 381857. linjamaki added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110685/new/ https://reviews.llvm.org/D110685 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolCha

[PATCH] D111047: CUDA/HIP: Allow __int128 on the host side

2021-10-25 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki updated this revision to Diff 381858. linjamaki added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111047/new/ https://reviews.llvm.org/D111047 Files: clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaType.cpp clang/te

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: carlosgalvezp, steakhal, martong, gamesh411, Szelethus, dkrupp, xazax.hun, whisperity. balazske requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. The CERT rule ERR33-C can

[PATCH] D112410: [SPIR-V] Add a tool chain for SPIR-V (incomplete)

2021-10-25 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki created this revision. Herald added a subscriber: ThomasRaoux. linjamaki published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds a tool chain (TC) for SPIR-V for demonstration purposes. The TC is not complete but it is f

[PATCH] D108696: [Coroutines] [Frontend] Lookup in std namespace first

2021-10-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D108696#3083081 , @Quuxplusone wrote: > In D108696#3082866 , @ChuanqiXu > wrote: > >> @Quuxplusone gentle ping~ > > I think this PR is mostly above my pay grade. :) Sorry for distu

[PATCH] D108696: [Coroutines] [Frontend] Lookup in std namespace first

2021-10-25 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/SemaCXX/coroutines-exp-namespace.cpp:2 +// This file is the same with coroutines.cpp except the coroutine components are defined in std::experimental namespace. +// This intention of this test is to make sure the legacy ime

[PATCH] D112359: [NFC][RISCV] Unify depedency check and extension implication parsing logics

2021-10-25 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 381866. eopXD added a comment. Update clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112359/new/ https://reviews.llvm.org/D112359 Files: clang/test/CodeGen/RISCV/riscv-metadata.c clang/test/Code

[PATCH] D112401: [Clang] Mutate printf bulitin names under IEEE128 on PPC64

2021-10-25 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf updated this revision to Diff 381868. qiucf added a reviewer: rjmccall. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112401/new/ https://reviews.llvm.org/D112401 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/ppc64-f128-builtin

[PATCH] D106102: [analyzer][solver] Introduce reasoning for not equal to operator

2021-10-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Thanks for the report @bjope and thanks for the action @manas and @steakhal ! Sorry guys, I should have run our CI safety net jobs for this patch. I tend to do that with all my solver related patches, I really don't know why I thought this was different. Repository:

[PATCH] D112413: [X86] Add -mskip-rax-setup support to align with GCC

2021-10-25 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: MaskRay, hjl.tools, erichkeane, LuoYuanke, craig.topper. Herald added subscribers: dang, hiraditya. pengfei requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This fixe

[PATCH] D112359: [RISCV] Unify depedency check and extension implication parsing logics

2021-10-25 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD updated this revision to Diff 381873. eopXD edited the summary of this revision. eopXD added a comment. Since parsing logic is unified, code of RISCVAsmParser can be reduced. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112359/new/ https://r

[PATCH] D112406: [Driver][AArch64]Add driver support for neoverse-512tvb target

2021-10-25 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. This is a bit of a shame. I was hoping we wouldn't need the same hacks as GCC. The llvm cost modelling can work quite differently at times to GCC and I didn't think we were close enough to optimal code to need to worry about these kinds of differences. I guess having th

[PATCH] D106681: [analyzer][NFCI] Move a block from `getBindingForElement` to separate functions

2021-10-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. Sorry for blocking the review of this one for so long. Comment at: clang/test/Analysis/initialization.c:103 +void glob_arr_index4() { + clang_analyzer_eval(glob_arr_no_init[2]); // expected-warning{{UNKNOWN}} +} --

[PATCH] D111542: [analyzer] Retrieve incomplete array extent from its redeclaration.

2021-10-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. Minor nits. Aside from that just land it. Thanks for the fix. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1654 + // NOTE: If `Init` is non-null, then a new `VD` is non-null for sure. So check + // `Init

[PATCH] D112415: [Driver] ignore -maccumulate_outgoing_args option

2021-10-25 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: efriedma, erichkeane, LuoYuanke. Herald added a subscriber: dang. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://llvm.org/bugs/show_bug.cgi?id=28145 Signed-off-

[PATCH] D112408: [WIP][RISCV] Add the zve extension according to the v1.0-rc2 spec

2021-10-25 Thread Fraser Cormack via Phabricator via cfe-commits
frasercrmck added a comment. Don't we need to teach ISel some tricks before we consider these extensions supported? E.g., we need to stop i64 vectors being legal under zve32x or zve32f. Comment at: llvm/lib/Target/RISCV/RISCV.td:182 +def FeatureExtZve32x +: SubtargetFeat

[PATCH] D111642: [Analyzer][solver] Simplification: reorganize equalities with adjustment

2021-10-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. Awesome! So clean, and I also like the tests. Good job. Comment at: clang/test/Analysis/solver-sym-simplification-adjustment.c:58 + if (b != 1) { // b == 1 --> c

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. <3 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112296/new/ https://reviews.llvm.org/D112296 _

[clang] e1fdec8 - [analyzer] Add std::string checker

2021-10-25 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2021-10-25T11:15:40+02:00 New Revision: e1fdec875ff13504057fa01227458c9afa08222f URL: https://github.com/llvm/llvm-project/commit/e1fdec875ff13504057fa01227458c9afa08222f DIFF: https://github.com/llvm/llvm-project/commit/e1fdec875ff13504057fa01227458c9afa08222f.diff

[clang] caeef19 - [analyzer] Allow cmake options to be passed to satest container

2021-10-25 Thread Balazs Benics via cfe-commits
Author: Manas Date: 2021-10-25T11:15:40+02:00 New Revision: caeef1995ab47387fa8da3e958afc5637b4e893d URL: https://github.com/llvm/llvm-project/commit/caeef1995ab47387fa8da3e958afc5637b4e893d DIFF: https://github.com/llvm/llvm-project/commit/caeef1995ab47387fa8da3e958afc5637b4e893d.diff LOG: [a

[PATCH] D111247: [analyzer] Add std::string checker

2021-10-25 Thread Balázs Benics 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 rGe1fdec875ff1: [analyzer] Add std::string checker (authored by steakhal). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repo

[PATCH] D105447: [analyzer] Allow cmake options to be passed to satest container

2021-10-25 Thread Balázs Benics via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcaeef1995ab4: [analyzer] Allow cmake options to be passed to satest container (authored by manas, committed by steakhal). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D109557: Adds a BlockIndent option to AlignAfterOpenBracket

2021-10-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/ReleaseNotes.rst:227 correctly places the opening brace according to ``BraceWrapping.AfterEnum``. +- Option ``AlignAfterOpenBracket: BlockIndent`` has been added. If set, it will + always break after an open bra

[PATCH] D107339: [analyzer] Retrieve a character from StringLiteral as an initializer for constant arrays.

2021-10-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1757-1760 + // FIXME: Nevertheless, we can't do the same for cases, like: + // const char *str = "123"; // literal length is 4 + // char c = str[41];// offset is 41 + // It sh

[PATCH] D112420: [clang][ARM] PACBTI-M assembly support

2021-10-25 Thread Ties Stuij via Phabricator via cfe-commits
stuij created this revision. Herald added subscribers: hiraditya, kristof.beyls. stuij requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Introduce assembly support for Armv8.1-M PACBTI extension. This is an optional extensio

[PATCH] D110833: [clang-format] Refactor SpaceBeforeParens to add flags

2021-10-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:3422 ///true: false: - ///for (auto v : values) {} vs. for(auto v: values) {} + ///for (auto v : values) {} vs. for (aut

[PATCH] D110833: [clang-format] Refactor SpaceBeforeParens to add flags

2021-10-25 Thread Christian Rayroud via Phabricator via cfe-commits
crayroud added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3170 + // to add a space only before the first one + bool IsFirstLParen = true; + const FormatToken *Tok = Right.Previous; I will simplify the following using Left.is(T

[PATCH] D112421: [clang][ARM] PACBTI-M frontend support

2021-10-25 Thread Ties Stuij via Phabricator via cfe-commits
stuij created this revision. Herald added subscribers: dexonsmith, hiraditya, kristof.beyls. Herald added a reviewer: aaron.ballman. stuij requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Handle branch protection option on

[PATCH] D112422: [clang][ARM] emit PACBTI-M feature defines

2021-10-25 Thread Ties Stuij via Phabricator via cfe-commits
stuij created this revision. Herald added a subscriber: kristof.beyls. stuij requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. emit __ARM_FEATURE_BTI_DEFAULT and __ARM_FEATURE_PAC_DEFAULT defines when those features have been enabled This pa

[PATCH] D112430: [ARM][libunwind] add PACBTI-M support for libunwind

2021-10-25 Thread Ties Stuij via Phabricator via cfe-commits
stuij created this revision. Herald added subscribers: libcxx-commits, kristof.beyls. Herald added a project: libunwind. Herald added a reviewer: libunwind. stuij requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implements the fol

[PATCH] D112431: [ARM][clang] Define feature test macro for the PACBTI-M extension

2021-10-25 Thread Ties Stuij via Phabricator via cfe-commits
stuij created this revision. Herald added a subscriber: kristof.beyls. stuij requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If the extension string "+pacbti" was given in -march=... or -mcpu=... options the compiler shall define the follo

[PATCH] D112430: [ARM][libunwind] add PACBTI-M support for libunwind

2021-10-25 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: libunwind/src/Registers.hpp:2245-2246 + if (regNum == UNW_ARM_RA_AUTH_CODE) +return true; + Maybe we could gate this on __ARM_FEATURE_PAUTH because it won't work anyway without the feature enabled for libunwin

[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-25 Thread Bradley Smith 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 rG0ce46a1d43c6: [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum… (authored by bsmith). Repository: rG LLVM Github Mono

[clang] 0ce46a1 - [AArch64][Driver][SVE] Allow -msve-vector-bits=+ syntax to mean no maximum vscale

2021-10-25 Thread Bradley Smith via cfe-commits
Author: Bradley Smith Date: 2021-10-25T11:10:52Z New Revision: 0ce46a1d43c6c2e0df429a6a80848d4acc781eb6 URL: https://github.com/llvm/llvm-project/commit/0ce46a1d43c6c2e0df429a6a80848d4acc781eb6 DIFF: https://github.com/llvm/llvm-project/commit/0ce46a1d43c6c2e0df429a6a80848d4acc781eb6.diff LOG:

[clang] ffa96f0 - [clang] Fix range for forward-declared enums

2021-10-25 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2021-10-25T13:16:14+02:00 New Revision: ffa96f022c3ff03888afca8fdda766fe556eb9c5 URL: https://github.com/llvm/llvm-project/commit/ffa96f022c3ff03888afca8fdda766fe556eb9c5 DIFF: https://github.com/llvm/llvm-project/commit/ffa96f022c3ff03888afca8fdda766fe556eb9c5.dif

[clang-tools-extra] 4e4511d - [clang] Traverse enum base specifier in RAV

2021-10-25 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2021-10-25T13:16:14+02:00 New Revision: 4e4511df8d33a6fc02d5e46c681855db495187cd URL: https://github.com/llvm/llvm-project/commit/4e4511df8d33a6fc02d5e46c681855db495187cd DIFF: https://github.com/llvm/llvm-project/commit/4e4511df8d33a6fc02d5e46c681855db495187cd.dif

[clang-tools-extra] 9ab9caf - [clang] Visit enum base specifiers in libIndex

2021-10-25 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2021-10-25T13:16:14+02:00 New Revision: 9ab9caf214f47ea0ccf5cd3eb0aef2fcb88bd6e1 URL: https://github.com/llvm/llvm-project/commit/9ab9caf214f47ea0ccf5cd3eb0aef2fcb88bd6e1 DIFF: https://github.com/llvm/llvm-project/commit/9ab9caf214f47ea0ccf5cd3eb0aef2fcb88bd6e1.dif

[PATCH] D111259: [clang] Fix range for forward-declared enums

2021-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. kadircet marked 2 inline comments as done. Closed by commit rGffa96f022c3f: [clang] Fix range for forward-declared enums (authored by kadircet). Changed prior to commit: https://reviews.llvm.org/D111259?vs=377651&id=38193

[PATCH] D111260: [clang] Visit enum base specifiers in libIndex

2021-10-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9ab9caf214f4: [clang] Visit enum base specifiers in libIndex (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111260/new/ https://revie

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-25 Thread Shraiysh via Phabricator via cfe-commits
shraiysh updated this revision to Diff 381772. shraiysh added a comment. Rebase with main, updated syntax. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111992/new/ https://reviews.llvm.org/D111992 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp fla

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-25 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5993 case OMPC_adjust_args: + case OMPC_memory_order: llvm_unreachable("Clause is not allowed in 'omp atomic'."); The memory_order clause in clang side is not handled in this pa

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-25 Thread Peixin Qiao via Phabricator via cfe-commits
peixin added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5993 case OMPC_adjust_args: + case OMPC_memory_order: llvm_unreachable("Clause is not allowed in 'omp atomic'."); peixin wrote: > The memory_order clause in clang side is not ha

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-25 Thread Shraiysh via Phabricator via cfe-commits
shraiysh added a comment. Thanks for the review @peixin. Comment at: mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td:513 + +def AtomicReadOp : OpenMP_Op<"atomic.read"> { + let arguments = (ins OpenMP_PointerLikeType:$address, peixin wrote: > How do you plan to h

[PATCH] D111992: [MLIR][OpenMP] Added omp.atomic.read and omp.atomic.write

2021-10-25 Thread Shraiysh via Phabricator via cfe-commits
shraiysh added inline comments. Comment at: mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp:1246 +StringRef memOrder = op.memory_order().getValue(); +if (memOrder.equals("acq_rel") || memOrder.equals("release")) + return op.emitError( shraiysh wrote: >

[PATCH] D110357: [Analyzer] Extend ConstraintAssignor to handle remainder op

2021-10-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1618-1627 +const SymbolRef LHS = Sym->getLHS(); +const llvm::APSInt &Zero = +Builder.getBasicValueFactory().getValue(0, Sym->getType()); +// a % b != 0 im

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1623 if (!Constraint.containsZero()) { - State = RCM.assumeSymNE(State, LHS, Zero, Zero); + State = RCM.assumeSymRel(State, LHS, BO_NE, Zero); if (!Stat

[PATCH] D106681: [analyzer][NFCI] Move a block from `getBindingForElement` to separate functions

2021-10-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D106681#3083409 , @steakhal wrote: > Sorry for blocking the review of this one for so long. Thank you for the review! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106681/new/ https://reviews.llvm.org/D106681

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111985/new/ https://reviews.llvm.org/D111985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D111542: [analyzer] Retrieve incomplete array extent from its redeclaration.

2021-10-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1654 + // NOTE: If `Init` is non-null, then a new `VD` is non-null for sure. So check + // `Init` for null only and don't worry about the replaced `VD`. if (!Init) ---

[PATCH] D112413: [X86] Add -mskip-rax-setup support to align with GCC

2021-10-25 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added inline comments. Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:99 +cl::desc("Skips setting up the RAX register when SSE is disabled and there " + "are no variable arguments passed in vector registers."), +cl::Hidden); The de

[clang] 44e803e - [analyzer][NFCI] Move a block from `getBindingForElement` to separate functions

2021-10-25 Thread Denys Petrov via cfe-commits
Author: Denys Petrov Date: 2021-10-25T15:14:10+03:00 New Revision: 44e803ef6d41770adf309960e37bcc6a75dbbe2c URL: https://github.com/llvm/llvm-project/commit/44e803ef6d41770adf309960e37bcc6a75dbbe2c DIFF: https://github.com/llvm/llvm-project/commit/44e803ef6d41770adf309960e37bcc6a75dbbe2c.diff

[clang] 3b1165b - [analyzer] Retrieve incomplete array extent from its redeclaration.

2021-10-25 Thread Denys Petrov via cfe-commits
Author: Denys Petrov Date: 2021-10-25T15:14:10+03:00 New Revision: 3b1165ba3d15de83699be3ff4be3b6adf4d6e977 URL: https://github.com/llvm/llvm-project/commit/3b1165ba3d15de83699be3ff4be3b6adf4d6e977 DIFF: https://github.com/llvm/llvm-project/commit/3b1165ba3d15de83699be3ff4be3b6adf4d6e977.diff

[PATCH] D106681: [analyzer][NFCI] Move a block from `getBindingForElement` to separate functions

2021-10-25 Thread Denys Petrov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG44e803ef6d41: [analyzer][NFCI] Move a block from `getBindingForElement` to separate functions (authored by ASDenysPetrov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D111542: [analyzer] Retrieve incomplete array extent from its redeclaration.

2021-10-25 Thread Denys Petrov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3b1165ba3d15: [analyzer] Retrieve incomplete array extent from its redeclaration. (authored by ASDenysPetrov). Changed prior to commit: https://reviews.llvm.org/D111542?vs=381252&id=381944#toc Reposito

[PATCH] D111654: [analyzer] Retrieve a value from list initialization of multi-dimensional array declaration.

2021-10-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. This is an important step towards better handling of global initializer expressions. I'm looking forward to it. Although, I have concerns to address. Comment at: clang/lib/AST/Type.cpp:141-143 +/// Return an array with extents of the declared array ty

[PATCH] D110065: [AArch64] Add support for the 'R' architecture profile.

2021-10-25 Thread John Brawn via Phabricator via cfe-commits
john.brawn accepted this revision. john.brawn added a comment. This revision is now accepted and ready to land. I have one small comment, but otherwise LGTM. Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp:1558 + + if (Reg && !isValidSysReg(Reg, Read, S

[PATCH] D111985: [Clang] Add elementwise min/max builtins.

2021-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Sema/Sema.h:12715-12716 + ExprResult SemaBuiltinElementwiseMath(CallExpr *TheCall, +ExprResult CallResult); + Why oh why did we start slapping `Sema` a

[PATCH] D112101: [AST] Fix the EndLoc calculation for ObjCObjectPointer

2021-10-25 Thread Luke Petre via Phabricator via cfe-commits
lpetre created this revision. lpetre updated this revision to Diff 381958. lpetre added a comment. lpetre updated this revision to Diff 381960. lpetre retitled this revision from "Fix the EndLoc calculation for ObjCObjectPointer" to "[AST] Fix the EndLoc calculation for ObjCObjectPointer". lpetre

[clang] 333c36b - [clang][unittests] Fix shared lib builds

2021-10-25 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2021-10-25T15:09:45+02:00 New Revision: 333c36bec09a954b59ceb01e21f1525f17530ec0 URL: https://github.com/llvm/llvm-project/commit/333c36bec09a954b59ceb01e21f1525f17530ec0 DIFF: https://github.com/llvm/llvm-project/commit/333c36bec09a954b59ceb01e21f1525f17530ec0.dif

[PATCH] D112447: [clangd] IncludeCleaner: Support macros

2021-10-25 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Collect the macro definition loc

[PATCH] D109557: Adds a BlockIndent option to AlignAfterOpenBracket

2021-10-25 Thread Cameron Mulhern via Phabricator via cfe-commits
csmulhern updated this revision to Diff 381974. csmulhern marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109557/new/ https://reviews.llvm.org/D109557 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/Relea

[PATCH] D107339: [analyzer] Retrieve a character from StringLiteral as an initializer for constant arrays.

2021-10-25 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1757-1760 + // FIXME: Nevertheless, we can't do the same for cases, like: + // const char *str = "123"; // literal length is 4 + // char c = str[41];// offset is 41 + //

[PATCH] D111654: [analyzer] Retrieve a value from list initialization of multi-dimensional array declaration.

2021-10-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/AST/Type.h:2953 const llvm::APInt &getSize() const { return Size; } + SmallVector getAllExtents() const; const Expr *getSizeExpr() const { Could this be a free function (not a member function)?

[PATCH] D112390: [AIX][ZOS] Disable tests due to lack of Objective-C support

2021-10-25 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan updated this revision to Diff 381979. Jake-Egan added a comment. Fixed objc_direct.ll Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112390/new/ https://reviews.llvm.org/D112390 Files: clang/test/Modules/ModuleDebugInfo.cpp clang/test

[PATCH] D112296: [Analyzer][solver] Handle adjustments in constraint assignor remainder

2021-10-25 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1623 if (!Constraint.containsZero()) { - State = RCM.assumeSymNE(State, LHS, Zero, Zero); + State = RCM.assumeSymRel(State,

[PATCH] D112235: [HIP][OpenMP] Fix assertion in deferred diag due to incomplete class definition

2021-10-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/OpenMP/deferred-diags.cpp:40 +// Test deleting object with incomplete class definition does not causing +// assertion. +namespace TestDeleteIncompleteClassDefinition { r

[PATCH] D112209: [clangd] IncludeCleaner: Complicated rules for enum usage

2021-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:38 bool VisitTagType(TagType *TT) { +// For enumerations we will require only the definition if it's present and +// the underlying type is not specified. I don't

[PATCH] D112453: [Sema] When dereferencing a pointer of dependent type, infer the result type.

2021-10-25 Thread Clement Courbet via Phabricator via cfe-commits
courbet created this revision. courbet added reviewers: rsmith, aaron.ballman. courbet requested review of this revision. Herald added a project: clang. Example: template auto f(T* t) { return *t; } Before that change, the `UnaryOperator` for `*t` has type ``. After the change, its type

[PATCH] D110357: [Analyzer] Extend ConstraintAssignor to handle remainder op

2021-10-25 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 6 inline comments as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1619-1620 +const SymbolRef LHS = Sym->getLHS(); +const llvm::APSInt &Zero = +Builder.getBasicValueFactory().getValue(0, Sy

  1   2   >