[PATCH] D140915: [clangd] Fix getQueryScopes for using-directive with inline namespace

2023-01-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/CodeComplete.cpp:674 +else if (const auto *ND = dyn_cast(Context)) { + if (ND->isInlineNamespace()) +Scopes.AccessibleScopes.push_back(printQualifiedName(*ND) + "::"); since we

[PATCH] D140956: [clang-format] Add an option for breaking after C++ attributes

2023-01-04 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: MyDeveloperDay, HazardyKnusperkeks, rymiel. owenpan added a project: clang-format. Herald added a project: All. owenpan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch only

[PATCH] D139713: [Sema] Fix crash when evaluating nested call with value-dependent arg

2023-01-04 Thread Pierre van Houtryve via Phabricator via cfe-commits
Pierre-vh updated this revision to Diff 486183. Pierre-vh added a comment. Remove assert Please review @ahatanak Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139713/new/ https://reviews.llvm.org/D139713 Files: clang/lib/AST/ExprConstant.cpp c

[PATCH] D140894: [clang-tidy] Don't emit misc-unused-using-decl warnings for header files.

2023-01-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 486191. hokein marked 2 inline comments as done. hokein added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140894/new/ https://reviews.llvm.org/D140894 Files: clang-tools-extra/cl

[PATCH] D140894: [clang-tidy] Don't emit misc-unused-using-decl warnings for header files.

2023-01-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc/unused-using-decls.rst:26 + A semicolon-separated list of filename extensions of header files (the filename + extensions should not include "." prefix). Default is ";h;hh;hpp;hxx". + F

[PATCH] D140775: [clangd] Hover: show CalleeArgInfo for literals

2023-01-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140775/new/ https://reviews.llvm.org/D140775

[PATCH] D140927: [C++20][Modules] Fix named module import diagnostics.

2023-01-04 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D140927#4024648 , @ChuanqiXu wrote: > [module.import]p1 says: > >> In a module unit, all module-import-declarations and export-declarations >> exporting module-import-declarations shall appear before all other >> declarations i

[clang-tools-extra] 0e11d65 - [clang-tidy] Don't emit misc-unused-using-decl warnings for header files.

2023-01-04 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2023-01-04T10:07:28+01:00 New Revision: 0e11d65a58da32311b562ecea2b5ba9d4d655659 URL: https://github.com/llvm/llvm-project/commit/0e11d65a58da32311b562ecea2b5ba9d4d655659 DIFF: https://github.com/llvm/llvm-project/commit/0e11d65a58da32311b562ecea2b5ba9d4d655659.diff LO

[PATCH] D140894: [clang-tidy] Don't emit misc-unused-using-decl warnings for header files.

2023-01-04 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0e11d65a58da: [clang-tidy] Don't emit misc-unused-using-decl warnings for header files. (authored by hokein). Repository: rG LLVM Github Monorepo

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 486195. ChuanqiXu added a comment. Address comments from @jansvoboda11: use the style of `clang-scan-deps -format=p1689 -- -std=c++20 -o ` instead of `clang-scan-deps -format=p1689 --p1689-targeted-file-name= --p1689-targeted-output= -- -std=c++20`.

[PATCH] D140959: RFC: Multilib prototype

2023-01-04 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings created this revision. michaelplatings added a project: clang. Herald added subscribers: s.egerton, ormris, abidh, mgrang, simoncook, kristof.beyls. Herald added a project: All. michaelplatings requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. This

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:571-581 + + // FIXME: createInvocation will drop the `-o` option since it requires + // `-fsyntax-only`. So here we try to parse the output file manually. + auto CommandLineIter = +

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 486196. ChuanqiXu added a comment. Update since https://reviews.llvm.org/D137534 changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139168/new/ https://reviews.llvm.org/D139168 Files: clang/include/clang/Tooling/DependencyScanning/Dependenc

[PATCH] D139168: [C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4)

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Currently we will detect `-MF` in the command line and we will write the make-format dependency output to the corresponding file once we find `-MF`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139168/new/ https://reviews.llvm.org/D139168 __

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:571-581 + + // FIXME: createInvocation will drop the `-o` option since it requires + // `-fsyntax-only`. So here we try to parse the output file manually. + auto CommandLineIter = +

[PATCH] D140527: [LoongArch] Add intrinsics for CACOP instruction

2023-01-04 Thread Lu Weining via Phabricator via cfe-commits
SixWeining accepted this revision. SixWeining 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/D140527/new/ https://reviews.llvm.org/D140527 __

[PATCH] D140956: [clang-format] Add an option for breaking after C++ attributes

2023-01-04 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/FormatToken.h:324 + /// \c true if this token starts a C++ attribute. + unsigned StartsCppAttribute : 1; + Can be removed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D140960: [clangd] Disable backend-releated filelist compiler options.

2023-01-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. These options doesn't

[PATCH] D138655: [clang-tidy] Fix `cppcoreguidelines-init-variables` for invalid vardecl

2023-01-04 Thread gehry via Phabricator via cfe-commits
Sockke added a comment. Friendly ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138655/new/ https://reviews.llvm.org/D138655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D140927: [C++20][Modules] Fix named module import diagnostics.

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. From the discussion in https://github.com/llvm/llvm-project/issues/59688, I feel you are correct. But let's wait for we get a clarification. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140927/new/ https://reviews.llvm

[PATCH] D140960: [clangd] Disable backend-releated filelist compiler options.

2023-01-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks! Comment at: clang-tools-extra/clangd/Compiler.cpp:84 + + // These options only affect the codegen in the backend, and clang will die + // immediately when the

[PATCH] D140261: [C++20][Modules] Do not allow non-inline external definitions in header units.

2023-01-04 Thread Iain Sandoe via Phabricator via cfe-commits
iains updated this revision to Diff 486202. iains added a comment. rebase, added release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140261/new/ https://reviews.llvm.org/D140261 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Ba

[PATCH] D140261: [C++20][Modules] Do not allow non-inline external definitions in header units.

2023-01-04 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. how does that look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140261/new/ https://reviews.llvm.org/D140261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D139774: [libclang] Add API to set temporary directory location

2023-01-04 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D139774#4023940 , @aaron.ballman wrote: > This feels like a configuration property of the libclang execution -- so it'd > be nice to require it to be set up from `clang_createIndex()` (IIRC that's > the entrypoint for CIndex f

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2023-01-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D127762#4023803 , @aaron.ballman wrote: > In D127762#3960906 , @rsandifo-arm > wrote: > >> Thanks @aaron.ballman for the feedback about spellings. I've gone with the >> lower-c

[PATCH] D24888: [clang-tidy] Use [[clang::suppress]] with cppcoreguidelines-pro-type-reinterpret-cast

2023-01-04 Thread Andrey Butirsky via Phabricator via cfe-commits
bam added a comment. Herald added subscribers: shchenz, kbarton, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. I'm sorry, could we bring it to the finish line? It's a pity the standard C++ Core Guidelines rule suppression syntax is still not supported, as Clang-tidy i

[PATCH] D140693: [Driver][RISCV] Adjust the priority between -mcpu, -mtune and -march

2023-01-04 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5457 + // RISC-V will handle -mcpu option in Clang::AddRISCVTargetArgs. + if (!Triple.isRISCV()) { +// Add the target cpu craig.topper wrote: > kito-cheng wrote: > > craig.t

[PATCH] D140261: [C++20][Modules] Do not allow non-inline external definitions in header units.

2023-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. Yeah, it looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140261/new/ https://reviews.llvm.org/D140261 ___ cfe-commits mailing

[PATCH] D136554: Implement CWG2631

2023-01-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D136554#4024719 , @rupprecht wrote: > In D136554#4024628 , @rupprecht > wrote: > >> I still see one behavior change (actually it was there before, but I missed >> it in the test resu

[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

2023-01-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman gentle ping. I hope your feedback was addressed to your satisfaction :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137244/new/ https://reviews.llvm.org/D137244 __

[clang] 8a06b23 - [NFC] let FunctionDecl::isReservedGlobalPlacementOperator return false when the function decl is not allocation functions

2023-01-04 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-01-04T18:57:36+08:00 New Revision: 8a06b2362a4b4da835d7d6041d1c0d706b5281b7 URL: https://github.com/llvm/llvm-project/commit/8a06b2362a4b4da835d7d6041d1c0d706b5281b7 DIFF: https://github.com/llvm/llvm-project/commit/8a06b2362a4b4da835d7d6041d1c0d706b5281b7.diff LO

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-04 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 486222. fpetrogalli added a comment. I have addressed last round of review from @craig.topper and @pcwang-thead: 1. Renamed the RISCV-specific classes for the ProcessorModel. 2. Swapped `tunef` with `f` in `RISCVTuneProcessorModel`. 3. Fixed comment. 4. A

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2023-01-04 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 486223. fpetrogalli added a comment. [NFC] Restore empty line before end of namespace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137517/new/ https://reviews.llvm.org/D137517 Files: clang/lib/Basic/Ta

[PATCH] D140292: [OpenMP] Migrate OpenMPOffloadMappingFlags from Clang CodeGen to OMPConstants

2023-01-04 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 486224. TIFitis marked an inline comment as done. TIFitis added a comment. Changed OpenMPOffloadMappingFlags from enum to enum class. This resolves the conflict with LLVM_MARK_AS_BITMASK_ENUM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D137070: [clang][Interp] Support destructors

2023-01-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Looks like I have to actually go up the class chain and emit all destructors manually. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137070/new/ https://reviews.llvm.org/D137070 ___ cfe-commits mailing list cfe-commi

[PATCH] D131064: [AArch64] Alter arm_sve.h to be target-based, not preprocessor based.

2023-01-04 Thread Dave Green via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6cac7c285e69: [AArch64] Alter arm_sve.h to be target-based, not preprocessor based. (authored by dmgreen). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior to commit:

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D140929#4025118 , @yonghong-song wrote: > Please separate the patch to clang and llvm part. It's already split in three commits: two for clang, one for llvm. Not sure if this is possible to see in the Phabricator UI, though.

[PATCH] D140960: [clangd] Disable backend-releated filelist compiler options.

2023-01-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 486231. hokein marked an inline comment as done. hokein added a comment. address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140960/new/ https://reviews.llvm.org/D140960 Files: clang-tools-extra/cl

[PATCH] D140960: [clangd] Disable backend-releated filelist compiler options.

2023-01-04 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG68fe0674187d: [clangd] Disable backend-releated filelist compiler options. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINC

[clang-tools-extra] 68fe067 - [clangd] Disable backend-releated filelist compiler options.

2023-01-04 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2023-01-04T13:00:24+01:00 New Revision: 68fe0674187d1b44058c916620a6babfa626c947 URL: https://github.com/llvm/llvm-project/commit/68fe0674187d1b44058c916620a6babfa626c947 DIFF: https://github.com/llvm/llvm-project/commit/68fe0674187d1b44058c916620a6babfa626c947.diff LO

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D140929#4025562 , @eddyz87 wrote: > In D140929#4025118 , @yonghong-song > wrote: > >> Please separate the patch to clang and llvm part. > > It's already split in three commits: two for

[PATCH] D140956: [clang-format] Add an option for breaking after C++ attributes

2023-01-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This LGTM Should we care about other forms of attributes like `__stdcall` etc..? I personally don't, just I assume from the tests this isn't covered (maybe just add that limitation to the doc if it is indeed a limitation) Repository: rG LLVM Github Monorepo

[PATCH] D140968: [clang-tidy] Add check for passing the result of `std::string::c_str` to `strlen`

2023-01-04 Thread Alex Coster via Phabricator via cfe-commits
acoster created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. acoster requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Suggests replacing the ca

[PATCH] D136554: Implement CWG2631

2023-01-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I found a new issue doing a bootstrap build, I'm currently reducing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554 ___ cfe-commits ma

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 486245. eddyz87 added a comment. Reorganize commits as a stack. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140929/new/ https://reviews.llvm.org/D140929 Files: llvm/lib/Target/BPF/BTFDebug.cpp llvm/lib/T

[clang] 9978529 - [AArch64] Alter arm_neon_sve_bridge.h to be target-based, not preprocessor based.

2023-01-04 Thread David Green via cfe-commits
Author: David Green Date: 2023-01-04T13:09:26Z New Revision: 997852920d52442242fca9173a7b003b1164e26d URL: https://github.com/llvm/llvm-project/commit/997852920d52442242fca9173a7b003b1164e26d DIFF: https://github.com/llvm/llvm-project/commit/997852920d52442242fca9173a7b003b1164e26d.diff LOG: [

[PATCH] D132639: [AArch64] Alter arm_neon_sve_bridge.h to be target-based, not preprocessor based.

2023-01-04 Thread Dave Green 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 rG997852920d52: [AArch64] Alter arm_neon_sve_bridge.h to be target-based, not preprocessor… (authored by dmgreen). Herald added a project: clang. Heral

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 abandoned this revision. eddyz87 added a comment. I think I messed up while creating this revision. I've created a proper stack of revisions with a tip at D140971 . Sorry for all the spam in emails. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D140970: [BPF] preserve btf_decl_tag for parameters of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 created this revision. Herald added a project: All. eddyz87 published this revision for review. eddyz87 added a reviewer: yonghong-song. Herald added a project: clang. Herald added a subscriber: cfe-commits. Generate DILocalVariable entries for parameters of extern functions, the "annotati

[PATCH] D140843: [clang-format] fix template closer followed by >

2023-01-04 Thread Zhikai Zeng via Phabricator via cfe-commits
Backl1ght updated this revision to Diff 486248. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140843/new/ https://reviews.llvm.org/D140843 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTest.cpp clang/unittests/Format/TokenAnnotatorTest.cpp Index: clang/u

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Gabor -- do you want to review before I land this patch (Dmitri already accepted it)? thx Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140694/new/ https://reviews.llvm.org/D140694 ___

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-01-04 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added a comment. Thanks everyone for your review and comments! I am going to address all of them in a series of smaller patches starting with D140784 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139730/

[PATCH] D140843: [clang-format] fix template closer followed by >

2023-01-04 Thread Zhikai Zeng via Phabricator via cfe-commits
Backl1ght added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:169-171 +CurrentToken->getStartOfNonWhitespace() == +CurrentToken->Next->getStartOfNonWhitespace().getLocWithOffset( +-1)) { MyDevelop

[PATCH] D140897: [clang][dataflow] Fix handling of `DeclRefExpr`s to `BindingDecl`s.

2023-01-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 486250. ymandel added a comment. add clarifying comment regarding interpration of `DecompositionDecl`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140897/new/ https://reviews.llvm.org/D140897 Files: clang/

[PATCH] D140876: [clang][C++20] Non-dependent access checks in requires expression.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 marked an inline comment as done. usaxena95 added a comment. In D140876#4023286 , @ilya-biryukov wrote: > Should access checks should happen in the context where `concept` is written > or where it's used? > If access-checking should happen whe

[PATCH] D140387: [clang][analyzer] Add stream related functions to StdLibraryFunctionsChecker.

2023-01-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 486252. balazske marked an inline comment as done. balazske added a comment. Removed class NotZeroConstraint. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140387/new/ https://reviews.llvm.org/D140387 Files:

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 486255. usaxena95 marked 3 inline comments as done. usaxena95 added a comment. Adding access check related changes from https://reviews.llvm.org/D140876 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140547/new

[PATCH] D140876: [clang][C++20] Non-dependent access checks in requires expression.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 abandoned this revision. usaxena95 marked an inline comment as done. usaxena95 added a comment. Moving the changes to https://reviews.llvm.org/D140547 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140876/new/ https://reviews.llvm.org/D140

[PATCH] D137534: [C++20] [Modules] [ClangScanDeps] Allow clang-scan-deps to without specified compilation database in P1689 (3/4)

2023-01-04 Thread Ben Boeckel via Phabricator via cfe-commits
ben.boeckel added a comment. In D137534#4024249 , @jansvoboda11 wrote: > I'm getting confused by the semantics of `--p1689-targeted-output=`. In > D137527 , it's used to populate > `CompilerCommand::Output` which is su

[PATCH] D140983: [IRBuilder] Use canonical i64 type for insertelement index used by vector splats.

2023-01-04 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm created this revision. Herald added subscribers: frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, dmgreen, Jim, jocewei, PkmX, arphaman, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, kbarton

[PATCH] D140387: [clang][analyzer] Add stream related functions to StdLibraryFunctionsChecker.

2023-01-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. LGTM, granted you add that test in the followup commit. If possible, I'd prefer to have features tested in the patch that added them (but this is fine for now). Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:838 + Resul

[PATCH] D140395: [clang][analyzer] Extend StreamChecker with some new functions.

2023-01-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus 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/D140395/new/ https://reviews.llvm.org/D140395 _

[PATCH] D137790: [clang][analyzer] Remove report of null stream from StreamChecker.

2023-01-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Please rerun the evaluation before commiting to confirm the results haven't changed! Otherwise, LGTM. Comment at: clang/test/Analysis/stream.c:89 void check_freopen_1

[PATCH] D140984: [clang] Correct -frewrite-includes generation of line control directives with mixed EOL forms.

2023-01-04 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann created this revision. tahonermann added reviewers: rnk, cor3ntin, shafik, erichkeane, aaron.ballman. Herald added a project: All. tahonermann requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously, if a header file and a so

[PATCH] D137790: [clang][analyzer] Remove report of null stream from StreamChecker.

2023-01-04 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:507-511 + // FIXME: Use a return value from EvalFn instead of isDifferent. + // Some functions should not change state and not have any other + // (invalidation, including errno) e

[clang] a26cbd0 - [Driver] Convert test to check 'target=...'

2023-01-04 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2023-01-04T06:46:00-08:00 New Revision: a26cbd03fe0f6f996d27f793e2107393d1888e40 URL: https://github.com/llvm/llvm-project/commit/a26cbd03fe0f6f996d27f793e2107393d1888e40 DIFF: https://github.com/llvm/llvm-project/commit/a26cbd03fe0f6f996d27f793e2107393d1888e40.diff

[PATCH] D140984: [clang] Correct -frewrite-includes generation of line control directives with mixed EOL forms.

2023-01-04 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Frontend/Rewrite/InclusionRewriter.cpp:292-303 // Output the file one line at a time, rewriting the line endings as we go. StringRef Rest = TextToWrite; while (!Rest.empty()) { - StringRef LineText; -

[PATCH] D140968: [clang-tidy] Add check for passing the result of `std::string::c_str` to `strlen`

2023-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/StrlenStringCStrCheck.cpp:1 +//===- StrlenStringCStrCheck.cpp - Check for strlen(string::c_str()) calls +//-===// Please make it single string. Comme

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2023-01-04 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam updated this revision to Diff 486274. zahiraam marked 2 inline comments as done. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137107/new/ https://reviews.llvm.org/D137107 Files: clang/include/clang/Basic

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-01-04 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added inline comments. Comment at: openmp/libomptarget/DeviceRTL/src/Mapping.cpp:50 -uint32_t getNumHardwareThreadsInBlock() { - return __builtin_amdgcn_workgroup_size_x(); -} +uint32_t getNumHardwareThreadsInBlock() { return external_get_local_size(0); } --

[PATCH] D137531: [clang] Add the check of membership in decltype for the issue #58674

2023-01-04 Thread Liming Liu via Phabricator via cfe-commits
lime updated this revision to Diff 486275. lime added a comment. Rebased. Could you please help to commit this patch? My signature is `Liming Liu `. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137531/new/ https://reviews.llvm.org/D137531 Files: clang/docs/ReleaseNotes.rst clang/

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2023-01-04 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5006 +if (NeedsGlobalCtor || NeedsGlobalDtor) + DelayedCXXInitPosition[D] = ~0U; + } else { efriedma wrote: > zahiraam wrote: > > efriedma wrote: > > > zahiraam wrote: > > >

[PATCH] D140984: [clang] Correct -frewrite-includes generation of line control directives with mixed EOL forms.

2023-01-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks Tom I think this looks reasonable but given the subtlety a comment in the code may be useful + a release note to indicate the fixed issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140984/new/ https://reviews.l

[PATCH] D140983: [IRBuilder] Use canonical i64 type for insertelement index used by vector splats.

2023-01-04 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm updated this revision to Diff 486284. paulwalker-arm added a comment. Herald added subscribers: Moerafaat, zero9178, bzcheeseman, awarzynski, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, stephenneuendorffer, liu

[PATCH] D140992: clang: Add __builtin_elementsize_fma

2023-01-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: fhahn, junaire, bob80905, python3kgae, RKSimon, aaron.ballman, erichkeane, scanon. Herald added a project: All. arsenm requested review of this revision. Herald added a subscriber: wdng. I didn't understand why the other builtins have promotio

[PATCH] D140387: [clang][analyzer] Add stream related functions to StdLibraryFunctionsChecker.

2023-01-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:838 + Result += getArgDesc(ArgN); + Result += DK == Violation ? " should not be zero" : " is not zero"; + return Result.c_str(); Szelethus wrote: > bal

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 marked an inline comment as done. usaxena95 added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1367 + if (E->getBody()->isDependentContext()) { +Sema::SFINAETrap Trap(SemaRef); +// We recreate the RequiresExpr body, but no

[PATCH] D140968: [clang-tidy] Add check for passing the result of `std::string::c_str` to `strlen`

2023-01-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/StrlenStringCStrCheck.h:23 + : ClangTidyCheck(Name, Context), +EnableForDataMethod(Options.get("EnableForDataMethod", false)) {} + The docs say this is "true" b

[PATCH] D140968: [clang-tidy] Add check for passing the result of `std::string::c_str` to `strlen`

2023-01-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/strlen-string-cstr.cpp:1 +// RUN: %check_clang_tidy -check-suffix=0 %s readability-strlen-string-cstr %t -- -config="{CheckOptions: [{key: readability-strlen-string-cstr.En

[PATCH] D139458: [clangd] Full support for #import insertions

2023-01-04 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 486291. dgoldman marked 4 inline comments as done. dgoldman added a comment. Update comment + test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139458/new/ https://reviews.llvm.org/D139458 Files: clang-too

[PATCH] D137790: [clang][analyzer] Remove report of null stream from StreamChecker.

2023-01-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:507-511 + // FIXME: Use a return value from EvalFn instead of isDifferent. + // Some functions should not change state and not have any other + // (invalidation, including errno) ef

[clang] 8596004 - [clang] Add the check of membership in decltype for the issue #58674#

2023-01-04 Thread Erich Keane via cfe-commits
Author: Liming Liu Date: 2023-01-04T07:47:17-08:00 New Revision: 85960043d594fc12d340ccb66a30861b023ab496 URL: https://github.com/llvm/llvm-project/commit/85960043d594fc12d340ccb66a30861b023ab496 DIFF: https://github.com/llvm/llvm-project/commit/85960043d594fc12d340ccb66a30861b023ab496.diff LO

[PATCH] D137531: [clang] Add the check of membership in decltype for the issue #58674

2023-01-04 Thread Erich Keane 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 rG85960043d594: [clang] Add the check of membership in decltype for the issue #58674# (authored by lime, committed by erichkeane). Repository: rG LL

[PATCH] D140694: [clang][dataflow] Only model struct fields that are used in the function being analyzed.

2023-01-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This is a big improvement, I skimmed through it and looks good to me. There might be some sneaky ways to change values of fields without mentioning them, e.g., casting a pointer to a struct to an array of chars. But I think reasoning

[PATCH] D140292: [OpenMP] Migrate OpenMPOffloadMappingFlags from Clang CodeGen to OMPConstants

2023-01-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Can you please check why there are so many reformatted lines are part of this patch? Is the clang-format version up to date? Maybe it changed but we should only format the parts touched by the patch, hence `git-clang-format HEAD~` rather than format everything. Repo

[PATCH] D140970: [BPF] preserve btf_decl_tag for parameters of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 486295. eddyz87 added a comment. Fix for formatting issue reported by CI. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140970/new/ https://reviews.llvm.org/D140970 Files: clang/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D139586: [Clang][C++23] Lifetime extension in range-based for loops

2023-01-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D139586#4000309 , @hubert.reinterpretcast wrote: > At least on the surface, it looks like there will be a lot of trouble to deal > with default arguments: > > struct A { A(); ~A(); int x[3]; }; > int (&f(const A & = A())

[PATCH] D140996: [c++20] P1907R1: Support for generalized non-type template arguments of scalar type.

2023-01-04 Thread Andrey Ali Khan Bolshakov via Phabricator via cfe-commits
bolshakov-a created this revision. bolshakov-a added reviewers: aaron.ballman, rsmith, mizvekov. Herald added subscribers: kadircet, arphaman, martong, kristof.beyls. Herald added a reviewer: shafik. Herald added a project: All. bolshakov-a requested review of this revision. Herald added projects:

[PATCH] D140999: [NFC][TargetParser] Deprecate llvm/Support/AArch64TargetParser.h

2023-01-04 Thread Sam Elliott via Phabricator via cfe-commits
lenary created this revision. Herald added subscribers: hiraditya, kristof.beyls. Herald added a project: All. lenary requested review of this revision. Herald added subscribers: llvm-commits, lldb-commits, cfe-commits, MaskRay. Herald added projects: clang, LLDB, LLVM. This deprecates, but does n

[PATCH] D140999: [NFC][TargetParser] Deprecate llvm/Support/AArch64TargetParser.h

2023-01-04 Thread Sam Elliott via Phabricator via cfe-commits
lenary added reviewers: tmatheson, pratlucas, MaskRay. lenary added a comment. Herald added subscribers: StephenFan, JDevlieghere. Adding some relevant reviewers. My plan is to land the other patches like this directly onto `main`, as they are NFC and a cleanup. I hope this is uncontroversial, b

[PATCH] D140547: Perform access checking to private members in simple requirement.

2023-01-04 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 486313. usaxena95 marked an inline comment as done. usaxena95 added a comment. Added more tests. Still investigating libcxx failure and tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140547/new/ https:/

[PATCH] D141000: [clang-tidy] Introduce HeaderFileExtensions option

2023-01-04 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. Herald added subscribers: arphaman, xazax.hun. Herald added a reviewer: njames93. Herald added a project: All. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. We have a number o

[PATCH] D140959: RFC: Multilib prototype

2023-01-04 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/include/clang/Driver/Multilib2.h:33-34 +private: + std::vector, std::vector>> Multilibs; + std::vector, std::vector>> RegexAttributes; +}; I think it'd really help readability and comprehension if this was model

[PATCH] D140999: [NFC][TargetParser] Deprecate llvm/Support/AArch64TargetParser.h

2023-01-04 Thread Sam Elliott via Phabricator via cfe-commits
lenary edited the summary of this revision. lenary updated this revision to Diff 486324. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140999/new/ https://reviews.llvm.org/D140999 Files: clang/lib/Basic/Targets/AArch64.cpp clang/lib/Basic/Target

[PATCH] D137756: [z/OS][pg] Throw error when using -pg on z/OS

2023-01-04 Thread Michael Francis via Phabricator via cfe-commits
francii added a comment. In D137756#4023531 , @hubert.reinterpretcast wrote: > In D137756#4018666 , @MaskRay wrote: > >> Most targets reject `-p` now. It's unnecessary to have another z/OS specific >> diagnostic

[PATCH] D139774: [libclang] Add API to set temporary directory location

2023-01-04 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D139774#4025356 , @vedgy wrote: > `clang_disposeIndex()` would have to un-override the temporary directory > then. I'll have to check whether this un-overriding happens too early (before > all //preamble-*.pch// files are remov

[PATCH] D141000: [clang-tidy] Introduce HeaderFileExtensions option

2023-01-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Looks OK for me, but probably will be good idea to remove check-specific options in same commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141000/new/ https://reviews.llvm.org/D141000 __

[PATCH] D140983: [IRBuilder] Use canonical i64 type for insertelement index used by vector splats.

2023-01-04 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm updated this revision to Diff 486332. paulwalker-arm added a comment. Herald added a reviewer: bollu. Update poly tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140983/new/ https://reviews.llvm.org/D140983 Files: clang/test/

[PATCH] D140992: clang: Add __builtin_elementwise_fma

2023-01-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. Need update clang/docs/ReleaseNotes.rst for new intrinsic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140992/new/ https://reviews.llvm.org/D140992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D140992: clang: Add __builtin_elementwise_fma

2023-01-04 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:2615 QualType ArgTy = TheCall->getArg(0)->getType(); -QualType EltTy = ArgTy; - -if (auto *VecTy = EltTy->getAs()) - EltTy = VecTy->getElementType(); -if (!EltTy->isFloatingType()) {

  1   2   >