[clang] daa316b - [clang][dataflow] Fix bug in joining bool values.

2023-01-19 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2023-01-19T15:59:06Z New Revision: daa316bcaf717e1dacdfee443f2c325a783d2c70 URL: https://github.com/llvm/llvm-project/commit/daa316bcaf717e1dacdfee443f2c325a783d2c70 DIFF: https://github.com/llvm/llvm-project/commit/daa316bcaf717e1dacdfee443f2c325a783d2c70.diff

[PATCH] D141709: [clang][dataflow] Fix bug in joining bool values.

2023-01-19 Thread Yitzhak Mandelbaum 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 rGdaa316bcaf71: [clang][dataflow] Fix bug in joining bool values. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D141310: [clang] add -Wcompare-function-pointers

2023-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D141310#4063203 , @dblaikie wrote: > In D141310#4062776 , @adriandole > wrote: > >> We use `icf=all` and have encountered bugs caused by function pointer >> comparisons. > > & t

[PATCH] D142121: [clang-tidy] Refactor common functionality of HeaderGuardCheck into HeaderGuardBase

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware created this revision. KyleFromKitware added a reviewer: clang-tools-extra. KyleFromKitware created this object with edit policy "Only User: KyleFromKitware (Kyle Edwards)". KyleFromKitware added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. Hera

[PATCH] D140434: readability-const-return-type: don't diagnose a template function returning T, even if sometimes instantiated with e.g. T = const int.

2023-01-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Sure, please ping me if you don't see a commit by EOD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140434/new/ https://reviews.llvm.org/D140434 ___ cfe-commits mailing list cfe-

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware created this revision. KyleFromKitware added a reviewer: clang-tools-extra. KyleFromKitware created this object with edit policy "Only User: KyleFromKitware (Kyle Edwards)". KyleFromKitware added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. Hera

[clang-tools-extra] e84d69f - [clangd] Fix clangd-fuzzer build.

2023-01-19 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2023-01-19T17:05:23+01:00 New Revision: e84d69f52d9a9fab9162128d8fe8ebec99ea60da URL: https://github.com/llvm/llvm-project/commit/e84d69f52d9a9fab9162128d8fe8ebec99ea60da DIFF: https://github.com/llvm/llvm-project/commit/e84d69f52d9a9fab9162128d8fe8ebec99ea60da.diff LO

[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D140875#4065763 , @ckandeler wrote: > With this, I now get: > FAILED: bin/clangd-fuzzer > : && /usr/lib/icecream/libexec/icecc/bin/c++ -fPIC > -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time > -Wall

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-19 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 490525. v1nh1shungry added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139705/new/ https://reviews.llvm.org/D139705 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/DeclT

[PATCH] D142125: [clang] Fix the location of UsingTypeLoc.

2023-01-19 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 projects: clang, clang-tools-extra. It is revealed by the https://reviews.llvm.org/D141280. namespa

[PATCH] D142085: [Clang][RISCV] Add `__riscv_` prefix for all RVV intrinsics

2023-01-19 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Could you split testcase update to a separated patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142085/new/ https://reviews.llvm.org/D142085 ___ cfe-commits mailing list c

[PATCH] D135488: [codegen] Add StackFrameLayoutAnalysisPass

2023-01-19 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. This broke a reverse iteration bot: https://lab.llvm.org/buildbot#builders/54/builds/3337 Forward fix in: https://reviews.llvm.org/D142127 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135488/new/ https://reviews.llvm.

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-19 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Sorry to disturb you again! It's been a week since I sent an email to Chris, and I have received no reply. Maybe my request was refused. It'd be great to land this and https://reviews.llvm.org/D140838 before the 16 release, right? If so, could you please help me co

[PATCH] D141666: [RISCV] Proper support of extensions Zicsr and Zifencei

2023-01-19 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Maybe multi-lib handling should split into another patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141666/new/ https://reviews.llvm.org/D141666 ___ cfe-commits mailing li

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware updated this revision to Diff 490534. KyleFromKitware added a comment. Added documentation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142123/new/ https://reviews.llvm.org/D142123 Files: clang-tools-extra/clang-tidy/modernize/CMakeLists.txt clang-tools-extra/clan

[PATCH] D141862: [clang][driver][AIX] Add OpenMP runtime if -fopenmp specified

2023-01-19 Thread David Tenty via Phabricator via cfe-commits
daltenty accepted this revision. daltenty added a comment. This revision is now accepted and ready to land. Some minor nits about how we can shorten the test, but otherwise LGTM Comment at: clang/test/Driver/aix-ld.c:1027 +// RUN:-fopenmp \ +// RUN: | FileCheck --chec

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

2023-01-19 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D139774#4065753 , @aaron.ballman wrote: > I lean towards #2b over #2a due to wanting individual overrides rather than a > blanket override (e.g., we should be able to put preamble files in a > different location than we put, s

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you explain a bit about why you want to promote use of `#pragma once`? It's not been standardized specifically because of how many known issues it causes, so it strikes me as odd to claim it's a modernization of a code base to use it. To me, I'd almost rather

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. We have this check in a custom clang-tidy module that runs on CMake's CI system. Other people have also sought out such a check, and I

[PATCH] D141798: Drop the ZeroBehavior parameter from countLeadingZeros and the like (NFC)

2023-01-19 Thread Kazu Hirata via Phabricator via cfe-commits
kazu added a comment. In D141798#4065025 , @RKSimon wrote: > @kazu Thanks for dealing with this! > > I'd like to build on this and create llvm variants of the C++20 > countl_zero/countr_zero/countl_one/countr_one template functions similar to > what I

[PATCH] D141324: [clang] extend external_source_symbol attribute with the USR clause

2023-01-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 490547. arphaman added a comment. Updated `__has_attribute(attribute_external_source_symbol)` to return a version. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141324/new/ https://reviews.llvm.org/D141324 Files: clang/include/clang/Basic/Attr.t

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-19 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision as: tahonermann. tahonermann added a comment. This revision is now accepted and ready to land. Looks good to me. Comment at: clang/lib/Sema/SemaConcept.cpp:377-380 + SubstitutedExpression = ImplicitCastExpr::Create( + S.C

[PATCH] D142133: [LinkerWrapper] Use `clang` to perform the device linking

2023-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, JonChesterfield, tianshilei1992, jdoerfert. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Right now in the linker wrapper we manual

[PATCH] D142113: [clang][nfc] refactor Module::Header to use OptionalFileEntryRef

2023-01-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:424 // Include this header as part of the umbrella directory. Module->addTopHeader(H.second); addHeaderInclude(H.first, Includes, LangOpts, Module->IsExternC); -

[clang] bc94a9b - Silence some sign comparison warnings; NFC

2023-01-19 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-01-19T12:26:53-05:00 New Revision: bc94a9b2eceba7effa032a5ce48419da2e69c8e9 URL: https://github.com/llvm/llvm-project/commit/bc94a9b2eceba7effa032a5ce48419da2e69c8e9 DIFF: https://github.com/llvm/llvm-project/commit/bc94a9b2eceba7effa032a5ce48419da2e69c8e9.diff

[PATCH] D141862: [clang][driver][AIX] Add OpenMP runtime if -fopenmp specified

2023-01-19 Thread Xing Xue via Phabricator via cfe-commits
xingxue added inline comments. Comment at: clang/test/Driver/aix-ld.c:1027 +// RUN:-fopenmp \ +// RUN: | FileCheck --check-prefix=CHECK-FOPENMP-OMP %s +// CHECK-FOPENMP-OMP-NOT: warning: daltenty wrote: > nit: since the output for these tests are really

[PATCH] D140663: CUDA/HIP: Use kernel name to map to symbol

2023-01-19 Thread Daniele Castagna via Phabricator via cfe-commits
dcastagna updated this revision to Diff 490559. dcastagna added a comment. Address yaxunl comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140663/new/ https://reviews.llvm.org/D140663 Files: clang/lib/CodeGen/CGCUDANV.cpp clang/test/Cod

[clang] b3faa1a - Fix zero-initialization fix-it for variable template

2023-01-19 Thread Aaron Ballman via cfe-commits
Author: v1nh1shungry Date: 2023-01-19T12:35:46-05:00 New Revision: b3faa1a87ac37e3825a67368dfb8dcfef95f4c53 URL: https://github.com/llvm/llvm-project/commit/b3faa1a87ac37e3825a67368dfb8dcfef95f4c53 DIFF: https://github.com/llvm/llvm-project/commit/b3faa1a87ac37e3825a67368dfb8dcfef95f4c53.diff

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-19 Thread Aaron Ballman 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 rGb3faa1a87ac3: Fix zero-initialization fix-it for variable template (authored by v1nh1shungry, committed by aaron.ballman). Repository: rG LLVM Git

[PATCH] D139705: [clang] fix zero-initialization fix-it for variable template

2023-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: lattner. aaron.ballman added a comment. In D139705#4065905 , @v1nh1shungry wrote: > Sorry to disturb you again! It's been a week since I sent an email to Chris, > and I have received no reply. Maybe my request was refus

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Can you add positive test for declare mapper? Comment at: clang/lib/Sema/SemaExpr.cpp:5423-5426 + +/// Act on the iterator variable declaration. +ActOnOpenMPIteratorVarDecl(VD); + Can we register this variable only in declare ma

[PATCH] D142133: [LinkerWrapper] Use `clang` to perform the device linking

2023-01-19 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield accepted this revision. JonChesterfield added a comment. This revision is now accepted and ready to land. Herald added a subscriber: ormris. That's much cleaner, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142133/new/ http

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/declare_mapper_messages.c:33-36 +#pragma omp declare mapper(id2: struct vec vvec) map(iterator(it=0:vvec.len:2), tofrom:vvec.data[it]) +int var; // expected-note {{'var' declared here}} +// expected-error@+1 {{only va

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:5423-5426 + +/// Act on the iterator variable declaration. +ActOnOpenMPIteratorVarDecl(VD); + ABataev wrote: > Can we register this variable only in declare mapper context, i.e. add a

[clang] b05fa4f - [clang][driver][AIX] Add OpenMP runtime if -fopenmp specified

2023-01-19 Thread Xing Xue via cfe-commits
Author: Xing Xue Date: 2023-01-19T12:46:22-05:00 New Revision: b05fa4faf64d6c6811bbecead13dc7c23ac43aca URL: https://github.com/llvm/llvm-project/commit/b05fa4faf64d6c6811bbecead13dc7c23ac43aca DIFF: https://github.com/llvm/llvm-project/commit/b05fa4faf64d6c6811bbecead13dc7c23ac43aca.diff LOG:

[PATCH] D141862: [clang][driver][AIX] Add OpenMP runtime if -fopenmp specified

2023-01-19 Thread Xing Xue via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. xingxue marked an inline comment as done. Closed by commit rGb05fa4faf64d: [clang][driver][AIX] Add OpenMP runtime if -fopenmp specified (authored by xingxue). Changed

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/declare_mapper_messages.c:33-36 +#pragma omp declare mapper(id2: struct vec vvec) map(iterator(it=0:vvec.len:2), tofrom:vvec.data[it]) +int var; // expected-note {{'var' declared here}} +// expected-error@+1 {{only var

[PATCH] D141672: [RISCV] Support vector crypto extension ISA string and assembly

2023-01-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Herald added a subscriber: luke. Comment at: llvm/lib/Support/RISCVISAInfo.cpp:765 + if ((Exts.count("zvkb") || Exts.count("zvkg") || Exts.count("zvknha") || Exts.count("zvkns") || + Exts.count("zvksed") || Exts.count("zvksh")) && !Ha

[PATCH] D142138: [OpenMP] Clean up AMD handling for `-fopenmp-targets=amdgcn` arch inference

2023-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, tianshilei1992, JonChesterfield, jdoerfert. Herald added subscribers: kosarev, kerbowa, guansong, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, M

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/declare_mapper_messages.c:33-36 +#pragma omp declare mapper(id2: struct vec vvec) map(iterator(it=0:vvec.len:2), tofrom:vvec.data[it]) +int var; // expected-note {{'var' declared here}} +// expected-error@+1 {{only va

[PATCH] D142113: [clang][nfc] refactor Module::Header to use OptionalFileEntryRef

2023-01-19 Thread Richard Howell via Phabricator via cfe-commits
rmaz updated this revision to Diff 490568. rmaz added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142113/new/ https://reviews.llvm.org/D142113 Files: clang/include/clang/Basic/Module.h clang/include/clang/Lex/Modu

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/declare_mapper_messages.c:33-36 +#pragma omp declare mapper(id2: struct vec vvec) map(iterator(it=0:vvec.len:2), tofrom:vvec.data[it]) +int var; // expected-note {{'var' declared here}} +// expected-error@+1 {{only var

[PATCH] D142048: [Phabricator] Fix __ptr32 arguments passed to builtins

2023-01-19 Thread Ariel Burton via Phabricator via cfe-commits
Ariel-Burton updated this revision to Diff 490569. Ariel-Burton added a comment. - Adjust formatting to conform to git-clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142048/new/ https://reviews.llvm.org/D142048 Files: clang/lib/Sema/

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Given the fact its non-standard, it has caveats and peoples eagerness to blindly enable all checks (or all checks from a module). I feel this check would likely cause more harm than good. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142123/new/ https://revie

[PATCH] D142138: [OpenMP] Clean up AMD handling for `-fopenmp-targets=amdgcn` arch inference

2023-01-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. @yaxunl Do you know why AMD uses `-mcpu` but we use `-march` here? Would there be any downside to aliasing them in the AMDGPU toolchain? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142138/new/ https://reviews.llvm.org/D1

[PATCH] D142121: [clang-tidy] Refactor common functionality of HeaderGuardCheck into HeaderGuardBase

2023-01-19 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. What's the purpose behind this refactor, If its for 142123, then this should be blocked until a consensus is reached over there? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142121/new/ https://reviews.llvm.org/D142121

[PATCH] D141625: [DeclContext] Sort the Decls before adding into DeclContext

2023-01-19 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. @dblaikie Do you have any objection for committing the patch as it is? I don't think reverse iteration test is a proper way to test for this specific bug. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141625/new/ https:/

[clang] b5d9f00 - Forbid implicit conversion of constraint expression to bool

2023-01-19 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2023-01-19T10:12:59-08:00 New Revision: b5d9f00b2096290653fcb6e8de38d5c352af63a0 URL: https://github.com/llvm/llvm-project/commit/b5d9f00b2096290653fcb6e8de38d5c352af63a0 DIFF: https://github.com/llvm/llvm-project/commit/b5d9f00b2096290653fcb6e8de38d5c352af63a0.diff L

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-19 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 rGb5d9f00b2096: Forbid implicit conversion of constraint expression to bool (authored by erichkeane). Herald added a project: clang. Repository: rG

[PATCH] D142139: [clang-format] Disallow templates to be followed by literal

2023-01-19 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel created this revision. rymiel added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay. rymiel added a project: clang-format. Herald added a project: All. rymiel requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There should not be

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. In D142123#4066351 , @njames93 wrote: > and peoples eagerness to blindly enable all checks (or all checks from a > module) Perhaps there's some way we can have it disabled by default and not enabled unless they explicit

[PATCH] D142138: [OpenMP] Clean up AMD handling for `-fopenmp-targets=amdgcn` arch inference

2023-01-19 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a subscriber: arsenm. JonChesterfield added a comment. @arsenm as above, mcpu != march important? llc takes a different one to clang iirc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142138/new/ https://reviews.llvm.org/D142

[PATCH] D142139: [clang-format] Disallow templates to be followed by literal

2023-01-19 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel updated this revision to Diff 490584. rymiel added a comment. Drop unrelated change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142139/new/ https://reviews.llvm.org/D142139 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Fo

[PATCH] D142121: [clang-tidy] Refactor common functionality of HeaderGuardCheck into HeaderGuardBase

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. Yes, this is for D142123 . However, even if that doesn't land, I'd still like to land this. We use the code from D142123 in CMake's CI system, and getting it to work without this change resulte

[PATCH] D142133: [LinkerWrapper] Use `clang` to perform the device linking

2023-01-19 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. Nice. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142133/new/ https://reviews.llvm.org/D142133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D142123#4066351 , @njames93 wrote: > Given the fact its non-standard, it has caveats and peoples eagerness to > blindly enable all checks (or all checks from a module). > I feel this check would likely cause more harm than

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D142123#4066023 , @KyleFromKitware wrote: > We have this check in a custom clang-tidy module that runs on CMake's CI > system. Other people >

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D142123#4066447 , @lebedev.ri wrote: > In D142123#4066351 , @njames93 > wrote: > >> Given the fact its non-standard, it has caveats and peoples eagerness to >> blindly enable a

[PATCH] D141625: [DeclContext] Sort the Decls before adding into DeclContext

2023-01-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D141625#4066362 , @steven_wu wrote: > @dblaikie Do you have any objection for committing the patch as it is? I > don't think reverse iteration test is a proper way to test for this specific > bug. I think reverse iteration

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. In D142123#4066460 , @aaron.ballman wrote: > In D142123#4066447 , @lebedev.ri > wrote: > >> In D142123#4066351 , @njames93 >> wrote: >>

[PATCH] D141324: [clang] extend external_source_symbol attribute with the USR clause

2023-01-19 Thread Erich Keane via Phabricator via cfe-commits
-- For standards version numbers, we tend to set this to a 'date' more or less, so something like `20230119`. I wonder if there is value to making THAT how we do this here too? Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:3318 +for (const auto &Sp

[PATCH] D141310: [clang] add -Wcompare-function-pointers

2023-01-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. >>> It's not that noisy compiling clang (eight hits). >> >> Good to know - I'm surprised it's that low. >> >> Is there some idiom we can use/document/recommend for people to use when the >> warning is a false positive? (when the user is confident the functions won't >>

[PATCH] D142143: [Lex] For dependency directive lexing, angled includes in `__has_include` should be lexed as string literals

2023-01-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi created this revision. Herald added a project: All. akyrtzi requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. rdar://104386604 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D142143 Files: clang/lib/Lex/Lexer.cpp

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

2023-01-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D139774#4065753 , @aaron.ballman wrote: > In D139774#4063131 , @vedgy wrote: > >> After a discussion under the corresponding KDevelop merge request, I can see >> 4-6 alternative ways

[clang] bec49b1 - [LinkerWrapper] Use `clang` to perform the device linking

2023-01-19 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-01-19T12:47:51-06:00 New Revision: bec49b1d803ced901e14aca154ffc106939100e5 URL: https://github.com/llvm/llvm-project/commit/bec49b1d803ced901e14aca154ffc106939100e5 DIFF: https://github.com/llvm/llvm-project/commit/bec49b1d803ced901e14aca154ffc106939100e5.diff

[PATCH] D142133: [LinkerWrapper] Use `clang` to perform the device linking

2023-01-19 Thread Joseph Huber 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 rGbec49b1d803c: [LinkerWrapper] Use `clang` to perform the device linking (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] 679c352 - [Clang][NFC] Tweak error message for GPU architecture tools

2023-01-19 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-01-19T12:48:28-06:00 New Revision: 679c352ff42d45de6dcaca7022a7e664cd03323c URL: https://github.com/llvm/llvm-project/commit/679c352ff42d45de6dcaca7022a7e664cd03323c DIFF: https://github.com/llvm/llvm-project/commit/679c352ff42d45de6dcaca7022a7e664cd03323c.diff

[PATCH] D142144: [RISCV][Driver] Add -rvv-vector-bits= option similar to -sve-vector-bits=

2023-01-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: reames, kito-cheng, frasercrmck, rogfer01. Herald added subscribers: luke, VincentWu, ctetreau, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edw

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. In terms of a "generic check", there is already the `HeaderGuardCheck`, but that has to be extended to be specific to the project's naming convention. And I don't think there can be a generic check that converts `#pragma once` to a header guard - when it adds th

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

2023-01-19 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D139774#4066519 , @dblaikie wrote: > (1) seems OK-ish, I guess there's some question as to what the tradeoff is > for that option - does that blow out memory usage of the client/kdevelop? But > I guess it's probably fine. At l

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

2023-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D139774#4066519 , @dblaikie wrote: > I've mixed feelings about this, but yeah, I guess the issues with global > state are pretty undesirable. I don't worry too much about (2) - doesn't feel > too problematic to me (for

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

2023-01-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D139774#4066574 , @aaron.ballman wrote: > In D139774#4066519 , @dblaikie > wrote: > >> I've mixed feelings about this, but yeah, I guess the issues with global >> state are pretty u

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

2023-01-19 Thread Igor Kushnir via Phabricator via cfe-commits
vedgy added a comment. In D139774#4066593 , @dblaikie wrote: >>> (1) seems OK-ish, I guess there's some question as to what the tradeoff is >>> for that option - does that blow out memory usage of the client/kdevelop? >>> But I guess it's probably fine.

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D142123#4066564 , @KyleFromKitware wrote: > In terms of a "generic check", there is already the `HeaderGuardCheck`, but > that has to be extended to be specific to the project's naming convention. > And I don't think t

[PATCH] D141625: [DeclContext] Sort the Decls before adding into DeclContext

2023-01-19 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. In D141625#4066466 , @dblaikie wrote: > In D141625#4066362 , @steven_wu > wrote: > >> @dblaikie Do you have any objection for committing the patch as it is? I >> don't think reverse it

[PATCH] D142101: [clang] [extract-api] Don't crash for category in libclang APIs

2023-01-19 Thread Ben Barham via Phabricator via cfe-commits
bnbarham accepted this revision. bnbarham added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp:537-544 + generatePathComponents(Record, API, + [Lang, &ParentContex

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. In D142123#4066676 , @aaron.ballman wrote: > It doesn't have to -- for example, we can name the guard based on the path to > the header. e.g., `foo/include/bar/baz.h` could use `FOO_INCLUDE_BAR_BAZ_H` > as the header gu

[PATCH] D142143: [Lex] For dependency directive lexing, angled includes in `__has_include` should be lexed as string literals

2023-01-19 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:4415 +if (Result.isNot(tok::header_name)) + return true; +// Advance the index of lexed tokens. This case is missing a test I think. Comment at: clang/lib/Lex/L

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. In D142123#4066706 , @KyleFromKitware wrote: > The only way to avoid this is if we overhaul the existing `HeaderGuardCheck` > and make its naming convention configurable by a configuration option as > opposed to having

[PATCH] D141625: [DeclContext] Sort the Decls before adding into DeclContext

2023-01-19 Thread Steven Wu via Phabricator via cfe-commits
steven_wu updated this revision to Diff 490616. steven_wu added a comment. Update tests according to feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141625/new/ https://reviews.llvm.org/D141625 Files: clang/lib/Parse/ParseDecl.cpp clang

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Jose E. Marchesi via Phabricator via cfe-commits
jemarch added a comment. Note that in GCC we are now emitting a note if the stack protector is requested by the user in the BPF backend: note: -fstack-protector does not work on this architecture which is less intrusive than a warning, still informative. Then the stack protector is disabled.

[PATCH] D141868: [Clang] [Sema] Removed a fix-it for system headers

2023-01-19 Thread Fahad Nayyar via Phabricator via cfe-commits
fahadnayyar updated this revision to Diff 490618. fahadnayyar added a comment. Added release notes and changed a normal for-loop to range-based for-loop. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141868/new/ https://reviews.llvm.org/D141868 Fi

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Alexei Starovoitov via Phabricator via cfe-commits
ast accepted this revision. ast added a comment. This revision is now accepted and ready to land. This approach looks better to me than NVPTX warn and I agree with Ed that it's better to leave NVPTX as-is to avoid any regression. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D141868: [Clang] [Sema] Removed a fix-it for system headers

2023-01-19 Thread Fahad Nayyar via Phabricator via cfe-commits
fahadnayyar marked 3 inline comments as done. fahadnayyar added a comment. In D141868#4060757 , @NoQ wrote: > Looks great! Sounds like you're looking for a more permanent fix, I guess > `ConversionFixItGenerator` could try to avoid adding fixits to syste

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. @ast With this patch, gentoo clang compilation will hit the warning even if people appends -fno-stack-protector. Is this okay? In general, if the option is '-fstack-protector -fno-stack-protector', we should not issue warning, right? Repository: rG LLVM Github

[PATCH] D139114: [Clang][Sema] Enabled implicit conversion warning for CompoundAssignment operator.

2023-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D139114#4059603 , @fahadnayyar wrote: > @aaron.ballman do you think that we should call > ```CheckImplicitConversion``` only for arithemetic compound assignment > operators like +=, -=, /=, *= and %= ? > > For bitwise

[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2023-01-19 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. How does this affect LTO? LTO for RISC-V is broken for various reasons, but LTO isn't Clang's responsibility beyond passing on driver arguments. Is this not just one of many symptoms of RISC-V not having the right module-level subtarget under LTO, which is a real problem

[PATCH] D139704: [clang][RISCV] Added target attributes to runtime functions

2023-01-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a subscriber: eli.friedman. erichkeane added a comment. The code changes/test changes seem innocuous enough, so from an 'attribute code owner perspective' I think this is alright. I think @rjmccall or @eli.friedman need to take a peak from CodeGen owner's perspective, and it se

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Alexei Starovoitov via Phabricator via cfe-commits
ast added a comment. In D142046#4066758 , @yonghong-song wrote: > @ast With this patch, gentoo clang compilation will hit the warning even if > people appends -fno-stack-protector. Is this okay? In general, if the option > is '-fstack-protector -fno-st

[PATCH] D141868: [Clang] [Sema] Removed a fix-it for system headers

2023-01-19 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. LGTM! Comment at: clang/docs/ReleaseNotes.rst:356 ^^^ +- Disabled FIT-IT suggested for a case of bad conversion in system heade

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D142123#4066460 , @aaron.ballman wrote: > In D142123#4066447 , @lebedev.ri > wrote: > >> In D142123#4066351 , @njames93 >> wrote: >> >>>

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. Sorry, I double checked. '-fstack-protector -fno-stack-protector' will not result in warnings. So the patch LGTM. So gentoo people can add -fno-stack-protector to suppress warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Kyle Edwards via Phabricator via cfe-commits
KyleFromKitware added a comment. Basically, anything that extends `HeaderGuardCheck` (or `HeaderGuardBase` from D142121 ) is really just a fancy configuration option, rather than a separate check, and should be treated as such. My proposal is this: 1. Create a

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. I can relax the warning to note to be on the same page with GCC, the reason I didn't is that similar things in DiagnosticDriverKinds.td are warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142046/new/ https://review

[PATCH] D142143: [Lex] For dependency directive lexing, angled includes in `__has_include` should be lexed as string literals

2023-01-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:4420 + DepDirectives.front().Tokens[NextDepDirectiveTokenIndex]; + if (BufferStart + NextTok.Offset >= BufferPtr) +break; benlangmuir wrote: > How do we know this will termin

[PATCH] D142113: [clang][nfc] refactor Module::Header to use OptionalFileEntryRef

2023-01-19 Thread Richard Howell via Phabricator via cfe-commits
rmaz updated this revision to Diff 490624. rmaz added a comment. rebase on last successful build: https://buildkite.com/llvm-project/llvm-main/builds/6356 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142113/new/ https://reviews.llvm.org/D142113

[PATCH] D142143: [Lex] For dependency directive lexing, angled includes in `__has_include` should be lexed as string literals

2023-01-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi updated this revision to Diff 490629. akyrtzi added a comment. Add test case for dependency directive lexing of ill-formed include inside `__has_include` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142143/new/ https://reviews.llvm.org/D1

[PATCH] D142143: [Lex] For dependency directive lexing, angled includes in `__has_include` should be lexed as string literals

2023-01-19 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi marked an inline comment as done. akyrtzi added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:4415 +if (Result.isNot(tok::header_name)) + return true; +// Advance the index of lexed tokens. benlangmuir wrote: > This case is missing a t

[PATCH] D142123: [clang-tidy] Add check to suggest use of #pragma once

2023-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D142123#4066805 , @KyleFromKitware wrote: > The refactoring that I've done in D142121 > is most of the way to being able to implement my above proposal. I just need > to shift a few t

[PATCH] D141324: [clang] extend external_source_symbol attribute with the USR clause

2023-01-19 Thread Alex Lorenz via Phabricator via cfe-commits
erichkeane wrote: > For standards version numbers, we tend to set this to a 'date' more or less, > so something like `20230119`. I wonder if there is value to making THAT how > we do this here too? That's a good idea, I can update it to be a specific d

<    1   2   3   >