[PATCH] D136639: [CodeGen][ObjC] Fix a memory leak that occurs when a non-trivial C struct property is set using dot notation

2022-12-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/test/CodeGenObjC/nontrivial-c-struct-property.m:89 + +// CHECK: call void @__destructor_8_s0(ptr %[[AGG_TMP_ENSURED]]) + ahatanak wrote: > rjmccall wrote: > > It looks like we're copying `a` into a temporary and t

[clang] 53e5cd4 - llvm::Optional::value => operator*/operator->

2022-12-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-12-17T06:37:59Z New Revision: 53e5cd4d3e39dad47312a48d4c6c71318bb2c283 URL: https://github.com/llvm/llvm-project/commit/53e5cd4d3e39dad47312a48d4c6c71318bb2c283 DIFF: https://github.com/llvm/llvm-project/commit/53e5cd4d3e39dad47312a48d4c6c71318bb2c283.diff LOG:

[PATCH] D140224: [Driver] Revert D139717 and add -Xparser instead

2022-12-16 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a subscriber: rpbeltran. manojgupta added a comment. > If ChromeOS needs time for migration, I think -Xcompiler can be temporarily > ignored. If you can wait for a few weeks, that'd be great. We are already fighting with a large number of ToT issues. And this change makes our b

[PATCH] D138300: [clangd] Support type hints for `decltype(expr)`

2022-12-16 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 483720. v1nh1shungry added a comment. reimplement and address review's suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138300/new/ https://reviews.llvm.org/D138300 Files: clang-tools-extra/cla

[clang] fc6ca0d - [clang] llvm::Optional::value => operator*/operator->

2022-12-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-12-17T05:15:07Z New Revision: fc6ca0d05377e30b8f51f7ee904834e06c137342 URL: https://github.com/llvm/llvm-project/commit/fc6ca0d05377e30b8f51f7ee904834e06c137342 DIFF: https://github.com/llvm/llvm-project/commit/fc6ca0d05377e30b8f51f7ee904834e06c137342.diff LOG:

[clang-tools-extra] 43fbbcb - [clangd] llvm::Optional::value => operator*/operator->

2022-12-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-12-17T05:11:01Z New Revision: 43fbbcbfa9a0cb0a0ce2e1c5df63e49e8acf2db2 URL: https://github.com/llvm/llvm-project/commit/43fbbcbfa9a0cb0a0ce2e1c5df63e49e8acf2db2 DIFF: https://github.com/llvm/llvm-project/commit/43fbbcbfa9a0cb0a0ce2e1c5df63e49e8acf2db2.diff LOG:

[PATCH] D138321: [-Wunsafe-buffer-usage] Ignore array subscript on literal zero

2022-12-16 Thread Ziqing Luo 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 rGf6c54cdbc439: [-Wunsafe-buffer-usage] Ignore array subscript on literal zero (authored by ziqingluo-90). Changed prior to commit: https://reviews.

[clang] f6c54cd - [-Wunsafe-buffer-usage] Ignore array subscript on literal zero

2022-12-16 Thread via cfe-commits
Author: ziqingluo-90 Date: 2022-12-16T21:04:41-08:00 New Revision: f6c54cdbc4394cd32f0dde990f217ca8f534a136 URL: https://github.com/llvm/llvm-project/commit/f6c54cdbc4394cd32f0dde990f217ca8f534a136 DIFF: https://github.com/llvm/llvm-project/commit/f6c54cdbc4394cd32f0dde990f217ca8f534a136.diff

[clang] f4b9077 - llvm::Optional::value => operator*/operator->

2022-12-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-12-17T04:45:11Z New Revision: f4b90773dc3d4773546a30a70c96deba3b858e5c URL: https://github.com/llvm/llvm-project/commit/f4b90773dc3d4773546a30a70c96deba3b858e5c DIFF: https://github.com/llvm/llvm-project/commit/f4b90773dc3d4773546a30a70c96deba3b858e5c.diff LOG:

[PATCH] D138318: [-Wunsafe-buffer-usage] Improve pointer match pattern

2022-12-16 Thread Ziqing Luo 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 rG04202b94b684: [-Wunsafe-buffer-usage] Improve pointer matching pattern (authored by ziqingluo-90). Changed prior to commit: https://reviews.llvm.o

[clang] 04202b9 - [-Wunsafe-buffer-usage] Improve pointer matching pattern

2022-12-16 Thread via cfe-commits
Author: ziqingluo-90 Date: 2022-12-16T20:40:59-08:00 New Revision: 04202b94b684963a7b581a4a0f5baa8f7921b564 URL: https://github.com/llvm/llvm-project/commit/04202b94b684963a7b581a4a0f5baa8f7921b564 DIFF: https://github.com/llvm/llvm-project/commit/04202b94b684963a7b581a4a0f5baa8f7921b564.diff

[PATCH] D138792: [AArch64] Improve TargetParser API

2022-12-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D138792#3970376 , @tmatheson wrote: > @MaskRay I reverted that commit because it broke important functionality > (comparison by address) to fix an issue in an unsupported C++ version, it > wasn't reviewed, and it was not clea

[PATCH] D138300: [clangd] Support type hints for `decltype(expr)`

2022-12-16 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry reclaimed this revision. v1nh1shungry added a comment. Got it! Thank you for the detailed explanation! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138300/new/ https://reviews.llvm.org/D138300

[PATCH] D138300: [clangd] Support type hints for `decltype(expr)`

2022-12-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/unittests/InlayHintTests.cpp:1155 +// FIXME: Nice to show `: int &` +decltype((i)) $a[[a]] = i; + )cpp", v1nh1shungry wrote: > The only concern I have is how to deal with this situation.

[clang-tools-extra] 53243f2 - std::optional::value => operator*/operator->

2022-12-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-12-17T03:12:04Z New Revision: 53243f2a296178b899dcc569475bdcc7e5f30d3b URL: https://github.com/llvm/llvm-project/commit/53243f2a296178b899dcc569475bdcc7e5f30d3b DIFF: https://github.com/llvm/llvm-project/commit/53243f2a296178b899dcc569475bdcc7e5f30d3b.diff LOG:

[PATCH] D138300: [clangd] Support type hints for `decltype(expr)`

2022-12-16 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry added a comment. Thanks for the feedback! > One high-level thought I had is: what if we attached the type hint to the > closing `)` of the decltype (and had it pertain only to the `decltype(expr)`, > not anything surrounding it like `const` or `&`)? It seems to me that this > woul

[PATCH] D139995: [RISCV] Refactor RVV Policy by structure

2022-12-16 Thread Piyou Chen via Phabricator via cfe-commits
BeMg updated this revision to Diff 483707. BeMg added a comment. 1. Use Undisturbed, Agnostic and Omit to represent Tail and Mask 2. Replace getDefaultPolicyBits != 0 with !RVVI->isTUPolicy() && !RVVI->isTUMUPolicy() 3. Use llvm_unreachable Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D136639: [CodeGen][ObjC] Fix a memory leak that occurs when a non-trivial C struct property is set using dot notation

2022-12-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/test/CodeGenObjC/nontrivial-c-struct-property.m:89 + +// CHECK: call void @__destructor_8_s0(ptr %[[AGG_TMP_ENSURED]]) + rjmccall wrote: > It looks like we're copying `a` into a temporary and then copying out of t

[PATCH] D138253: [-Wunsafe-buffer-usage] NFC: Implement fix-strategies and variable-use-claiming.

2022-12-16 Thread 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 rG8086323a91b5: [-Wunsafe-buffer-usage] NFC: Implement fix-strategies and variable-use-claiming. (authored by Artem Dergachev ).

[clang] 8086323 - [-Wunsafe-buffer-usage] NFC: Implement fix-strategies and variable-use-claiming.

2022-12-16 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2022-12-16T18:48:29-08:00 New Revision: 8086323a91b597e9510d15f14d56d358221ff539 URL: https://github.com/llvm/llvm-project/commit/8086323a91b597e9510d15f14d56d358221ff539 DIFF: https://github.com/llvm/llvm-project/commit/8086323a91b597e9510d15f14d56d358221ff539.dif

[clang] 852db8e - clang/unittests/Basic/SarifTest.cpp: std::optional::value => operator*

2022-12-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-12-17T02:08:24Z New Revision: 852db8e97ef79db451072c4e3261c3116a4f01b6 URL: https://github.com/llvm/llvm-project/commit/852db8e97ef79db451072c4e3261c3116a4f01b6 DIFF: https://github.com/llvm/llvm-project/commit/852db8e97ef79db451072c4e3261c3116a4f01b6.diff LOG:

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

2022-12-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I read the patches and review comments in https://reviews.llvm.org/D42776, but I don't remember why I added that assert. Maybe I was just trying to ensure the version number passed to `getTemporary` was the one that was used to create the temporary. For example, if a t

[PATCH] D140224: [Driver] Revert D139717 and add -Xparser instead

2022-12-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D140224#4001881 , @manojgupta wrote: > Here are a few instances of Xcompiler usage for a non-exhaustive search (I > can't look inside package tarballs if they are using it ): > > https://chromium.googlesource.com/chromiumos/o

[PATCH] D137379: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-12-16 Thread Ziqing Luo 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 rG6d1d055fad50: [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array… (authored by ziqingluo-90). Repository: rG LLVM Github Mon

[clang] 6d1d055 - [-Wunsafe-buffer-usage] Add warnings for unsafe buffer accesses by array subscript operations

2022-12-16 Thread via cfe-commits
Author: ziqingluo-90 Date: 2022-12-16T17:42:07-08:00 New Revision: 6d1d055fad502e0751d59c31ca915737b73e002f URL: https://github.com/llvm/llvm-project/commit/6d1d055fad502e0751d59c31ca915737b73e002f DIFF: https://github.com/llvm/llvm-project/commit/6d1d055fad502e0751d59c31ca915737b73e002f.diff

[PATCH] D136315: [clang][Darwin] Try to guess the SDK root with xcrun when unspecified

2022-12-16 Thread Caleb Zulawski via Phabricator via cfe-commits
calebzulawski updated this revision to Diff 483697. calebzulawski added a comment. Looks like the failure was somehow in clangd? Trying to trigger another build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136315/new/ https://reviews.llvm.org/D1

[PATCH] D140250: Define NULL in its own header

2022-12-16 Thread Ian Anderson via Phabricator via cfe-commits
iana added inline comments. Comment at: clang/lib/Headers/__stddef_null.h:15 +#ifdef __cplusplus +#if !defined(__MINGW32__) && !defined(_MSC_VER) +#define NULL __null `arc lint` wanted to remove all of the indentation that was in stddef.h. Repository: rG LLVM

[PATCH] D138318: [-Wunsafe-buffer-usage] Improve pointer match pattern

2022-12-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Great! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138318/new/ https://reviews.llvm.org/D138318 ___ cfe-commits mailing list cfe-commits@lists

[clang] 21c4dc7 - std::optional::value => operator*/operator->

2022-12-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-12-17T00:42:05Z New Revision: 21c4dc7997b83e83f87c26a97c104dcdd95f1d0f URL: https://github.com/llvm/llvm-project/commit/21c4dc7997b83e83f87c26a97c104dcdd95f1d0f DIFF: https://github.com/llvm/llvm-project/commit/21c4dc7997b83e83f87c26a97c104dcdd95f1d0f.diff LOG:

[PATCH] D137348: [-Wunsafe-buffer-usage] Introduce an abstraction for fixable code patterns.

2022-12-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:165 + assert(numFound <= 1 && "Conflicting bind tags in gadgets!"); + (void)numFound; } numFound was undefined in non-assertion builds. Fixed in 893a0ea948a6542101

[clang] 893a0ea - -Wunsafe-buffer-usage: fix build when -DLLVM_ENABLE_ASSERTIONS=off

2022-12-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-12-16T23:43:32Z New Revision: 893a0ea948a65421013b62bd1855e430ca184739 URL: https://github.com/llvm/llvm-project/commit/893a0ea948a65421013b62bd1855e430ca184739 DIFF: https://github.com/llvm/llvm-project/commit/893a0ea948a65421013b62bd1855e430ca184739.diff LOG:

[clang] 7a91e00 - Ensure clang test doesn't write out to the source directory

2022-12-16 Thread David Blaikie via cfe-commits
Author: David Blaikie Date: 2022-12-16T23:39:28Z New Revision: 7a91e00d915c638bfb4864826bc445211e0e41d7 URL: https://github.com/llvm/llvm-project/commit/7a91e00d915c638bfb4864826bc445211e0e41d7 DIFF: https://github.com/llvm/llvm-project/commit/7a91e00d915c638bfb4864826bc445211e0e41d7.diff LOG:

[clang] be931f8 - clang/test/CodeCompletion: Simplify/fix some `touch` commands

2022-12-16 Thread David Blaikie via cfe-commits
Author: David Blaikie Date: 2022-12-16T23:18:11Z New Revision: be931f89451b650e081daf875213c19f658caf25 URL: https://github.com/llvm/llvm-project/commit/be931f89451b650e081daf875213c19f658caf25 DIFF: https://github.com/llvm/llvm-project/commit/be931f89451b650e081daf875213c19f658caf25.diff LOG:

[PATCH] D137348: [-Wunsafe-buffer-usage] Introduce an abstraction for fixable code patterns.

2022-12-16 Thread 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 rG0d00a9722f3c: [-Wunsafe-buffer-usage] NFC: Introduce an abstraction for fixable code patterns. (authored by Artem Dergachev ).

[PATCH] D140250: Define NULL in its own header

2022-12-16 Thread Ian Anderson via Phabricator via cfe-commits
iana created this revision. iana added reviewers: ributzka, vsapsai, Bigcheese. Herald added a subscriber: mstorsjo. Herald added a project: All. iana requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Make a new header to define NULL so that

[clang] 0d00a97 - [-Wunsafe-buffer-usage] NFC: Introduce an abstraction for fixable code patterns.

2022-12-16 Thread Artem Dergachev via cfe-commits
Author: Artem Dergachev Date: 2022-12-16T15:02:22-08:00 New Revision: 0d00a9722f3ce9d314ddd26a33e22921956b7519 URL: https://github.com/llvm/llvm-project/commit/0d00a9722f3ce9d314ddd26a33e22921956b7519 DIFF: https://github.com/llvm/llvm-project/commit/0d00a9722f3ce9d314ddd26a33e22921956b7519.dif

[PATCH] D131915: [MLIR][OpenMP] Added target data, exit data, and enter data operation definition for MLIR.

2022-12-16 Thread Kiran Chandramohan via Phabricator via cfe-commits
kiranchandramohan requested changes to this revision. kiranchandramohan added a comment. This revision now requires changes to proceed. Can you add the other authors as Co-authors in the patch Summary? In D131915#4001620 , @TIFitis wrote: >> Can you add

[PATCH] D140176: [clang][deps] NFC: Split out the module-based API from the TU-based API

2022-12-16 Thread Artem Chikin via Phabricator via cfe-commits
artemcm accepted this revision. artemcm added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:111 + /// information needed for explicit build. + llvm::Expected + getModuleDep

[PATCH] D140176: [clang][deps] NFC: Split out the module-based API from the TU-based API

2022-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:111 + /// information needed for explicit build. + llvm::Expected + getModuleDependencies(StringRef ModuleName, artemcm wrote: > The existi

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Comment at: clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:16 +#pragma omp declare target enter(fun2) device_type(nohost) +#pragma omp declare variant(host

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 483659. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/ https://reviews.llvm.org/D139723 Files: clang/lib/Headers/CMakeLists.txt clang/lib/Headers/__clang_hip_runtime_wrapper.h clang/lib/Headers

[PATCH] D138318: [-Wunsafe-buffer-usage] Improve pointer match pattern

2022-12-16 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 483658. ziqingluo-90 added a comment. Addressing comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138318/new/ https://reviews.llvm.org/D138318 Files: clang/lib/Analysis/UnsafeBufferUsage.cpp clang/test/SemaCXX/warn-unsafe-buffer-usa

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:16 +#pragma omp declare target enter(fun2) device_type(nohost) +#pragma omp declare variant(host_function) match(device={kind(host)}) +void fun2() {} doru1004

[clang] 8384347 - [clang-format] Don't require deduction guides to be templates

2022-12-16 Thread Emilia Dreamer via cfe-commits
Author: Emilia Dreamer Date: 2022-12-16T23:26:05+02:00 New Revision: 8384347997f87d73c70f194d90c3efb7ddf6f963 URL: https://github.com/llvm/llvm-project/commit/8384347997f87d73c70f194d90c3efb7ddf6f963 DIFF: https://github.com/llvm/llvm-project/commit/8384347997f87d73c70f194d90c3efb7ddf6f963.diff

[PATCH] D139416: [clang-format] Don't require deduction guides to be templates

2022-12-16 Thread Emilia Dreamer 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 rG8384347997f8: [clang-format] Don't require deduction guides to be templates (authored by rymiel). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D140179: [WIP][-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

2022-12-16 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:943 +def warn_pragma_unsafe_buffer_usage_misorder : +ExtWarn<"pragma unsafe_buffer_usage used in misorder">, + InGroup; NoQ wrote: > IIUC `ExtWarn` means it's a warn

[PATCH] D140179: [WIP][-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

2022-12-16 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 483645. ziqingluo-90 added a comment. Addressing comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140179/new/ https://reviews.llvm.org/D140179 Files: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h clang/include/clang/Basi

[PATCH] D137875: clang/AMDGPU: Drop volatile from builtin_atomic* pointers

2022-12-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm abandoned this revision. arsenm added a comment. Apparently this is just wrong and the test that the volatile check works breaks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137875/new/ https://reviews.llvm.org/D137875 ___ cfe-commits

[PATCH] D139741: [clang][CodeGen] Use base subobject type layout for potentially-overlapping fields

2022-12-16 Thread Vladislav Dzhidzhoev via Phabricator via cfe-commits
dzhidzhoev added a comment. In D139741#4002244 , @efriedma wrote: > Does the following work with the updated patch? > > class Empty {}; > class UnionClass : Empty { > [[no_unique_address]] union X { > private: > Empty x; > alignas(

[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1198 -def CUDAGlobal : InheritableAttr { - let Spellings = [GNU<"global">, Declspec<"__global__">]; +def CUDAGlobal : InheritableAttr, TargetSpecificAttr { + let Spellings = [GNU<"global">, Declspec<

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:16 +#pragma omp declare target enter(fun2) device_type(nohost) +#pragma omp declare variant(host_function) match(device={kind(host)}) +void fun2() {} ABataev

[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

2022-12-16 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. LGTM. General question -- what happens now that the `global` and `launch_bounds` are target-specific as opposed to language-specific, if they happen to be used in a C++ compilation targeting `x86`? I assume they will still be ignored, right? Comment at:

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:16 +#pragma omp declare target enter(fun2) device_type(nohost) +#pragma omp declare variant(host_function) match(device={kind(host)}) +void fun2() {} You mean

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2683 + OMPDeclareTargetDeclAttr::getDeviceType(VariantFD->getMostRecentDecl()); +if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host) + return true; ABataev wrote: >

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 483643. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140155/new/ https://reviews.llvm.org/D140155 Files: clang/lib/Sema/SemaOpenMP.cpp clang/test/OpenMP/declare_target_messages.cpp clang/test/OpenMP/decl

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2683 + OMPDeclareTargetDeclAttr::getDeviceType(VariantFD->getMostRecentDecl()); +if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host) + return true; doru1004 wrote: >

[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 483640. jhuber6 added a comment. Changing to use the same CUDA global attributes. This requires a few extra checks for whether or not we were in CUDA mode since previously it just assume any time we saw one of these globals we were in that mode. I added a di

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 483639. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140155/new/ https://reviews.llvm.org/D140155 Files: clang/lib/Sema/SemaOpenMP.cpp clang/test/OpenMP/declare_target_messages.cpp clang/test/OpenMP/decl

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 marked an inline comment as done. doru1004 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2683 + OMPDeclareTargetDeclAttr::getDeviceType(VariantFD->getMostRecentDecl()); +if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host) + retu

[PATCH] D131915: [MLIR][OpenMP] Added target data, exit data, and enter data operation definition for MLIR.

2022-12-16 Thread Valentin Clement via Phabricator via cfe-commits
clementval added inline comments. Comment at: mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp:584 +std::stringstream typeMod, type; +if (mapTypeBits & 0x04) + typeMod << "always "; jdoerfert wrote: > TIFitis wrote: > > kiranchandramohan wrote: > > > The

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

2022-12-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Right, the call to atexit from the constructor function shouldn't be there. I think you need to add a "skip emitting the destructor" flag to EmitCXXCtorInit CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137107/new/ https://reviews.llvm.org/D137107 __

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2683 + OMPDeclareTargetDeclAttr::getDeviceType(VariantFD->getMostRecentDecl()); +if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host) + return true; Do you have a test

[PATCH] D131915: [MLIR][OpenMP] Added target data, exit data, and enter data operation definition for MLIR.

2022-12-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp:584 +std::stringstream typeMod, type; +if (mapTypeBits & 0x04) + typeMod << "always "; TIFitis wrote: > kiranchandramohan wrote: > > There is a `bitn` function

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 483627. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140155/new/ https://reviews.llvm.org/D140155 Files: clang/lib/Sema/SemaOpenMP.cpp clang/test/OpenMP/declare_target_messages.cpp clang/test/OpenMP/decl

[clang] 96d3c82 - Revert "[SROA] `isVectorPromotionViable()`: memory intrinsics operate on vectors of bytes (take 3)"

2022-12-16 Thread Roman Lebedev via cfe-commits
Author: Roman Lebedev Date: 2022-12-16T22:58:41+03:00 New Revision: 96d3c82645cf41a38543c5128cc15cda5761a76a URL: https://github.com/llvm/llvm-project/commit/96d3c82645cf41a38543c5128cc15cda5761a76a DIFF: https://github.com/llvm/llvm-project/commit/96d3c82645cf41a38543c5128cc15cda5761a76a.diff

[PATCH] D139741: [clang][CodeGen] Use base subobject type layout for potentially-overlapping fields

2022-12-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Does the following work with the updated patch? class Empty {}; class UnionClass : Empty { [[no_unique_address]] union X { private: Empty x; alignas(2) char C; } U; char C; }; UnionClass L; Repository: rG LLVM Github Monorepo CHAN

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-12-16 Thread Haowei Wu via Phabricator via cfe-commits
haowei added a comment. In D137473#3993584 , @bnbarham wrote: > LGTM. If you could put up a PR after to fix the use of > `sys::fs::make_absolute` that would be appreciated 🙇. Thanks, I will start working on the fix. Repository: rG LLVM Github Monore

[clang-tools-extra] 8310bec - [clangd] Migrate uses of operator<<(raw_ostream &OS, const Optional &O) to std::optional

2022-12-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-12-16T19:46:01Z New Revision: 8310bec5687c0396d5b230203cf9debdc489710f URL: https://github.com/llvm/llvm-project/commit/8310bec5687c0396d5b230203cf9debdc489710f DIFF: https://github.com/llvm/llvm-project/commit/8310bec5687c0396d5b230203cf9debdc489710f.diff LOG:

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-12-16 Thread Haowei 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 rGa903ecb4a26d: [vfs] Allow root paths relative to the vfsoverlay YAML file (authored by haowei). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] a903ecb - [vfs] Allow root paths relative to the vfsoverlay YAML file

2022-12-16 Thread Haowei Wu via cfe-commits
Author: Haowei Wu Date: 2022-12-16T11:45:36-08:00 New Revision: a903ecb4a26d8cf9a2e9e8369105682fd98f3982 URL: https://github.com/llvm/llvm-project/commit/a903ecb4a26d8cf9a2e9e8369105682fd98f3982 DIFF: https://github.com/llvm/llvm-project/commit/a903ecb4a26d8cf9a2e9e8369105682fd98f3982.diff LOG

[PATCH] D139998: [clangd] Remove ReferenceFinder::Reference::Target

2022-12-16 Thread Nathan Ridge 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 rG40d29c0a714d: [clangd] Remove ReferenceFinder::Reference::Target (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[clang-tools-extra] 40d29c0 - [clangd] Remove ReferenceFinder::Reference::Target

2022-12-16 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2022-12-16T14:44:44-05:00 New Revision: 40d29c0a714d7a19110f6f43d0af4c3df249c458 URL: https://github.com/llvm/llvm-project/commit/40d29c0a714d7a19110f6f43d0af4c3df249c458 DIFF: https://github.com/llvm/llvm-project/commit/40d29c0a714d7a19110f6f43d0af4c3df249c458.diff

[PATCH] D139998: [clangd] Remove ReferenceFinder::Reference::Target

2022-12-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 483623. nridge added a comment. address nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139998/new/ https://reviews.llvm.org/D139998 Files: clang-tools-extra/clangd/XRefs.cpp Index: clang-tools-extra/cla

[PATCH] D140175: [clang][deps] Remove support for the deprecated driver API

2022-12-16 Thread Artem Chikin via Phabricator via cfe-commits
artemcm accepted this revision. artemcm added a comment. This revision is now accepted and ready to land. Swift has moved away from this kind of API. I can't speak for other clients, but this LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1401

[PATCH] D140176: [clang][deps] NFC: Split out the module-based API from the TU-based API

2022-12-16 Thread Artem Chikin via Phabricator via cfe-commits
artemcm requested changes to this revision. artemcm added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:111 + /// information needed for explicit build. + llvm::Expected + ge

[clang] 556d48f - [CodeComplete] Offer completions for headers with extension .hxx in include directives

2022-12-16 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2022-12-16T14:34:11-05:00 New Revision: 556d48fbaa994fc8b6993a90ec74fe6204ccc11c URL: https://github.com/llvm/llvm-project/commit/556d48fbaa994fc8b6993a90ec74fe6204ccc11c DIFF: https://github.com/llvm/llvm-project/commit/556d48fbaa994fc8b6993a90ec74fe6204ccc11c.diff

[PATCH] D140191: [CodeComplete] Offer completions for headers with extension .hxx in include directives

2022-12-16 Thread Nathan Ridge 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 rG556d48fbaa99: [CodeComplete] Offer completions for headers with extension .hxx in include… (authored by nridge). Repository: rG LLVM Github Monore

[PATCH] D140191: [CodeComplete] Offer completions for headers with extension .hxx in include directives

2022-12-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang/lib/Sema/SemaCodeComplete.cpp:10020 // Only files that really look like headers. (Except in special dirs). // Header extensions from Types.def, which we can't depend on here. const bool IsHeader = Filename

[PATCH] D140191: [CodeComplete] Offer completions for headers with extension .hxx in include directives

2022-12-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 483616. nridge added a comment. Update comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140191/new/ https://reviews.llvm.org/D140191 Files: clang/lib/Sema/SemaCodeComplete.cpp clang/test/CodeCompletion

[PATCH] D138179: MIPS: fix build from IR files, nan2008 and FpAbi

2022-12-16 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added subscribers: nickdesaulniers, nathanchance. nathanchance added a comment. For what it's worth, this breaks building the Linux kernel's `ARCH=mips 32r1_defconfig` with clang and GNU as, with thousands of messages along the line of: /tmp/mmc_ops-d329c3.s: Assembler messages:

[PATCH] D138668: Correct typos

2022-12-16 Thread Jacques Pienaar via Phabricator via cfe-commits
jpienaar closed this revision. jpienaar added a comment. Landed in https://github.com/llvm/llvm-project/commit/a9f9f3dff474b7bdb19129eaf625d3ef0084a975 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138668/new/ https://reviews.llvm.org/D138668 ___

[clang-tools-extra] a9f9f3d - Correct typos (NFC)

2022-12-16 Thread Jacques Pienaar via cfe-commits
Author: Sprite Date: 2022-12-16T10:51:26-08:00 New Revision: a9f9f3dff474b7bdb19129eaf625d3ef0084a975 URL: https://github.com/llvm/llvm-project/commit/a9f9f3dff474b7bdb19129eaf625d3ef0084a975 DIFF: https://github.com/llvm/llvm-project/commit/a9f9f3dff474b7bdb19129eaf625d3ef0084a975.diff LOG: C

[PATCH] D140195: [Clang][CGDebugInfo][ObjC] Mark objc bitfields with the DIFlagBitfield flag

2022-12-16 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. How does this affect the generated DWARF? Have you tested that this does the right thing in LLDB? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140195/new/ https://reviews.llvm.org/D140195

[PATCH] D140179: [WIP][-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

2022-12-16 Thread Jan Korous via Phabricator via cfe-commits
jkorous added inline comments. Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:2379 +for (auto UnsafeUse : UnsafeUses) + if (!DE.isSafeBufferOptOut(SM, UnsafeUse->getBeginLoc())) +UnsafeUsesToReport.push_back(UnsafeUse); NoQ wrote: > I belie

[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

2022-12-16 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:7362 + if (FD->hasAttr()) { +addNVVMMetadata(F, "kernel", 1); + } jhuber6 wrote: > tra wrote: > > How does AMDGPU track kernels? It may be a good opportunity to stop using > > metadata

[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:7362 + if (FD->hasAttr()) { +addNVVMMetadata(F, "kernel", 1); + } tra wrote: > How does AMDGPU track kernels? It may be a good opportunity to stop using > metadata for this if we c

[PATCH] D140224: [Driver] Revert D139717 and add -Xparser instead

2022-12-16 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Here are a few instances of Xcompiler usage for a non-exhaustive search (I can't look inside package tarballs if they are using it ): https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/main/net-vpn/openvpn/openvpn-2.4.4.ebuild#74 https://chromi

[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

2022-12-16 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:7362 + if (FD->hasAttr()) { +addNVVMMetadata(F, "kernel", 1); + } How does AMDGPU track kernels? It may be a good opportunity to stop using metadata for this if we can use a better sui

[PATCH] D140218: [update_cc_test_checks] Default to --function-signature for new tests

2022-12-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected:3 // Basic C++ test for update_cc_test_checks // RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s -

[PATCH] D140224: [Driver] Revert D139717 and add -Xparser instead

2022-12-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D140224#4001748 , @manojgupta wrote: > Without -Xcompiler, ChromeOS code will break. It may not be supported by GCC > but it is supported in some other compilers like Cuda and a few others if you > search. Also being support

[PATCH] D137817: [clangd] Improve action `RemoveUsingNamespace` for user-defined literals

2022-12-16 Thread Vincent Hong via Phabricator via cfe-commits
v1nh1shungry updated this revision to Diff 483582. v1nh1shungry added a comment. Reimplemented. Note: Failed to find a way to use `ReferenceLoc` to insert the using-declarations. Currently I have to visit the `Decl` again and look for `CompoundStmt`, if there is any target user-defined literal i

[PATCH] D140218: [update_cc_test_checks] Default to --function-signature for new tests

2022-12-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I don't understand why we would remove the flag for _cc_. I feel all these patches are going exactly in the opposite direction I would think one would go. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140218/new/ https:/

[PATCH] D140179: [WIP][-Wunsafe-buffer-usage] Add unsafe buffer checking opt-out pragmas

2022-12-16 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 483579. ziqingluo-90 added a comment. Fixing bugs in my test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140179/new/ https://reviews.llvm.org/D140179 Files: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h clang/include/clang/B

[PATCH] D140158: [CUDA] Allow targeting NVPTX directly without a host toolchain

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 483576. jhuber6 added a comment. Accidentally deleted the old `getInputFilename` routine which we need. The symlink worked fine but would break on Windows, so I ended up writing a hack that would only use `.cubin` if we have the `nvlink` linker active and the

[PATCH] D140226: [NVPTX] Introduce attribute to mark kernels without a language mode

2022-12-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, JonChesterfield. Herald added subscribers: kosarev, mattd, gchakrabarti, asavonic, jdoerfert, Anastasia, tpr. Herald added a reviewer: aaron.ballman. Herald added a project: All. jhuber6 requested review of this revision. Herald added a

[PATCH] D140224: [Driver] Revert D139717 and add -Xparser instead

2022-12-16 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a comment. Without -Xcompiler, ChromeOS code will break. It may not be supported by GCC but it is supported in some other compilers like Cuda and a few others if you search. Also being supported by libtool makes it more important to keep it working. Repository: rG LLVM Gith

[PATCH] D140224: [Driver] Revert D139717 and add -Xparser instead

2022-12-16 Thread Davide Italiano via Phabricator via cfe-commits
davide added a comment. Fine if Roy is happy. If we find another thing that break, we'll let you know. Please wait for him to comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140224/new/ https://reviews.llvm.org/D140224

[PATCH] D140177: [clang][deps] Give the fake file a unique name in by-module-name scans

2022-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 483567. jansvoboda11 added a comment. Improve tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140177/new/ https://reviews.llvm.org/D140177 Files: clang/lib/Tooling/DependencyScanning/DependencyScann

[PATCH] D140224: [Driver] Revert D139717 and add -Xparser instead

2022-12-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 483565. MaskRay added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140224/new/ https://reviews.llvm.org/D140224 Files: clang/include/clang/Driver/Options.td clang/test/Driver/warn-Xparser.c

[PATCH] D140224: [Driver] Revert D139717 and add -Xparser instead

2022-12-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. Herald added a subscriber: StephenFan. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some macOS projects use -Xparser even if it leads to a -Wunused-command-line-argument

  1   2   3   >