[clang] e604f88 - [X86][test] Change some CodeGen tests to use %clang_cc1

2022-11-03 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-11-03T22:54:44-07:00 New Revision: e604f88304e183d3ce46cea5ba6bfba2fe9fba36 URL: https://github.com/llvm/llvm-project/commit/e604f88304e183d3ce46cea5ba6bfba2fe9fba36 DIFF: https://github.com/llvm/llvm-project/commit/e604f88304e183d3ce46cea5ba6bfba2fe9fba36.diff

[clang] 3cbf904 - [X86][test] Add -fcf-protection test for pre-pentiumpro

2022-11-03 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-11-03T22:21:44-07:00 New Revision: 3cbf90468aecce960887e680f813cbb1209b337f URL: https://github.com/llvm/llvm-project/commit/3cbf90468aecce960887e680f813cbb1209b337f DIFF: https://github.com/llvm/llvm-project/commit/3cbf90468aecce960887e680f813cbb1209b337f.diff

[PATCH] D136751: [clang][Interp] This pointers are writable in constructors

2022-11-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136751/new/ https://reviews.llvm.org/D136751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D136694: [clang][Interp] Check that constructor calls initialize all record fields

2022-11-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136694/new/ https://reviews.llvm.org/D136694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D136457: [clang][Interp] Fix discarding non-primitive function call return values

2022-11-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136457/new/ https://reviews.llvm.org/D136457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D135750: [clang][Interp] Track initialization state of local variables

2022-11-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135750/new/ https://reviews.llvm.org/D135750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-11-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134859/new/ https://reviews.llvm.org/D134859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D137386: [clang][Interp] Reject invalid declarations and expressions

2022-11-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I'm not really sure if this is the right thing to

[PATCH] D136815: [clang][Interp] Unify visiting variable declarations

2022-11-03 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:282 + bool isGlobalDecl(const VarDecl *VD) const { +return !VD->hasLocalStorage() || VD->isConstexpr(); + } shafik wrote: > tbaeder wrote: > > shafik wrote: > > > tbaeder

[PATCH] D137317: [X86][CET] Add Diags for targets pre to i686 for `-fcf-protection`

2022-11-03 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG525167829727: [X86][CET] Add Diags for targets pre to i686 for `-fcf-protection` (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 5251678 - [X86][CET] Add Diags for targets pre to i686 for `-fcf-protection`

2022-11-03 Thread Phoebe Wang via cfe-commits
Author: Phoebe Wang Date: 2022-11-04T12:38:29+08:00 New Revision: 52516782972730ff065a34123a9d8876da08c254 URL: https://github.com/llvm/llvm-project/commit/52516782972730ff065a34123a9d8876da08c254 DIFF: https://github.com/llvm/llvm-project/commit/52516782972730ff065a34123a9d8876da08c254.diff

[PATCH] D137381: [clang][compiler-rt] Exception escape out of an non-unwinding function is an undefined behaviour

2022-11-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In your example, `clang++ a.cc; ./a.out` gives a libstdc++ error: terminate called after throwing an instance of 'int' libc++'s is similar. footgun is nounwind (due to the GNU pure attribute), so Clang uses `call` instead of `invoke` and the function call does not

[PATCH] D137317: [X86][CET] Add Diags for targets pre to i686 for `-fcf-protection`

2022-11-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks @nickdesaulniers and @craig.topper! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137317/new/ https://reviews.llvm.org/D137317 ___ cfe-commits mailing list

[PATCH] D137058: [Driver] [Modules] Support -fsave-std-c++-module-file (1/2)

2022-11-03 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. > so I can appreciate the -fsave-std-c++-module-file name here, but it does > sound a bit verbose? My thought is the option is mainly used by build systems so that the users wouldn't type it frequently. In this case, I feel it might not be bad to make it a little

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei planned changes to this revision. pengfei added a comment. In D136919#3906159 , @rjmccall wrote: > In D136919#3906133 , @rjmccall > wrote: > >> We talked about this on the Itanium list, and as currently

[PATCH] D137259: [clang][modules][deps] WIP: In-memory module transfer

2022-11-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 473104. jansvoboda11 added a comment. Kinda rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137259/new/ https://reviews.llvm.org/D137259 Files: clang/include/clang/Frontend/CompilerInstance.h

[PATCH] D135937: [X86] Support -march=raptorlake, meteorlake

2022-11-03 Thread Freddy, Ye 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 rGa806fc2767d7: [X86] Support -march=raptorlake, meteorlake (authored by FreddyYe). Changed prior to commit:

[clang] a806fc2 - [X86] Support -march=raptorlake, meteorlake

2022-11-03 Thread Freddy Ye via cfe-commits
Author: Freddy Ye Date: 2022-11-04T09:32:17+08:00 New Revision: a806fc2767d74f2d052647e272dd4339bd747bf0 URL: https://github.com/llvm/llvm-project/commit/a806fc2767d74f2d052647e272dd4339bd747bf0 DIFF: https://github.com/llvm/llvm-project/commit/a806fc2767d74f2d052647e272dd4339bd747bf0.diff

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

2022-11-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yes, so this is how you work with the abstraction introduced in D137348 . It's very easy to cover more and more patterns incrementally. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136811: -Wunsafe-buffer-usage: WIP: RFC: NFC: User documentation.

2022-11-03 Thread Jan Korous via Phabricator via cfe-commits
jkorous added inline comments. Comment at: clang/docs/SafeBuffers.rst:173 + #pragma unsafe_buffer_usage begin + +Such pragmas not only enable incremental adoption with much smaller granularity, aaron.ballman wrote: > jkorous wrote: > > aaron.ballman wrote: > >

[PATCH] D137381: [clang][compiler-rt] Exception escape out of an non-unwinding function is an undefined behaviour

2022-11-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. (also, this needs a bit more work around irgen, will look in a bit.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137381/new/ https://reviews.llvm.org/D137381 ___

[PATCH] D137381: [clang][compiler-rt] Exception escape out of an non-unwinding function is an undefined behaviour

2022-11-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: rjmccall, morehouse, aaron.ballman, dvyukov, MaskRay, vsk, Sanitizers. lebedev.ri added a project: LLVM. Herald added subscribers: Enna1, StephenFan, dberris. Herald added a project: All. lebedev.ri requested review of this revision.

[PATCH] D136846: [Driver] Add -fsample-profile-use-profi

2022-11-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added inline comments. This revision now requires changes to proceed. Comment at: clang/docs/UsersManual.rst:2246 + blocks. Profi (profile inference) algorithm can infer block and edge counts + to fix them. For applying this,

[PATCH] D137268: [clang][Headers] Do not define varargs macros for __need___va_list

2022-11-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Headers/stdarg.h:17 +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST 1 +typedef __builtin_va_list __gnuc_va_list; To match gcc stdarg.h, `#define __GNUC_VA_LIST` Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D137287: [Test] Fix CHECK typo.

2022-11-03 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. LGTM, but you'll want to be ready to jump on any bot failures. That's just the nature of these kinds of changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131919: Move googletest to the third-party directory

2022-11-03 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision. probinson added a comment. Yes, LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131919/new/ https://reviews.llvm.org/D131919 ___ cfe-commits mailing list

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

2022-11-03 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 created this revision. ziqingluo-90 added reviewers: NoQ, t-rasmud, malavikasamak, jkorous, xazax.hun, aaron.ballman, gribozavr2. Herald added a subscriber: rnkovacs. Herald added a project: All. ziqingluo-90 requested review of this revision. Herald added a project: clang. Herald

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Might also be worth considering if we can avoid cloning here. It should be possible to emit the lambda body into a separate function with a calling convention of your choice, and make both the call operator and the static invoker call it. Repository: rG LLVM

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Should we try to use this codepath for variadic lambdas as well? Do we want to try to unify our cloning code? CodeGenFunction::GenerateVarArgsThunk has code doing something similar. (It's at least worth comparing to see if you're doing something significantly

[PATCH] D137058: [Driver] [Modules] Support -fsave-std-c++-module-file (1/2)

2022-11-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. > What was the objection to "-fc++-module-filename[=]" ? I guess it reads a bit awkwardly when you aren't providing the filename/want the default filename? > GCC has "-fmodule-only" Hmm, I don't mind that too much (& as you say, '-fobject-only' - though that flag is

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3590-3593 + getTarget().getCXXABI().isMicrosoft() && + llvm::any_of(cast(FD)->parameters(), [&](ParmVarDecl *P) { +return isInAllocaArgument(getCXXABI(), P->getType());

[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-03 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 473084. jyu2 added a comment. Herald added a subscriber: openmp-commits. Thanks Alexey. New runtime test is added. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137313/new/ https://reviews.llvm.org/D137313

[PATCH] D137287: [Test] Fix CHECK typo.

2022-11-03 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D137287#3905474 , @probinson wrote: > Nice work! > have you verified that all the modified tests pass? naively it looks like > you'd need at least 3 different targets to run them all (windows, > webassembly, powerpc) Those

[PATCH] D131919: Move googletest to the third-party directory

2022-11-03 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. Herald added a subscriber: Moerafaat. @probinson Does this latest update look better? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131919/new/ https://reviews.llvm.org/D131919

[PATCH] D90121: clang-format: Add a consumer to diagnostics engine

2022-11-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. The issue that caused this issue was fix by the fix in https://reviews.llvm.org/rGa92cf5a5a0cd01145f8db2ae09334a8b43a1271b , from the clang-format perspective I don't really feel we need to revisit bringing in these libraries. I think I proved that moving

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: efriedma. rnk added a comment. +@efriedma, can you review this as a Clang CodeGen owner, according to the recently updated CodeOwners.rst file? https://github.com/llvm/llvm-project/blob/main/clang/CodeOwners.rst#clang-llvm-ir-generation Comment at:

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 473082. akhuang added a comment. moved some stuff around Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136998/new/ https://reviews.llvm.org/D136998 Files: clang/lib/CodeGen/CGClass.cpp

[PATCH] D137058: [Driver] [Modules] Support -fsave-std-c++-module-file (1/2)

2022-11-03 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D137058#3906579 , @dblaikie wrote: > I realize I got this jumbled up and the thread about "why do we need to name > things" is meant to be over in D137059 > (sorry @ben.boeckel :/ I know this

[PATCH] D137334: [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 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 rGc0725865b188: [clang][dataflow] Generalize custom comparison to return tri-value result. (authored by ymandel). Repository: rG LLVM Github

[clang] c072586 - [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-11-03T23:31:20Z New Revision: c0725865b188f71f904ecd4dac56ef37268b30d2 URL: https://github.com/llvm/llvm-project/commit/c0725865b188f71f904ecd4dac56ef37268b30d2 DIFF: https://github.com/llvm/llvm-project/commit/c0725865b188f71f904ecd4dac56ef37268b30d2.diff

[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

2022-11-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3590-3593 + getTarget().getCXXABI().isMicrosoft() && + llvm::any_of(cast(FD)->parameters(), [&](ParmVarDecl *P) { +return isInAllocaArgument(getCXXABI(), P->getType());

[PATCH] D137375: [AIX][pg] Add Correct Search Paths for Profiled Libraries

2022-11-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This needs a clang/test/Driver test. And, does this work with --sysroot= ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137375/new/ https://reviews.llvm.org/D137375 ___

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

2022-11-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D137107#3905443 , @zahiraam wrote: > extern int __declspec(dllimport) next(int n); > int main () { > extern int _declspec(dllimport) val; > constexpr int& val_ref = val; > int i = next(val_ref); > return i; >

[PATCH] D137375: [AIX][pg] Add Correct Search Paths for Profiled Libraries

2022-11-03 Thread Michael Francis via Phabricator via cfe-commits
francii created this revision. Herald added a project: All. francii requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. On AIX, profiled system libraries are stored at `/lib/profiled` and `/usr/lib/profiled`. When compiling with

[PATCH] D137268: [clang][Headers] Do not define varargs macros for __need___va_list

2022-11-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/Headers/stdarg.h:21 + +#ifdef __STDARG_H Maybe the following is a little more readable? ``` #ifndef __STDARG_H #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST 1 typedef __builtin_va_list __gnuc_va_list;

[PATCH] D137373: [AIX][p] Add 64-bit Test Case

2022-11-03 Thread Michael Francis via Phabricator via cfe-commits
francii created this revision. Herald added a project: All. francii requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add a 64-bit version of the already-existing `-p` test case for compiler-emitted linker flags. Repository: rG LLVM

[PATCH] D137372: [AIX][pg] Add 32-bit test case

2022-11-03 Thread Michael Francis via Phabricator via cfe-commits
francii created this revision. Herald added a project: All. francii requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add a 32-bit version of the already-existing pg test case for compiler-emitted linker flags. Repository: rG LLVM Github

[PATCH] D137059: [Driver] [Modules] Introduce -fsave-std-c++-module-file= to specify the path of the module file (2/2)

2022-11-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a subscriber: rsmith. dblaikie added a comment. In D137059#3899339 , @ben.boeckel wrote: > There is another motivating factor for 1-phase: the build graph is far > simpler. With 2-phase, CMake will have to write out rules to perform: > >

[PATCH] D136811: -Wunsafe-buffer-usage: WIP: RFC: NFC: User documentation.

2022-11-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/docs/SafeBuffers.rst:31 +convert large amounts of old code to conform to the warning; + - Attribute ``[[unsafe_buffer_usage]]`` lets you annotate custom functions as +unsafe, while providing a safe alternative that can often

[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D137313#3906527 , @jyu2 wrote: > In D137313#3906487 , @ABataev wrote: > >> Do we have a runtime test for this? Would be good to try to test it if the >> offloading fails and the host

[PATCH] D137058: [Driver] [Modules] Support -fsave-std-c++-module-file (1/2)

2022-11-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a subscriber: rsmith. dblaikie added a comment. I realize I got this jumbled up and the thread about "why do we need to name things" is meant to be over in D137059 (sorry @ben.boeckel :/ I know this is all confusing to follow at the best of

[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-03 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D137313#3906487 , @ABataev wrote: > Do we have a runtime test for this? Would be good to try to test it if the > offloading fails and the host version is executed instead. I have runtime test in https://reviews.llvm.org/D134268

[PATCH] D137224: clang/cmake: Simplify lit detection for standalone builds

2022-11-03 Thread Tom Stellard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc9a959334707: clang/cmake: Simplify lit detection for standalone builds (authored by tstellar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137224/new/

[clang] c9a9593 - clang/cmake: Simplify lit detection for standalone builds

2022-11-03 Thread Tom Stellard via cfe-commits
Author: Tom Stellard Date: 2022-11-03T15:12:55-07:00 New Revision: c9a959334707810795f7e8c56ab6dd55ff0a359d URL: https://github.com/llvm/llvm-project/commit/c9a959334707810795f7e8c56ab6dd55ff0a359d DIFF: https://github.com/llvm/llvm-project/commit/c9a959334707810795f7e8c56ab6dd55ff0a359d.diff

[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Do we have a runtime test for this? Would be good to try to test it if the offloading fails and the host version is executed instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137313/new/

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

2022-11-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D137107#3906439 , @zahiraam wrote: > Here is an even smaller test case. > lib.cpp: > __declspec(dllexport) int val=12; > > t1.cpp: > int main () { > > extern int _declspec(dllimport) val; > int& val_ref = val; > return

[Diffusion] rGfdab9f1203ee: [Clang] Check for response file existence prior to check for recursion

2022-11-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a subscriber: cfe-commits. BRANCHES main Users: sepavloff (Author) https://reviews.llvm.org/rGfdab9f1203ee ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D137259: [clang][modules][deps] WIP: In-memory module transfer

2022-11-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 473043. jansvoboda11 added a comment. Handle macros Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137259/new/ https://reviews.llvm.org/D137259 Files: clang/include/clang/Frontend/CompilerInstance.h

[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-03 Thread Noah Goldstein via Phabricator via cfe-commits
goldstein.w.n added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:5056-5059 + "if (A) { \\\n" + "B(); \\\n" + "}\\\n" + "C();\n"

[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-03 Thread Noah Goldstein via Phabricator via cfe-commits
goldstein.w.n added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:5056-5059 + "if (A) { \\\n" + "B(); \\\n" + "}\\\n" + "C();\n" owenpan

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

2022-11-03 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D137107#3906413 , @mstorsjo wrote: > In D137107#3905443 , @zahiraam > wrote: > >> and the same assembly (load __imp_?val) (is that why you made the comment >> above?). And the test

[PATCH] D137327: [clang-format] Handle object instansiation in if-statements

2022-11-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:366 + CurrentToken->is(tok::identifier) && + !Next->isOneOf(tok::equal, tok::l_brace)) { Prev->setType(TT_BinaryOperator); Could you

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

2022-11-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D137107#3905443 , @zahiraam wrote: > and the same assembly (load __imp_?val) (is that why you made the comment > above?). And the test case runs. Yes, pretty much - the actual value of the address of `` isn't known at

[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-03 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D137313#3904805 , @ABataev wrote: > Whyt it is NFC? I assume it fixes the dereferencing of references, right? Thanks Alexey. I really don't expect run time change for this change. The change only change BP/PP of the map

[PATCH] D136796: [llvm-objdump][Offload] Use common offload extraction method

2022-11-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:1262-1265 +if (identify_magic((*BufferOrErr)->getBuffer()) == +file_magic::elf_shared_object) + continue; + tra wrote: > jhenderson wrote: > >

[clang] 3384f05 - [llvm-objdump][Offload] Use common offload extraction method

2022-11-03 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-11-03T16:19:13-05:00 New Revision: 3384f05a2cdb96a2f106c234ae8a9d0e306717a4 URL: https://github.com/llvm/llvm-project/commit/3384f05a2cdb96a2f106c234ae8a9d0e306717a4 DIFF: https://github.com/llvm/llvm-project/commit/3384f05a2cdb96a2f106c234ae8a9d0e306717a4.diff

[PATCH] D136796: [llvm-objdump][Offload] Use common offload extraction method

2022-11-03 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 rG3384f05a2cdb: [llvm-objdump][Offload] Use common offload extraction method (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D136815: [clang][Interp] Unify visiting variable declarations

2022-11-03 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:282 + bool isGlobalDecl(const VarDecl *VD) const { +return !VD->hasLocalStorage() || VD->isConstexpr(); + } tbaeder wrote: > shafik wrote: > > tbaeder wrote: > > > shafik

[PATCH] D136894: Add clang-doc readme

2022-11-03 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. In D136894#3905638 , @brettw wrote: > I definitely wasn't intending to write "formal documentation" for clang-doc. > I was trying to write some notes for a future contributor as I'm winding down > my work here, and it seems

[PATCH] D136811: -Wunsafe-buffer-usage: WIP: RFC: NFC: User documentation.

2022-11-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/docs/SafeBuffers.rst:31 +convert large amounts of old code to conform to the warning; + - Attribute ``[[unsafe_buffer_usage]]`` lets you annotate custom functions as +unsafe, while providing a safe alternative that can

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2022-11-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 473028. njames93 marked 3 inline comments as done. njames93 added a comment. Address documentation comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137302/new/ https://reviews.llvm.org/D137302 Files:

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D137350#3906234 , @reames wrote: > In D137350#3906126 , @craig.topper > wrote: > >> Do these need their own DecoderNameSpace? > > What is a decoder namespace? Some quick

[PATCH] D137340: [clang-tidy] Add modernize-use-anonymous-namespace check

2022-11-03 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D137340#3906250 , @njames93 wrote: > I'm not entirely sure why this belongs in the modernize module given > anonymous namespaces have been in c++ forever, maybe its more of a misc > check? Also the modernize checks are

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-11-03 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2497d5aa7716: Define _GNU_SOURCE for arm baremetal in C++ mode. (authored by manojgupta). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136712/new/

[clang] 2497d5a - Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-11-03 Thread Manoj Gupta via cfe-commits
Author: Manoj Gupta Date: 2022-11-03T13:58:47-07:00 New Revision: 2497d5aa7716a664c4f73df1980b026c906c7522 URL: https://github.com/llvm/llvm-project/commit/2497d5aa7716a664c4f73df1980b026c906c7522 DIFF: https://github.com/llvm/llvm-project/commit/2497d5aa7716a664c4f73df1980b026c906c7522.diff

[PATCH] D137024: [compiler-rt] Switch from llvm-config to find_package(LLVM)

2022-11-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D137024#3905181 , @mgorny wrote: >> These workarounds are fine for me, but I wonder if it would be useful with a >> more direct cmake option to tell it not look for these files at all. > > CMake has something like that

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CodeGenTBAA.cpp:341 if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) { - // Handle C++ base classes. Non-virtual bases can treated a a kind of + // Handle C++ base classes. Non-virtual bases can

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/CodeGen/CodeGenTBAA.cpp:341 if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) { - // Handle C++ base classes. Non-virtual bases can treated a a kind of + // Handle C++ base classes. Non-virtual bases can treated a

[PATCH] D135987: [clangBasic] Refactor StaticAnalyzer to use `clang::SarifDocumentWriter`

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for this refactoring, I really like the direction it's going! I've not spotted anything concerning, but if someone can double-check conformance to SARIF in terms of the changes to the tests, that would be appreciated. It looks like precommit CI found a

[PATCH] D137340: [clang-tidy] Add modernize-use-anonymous-namespace check

2022-11-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm not entirely sure why this belongs in the modernize module given anonymous namespaces have been in c++ forever, maybe its more of a misc check? Also the modernize checks are meant to actually emit fixes(ignore the c arrays check :) ), Right now, this only warn, it

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Philip Reames via Phabricator via cfe-commits
reames updated this revision to Diff 473022. reames added a comment. Address review comments from @craig.topper CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137350/new/ https://reviews.llvm.org/D137350 Files: clang/test/Preprocessor/riscv-target-features.c

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-03 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:827 +BUILTIN(__nvvm_reflect, "icC*", "nc") + Do we actually need this patch at all. `extern "C" int __nvvm_reflect(const char *);` appears to work just fine already:

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Philip Reames via Phabricator via cfe-commits
reames added a comment. In D137350#3906126 , @craig.topper wrote: > Do these need their own DecoderNameSpace? What is a decoder namespace? Some quick grepping and googling isn't very informative. Comment at:

[PATCH] D136811: -Wunsafe-buffer-usage: WIP: RFC: NFC: User documentation.

2022-11-03 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Thank you for the feedback Gábor! Comment at: clang/docs/SafeBuffers.rst:36-37 +hardened mode where C++ classes such as ``std::vector`` and ``std::span``, +together with their respective ``iterator`` classes, are protected +at runtime

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D136919#3906133 , @rjmccall wrote: > We talked about this on the Itanium list, and as currently specified, it is > absolutely not correct for `__bf16` to have the same mangling as > `std::bfloat16_t`, because `__bf16` does

[PATCH] D136282: [clang] [CMake] Link libclangBasic against libatomic when necessary.

2022-11-03 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG20132d8eaa68: Link libclangBasic against libatomic when necessary. (authored by thesamesam, committed by mgorny). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 20132d8 - Link libclangBasic against libatomic when necessary.

2022-11-03 Thread Michał Górny via cfe-commits
Author: Sam James Date: 2022-11-03T21:07:44+01:00 New Revision: 20132d8eaa68a6c53e152718beda1dc0f4c9ff6c URL: https://github.com/llvm/llvm-project/commit/20132d8eaa68a6c53e152718beda1dc0f4c9ff6c DIFF: https://github.com/llvm/llvm-project/commit/20132d8eaa68a6c53e152718beda1dc0f4c9ff6c.diff

[PATCH] D136796: [llvm-objdump][Offload] Use common offload extraction method

2022-11-03 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM, modulo separating clang-related change into a separate patch. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:1262-1265 +if

[PATCH] D135721: [HLSL] Added HLSL this as a reference

2022-11-03 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:179 +AST, SourceLocation(), +Constructor->getThisType().getTypePtr()->getPointeeType(), true); +This->setValueKind(ExprValueKind::VK_LValue); aaron.ballman

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The clang parts generally LG, but I spotted a few things. Thank you for this cleanup effort! Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:467 - /// Return a matcher that that points to the same implementation, but sets

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. We talked about this on the Itanium list, and as currently specified, it is absolutely not correct for `__bf16` to have the same mangling as `std::bfloat16_t`, because these types do not have the same semantics. If GCC did that, it is a bug. That discussion was

[PATCH] D136554: Implement CWG2631

2022-11-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done and an inline comment as not done. cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:5918 +if (const FunctionDecl *FD = E->getDirectCallee()) + HasImmediateCalls |= FD->isConsteval(); +return

[PATCH] D136554: Implement CWG2631

2022-11-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 8 inline comments as done. cor3ntin added inline comments. Comment at: clang/include/clang/Sema/Sema.h:9602-9604 +return Ctx.Context == + ExpressionEvaluationContext::PotentiallyEvaluatedIfUsed || +

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Do these need their own DecoderNameSpace? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137350/new/ https://reviews.llvm.org/D137350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Jez Ng via Phabricator via cfe-commits
int3 added a comment. lld/MachO changes lgtm Comment at: lld/MachO/Driver.cpp:1386 // ld64 does something really weird. It attempts to realign the value to the -// page size, but assumes the the page size is 4K. This doesn't work with +// page size, but assumes

[PATCH] D136554: Implement CWG2631

2022-11-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 473006. cor3ntin added a comment. Add parentheses to make check clearer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554 Files: clang/docs/ReleaseNotes.rst

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Amir Ayupov via Phabricator via cfe-commits
Amir accepted this revision. Amir added a comment. BOLT changes LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137338/new/ https://reviews.llvm.org/D137338 ___ cfe-commits mailing list

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:437 + +// RUN: %clang -target riscv64 -march=rv64ixventanacondops -x c -E -dM %s \ +// RUN: -o - | FileCheck --check-prefix=CHECK-XVENTANACONDOPS-EXT %s reames wrote:

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-11-03 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 473004. manojgupta added a comment. Updated test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136712/new/ https://reviews.llvm.org/D136712 Files: clang/lib/Basic/Targets/ARM.cpp

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: clang-vendors, rjmccall. aaron.ballman added a subscriber: rjmccall. aaron.ballman added a comment. Adding clang-vendors because of the potential ABI break concerns and @rjmccall for the Itanium ABI questions specifically. In D136919#3904925

  1   2   3   >