[PATCH] D112926: run-clang-tidy.py analyze unique files only

2021-11-04 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz added a comment. It looks good to me. I don't have any more comments to add - it is a very small code change after all. I have commit access and am happy to commit it on your behalf. However, this would be my first time as a reviewer, and I don't want to be presumptuous and appr

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

2021-11-04 Thread Christian Rayroud via Phabricator via cfe-commits
crayroud updated this revision to Diff 384679. crayroud added a comment. Fix ordering of SpaceBeforeParensCustom options CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110833/new/ https://reviews.llvm.org/D110833 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/ReleaseNotes.

[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 marked 3 inline comments as done. skan added inline comments. Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:1759 // It is widely common for MS InlineAsm to use a global variable and one/two // registers in a mmory expression, and though unaccessible via ri

[PATCH] D112916: Confusable identifiers detection

2021-11-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384687. serge-sans-paille added a comment. - Add documentation and changelog entry - Formatting / renaming nits - Some extra test cases - Check scope intersection in both orders CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112916/new/ htt

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-11-04 Thread Ard Biesheuvel via Phabricator via cfe-commits
ardb added a comment. I would argue that the existing __builtin_addressof() should absorb this behavior, rather than adding a special builtin related to CFI. As is documented for __builtin_addressof(), its intended use is in cases where the & operator may return something other than the address

[PATCH] D112916: Confusable identifiers detection

2021-11-04 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 384694. serge-sans-paille added a comment. Update doc 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-tools-extra/clang-tidy/misc

[PATCH] D113029: [clangd] Find definition of ClassTemplate without going through index.

2021-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113029/new/ https://reviews.llvm.org/D113029 __

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

2021-11-04 Thread C. Rayroud via Phabricator via cfe-commits
crayroud added a comment. I do not have commit access, could you please help with the push. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110833/new/ https://reviews.llvm.org/D110833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2021-11-04 Thread C. Rayroud via Phabricator via cfe-commits
crayroud added a comment. I do not have commit access, could you please help with the push. Here are the commit details: C. Rayroud CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110833/new/ https://reviews.llvm.org/D110833 ___ cfe-commits m

[PATCH] D100810: Use `GNUInstallDirs` to support custom installation dirs. -- LLVM

2021-11-04 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 added a comment. @nib Sorry for not catching this myself. I must admit the error does confuse me. I have an macOS machine I can ssh to, and yes, if if you had some tips on how to reproduce there I would greatly appreciate them. Thanks. Comment at: llvm/docs/CMake

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

2021-11-04 Thread C. Rayroud via Phabricator via cfe-commits
crayroud added a comment. Could you please wait before to push this changes to the main branch, there is one more point I want to verify. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110833/new/ https://reviews.llvm.org/D110833 ___ cfe-comm

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

2021-11-04 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:134-135 StringRef &Err) const { - llvm::AArch64::ParsedBranchProtection PBP; - if (!llvm::AArch64::parseBranchProtection(Spec, PBP, Err)) + llvm:

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2021-11-04 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 384706. Sockke added a comment. I improved the logic of judgments needing to report suggesting notes in some cases. And more tests were added here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 Files:

[PATCH] D112926: run-clang-tidy.py analyze unique files only

2021-11-04 Thread Serikzhan via Phabricator via cfe-commits
serkazi added a comment. In D112926#3108140 , @salman-javed-nz wrote: > It looks good to me. I don't have any more comments to add - it is a very > small code change after all. > I have commit access and am happy to commit it on your behalf. > > However

[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 384479. NeHuang marked 5 inline comments as done. NeHuang added a comment. Addressed review comments from @amy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112285/new/ https://reviews.llvm.org/D112285 Files:

[PATCH] D113168: [clang-tblgen] Fix non-determinism in generating AttrSubMatchRulesParserStringSwitches.inc

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'd like to understand the motivation behind the change a bit more. What problems stem from generating the parsing helpers in a different order? Why do we not need the same changes when generating documentation (see `EmitClangAttrDocs()`)? Repository: rG LLVM

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

2021-11-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 384715. MyDeveloperDay retitled this revision from "[clang-format] Add InsertBraces option" to "[clang-format] Add Insert/Remove Braces option". MyDeveloperDay edited the summary of this revision. MyDeveloperDay added a comment. This is very much a WIP

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

2021-11-04 Thread Ties Stuij via Phabricator via cfe-commits
stuij updated this revision to Diff 384721. stuij added a comment. Herald added subscribers: ormris, steven_wu. addressed review comments: - Added predicate operand to bxaut, autg. They will now also behave correctly in IT blocks. - Adjusted operator constraints for a number of instructions so t

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

2021-11-04 Thread Ties Stuij via Phabricator via cfe-commits
stuij marked 6 inline comments as done. stuij added a comment. A slight amendment to the description of the just uploaded patch amendment: PACG has also been made conditional. Comment at: llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp:6441 + Mnemonic == "csetm" || +

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

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D99#3108092 , @yonghong-song wrote: >> That sounds reasonable to me, but one possibility would be to change >> createType() and

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

2021-11-04 Thread Ties Stuij via Phabricator via cfe-commits
stuij updated this revision to Diff 384724. stuij added a comment. removed stray block duplicating the behaviour of CollectARMPACBTIOptions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112421/new/ https://reviews.llvm.org/D112421 Files: clang/i

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

2021-11-04 Thread Momchil Velikov via Phabricator via cfe-commits
chill added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:134-135 StringRef &Err) const { - llvm::AArch64::ParsedBranchProtection PBP; - if (!llvm::AArch64::parseBranchProtection(Spec, PBP, Err)) + llvm::ARM:

[PATCH] D112577: [clang][OpenMP] Initial parsing/sema for 'align' clause

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ah, thank you for the explanations! Then this continues to LGTM. Do you need someone to commit on your behalf? If so, what name and email address would you like me to use for patch attribution in git? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112577/n

[PATCH] D113120: [clang] Add early exit when checking for const init of arrays.

2021-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks this looks amazing! i am also not an expert in these parts of the code but AFAICT the proposed behavior is in line with the contract. i am a little worried about the cost of extra copy (especially when there are only a handful of elements), but it should be prob

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

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D112491#3107361 , @fowles wrote: > Do we also want a `forEachCapture` matcher? That might be good follow-on work (I wouldn't insist on it for this patch though). Comment at: clang/docs/ReleaseNotes.r

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

2021-11-04 Thread Matt Kulukundis via Phabricator via cfe-commits
fowles added a comment. In D112491#3108631 , @aaron.ballman wrote: > That might be good follow-on work (I wouldn't insist on it for this patch > though). Completely agreed, just something that occurred to me as the next thing I will need when building

[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

2021-11-04 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 384728. Sockke added a comment. In addition, the splicing logics of "FunctionName" and "ExpectParmTypeName" were improved. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107450/new/ https://reviews.llvm.org/D107450 Files: clang-tools-extra/clang-t

[PATCH] D111866: [RISCV] Support Zfhmin extension

2021-11-04 Thread Shao-Ce SUN via Phabricator via cfe-commits
achieveartificialintelligence updated this revision to Diff 384729. 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] 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#3107897 , @Sockke wrote: > This seems to be an existing check. Have you compared it with > **bugprone-string-constructor**? Thanks for the suggestion! From what I can tell, bugprone-string-constructor check only h

[clang] c524f1a - No longer crash when a consteval function returns a structure

2021-11-04 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2021-11-04T09:41:10-04:00 New Revision: c524f1a0764da0c8d1775b2860dfc33901ca9c8f URL: https://github.com/llvm/llvm-project/commit/c524f1a0764da0c8d1775b2860dfc33901ca9c8f DIFF: https://github.com/llvm/llvm-project/commit/c524f1a0764da0c8d1775b2860dfc33901ca9c8f.diff

[PATCH] D111669: No longer crash when a consteval function returns a structure

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the review! I've commit in c524f1a0764da0c8d1775b2860dfc33901ca9c8f . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111669/new/ https://reviews.llvm.org/D111669 _

[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#3107460 , @ibookstein wrote: > I'll first explain my thought process about the representation of aliases and > ifuncs in the IR, and why I think both aliasees and resolvers must always be > defined; I hope I'm not

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

2021-11-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. To continue my point... an ifunc/resolver is just like a function, in that a non-defined declaration is completely valid, since it refers to a definition in a separate TU. It makes sense to me that a resolver could do the same. Actually... I question the diagnostic

[PATCH] D112926: run-clang-tidy.py analyze unique files only

2021-11-04 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar accepted this revision. kuhar added a comment. This revision is now accepted and ready to land. I think this change is fine. One could argue that having multiple files is an issue with tooling/build system in the first place, and we could consider printing a warning instead of silently fi

[PATCH] D112926: run-clang-tidy.py analyze unique files only

2021-11-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D112926#3108745 , @kuhar wrote: > I think this change is fine. > One could argue that having multiple files is an issue with tooling/build > system in the first place, No, why would that be a bug in itself? It may be a

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

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D112579#3097890 , @fcloutier wrote: > Thanks for looking, Aaron. Thank you for the detailed response! > Type checking may well actually need to be tested better for the case where > variadic argument promotions don't h

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

2021-11-04 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Not yet done reviewing everything. Comment at: clang/include/clang/Format/Format.h:946 +/// Remove if there is no comment +BIS_RemoveNoComment + }; Maybe differentiate between single line and multi line comments? =

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

2021-11-04 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. 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 casts might introduce `ElementRegions` which could mess with this assumption. Aside from

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

2021-11-04 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added inline comments. Comment at: clang/lib/Basic/Targets/ARM.cpp:897 +Builder.defineMacro("__ARM_FEATURE_PAUTH", "1"); +Builder.defineMacro("__ARM_FEATURE_BTI", "1"); + } Since we decided to have two separate flags, I think this line should be i

[PATCH] D111100: enable plugins for clang-tidy

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman edited reviewers, added: aaron.ballman, whisperity, hokein; removed: sergio.martins, iamsergio, chgans, nocnokneo, kfunk, alexfh_, segoon. aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. Herald added a su

[clang] b8b6a5b - [OpenCL] Fix parsing of opencl-c.h as CL 3.0 with device-scope atomics enabled

2021-11-04 Thread Kevin Petit via cfe-commits
Author: Kevin Petit Date: 2021-11-04T14:17:45Z New Revision: b8b6a5bc86f570a6fb94b88b8c9d634c3af71eca URL: https://github.com/llvm/llvm-project/commit/b8b6a5bc86f570a6fb94b88b8c9d634c3af71eca DIFF: https://github.com/llvm/llvm-project/commit/b8b6a5bc86f570a6fb94b88b8c9d634c3af71eca.diff LOG: [

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

2021-11-04 Thread Kévin Petit via Phabricator via cfe-commits
kpet added inline comments. Comment at: clang/lib/Headers/opencl-c.h:13381 uint __ovld atomic_fetch_xor(volatile __global atomic_uint *object, uint operand); -uint __ovld atomic_fetch_xor(volatile __local atomic_uint *object, uint operand);i int __ovld atomic_fetch_and(volati

[PATCH] D113189: [clang] Inclusive language: change instances of blacklist/whitelist to allowlist/ignorelist

2021-11-04 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA created this revision. ZarkoCA added reviewers: thakis, compnerd, rtrieu, gribozavr, kcc. ZarkoCA requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Change the error message to use ignorelist, and changed some variable and function n

[PATCH] D111566: [SYCL] Fix function pointer address space

2021-11-04 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111566/new/ https://reviews.llvm.org/D111566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D111566: [SYCL] Fix function pointer address space

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CodeGenTypes.cpp:636-638 +unsigned AS = PointeeType->isFunctionTy() + ? getDataLayout().getProgramAddressSpace() + : Context.getTargetAddressSpace(ETy); --

[clang-tools-extra] 97fbc97 - [clangd] Find definition of ClassTemplate without going through index.

2021-11-04 Thread Adam Czachorowski via cfe-commits
Author: Adam Czachorowski Date: 2021-11-04T15:25:21+01:00 New Revision: 97fbc975fab19be68eb6a643ddac850ef71c2ecd URL: https://github.com/llvm/llvm-project/commit/97fbc975fab19be68eb6a643ddac850ef71c2ecd DIFF: https://github.com/llvm/llvm-project/commit/97fbc975fab19be68eb6a643ddac850ef71c2ecd.d

[PATCH] D113029: [clangd] Find definition of ClassTemplate without going through index.

2021-11-04 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG97fbc975fab1: [clangd] Find definition of ClassTemplate without going through index. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1130

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

2021-11-04 Thread Momchil Velikov via Phabricator via cfe-commits
chill added inline comments. Comment at: clang/lib/Basic/Targets/ARM.cpp:897 +Builder.defineMacro("__ARM_FEATURE_PAUTH", "1"); +Builder.defineMacro("__ARM_FEATURE_BTI", "1"); + } miyuki wrote: > Since we decided to have two separate flags, I think this l

[PATCH] D109372: [RISCV][RFC] Add Clang support for RISC-V overlay system

2021-11-04 Thread Edward Jones via Phabricator via cfe-commits
edward-jones added a comment. In D109372#3099969 , @jrtc27 wrote: > In D109372#3099947 , @edward-jones > wrote: > >> I reverted some of the previous changes I made so that this patch matches >> the spec as curre

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

2021-11-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: urnathan, hubert.reinterpretcast. aaron.ballman 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<"ca

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

2021-11-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:946 +/// Remove if there is no comment +BIS_RemoveNoComment + }; HazardyKnusperkeks wrote: > Maybe differentiate betwee

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

2021-11-04 Thread gehry via Phabricator via cfe-commits
Sockke added subscribers: whisperity, aaron.ballman. Sockke added a comment. In D113148#3108705 , @CJ-Johnson wrote: > In D113148#3107897 , @Sockke wrote: > >> This seems to be an existing check. Have you compare

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

2021-11-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:1131 + * ``BIS_Remove`` (in configuration: ``Remove``) +Always remove braces. + Oops missed regenerating this.! (next ti

[clang] d3dc7d0 - [Sema][NFC] Improve test coverage of builtin operators.

2021-11-04 Thread Clement Courbet via cfe-commits
Author: Clement Courbet Date: 2021-11-04T15:43:32+01:00 New Revision: d3dc7d077f1d9c9478813a34ed38abbcb4fc1ef5 URL: https://github.com/llvm/llvm-project/commit/d3dc7d077f1d9c9478813a34ed38abbcb4fc1ef5 DIFF: https://github.com/llvm/llvm-project/commit/d3dc7d077f1d9c9478813a34ed38abbcb4fc1ef5.dif

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

2021-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 384753. hliao added a comment. Rebase and kindly ping for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112041/new/ https://reviews.llvm.org/D112041 Files: clang/test/CodeGen/thinlto-distributed-newpm.

[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; +

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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 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] 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] 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] 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] 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] 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 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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 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] 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] 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 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] 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] 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] 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

  1   2   >