[PATCH] D113210: [NewPM] Use the default AA pipeline by default

2021-11-04 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. This change caused the Polly build to fail: https://lab.llvm.org/buildbot/#/builders/10/builds/7501 opt: /home/worker/buildbot-workers/polly-x86_64-gce1/rundir/llvm.src/llvm/include/llvm/IR/PassManager.h:784: typename PassT::Result& llvm::AnalysisManager::getResul

[PATCH] D104601: [Preprocessor] Implement -fminimize-whitespace.

2021-11-04 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. In D104601#3105044 , @manmanren wrote: > It will fail the compilation on the preprocessed output with > error: expected unqualified-id > int test();#pragma clang assume_nonnull end The handler for assume_nonull passes an inval

[clang] 8f099d1 - [Preprocessor] Fix warning: left and right subexpressions are identical. NFCI.

2021-11-04 Thread Michael Kruse via cfe-commits
Author: Michael Kruse Date: 2021-11-05T00:43:40-05:00 New Revision: 8f099d17a1bee857ada3c5af032cfcb559252024 URL: https://github.com/llvm/llvm-project/commit/8f099d17a1bee857ada3c5af032cfcb559252024 DIFF: https://github.com/llvm/llvm-project/commit/8f099d17a1bee857ada3c5af032cfcb559252024.diff

[clang] 1606022 - [Preprocessor] Fix newline before/after _Pragma.

2021-11-04 Thread Michael Kruse via cfe-commits
Author: Michael Kruse Date: 2021-11-05T00:43:40-05:00 New Revision: 1606022fab2d90ed8ee6d15800ec1c2c293db20e URL: https://github.com/llvm/llvm-project/commit/1606022fab2d90ed8ee6d15800ec1c2c293db20e DIFF: https://github.com/llvm/llvm-project/commit/1606022fab2d90ed8ee6d15800ec1c2c293db20e.diff

[PATCH] D113145: Remove two sema checkings as assertions introduced by D79719.

2021-11-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Yeah, that would be better. I just realized it earlier today. I'll attempt that instead. Thanks for the suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113145/new/ https://reviews.llvm.org/D113145

[PATCH] D113145: Remove two sema checkings as assertions introduced by D79719.

2021-11-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @ychen, an alternative fix would be to avoid getting asking for the layout for a broken `union` like this. Would it be appropriate to mark the `RecordDecl` in Sema such that `isInvalidDecl` returns true? Is that already happening? Repository: rG LLVM G

[PATCH] D91949: [clang-format] Add BeforeStructInitialization option in BraceWrapping configuration

2021-11-04 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D91949#2747412 , @krasimir wrote: > Do we have some widely used code style that requires the new option > (https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options)? I have the same question.

[PATCH] D112903: [C++20] [Module] Fix front end crashes when trying to export a qualified entity which is already declared

2021-11-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 384968. ChuanqiXu added a comment. Updated diagnostic messages. It looks good to me to reject for exporting non-namespace-scope names in `diagnoseQualifiedDeclaration()`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112903/new/ https://reviews.l

[PATCH] D112903: [C++20] [Module] Fix front end crashes when trying to export a qualified entity which is already declared

2021-11-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu requested review of this revision. ChuanqiXu added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7784-7785 "because namespace %1 does not enclose namespace %2">; +def err_invalid_declarator_in_export : Error<"cannot export %0 here " +

[PATCH] D113096: [X86][MS-InlineAsm] Add constraint *m for memory access w/ global var

2021-11-04 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. In D113096#3110546 , @skan wrote: > In D113096#3110507 , @thakis wrote: > >> Looks like this breaks tests on Mac: http://45.33.8.238/mac/38266/step_11.txt >> >> Please take a look and revert

[PATCH] D113096: [X86][MS-InlineAsm] Add constraint *m for memory access w/ global var

2021-11-04 Thread Kan Shengchen via Phabricator via cfe-commits
skan added a comment. In D113096#3110507 , @thakis wrote: > Looks like this breaks tests on Mac: http://45.33.8.238/mac/38266/step_11.txt > > Please take a look and revert for now if it takes a while to fix. I can quickly fix it. It's the issue of ambig

[PATCH] D113096: [X86][MS-InlineAsm] Add constraint *m for memory access w/ global var

2021-11-04 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this breaks tests on Mac: http://45.33.8.238/mac/38266/step_11.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/D113096/new/ https://reviews.llvm.

[PATCH] D112903: [C++20] [Module] Fix front end crashes when trying to export a qualified entity which is already declared

2021-11-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu planned changes to this revision. ChuanqiXu added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7784-7785 "because namespace %1 does not enclose namespace %2">; +def err_invalid_declarator_in_export : Error<"cannot export %0 here " +

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-11-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith @aaron.ballman gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110215/new/ https://reviews.llvm.org/D110215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang-tools-extra] 6c6ccc7 - [NFC] Don't set rlimit in test with MSAN

2021-11-04 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2021-11-04T18:18:03-07:00 New Revision: 6c6ccc72a6124164df5b8445624d220d45cf4b6a URL: https://github.com/llvm/llvm-project/commit/6c6ccc72a6124164df5b8445624d220d45cf4b6a DIFF: https://github.com/llvm/llvm-project/commit/6c6ccc72a6124164df5b8445624d220d45cf4b6a.diff L

[PATCH] D113096: [X86][MS-InlineAsm] Add constraint *m for memory access w/ global var

2021-11-04 Thread Kan Shengchen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbe08e452f366: [X86][MS-InlineAsm] Add constraint *m for memory access w/ global var (authored by skan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113096/

[clang] be08e45 - [X86][MS-InlineAsm] Add constraint *m for memory access w/ global var

2021-11-04 Thread Shengchen Kan via cfe-commits
Author: Shengchen Kan Date: 2021-11-05T09:11:41+08:00 New Revision: be08e452f36602cd73f816787bf16d1a0405ff09 URL: https://github.com/llvm/llvm-project/commit/be08e452f36602cd73f816787bf16d1a0405ff09 DIFF: https://github.com/llvm/llvm-project/commit/be08e452f36602cd73f816787bf16d1a0405ff09.diff

[PATCH] D109496: [clang] deprecate frelaxed-template-template-args, make it on by default

2021-11-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 384929. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109496/new/ https://reviews.llvm.org/D109496 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang

[PATCH] D112098: [ASan] Added stack safety support in address sanitizer.

2021-11-04 Thread Kirill Stoimenov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. kstoimenov marked an inline comment as done. Closed by commit rG3f1aca58df8f: [ASan] Added stack safety support in address sanitizer. (authored by kstoimenov). Reposit

[PATCH] D112914: Misleading identifier detection

2021-11-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. In D112914#3102728 , @carlosgalvezp wrote: > I don't know how to remove the "Requested changes" from here so I'll just > remove myself from reviewer. Marking the change as accepted should overwrite

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-11-04 Thread James King via Phabricator via cfe-commits
jcking1034 marked an inline comment as done. jcking1034 added a comment. @fowles @aaron.ballman I'll take a look at `forEachCapture` in the next patch. Also, I've discovered that the `VarDecl` node has a member function `isInitCapture` that seems like it could allow us to distinguish between ca

[PATCH] D112098: [ASan] Added stack safety support in address sanitizer.

2021-11-04 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov updated this revision to Diff 384902. kstoimenov added a comment. Moved AddressSanitizer back to the loop. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112098/new/ https://reviews.llvm.org/D112098 Files: llvm/lib/Transforms/Instrumen

[PATCH] D112098: [ASan] Added stack safety support in address sanitizer.

2021-11-04 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka accepted this revision. vitalybuka added inline comments. This revision is now accepted and ready to land. Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1328 + ClUseStackSafety ? &MAM.getResult(M) : nullptr; + AddressSanitizer FunctionSani

[PATCH] D113211: [NFC][clang] Inclusive terms: replace uses of blacklist in clang/test/

2021-11-04 Thread Jan Korous via Phabricator via cfe-commits
jkorous requested changes to this revision. jkorous added a comment. This revision now requires changes to proceed. Hi! Thank you for the clean-up :) I feel there might be a bit of work still left. While renaming filenames and function names should be mostly inconsequential renaming command line

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-11-04 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 384897. samitolvanen added a comment. Keep a `void *` return type for the nocfi variant. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108479/new/ https://reviews.llvm.org/D108479 Files: clang/docs/Lang

[PATCH] D106585: Fix clang debug info irgen of i128 enums

2021-11-04 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. This broke determinism when building Firefox. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106585/new/ https://reviews.llvm.org/D106585 ___ cfe-commits mailing list cfe-commits

[PATCH] D113148: Add new clang-tidy check for string_view(nullptr)

2021-11-04 Thread CJ Johnson via Phabricator via cfe-commits
CJ-Johnson updated this revision to Diff 384890. CJ-Johnson added a comment. Change static_cast suggested edit to use parens instead of braces Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113148/new/ https://reviews.llvm.org/D113148 Files: clan

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-11-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Sorry for being late to the party. Itay's explanation is correct to me. I don't know much about multiversioned functions. My reply below if for ifunc. - On ELF, an alias is just a symbol sharing st_shndx/st_value with another symbol. It is not by name. The target symbol

[PATCH] D113148: Add new clang-tidy check for string_view(nullptr)

2021-11-04 Thread CJ Johnson via Phabricator via cfe-commits
CJ-Johnson updated this revision to Diff 384881. CJ-Johnson marked an inline comment as done. CJ-Johnson added a comment. Fix spelling error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113148/new/ https://reviews.llvm.org/D113148 Files: clang-

[PATCH] D113148: Add new clang-tidy check for string_view(nullptr)

2021-11-04 Thread CJ Johnson via Phabricator via cfe-commits
CJ-Johnson marked an inline comment as done. CJ-Johnson added a comment. Thanks for the additional info, @aaron.ballman! I had not considered the issues with duplicate warnings. I agree that it would be annoying for users. That being the case, the second option ("remove the string_view nullptr c

[PATCH] D113210: [NewPM] Use the default AA pipeline by default

2021-11-04 Thread Arthur Eubanks 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 rG13317286f829: [NewPM] Use the default AA pipeline by default (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[clang] 1331728 - [NewPM] Use the default AA pipeline by default

2021-11-04 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2021-11-04T15:10:34-07:00 New Revision: 13317286f8298eb3bafa9ddebd1c03bef4918948 URL: https://github.com/llvm/llvm-project/commit/13317286f8298eb3bafa9ddebd1c03bef4918948 DIFF: https://github.com/llvm/llvm-project/commit/13317286f8298eb3bafa9ddebd1c03bef4918948.diff

[PATCH] D112098: [ASan] Added stack safety support in address sanitizer.

2021-11-04 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov updated this revision to Diff 384877. kstoimenov marked 2 inline comments as done. kstoimenov added a comment. Fixed tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112098/new/ https://reviews.llvm.org/D112098 Files: llvm/lib/Tra

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-11-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. `std::addressof(&someFunction)` certainly ought to return a signed pointer under ptrauth, so if your goal here is to get a completely unadorned symbol address, I think you do need a different builtin, and it probably ought to return a `void*` to emphasize that it shoul

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-11-04 Thread Itay Bookstein via Phabricator via cfe-commits
ibookstein added a comment. I see. What is the guiding principle there, though? Generating correct IR "up front" / "the first time" rather than "fixing it up as you go via manipulations"? (could you give a link?) I can see the engineering consideration in not letting IR manipulations creep into

[PATCH] D109496: [clang] deprecate frelaxed-template-template-args, make it on by default

2021-11-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 384873. mizvekov edited the summary of this revision. mizvekov added a comment. This revision is now accepted and ready to land. Implement workaround. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109496/new/

[PATCH] D113154: [OpenMP] Add parsing/sema/serialization for 'bind' clause

2021-11-04 Thread Mike Rice 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 rG4eac7bcf1af1: [OpenMP] Add parsing/sema/serialization for 'bind' clause. (authored by mikerice). Herald added projects: clang, Flang. Herald added a

[clang] 4eac7bc - [OpenMP] Add parsing/sema/serialization for 'bind' clause.

2021-11-04 Thread Mike Rice via cfe-commits
Author: Mike Rice Date: 2021-11-04T14:40:30-07:00 New Revision: 4eac7bcf1af1a94d76aec8d54f4a0f0014dd121c URL: https://github.com/llvm/llvm-project/commit/4eac7bcf1af1a94d76aec8d54f4a0f0014dd121c DIFF: https://github.com/llvm/llvm-project/commit/4eac7bcf1af1a94d76aec8d54f4a0f0014dd121c.diff LOG

[clang] 737e421 - [Attr] support btf_type_tag attribute

2021-11-04 Thread Yonghong Song via cfe-commits
Author: Yonghong Song Date: 2021-11-04T14:23:31-07:00 New Revision: 737e4216c537c33aab8ec51880f06b8a54325b94 URL: https://github.com/llvm/llvm-project/commit/737e4216c537c33aab8ec51880f06b8a54325b94 DIFF: https://github.com/llvm/llvm-project/commit/737e4216c537c33aab8ec51880f06b8a54325b94.diff

[PATCH] D113148: Add new clang-tidy check for string_view(nullptr)

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D113148#3109190 , @CJ-Johnson wrote: > As for "we should be careful we're not too onerous when users enable all > `bugprone` checks together.", these fixes are about preventing UB. While I > did put this in the "bugpro

[PATCH] D112285: [PowerPC] PPC backend optimization to lower int_ppc_tdw/int_ppc_tw intrinsics to TDI/TWI machine instructions

2021-11-04 Thread Victor Huang via Phabricator via cfe-commits
NeHuang updated this revision to Diff 384768. NeHuang marked 3 inline comments as done. NeHuang added a comment. Address review comments from @nemanjai Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112285/new/ https://reviews.llvm.org/D112285 File

Re: [PATCH] D65019: [ARM] push LR before __gnu_mcount_nc

2021-11-04 Thread Angela Webb via cfe-commits
___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D113186: [NFC] Inclusive language: Remove instances of master in URLs

2021-11-04 Thread Quinn Pham via Phabricator via cfe-commits
quinnp created this revision. Herald added subscribers: wenzhicui, wrengr, Chia-hungDuan, dcaballe, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini, usaxena95,

[PATCH] D111199: [Clang][LLVM][Attr] support btf_type_tag attribute

2021-11-04 Thread Yonghong Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGeb0fa8bfa356: [Clang][Attr] Support btf_type_tag attribute (authored by yonghong-song). Changed prior to commit: https://reviews.llvm.org/D99?

[clang] eb0fa8b - [Clang][Attr] Support btf_type_tag attribute

2021-11-04 Thread Yonghong Song via cfe-commits
Author: Yonghong Song Date: 2021-11-04T13:59:18-07:00 New Revision: eb0fa8bfa356d49198f98b878b004bce59232bb0 URL: https://github.com/llvm/llvm-project/commit/eb0fa8bfa356d49198f98b878b004bce59232bb0 DIFF: https://github.com/llvm/llvm-project/commit/eb0fa8bfa356d49198f98b878b004bce59232bb0.diff

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-11-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added subscribers: rjmccall, rsmith. pcc added a comment. This revision now requires changes to proceed. In D108479#3108360 , @ardb wrote: > I would argue that the existing __builtin_addressof() should absorb th

[PATCH] D113146: Fix the assertion in Sema::ActOnDependentMemberExpr

2021-11-04 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 384858. ychen added a comment. - Check that TemplateArgs maybe null. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113146/new/ https://reviews.llvm.org/D113146 Files: clang/lib/Sema/SemaExprMember.cpp clang/

[PATCH] D113080: [Support] Improve Caching conformance with Support library behavior

2021-11-04 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd788c44f5cdd: [Support] Improve Caching conformance with Support library behavior (authored by noajshu, committed by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[clang] d788c44 - [Support] Improve Caching conformance with Support library behavior

2021-11-04 Thread Petr Hosek via cfe-commits
Author: Noah Shutty Date: 2021-11-04T13:00:44-07:00 New Revision: d788c44f5cddb3e73069cd4d965bbf55b0d602d5 URL: https://github.com/llvm/llvm-project/commit/d788c44f5cddb3e73069cd4d965bbf55b0d602d5 DIFF: https://github.com/llvm/llvm-project/commit/d788c44f5cddb3e73069cd4d965bbf55b0d602d5.diff L

[PATCH] D112916: Confusable identifiers detection

2021-11-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384854. serge-sans-paille added a comment. Portable `confusable.txt` parsing CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ https://reviews.llvm.org/D112916 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tool

[PATCH] D95168: [clang-format] Add Insert/Remove Braces option

2021-11-04 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:946 +/// Remove if there is no comment +BIS_RemoveNoComment + }; MyDeveloperDay wrote: > HazardyKnusperkeks wrote: > > Maybe differentiate between single line and m

[PATCH] D111199: [Clang][LLVM][Attr] support btf_type_tag attribute

2021-11-04 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 384843. yonghong-song added a comment. - Change TypeLoc.isNull() check to !TypeLoc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99/new/ https://reviews.llvm.org/D99 Files: clang/include/clang/

[PATCH] D98895: [X86][clang] Disable long double type for -mno-x87 option

2021-11-04 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. @nickdesaulniers, thanks a lot for reporting this! Unfortunately it is not easy to keep compatibility with GCC in this case. GCC has this diagnostic very late in the pipeline, and trivial uses of `long double` type (e.g. unused variables, constant expressions) can be op

[PATCH] D113210: [NewPM] Use the default AA pipeline by default

2021-11-04 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 384842. aeubanks added a comment. update LTOBackend.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113210/new/ https://reviews.llvm.org/D113210 Files: clang/lib/CodeGen/BackendUtil.cpp llvm/lib/LTO/LTO

[PATCH] D111199: [Clang][LLVM][Attr] support btf_type_tag attribute

2021-11-04 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1426 + TypeLoc RetTL; + if (!TL.isNull()) { +if (auto FTL = TL.getAs()) dblaikie wrote: > I'm /guessing/ this can be rewritten as: > ``` > if (TL) > ``` > ? (similarly elsewh

[PATCH] D113210: [NewPM] Use the default AA pipeline by default

2021-11-04 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea added a comment. Can you also update `lib/LTO/LTOBackend.cpp` to something like: // Parse a custom AA pipeline if asked to, otherwise the default will be used. if (!Conf.AAPipeline.empty()) { AAManager AA; if (auto Err = PB.parseAAPipeline(AA, Conf.AAPipeline)) { report

[PATCH] D113211: [NFC][clang] Inclusive terms: replace uses of blacklist in clang/test/

2021-11-04 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA created this revision. ZarkoCA added reviewers: kcc, samsonov, jkorous, lebedev.ri, pcc, vlad.tsyrklevich. ZarkoCA requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Replace filenames, variable names, check prefixes uses of blacklist

[PATCH] D112850: [clang] 'unused-but-set-variable' warning should not apply to __block objective-c pointers

2021-11-04 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. The lifetime of an object won't be extended in the following case since the variable isn't captured by a block: void foo(id); void test(id a) { __block id t = a; foo(a); t = 0; } clang should probably warn if a variable marked `__block` isn't

[PATCH] D112732: [ASan] Process functions in Asan module pass

2021-11-04 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D112732#3107387 , @aeubanks wrote: > can we rename "asan-module" to "asan" after this change? and remove the extra > "asan-pipeline"/"asan-function-pipeline" parsing callbacks in > NewPMDriver.cpp? and previously we had `-

[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2021-11-04 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. The `avxintrin.h` header has more structured documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112941/new/ https://reviews.llvm.org/D112941 ___ cfe-commits mailing li

[PATCH] D112732: [ASan] Process functions in Asan module pass

2021-11-04 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1289 + } + Modified |= ModuleSanitizer.instrumentModule(M); + if (Modified) vitalybuka wrote: > kstoimenov wrote: > > At first I had module sanitizer run fir

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-11-04 Thread James King via Phabricator via cfe-commits
jcking1034 marked an inline comment as done. jcking1034 added inline comments. Comment at: clang/docs/ReleaseNotes.rst:223-229 +- ``LambdaCapture`` AST Matchers are now available. These matchers allow for + the binding of ``LambdaCapture`` nodes, and include the ``lambdaCapture`

[PATCH] D112850: [clang] 'unused-but-set-variable' warning should not apply to __block objective-c pointers

2021-11-04 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak 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/D112850/new/ https://reviews.llvm.org/D112850 ___

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-11-04 Thread James King via Phabricator via cfe-commits
jcking1034 updated this revision to Diff 384835. jcking1034 added a comment. Update release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112491/new/ https://reviews.llvm.org/D112491 Files: clang/docs/LibASTMatchersReference.html clang/

[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2021-11-04 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. In D112941#3105297 , @tschuett wrote: > The original `ptrauth.h` has the same comment style. Would doxygen style be > an improvement? Hmm, what do you have in mind? Markup for the builtin arguments/returns? The need for `__` prefi

[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2021-11-04 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab updated this revision to Diff 384827. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112941/new/ https://reviews.llvm.org/D112941 Files: clang/include/clang/Basic/Builtins.def clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang

[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2021-11-04 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab updated this revision to Diff 384825. ab marked 3 inline comments as done. ab added a comment. Simplify `err_ptrauth_disabled` diagnostic, rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112941/new/ https://reviews.llvm.org/D112941 Files:

[PATCH] D98895: [X86][clang] Disable long double type for -mno-x87 option

2021-11-04 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. This seems to be causing build errors for the linux kernel (which uses `-mno-x87`) for expressions like: `unsigned long foo = 300L * 1E6L;` https://github.com/ClangBuiltLinux/linux/issues/1497 // clang -O2 -mno-x87 void foo (unsigned long); void bar (void)

[PATCH] D113210: [NewPM] Use the default AA pipeline by default

2021-11-04 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added a reviewer: asbirlea. Herald added subscribers: ormris, steven_wu, hiraditya. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. aeubanks requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers

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

2021-11-04 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @steakhal Thank you for your suggestion. I'll make corresponding changes. > I'm still worried about the fact that you assume that there is a > correspondence between `ElementRegions` and `InitListExprs`. > I cannot see why this assumption holds, since reinterpret c

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-11-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. >> If the result wasn't null (call it F), use GI->takeName(F); >> F->replaceAllUsesWith(GI); When I wrote the multiversioning support in the first place, I was told that the above was unacceptable and the CFE doesn't wish to do that anymore. There ARE some examples

[PATCH] D106823: [analyzer][solver] Iterate to a fixpoint during symbol simplification with constants

2021-11-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > As of diff 5, line 1767 and all the code in the block at line 2184 are > uncovered by the tests you provided. Thanks, I've added new tests that cover the re-assume logic (the block of line 2184). However, I was unable to add a test that covers the case when the sim

[PATCH] D106823: [analyzer][solver] Iterate to a fixpoint during symbol simplification with constants

2021-11-04 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 384802. martong added a comment. - Add new tests to cover missing line coverage. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106823/new/ https://reviews.llvm.org/D106823 Files: clang/include/clang/StaticA

[PATCH] D113195: [clang-tidy] Add check for initialization of `absl::Cleanup`.

2021-11-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. Nice! Comment at: clang-tools-extra/clang-tidy/abseil/CleanupCtadCheck.cpp:19 + +using namespace clang::ast_matchers; +using namespace ::clang::transformer; ---

[PATCH] D112492: [HIP] Do not use kernel handle for MSVC target

2021-11-04 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > With these changes, we should have consistent name mangling for kernel stubs > and kernel launching mechanism on Linux and Windows. Nice! Thank you for figuring out the root causes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112492/new/ https://reviews.llvm.o

[PATCH] D112024: [clang] diagnose_as attribute for Fortify diagnosing like builtins.

2021-11-04 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield marked 8 inline comments as done. mbenfield added inline comments. Comment at: clang/include/clang/Basic/Attr.td:3822 +def DiagnoseAs : InheritableAttr { + let Spellings = [Clang<"diagnose_as">]; + let Args = [ExprArgument<"Function">, serge-sans-pail

[PATCH] D111199: [Clang][LLVM][Attr] support btf_type_tag attribute

2021-11-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. Seems unfortunate that attributes on types are only available through TypeLocs rather than through sugar (like if we used a typedef it'd be visible in the type sugar, but not if it's written on the type usage itself) - but that's above

[PATCH] D113201: [clang-tidy] Fix a crash in modernize-loop-convert around conversion operators

2021-11-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: aaron.ballman, alexfh, steakhal, whisperity. Szelethus added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, martong, gamesh411, dkrupp, rnkovacs, xazax.hun. Szelethus requested review of this revision. Herald added

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-11-04 Thread Itay Bookstein via Phabricator via cfe-commits
nextsilicon-itay-bookstein added a comment. That feature already exists - use a plain old function declaration :) My mental model for this is like this: memcpy one of the is the most widely popular APIs commonly implemented as an ifunc. In clients of this API, it's just a plain old function decl

[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-04 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 384791. jansvoboda11 added a comment. Call `getFileInfo` in `Preprocessor::EnterMainSourceFile`. This ensures deserialization of `HeaderFileInfo`, which seems to be necessary with modules-ts enabled. Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-11-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D112349#3109211 , @nextsilicon-itay-bookstein wrote: >> I don't know much about the ELF format... but this works today? We can >> define a resolver in a different TU and it WORKS thanks to the linker? So >> there is per

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-11-04 Thread Itay Bookstein via Phabricator via cfe-commits
nextsilicon-itay-bookstein added a comment. > I don't know much about the ELF format... but this works today? We can > define a resolver in a different TU and it WORKS thanks to the linker? So > there is perhaps something? The ifunc symbol that is emitted in the TU with the undefined resolver

[PATCH] D113148: Add new clang-tidy check for string_view(nullptr)

2021-11-04 Thread CJ Johnson via Phabricator via cfe-commits
CJ-Johnson added a comment. In D113148#3108993 , @aaron.ballman wrote: > Generally speaking, we prefer to improve the existing checks. I think > `bugprone-string-constructor` would probably be a better place for the > constructor-related functionality.

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-11-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Hmm... we've never had any problems with cpu-dispatch/specific on this before? An example just like that works in all my internal tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112349/new/ https://reviews.llvm.or

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-11-04 Thread Itay Bookstein via Phabricator via cfe-commits
nextsilicon-itay-bookstein added a comment. It sort-of-works only because you define the ifunc in both translation units (with the same name). But looks like it behaves incorrectly for references to the ifunc in the translation unit where the resolver is only declared, not defined: > cat exa

[PATCH] D113148: Add new clang-tidy check for string_view(nullptr)

2021-11-04 Thread CJ Johnson via Phabricator via cfe-commits
CJ-Johnson updated this revision to Diff 384775. CJ-Johnson added a comment. Remove trailing whitespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113148/new/ https://reviews.llvm.org/D113148 Files: clang-tools-extra/clang-tidy/bugprone/Bugpr

[PATCH] D113195: Suggests switching the initialization pattern of absl::Cleanup instances from the factory function to class template argument deduction (CTAD) in C++17 and higher.

2021-11-04 Thread CJ Johnson via Phabricator via cfe-commits
CJ-Johnson updated this revision to Diff 384774. CJ-Johnson added a comment. Add trailing newline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113195/new/ https://reviews.llvm.org/D113195 Files: clang-tools-extra/clang-tidy/abseil/AbseilTidyMod

[PATCH] D113195: Suggests switching the initialization pattern of absl::Cleanup instances from the factory function to class template argument deduction (CTAD) in C++17 and higher.

2021-11-04 Thread CJ Johnson via Phabricator via cfe-commits
CJ-Johnson updated this revision to Diff 384773. CJ-Johnson added a comment. Remove unwanted changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113195/new/ https://reviews.llvm.org/D113195 Files: clang-tools-extra/clang-tidy/abseil/AbseilTidy

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

2021-11-04 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. > Is this change observable in some way? With the new changes, we are now catching more typing errors before instantiation. I've added more tests to show that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112453/new/ htt

[PATCH] D113195: Suggests switching the initialization pattern of absl::Cleanup instances from the factory function to class template argument deduction (CTAD) in C++17 and higher.

2021-11-04 Thread CJ Johnson via Phabricator via cfe-commits
CJ-Johnson created this revision. CJ-Johnson added a reviewer: ymandel. Herald added subscribers: carlosgalvezp, mgorny. CJ-Johnson requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Suggests switching the initialization pattern of

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

2021-11-04 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 384771. courbet added a comment. Implement the proposed changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112453/new/ https://reviews.llvm.org/D112453 Files: clang/include/clang/AST/Type.h clang/lib/S

[PATCH] D108392: [OpenCL] Fix parsing of opencl-c.h in CL 3.0 with device-scope atomics enabled

2021-11-04 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov added inline comments. Comment at: clang/include/clang/Basic/OpenCLExtensions.def:114 +OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_scope_device, false, 300, OCL_C_30) +OPENCL_OPTIONALCOREFEATURE(__opencl_c_atomic_scope_all_devices, false, 300, OCL_C_30) OPENCL_OPTIO

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-11-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D112349#3109065 , @nextsilicon-itay-bookstein wrote: > I'm referring you again to the start of my explanation (the first three > paragraphs); the object file format (ELF) literally cannot express the > semantics you're as

[PATCH] D112349: [Verifier] Add verification logic for GlobalIFuncs

2021-11-04 Thread Itay Bookstein via Phabricator via cfe-commits
nextsilicon-itay-bookstein added a comment. I'm referring you again to the start of my explanation (the first three paragraphs); the object file format (ELF) literally cannot express the semantics you're asking for. You're asking for it to support a symbol in a special kind of undefined state:

[PATCH] D112492: [HIP] Do not use kernel handle for MSVC target

2021-11-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D112492#3101090 , @tra wrote: > As phrased, the summary would likely be rather confusing for anyone other > than you and me. > >> Currently Visual Studio 2019 has a linker issue which causes linking error >> when a template ker

[PATCH] D112903: [C++20] [Module] Fix front end crashes when trying to export a qualified entity which is already declared

2021-11-04 Thread Nathan Sidwell via Phabricator via cfe-commits
urnathan added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7784-7785 "because namespace %1 does not enclose namespace %2">; +def err_invalid_declarator_in_export : Error<"cannot export %0 here " + "because it had be declared in %1.">; def er

[PATCH] D112579: Allow non-variadic functions to be attributed with `__attribute__((format))`

2021-11-04 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. > Agreed. This should be checking the instantiations, so by that point, the > variadic template is really more like a fixed parameter list anyway. FWIW, in my own mental model, there's a big semantic difference between (varargs functions, variadic templates) on the

[PATCH] D113148: Add new clang-tidy check for string_view(nullptr)

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: alexfh, njames93, hokein, whisperity. aaron.ballman added a comment. Herald added a subscriber: rnkovacs. In D113148#3108960 , @Sockke wrote: > In D113148#3108705 , @CJ-Johnson > wr

[PATCH] D113118: [clang][AST] Check context of record in structural equivalence.

2021-11-04 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I very much like the code. L1364 is uncovered according to my coverage results. Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:1360-1364 +// Special case: We allow a struct defined in a function to be equivalent +// with a similar struc

[PATCH] D112041: [InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

2021-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:196 void inferAddressSpaces(ArrayRef Postorder, - ValueToAddrSpaceMapTy *InferredAddrSpace) const; +

  1   2   >