[PATCH] D112718: Add intrinsics and builtins for PTX atomics with semantic orders

2022-01-09 Thread Tadej Ciglarič via Phabricator via cfe-commits
t4c1 added inline comments. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:1057 + +BUILTIN(__nvvm_atom_xchg_global_i, "iiD*i", "n") +TARGET_BUILTIN(__nvvm_atom_cta_xchg_global_i, "iiD*i", "n", SM_60) tra wrote: > t4c1 wrote: > > tra wrote: > > > We need

[PATCH] D116577: [clang-tidy] Added "boost-use-range-based-for-loop" check

2022-01-09 Thread Denis Mikhailov via Phabricator via cfe-commits
denzor200 marked an inline comment as done. denzor200 added inline comments. Comment at: clang-tools-extra/clang-tidy/boost/CMakeLists.txt:8 BoostTidyModule.cpp + UseRangeBasedForLoopCheck.cpp UseToStringCheck.cpp LegalizeAdulthood wrote: > I am wondering

[PATCH] D116216: Prevent adding module flag - amdgpu_hostcall multiple times.

2022-01-09 Thread praveen velliengiri via Phabricator via cfe-commits
pvellien updated this revision to Diff 398519. pvellien added a comment. Herald added subscribers: kerbowa, nhaehnle, jvesely. @lebedev.ri updated with test-cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116216/new/ https://reviews.llvm.org/D116216 Files:

[PATCH] D116577: [clang-tidy] Added "boost-use-range-based-for-loop" check

2022-01-09 Thread Denis Mikhailov via Phabricator via cfe-commits
denzor200 updated this revision to Diff 398517. denzor200 added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116577/new/ https://reviews.llvm.org/D116577 Files: clang-tools-extra/clang-tidy/boost/BoostTidyModule.cpp

[PATCH] D116577: [clang-tidy] Added "boost-use-range-based-for-loop" check

2022-01-09 Thread Denis Mikhailov via Phabricator via cfe-commits
denzor200 updated this revision to Diff 398516. denzor200 marked 9 inline comments as done. denzor200 added a comment. review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116577/new/ https://reviews.llvm.org/D116577 Files:

[PATCH] D116834: [clang][dataflow] Change `transfer` function to update lattice element in place.

2022-01-09 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:167 - FunctionCallLattice transfer(const Stmt *S, const FunctionCallLattice , -

[PATCH] D112113: [ObjC] type method metadata `_imp`, messenger routine at callsite with program address space

2022-01-09 Thread Matt Jacobson via Phabricator via cfe-commits
mhjacobson added a comment. Happy new year! If this change is acceptable, could someone please merge it for me? (And if not, could someone point out what needs more work?) Thanks for your help! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D116577: [clang-tidy] Added "boost-use-range-based-for-loop" check

2022-01-09 Thread Denis Mikhailov via Phabricator via cfe-commits
denzor200 added a comment. In D116577#3220757 , @LegalizeAdulthood wrote: > I opened a similar issue for converting Qt's foreach to a range for loop > . > > However this check lands, it should be a

[PATCH] D116792: [AST] lookup in parent DeclContext for transparent DeclContext

2022-01-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D116792#3227379 , @erichkeane wrote: > I had to do something similar for this at one point: > https://github.com/llvm/llvm-project/commit/90010c2e1d60c6a9a4a0b30a113d4dae2b7214eb > > I seem to remember hitting this assert,

[PATCH] D116911: [AST] Don't consider 'ExportDecl' when calculating DeclContext 'Encloses'

2022-01-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: erichkeane, rjmccall. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. This mimics the style of

[PATCH] D116906: [OpenMP][AMDGPU] Optimize the linked in math libraries

2022-01-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. This fixes/hides the last remaining OvO failures with upstream on an AMD MI100 compiled with -O3. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116906/new/ https://reviews.llvm.org/D116906

[PATCH] D113140: [OpenMP][NFCI] Introduce the kernel environment for target regions

2022-01-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert abandoned this revision. jdoerfert added a comment. Split up, main content starts with D116908 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113140/new/ https://reviews.llvm.org/D113140

[PATCH] D116910: [OpenMP][3/3] Introduce the KernelEnvironment into Clang tests

2022-01-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: jhuber6, tianshilei1992, JonChesterfield. Herald added subscribers: asavonic, guansong, bollu, yaxunl, jvesely. jdoerfert requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang.

[PATCH] D116509: [Builtins] Add missing the macro 'y' description in comments

2022-01-09 Thread Jim Lin 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 rG9b70ddaff6e1: [Builtins] Add missing the macro y description in comments (authored by Jim). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] 9b70dda - [Builtins] Add missing the macro 'y' description in comments

2022-01-09 Thread Jim Lin via cfe-commits
Author: Jim Lin Date: 2022-01-10T10:43:13+08:00 New Revision: 9b70ddaff6e1d1ffc538ac74aa43b4fd6f73bb02 URL: https://github.com/llvm/llvm-project/commit/9b70ddaff6e1d1ffc538ac74aa43b4fd6f73bb02 DIFF: https://github.com/llvm/llvm-project/commit/9b70ddaff6e1d1ffc538ac74aa43b4fd6f73bb02.diff LOG:

[PATCH] D116906: [OpenMP][AMDGPU] Optimize the linked in math libraries

2022-01-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: JonChesterfield, jhuber6, ye-luo. Herald added subscribers: kerbowa, guansong, bollu, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl. jdoerfert requested review of this revision. Herald added subscribers: cfe-commits,

[PATCH] D116514: [clangd] Add code action to generate a constructor for a C++ class

2022-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Shouldn't the constructors that need `std::move` also ensure the `` header is also included, or at least transitively included. We don't want to generate constructors that wont compile. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D116904: Fix build failure with MSVC in C++20 mode

2022-01-09 Thread Evgeny Mandrikov via Phabricator via cfe-commits
Godin created this revision. Godin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Without this patch when using CMAKE_CXX_STANDARD=20 and MSVC 19.30.30705.0 compilation fails with clang\lib\Tooling\Syntax\Tree.cpp(347): error C2666:

[PATCH] D116882: [docs] [clang] Small documentation change for compilation databases

2022-01-09 Thread Dave Butler via Phabricator via cfe-commits
croepha marked an inline comment as done. croepha added inline comments. Comment at: clang/docs/JSONCompilationDatabase.rst:33 +Clang has the ablity to generate compilation database fragments via +the :option:`-MJ argument >`. You can contantinate those +fragments together

[PATCH] D116882: [docs] [clang] Small documentation change for compilation databases

2022-01-09 Thread Dave Butler via Phabricator via cfe-commits
croepha updated this revision to Diff 398468. croepha added a comment. Fixed spelling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116882/new/ https://reviews.llvm.org/D116882 Files: clang/docs/JSONCompilationDatabase.rst Index:

[PATCH] D63324: [clang-tidy] Replace memcpy by std::copy

2022-01-09 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Herald added a subscriber: carlosgalvezp. Comment at: clang-tools-extra/clang-tidy/modernize/CMakeLists.txt:19 ReplaceAutoPtrCheck.cpp + ReplaceMemcpyByStdCopy.cpp ReplaceRandomShuffleCheck.cpp In English, it's

[PATCH] D116882: [docs] [clang] Small documentation change for compilation databases

2022-01-09 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg accepted this revision. joerg added inline comments. This revision is now accepted and ready to land. Comment at: clang/docs/JSONCompilationDatabase.rst:33 +Clang has the ablity to generate compilation database fragments via +the :option:`-MJ argument >`. You can

[clang-tools-extra] 8afcfbf - Use true/false instead of 1/0 (NFC)

2022-01-09 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-01-09T12:21:06-08:00 New Revision: 8afcfbfb8fc1e53023ffac9d9bdc424248d6d2ff URL: https://github.com/llvm/llvm-project/commit/8afcfbfb8fc1e53023ffac9d9bdc424248d6d2ff DIFF: https://github.com/llvm/llvm-project/commit/8afcfbfb8fc1e53023ffac9d9bdc424248d6d2ff.diff

[clang] b12fd13 - Fix bugprone argument comments.

2022-01-09 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-01-09T12:21:02-08:00 New Revision: b12fd138127e368a5d78109bef77713c0bcd536e URL: https://github.com/llvm/llvm-project/commit/b12fd138127e368a5d78109bef77713c0bcd536e DIFF: https://github.com/llvm/llvm-project/commit/b12fd138127e368a5d78109bef77713c0bcd536e.diff

[clang] ac2090d - [clang] Remove unused forward declarations (NFC)

2022-01-09 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-01-09T12:21:00-08:00 New Revision: ac2090d507a67d1e98594d081ce3951837d43f28 URL: https://github.com/llvm/llvm-project/commit/ac2090d507a67d1e98594d081ce3951837d43f28 DIFF: https://github.com/llvm/llvm-project/commit/ac2090d507a67d1e98594d081ce3951837d43f28.diff

[PATCH] D91000: [clang-tidy] Add cert-msc24-c checker.

2022-01-09 Thread Fütő Gergely via Phabricator via cfe-commits
futogergely added a comment. In D91000#3225369 , @balazske wrote: > The functions `asctime` and `asctime_r` are discouraged according to CERT > MSC33-C rule. These could be added to this check as well. There is a clang SA > checker

[PATCH] D116736: [Clang] Add __builtin_reduce_or and __builtin_reduce_and

2022-01-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added reviewers: aaron.ballman, erichkeane. fhahn added a comment. LGTM, thanks! > The last __builtin_reduce_add will be seperated into another one. Are you planning on putting up a patch for this one as well? What makes add a bit different is that `‘llvm.vector.reduce.fadd.*’` can only

[PATCH] D113049: [AIX] Disable tests that fail because of no 64-bit XCOFF object file support

2022-01-09 Thread Jake Egan 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 rGfbf52caf58b3: [AIX] Disable tests that fail because of no 64-bit XCOFF object file support (authored by Jake-Egan). Repository: rG LLVM Github

[clang] fbf52ca - [AIX] Disable tests that fail because of no 64-bit XCOFF object file support

2022-01-09 Thread Jake Egan via cfe-commits
Author: Jake Egan Date: 2022-01-09T12:25:24-05:00 New Revision: fbf52caf58b3270c84e1cd3f399345272cca09a1 URL: https://github.com/llvm/llvm-project/commit/fbf52caf58b3270c84e1cd3f399345272cca09a1 DIFF: https://github.com/llvm/llvm-project/commit/fbf52caf58b3270c84e1cd3f399345272cca09a1.diff

[PATCH] D114823: Filter string_view from the nullptr diagnosis of bugprone-string-constructor to prevent duplicate warnings with bugprone-stringview-nullptr

2022-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm in 2 minds about this. This diagnostic is a good fit for this warning and shouldn't be removed. Likewise duplicate diagnostics from different checks is annoying. Maybe a better path forward would be to suppress the diagnostic if the `bugprone-stringview-nullptr`

[PATCH] D116875: [clang-tidy] Add performance-inefficient-array-traversal check

2022-01-09 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/InefficientArrayTraversalCheck.cpp:63 +hasLHS(ToDecl), +hasRHS(integerLiteral(equals(1)), +

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2022-01-09 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 398419. owenpan added a comment. Fixed a bug and added a test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116316/new/ https://reviews.llvm.org/D116316 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/ReleaseNotes.rst

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2022-01-09 Thread Paweł Bylica via Phabricator via cfe-commits
chfast added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5320 + if (!(Cleanup && Cleanup->getCleanup()->isRedundantBeforeReturn())) +CGM.ErrorUnsupported(MustTailCall, "tail call skipping over cleanups"); +} I reported a related

[PATCH] D116316: [clang-format] Add an experimental option to remove optional control statement braces in LLVM C++ code

2022-01-09 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 398415. owenpan added a comment. - Braces should not be removed if the single-statement block might wrap or is already wrapped. - Added test cases. - Did a final round of cleanup. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116316/new/

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 398410. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.h

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 398409. zinovy.nis marked 5 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files: clang-tools-extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp

[PATCH] D116478: [clang-tidy] A comma-separated list of the names of functions or methods to be considered as not having side-effects

2022-01-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 398408. zinovy.nis added a comment. - ``FunctionException`` -> ``IgnoredFunctions`` - Fixed double ticks in rst docs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116478/new/ https://reviews.llvm.org/D116478 Files:

[PATCH] D116882: [docs] [clang] Small documentation change for compilation databases

2022-01-09 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. https://sarcasm.github.io/notes/dev/compilation-database.html#clang Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116882/new/ https://reviews.llvm.org/D116882 ___ cfe-commits

[PATCH] D116875: [clang-tidy] Add performance-inefficient-array-traversal check

2022-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/InefficientArrayTraversalCheck.cpp:63 +hasLHS(ToDecl), +hasRHS(integerLiteral(equals(1)), +

[PATCH] D116875: [clang-tidy] Add performance-inefficient-array-traversal check

2022-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 398404. njames93 marked 4 inline comments as done. njames93 added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116875/new/ https://reviews.llvm.org/D116875 Files:

[PATCH] D116882: [docs] [clang] Small documentation change for compilation databases

2022-01-09 Thread Dave Butler via Phabricator via cfe-commits
croepha created this revision. croepha requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We have an page dedicated to compliation databases including various ways to generate them, but we don't mention that clang has a built in method to do

[clang] 80e2c58 - [clang] Remove redundant member initialization (NFC)

2022-01-09 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-01-09T00:19:51-08:00 New Revision: 80e2c587498a7b2bf14dde47a33a058da6e88a9a URL: https://github.com/llvm/llvm-project/commit/80e2c587498a7b2bf14dde47a33a058da6e88a9a DIFF: https://github.com/llvm/llvm-project/commit/80e2c587498a7b2bf14dde47a33a058da6e88a9a.diff

[clang] 17d4bd3 - [clang] Fix bugprone argument comments (NFC)

2022-01-09 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-01-09T00:19:49-08:00 New Revision: 17d4bd3d788e53f7990d42b3e5d97d178ace9341 URL: https://github.com/llvm/llvm-project/commit/17d4bd3d788e53f7990d42b3e5d97d178ace9341 DIFF: https://github.com/llvm/llvm-project/commit/17d4bd3d788e53f7990d42b3e5d97d178ace9341.diff

[clang] 4044666 - [clang] Use true/false instead of 1/0 (NFC)

2022-01-09 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2022-01-09T00:19:47-08:00 New Revision: 40446663c73831f166c4432edb2997d88fd167a9 URL: https://github.com/llvm/llvm-project/commit/40446663c73831f166c4432edb2997d88fd167a9 DIFF: https://github.com/llvm/llvm-project/commit/40446663c73831f166c4432edb2997d88fd167a9.diff