[PATCH] D122659: [clang][preprocessor] Allow calling DumpToken() on annotation tokens

2022-04-12 Thread Timm Bäder via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0eb5891adcb8: [clang][preprocessor] Allow calling DumpToken() on annotation tokens (authored by tbaeder). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 0eb5891 - [clang][preprocessor] Allow calling DumpToken() on annotation tokens

2022-04-12 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2022-04-13T07:06:00+02:00 New Revision: 0eb5891adcb84ccf665e88a62f573a1e22696782 URL: https://github.com/llvm/llvm-project/commit/0eb5891adcb84ccf665e88a62f573a1e22696782 DIFF: https://github.com/llvm/llvm-project/commit/0eb5891adcb84ccf665e88a62f573a1e22696782.diff

[clang] 0cb9c6e - [clang-format] Allow empty .clang-format file

2022-04-12 Thread via cfe-commits
Author: owenca Date: 2022-04-12T21:20:54-07:00 New Revision: 0cb9c6ea8398519bfb09479cc8cb29835e707440 URL: https://github.com/llvm/llvm-project/commit/0cb9c6ea8398519bfb09479cc8cb29835e707440 DIFF: https://github.com/llvm/llvm-project/commit/0cb9c6ea8398519bfb09479cc8cb29835e707440.diff LOG:

[PATCH] D123612: [Driver] Support linking to compiler-rt on AVR

2022-04-12 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 422388. Herald added a subscriber: ormris. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123612/new/ https://reviews.llvm.org/D123612 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/lib/Driver/ToolChains/AVR.h

[PATCH] D123648: Restrict lvalue-to-rvalue conversions in CGExprConstant.

2022-04-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123648/new/ https://reviews.llvm.org/D123648

[PATCH] D123438: [Clang] Move Hexagon / VE IAS enabling to Generic_GCC::IsIntegratedAssemblerDefault

2022-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. Herald added a subscriber: StephenFan. LGTM. The subject can be changed to mention NFC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D123642: [clang codegen] Assume arguments of __atomic_* are aligned.

2022-04-12 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. I disagree with this on principle -- IMO, it is basically a historical bug in GCC that it ignores the type alignment, and we should NOT try to match that -- it's dangerous. We ought to resolve the bug via other fixes: - As a workaround: add alignas(uint64_t) to the

[PATCH] D123441: [CUDA][HIP] Fix host used external kernel in archive

2022-04-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D123441#3446719 , @tra wrote: > So, a main TU with just `__global__ void kernel();` would emit a reference > when it's compiled on the GPU side. That, in turn will tell the linker what

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-12 Thread Chuanqi Xu 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 rG36de2d639eca: [NFC] [AST] Reduce the size of TemplateParmPosition (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] 36de2d6 - [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-12 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-04-13T10:56:13+08:00 New Revision: 36de2d639eca4cead62a6c6d288a501cee8bb6e7 URL: https://github.com/llvm/llvm-project/commit/36de2d639eca4cead62a6c6d288a501cee8bb6e7 DIFF: https://github.com/llvm/llvm-project/commit/36de2d639eca4cead62a6c6d288a501cee8bb6e7.diff

[PATCH] D123298: [NFC] [AST] Reduce the size of TemplateParmPosition

2022-04-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D123298#3445131 , @aaron.ballman wrote: > Still LG to me, but please watch the build bots and issues list closely for > any new template instantiation depth/position related issues over the next > short while given that

[PATCH] D123300: [Clang] Enable opaque pointers by default

2022-04-12 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D123300#3447116 , @maryammo wrote: > @nikic, it seems breaking the clang-ppc64le-rhel build > > htps://lab.llvm.org/buildbot/#/builders/57/builds/16776 > > Can you please take a look? should be fixed by

[clang] cbcdd5f - [clang][test] Disable opaque pointers in test

2022-04-12 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-04-12T19:15:33-07:00 New Revision: cbcdd5ff8addd8677a0d15c08d449e759801e355 URL: https://github.com/llvm/llvm-project/commit/cbcdd5ff8addd8677a0d15c08d449e759801e355 DIFF:

[PATCH] D123648: Restrict lvalue-to-rvalue conversions in CGExprConstant.

2022-04-12 Thread LiqinWeng via Phabricator via cfe-commits
Miss_Grape added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1096 +case CK_LValueToRValue: { + // We don't really support doing lvalue-to-rvalue conversions here; any + // interesting conversions should be done in Evaluate(). But as a

[PATCH] D123345: Treat `std::move`, `forward`, and `move_if_noexcept` as builtins.

2022-04-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/docs/CommandGuide/clang.rst:264 + +.. option:: -fno-builtin-std- + xbolva00 wrote: > -fno-builtin=xxx,yyy,zzz > > wdyt? Seems reasonable to me to treat `-fno-builtin-` and `-fno-builtin=` as equivalent, and I

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 422377. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h

[PATCH] D123300: [Clang] Enable opaque pointers by default

2022-04-12 Thread Maryam Moghadas via Phabricator via cfe-commits
maryammo added a comment. @nikic, it seems breaking the clang-ppc64le-rhel build htps://lab.llvm.org/buildbot/#/builders/57/builds/16776 Can you please take a look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123300/new/

[PATCH] D123345: Treat `std::move`, `forward`, and `move_if_noexcept` as builtins.

2022-04-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/docs/CommandGuide/clang.rst:264 + +.. option:: -fno-builtin-std- + -fno-builtin=xxx,yyy,zzz wdyt? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123345/new/

[PATCH] D123535: [clang-format] Allow empty .clang-format file

2022-04-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 422373. owenpan added a comment. Updated command line tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123535/new/ https://reviews.llvm.org/D123535 Files: clang/lib/Format/Format.cpp clang/test/Format/style-on-command-line.cpp Index:

[PATCH] D123649: Allow flexible array initialization in C++.

2022-04-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: aaron.ballman, rsmith, erichkeane. Herald added a project: All. efriedma requested review of this revision. Herald added a project: clang. Flexible array initialization is a C/C++ extension implemented in many compilers to allow

[PATCH] D123648: Restrict lvalue-to-rvalue conversions in CGExprConstant.

2022-04-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: aaron.ballman, rjmccall, rsmith. Herald added a project: All. efriedma requested review of this revision. Herald added a project: clang. We were generating wrong code for cxx20-consteval-crash.cpp: instead of loading a value of a

[PATCH] D123345: Treat `std::move`, `forward`, and `move_if_noexcept` as builtins.

2022-04-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 422366. rsmith added a comment. - Switch to a different example with underscores. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123345/new/ https://reviews.llvm.org/D123345 Files:

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 422365. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h

[PATCH] D123586: [clang][dataflow] Weaken abstract comparison to enable loop termination.

2022-04-12 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. Yeah, this is a hard problem in general. This looks like a sensible workaround for the short term, but I'm looking forward to a better solution. I'm a bit worried that the memory model

[PATCH] D123642: [clang codegen] Assume arguments of __atomic_* are aligned.

2022-04-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: jyknight, craig.topper, jfb, rjmccall. Herald added a subscriber: StephenFan. Herald added a project: All. efriedma requested review of this revision. Herald added a project: clang. This seems weird, but it's necessary to match gcc, and

[clang] 0cde8bd - Revert "[clang-format] Allow empty .clang-format file"

2022-04-12 Thread via cfe-commits
Author: owenca Date: 2022-04-12T16:05:39-07:00 New Revision: 0cde8bdb0bd0d2e681be43e8a4057138048eb421 URL: https://github.com/llvm/llvm-project/commit/0cde8bdb0bd0d2e681be43e8a4057138048eb421 DIFF: https://github.com/llvm/llvm-project/commit/0cde8bdb0bd0d2e681be43e8a4057138048eb421.diff LOG:

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Driver/Driver.cpp:1196 + + if (IsDXCMode()) { +// clang-dxc target is build from target_profile option. nit: this can be an `else` for the `if` above Comment at:

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 422350. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h

[PATCH] D123640: Make comment consistent with allow|ignore list renamings

2022-04-12 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya created this revision. hiraditya added a reviewer: thakis. Herald added a project: All. hiraditya requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D123640

[PATCH] D123535: [clang-format] Allow empty .clang-format file

2022-04-12 Thread Owen Pan 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 rG4e814a6f2db9: [clang-format] Allow empty .clang-format file (authored by owenpan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 4e814a6 - [clang-format] Allow empty .clang-format file

2022-04-12 Thread via cfe-commits
Author: owenca Date: 2022-04-12T15:45:22-07:00 New Revision: 4e814a6f2db90046914734fac4f9e3110c7e0424 URL: https://github.com/llvm/llvm-project/commit/4e814a6f2db90046914734fac4f9e3110c7e0424 DIFF: https://github.com/llvm/llvm-project/commit/4e814a6f2db90046914734fac4f9e3110c7e0424.diff LOG:

[PATCH] D105263: [X86] AVX512FP16 instructions enabling 1/6

2022-04-12 Thread Jameson Nash via Phabricator via cfe-commits
vtjnash added a comment. Herald added a subscriber: StephenFan. Herald added a project: All. I was tracking back a recent ABI break (also failing now in gcc 12, so maybe this irregularity is intentional), and was concerned that this commit is observed to cause the platform ABI to change

[PATCH] D122789: [compiler-rt] [scudo] Use -mcrc32 on x86 when available

2022-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This is to kurly (original Gentoo reporter) `printf '#include \n#include \nuint32_t computeHardwareCRC32(uint32_t Crc, uint32_t Data) { return _mm_crc32_u32(Crc, Data); }' > a.c` `clang -m32 -march=i686 -msse4.2 -c a.c` seems to compile fine. I have some older GCC and

[PATCH] D123300: [Clang] Enable opaque pointers by default

2022-04-12 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D123300#3446023 , @nikic wrote: > @mstorsjo Thanks! I've reduced this to a crash in `-argpromotion`: > > efine void @caller() { > call i32 @callee(ptr null) > ret void > } > > define internal void @callee(ptr

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. > if the developer uses default initialization for a randomized structure. Yeah, I suspect that @aaron.ballman @lebedev.ri @xbolva00 missed that this just extends the newly added opt-in `-frandomize-layout-seed=` (https://reviews.llvm.org/D121556). Why a

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> passing one of the seed flags Yeah, then this is fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123544/new/ https://reviews.llvm.org/D123544 ___ cfe-commits mailing

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123544#3446519 , @xbolva00 wrote: >>> If we had error diagnostics when the user is about to shoot their foot off, >>> I'd be more comfortable with the automatic hardening behavior. > > This feature IMHO should be enabled with

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123544#3446416 , @aaron.ballman wrote: > However, I had forgotten that the base feature *requires* the user to pass a > randomization seed via a flag in addition to requiring the attribute (thank > you for bringing that back

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D123471#3446751 , @yaxunl wrote: > HIP is considering a unified device binary embedding scheme with OpenMP. > However, some large MI frameworks are compiled with -fno-gpu-rdc. If > compiling with -fgpu-rdc, the linking time

[PATCH] D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: aaron.ballman, MaskRay. Herald added a subscriber: StephenFan. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This test makes sure that the

[PATCH] D123535: [clang-format] Allow empty .clang-format file

2022-04-12 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 422335. owenpan added a comment. Updated the affected clang test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123535/new/ https://reviews.llvm.org/D123535 Files: clang/lib/Format/Format.cpp clang/test/Format/style-on-command-line.cpp

[PATCH] D122734: [CUDA][HIP] Fix mangling number for local struct

2022-04-12 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:11760-11763 + auto Cutoff = [](unsigned V) { return V > 1 ? V : 1; }; + if (CUDANameMangleCtx.MangleDeviceNameInHostCompilation) +return Cutoff(Res >> 16); + return Cutoff(Res & 0x);

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. HIP is considering a unified device binary embedding scheme with OpenMP. However, some large MI frameworks are compiled with -fno-gpu-rdc. If compiling with -fgpu-rdc, the linking time will significantly increase since the post-linking optimizations take much longer

[clang] c80eaa9 - Revert "[clang-format] Allow empty .clang-format file"

2022-04-12 Thread via cfe-commits
Author: owenca Date: 2022-04-12T14:28:02-07:00 New Revision: c80eaa919f210014312f77c4c73f502406b4989d URL: https://github.com/llvm/llvm-project/commit/c80eaa919f210014312f77c4c73f502406b4989d DIFF: https://github.com/llvm/llvm-project/commit/c80eaa919f210014312f77c4c73f502406b4989d.diff LOG:

[PATCH] D122952: [clang] NFC: Extend comdat validation in target multiversion function tests.

2022-04-12 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann marked an inline comment as done. tahonermann added inline comments. Comment at: clang/test/CodeGen/attr-target-mv.c:95-111 +// WINDOWS: $foo_used = comdat any +// WINDOWS: $foo_used2.avx_sse4.2 = comdat any +// WINDOWS: $pr50025.resolver = comdat any +// WINDOWS:

[PATCH] D123441: [CUDA][HIP] Fix host used external kernel in archive

2022-04-12 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. In D123441#3446499 , @yaxunl wrote: > You are talking about a use case that actually needs --whole-archive option. > If the main TU does not reference some

[PATCH] D123627: Correctly diagnose prototype redeclaration errors in C

2022-04-12 Thread James Y Knight via Phabricator via cfe-commits
jyknight accepted this revision. jyknight added inline comments. Comment at: clang/test/Sema/warn-deprecated-non-prototype.c:64-70 // FIXME: we get two diagnostics here when running in pedantic mode. The first // comes when forming the function type for the definition, and the

[clang] 6eafda0 - [clang-format] Allow empty .clang-format file

2022-04-12 Thread via cfe-commits
Author: owenca Date: 2022-04-12T13:54:12-07:00 New Revision: 6eafda0ef0543cad4b190002e9dae93b036a4ded URL: https://github.com/llvm/llvm-project/commit/6eafda0ef0543cad4b190002e9dae93b036a4ded DIFF: https://github.com/llvm/llvm-project/commit/6eafda0ef0543cad4b190002e9dae93b036a4ded.diff LOG:

[PATCH] D123441: [CUDA][HIP] Fix host used external kernel in archive

2022-04-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Also, I don't see the advantage of resolving this issue through toolchains. You still need to detect kernels and device variables referenced by host code, and generate IR's which introduce artificial references to them. It just becomes more complicated since you have to

[PATCH] D122378: [doc] Rely on tblgen to dump supported options value when generating doc

2022-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `clang-tblgen --gen-opt-docs -I ../llvm/include -I include/clang/Driver include/clang/Driver/ClangOptionDocs.td` For -gsplit-dwarf, the message has lost information. I have found similar patterns for other options. .. option:: -gsplit-dwarf= .. program:: clang

[PATCH] D123630: Remove connection between 'ffast-math' and 'ffp-contract'.

2022-04-12 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam created this revision. zahiraam added reviewers: aaron.ballman, andrew.w.kaylor, rjmccall, joerg, efriedma. Herald added a project: All. zahiraam requested review of this revision. Herald added a subscriber: MaskRay. Herald added a project: clang. Currently the options ‘ffast-math’ and

[PATCH] D123211: [flang][driver] Add support for generating LLVM bytecode files

2022-04-12 Thread Emil Kieri via Phabricator via cfe-commits
ekieri added inline comments. Comment at: flang/lib/Frontend/FrontendActions.cpp:491 + // Create and configure `TargetMachine` + std::unique_ptr TM; + awarzynski wrote: > ekieri wrote: > > Is there a reason why use TM.reset instead of initialising TM like you

[PATCH] D123627: Correctly diagnose prototype redeclaration errors in C

2022-04-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. This LGTM, please give a day or so for others to take a look. Comment at: clang/test/Sema/predefined-function.c:27 -int foobar(int); // note {{previous declaration

[PATCH] D123627: Correctly diagnose prototype redeclaration errors in C

2022-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: jyknight, eli.friedman, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. We did not implement C99 6.7.5.3p15 fully in that we missed the rule for

[clang] d10c091 - lit.cfg.py: remove obsoleted feature clang-driver

2022-04-12 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-04-12T13:31:07-07:00 New Revision: d10c09168377767e43efbcb22e65343d509c13f0 URL: https://github.com/llvm/llvm-project/commit/d10c09168377767e43efbcb22e65343d509c13f0 DIFF: https://github.com/llvm/llvm-project/commit/d10c09168377767e43efbcb22e65343d509c13f0.diff

[clang] 63fbc77 - [Driver][test] Remove unused/obsoleted REQUIRES: clang-driver

2022-04-12 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2022-04-12T13:29:46-07:00 New Revision: 63fbc771218f6ec6700c607ed257a536bb016e12 URL: https://github.com/llvm/llvm-project/commit/63fbc771218f6ec6700c607ed257a536bb016e12 DIFF: https://github.com/llvm/llvm-project/commit/63fbc771218f6ec6700c607ed257a536bb016e12.diff

[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

2022-04-12 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. Looks reasonable overall. I've added a few specific comments to some tests, but in general, I think we should avoid adding -std=c99 to test-cases to workaround implicit decl issues, unless: - the test is explicitly testing the behavior of implicit decls (potentially

[PATCH] D119290: [Clang] Add support for -fcx-limited-range, -fcx-fortran-rules options.

2022-04-12 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. Herald added a subscriber: StephenFan. Comment at: clang/test/Driver/complex-range-flags.c:3 + +// REQUIRES: clang-driver + delete this is

[PATCH] D67678: PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer.

2022-04-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith reopened this revision. rsmith added a comment. This revision is now accepted and ready to land. Herald added a project: All. @dexonsmith @arphaman What do we need to do to get this re-landed? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D122008: [flang][driver] Add support for generating executables

2022-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:392 + //* on some platforms, we may need to use lib64 instead of lib (you can use + //CLANG_LIBDIR_SUFFIX to automate this) + //* this logic should also work on other similar platforms

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> If we had error diagnostics when the user is about to shoot their foot off, >> I'd be more comfortable with the automatic hardening behavior. This feature IMHO should be enabled with simple easy to understand flag, not silently and automatically do something which

[PATCH] D123450: [clang-format] Parse Verilog if statements

2022-04-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/FormatToken.h:374 + /// Verilog we want to treat the backtick like a hash. + tok::TokenKind AliasToken = tok::unknown; + sstwcw wrote: > HazardyKnusperkeks wrote: > > Can't we do that with

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> Because this feature requires a feature flag to enable it, this behavior >> *is* a conforming extension (the user has to take an action to get the new >> behavior). Well, then we should have proper C test (ok if linux only or so) to show case behaviour of this

[PATCH] D123345: Treat `std::move`, `forward`, and `move_if_noexcept` as builtins.

2022-04-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D123345#3440935 , @aaron.ballman wrote: > Any chance you'd be interested in submitting this patch to > http://llvm-compile-time-tracker.com/ (instructions at > http://llvm-compile-time-tracker.com/about.php) so we can have

[PATCH] D123441: [CUDA][HIP] Fix host used external kernel in archive

2022-04-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D123441#3446478 , @tra wrote: >> This approach will only link in kernels and device variables used by host >> code > > In the absence of the explicit reference info from the host side, GPU-side > linker must link all objects

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D123471#3446464 , @tra wrote: > I've mentioned in D123441 that it would be > useful to have a list of GPU-side symbols needed by the host and this offload > info is pretty close to what we

[clang] 7443a50 - [clang][extract-api] Add support for true anonymous enums

2022-04-12 Thread Daniel Grumberg via cfe-commits
Author: Daniel Grumberg Date: 2022-04-12T20:42:17+01:00 New Revision: 7443a504bf6c22b83727c1e43c82c4165b2d5db5 URL: https://github.com/llvm/llvm-project/commit/7443a504bf6c22b83727c1e43c82c4165b2d5db5 DIFF:

[PATCH] D123441: [CUDA][HIP] Fix host used external kernel in archive

2022-04-12 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > This approach will only link in kernels and device variables used by host code In the absence of the explicit reference info from the host side, GPU-side linker must link all objects with symbols that **may** be used by the host. E.g if we have a library with three

[PATCH] D123471: [CUDA] Create offloading entries when using the new driver

2022-04-12 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I've mentioned in D123441 that it would be useful to have a list of GPU-side symbols needed by the host and this offload info is pretty close to what we need. The only remaining feature is being able to extract them by external tool, so

[PATCH] D123441: [CUDA][HIP] Fix host used external kernel in archive

2022-04-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D123441#3446408 , @tra wrote: > LGTM in principle. This will keep around the GPU code we do need. > > That said, it seems to be a rather blunt hammer. I think we'll end up linking > almost everything in an archive into the

[PATCH] D122285: [analyzer] Add path note tags to standard library function summaries.

2022-04-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:879 +// knowing in advance which branch is taken. +return (Node->succ_size() > 1) ? Note.str() : ""; + }, NoQ wrote: >

[PATCH] D122285: [analyzer] Add path note tags to standard library function summaries.

2022-04-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:872-883 +if (NewState && NewState != State) { + StringRef Note = Case.getNote(); + const NoteTag *Tag = C.getNoteTag( + // Sorry couldn't help myself.

[PATCH] D123610: [Testing] Drop clangTesting from clang's public library interface

2022-04-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. The change makes sense to me. Comment at: clang/lib/Testing/CMakeLists.txt:6 +# Not add_clang_library: this is not part of clang's public library interface. +# Unit tests

[PATCH] D123345: Treat `std::move`, `forward`, and `move_if_noexcept` as builtins.

2022-04-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 422311. rsmith added a comment. - Document `-fno-builtin-std-foo`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123345/new/ https://reviews.llvm.org/D123345 Files: clang/docs/CommandGuide/clang.rst

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D123544#3446265 , @void wrote: > Could you explain a bit more why it's not considered conforming behavior in > C? The entire feature is definitely unusual and introduces some caveats (the > structure initialization

[PATCH] D123441: [CUDA][HIP] Fix host used external kernel in archive

2022-04-12 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. LGTM in principle. This will keep around the GPU code we do need. That said, it seems to be a rather blunt hammer. I think we'll end up linking almost everything in an archive into the final executable as we'll likely have a host-visible symbol in most of the GPU objects

[PATCH] D123127: [AST] Add a new TemplateName for templates found via a using declaration.

2022-04-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 422310. hokein added a comment. reland version: there is no freebit in the TemplateName's PointerUnion to store 5 different pointer types in 32-bit build, instead we change the TemplateDecl to NamedDecl, which can be used to hold the TemplateDecl and

[PATCH] D123127: [AST] Add a new TemplateName for templates found via a using declaration.

2022-04-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein reopened this revision. hokein added a comment. This revision is now accepted and ready to land. reopening it for the reland version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123127/new/ https://reviews.llvm.org/D123127

[PATCH] D123574: [clang] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective

2022-04-12 Thread Ben Barham via Phabricator via cfe-commits
bnbarham accepted this revision. bnbarham added a comment. Thanks Jan :)! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123574/new/ https://reviews.llvm.org/D123574 ___ cfe-commits mailing list

[PATCH] D121637: [PowerPC] Fix EmitPPCBuiltinExpr to emit arguments once

2022-04-12 Thread Quinn Pham via Phabricator via cfe-commits
quinnp reopened this revision. quinnp added a comment. This revision is now accepted and ready to land. Re-opening the revision so that I can update it with a fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121637/new/

[PATCH] D123574: [clang] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective

2022-04-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM, with a couple of nitpicks. If you'd rather not improve the tests that's probably fine, since the patch doesn't make them any worse. Comment at:

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123544#3446285 , @lebedev.ri wrote: > Does this not lead to non-deterministic/non-reproducible builds? It's deterministic based on the randomization seed. > I do not understand why this feature must be inflicted onto

[PATCH] D123352: [analyzer] Add FixItHint to `nullability.NullReturnedFromNonnull` and `nullability.NullableReturnedFromNonnull`

2022-04-12 Thread Moshe via Phabricator via cfe-commits
MosheBerman added a comment. Hey, bumping for feedback, please. :D Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123352/new/ https://reviews.llvm.org/D123352 ___ cfe-commits mailing list

[PATCH] D123345: Treat `std::move`, `forward`, and `move_if_noexcept` as builtins.

2022-04-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 422305. rsmith added a comment. - Add support for -fno-builtin, -ffreestanding, -fno-builtin-std-move. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123345/new/ https://reviews.llvm.org/D123345 Files:

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D123544#3446285 , @lebedev.ri wrote: > Does this not lead to non-deterministic/non-reproducible builds? > I do not understand why this feature must be inflicted onto everyone. It seems that the feature fixes the

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Does this not lead to non-deterministic/non-reproducible builds? I do not understand why this feature must be inflicted onto everyone. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123544/new/

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The Linux kernel already uses some options which deviate from standard C: `__attribute__((__gnu_inline__))`, `-ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang`. If the feature is to emulate `GCC_PLUGIN_STRUCTLEAK` in

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3445124 , @aaron.ballman wrote: > In D121556#3444837 , @void wrote: > >> In D121556#334 , @MaskRay >> wrote: >> >>> In

[PATCH] D123533: [clang][extract-api] Add support for true anonymous enums

2022-04-12 Thread Zixu Wang via Phabricator via cfe-commits
zixuw accepted this revision. zixuw added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123533/new/ https://reviews.llvm.org/D123533 ___

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123544#3445425 , @xbolva00 wrote: >>> While I agree with the security aspects of this in principle, it is not a >>> conforming behavior in C and it runs significant risk of breaking existing >>> code such that it introduces

[PATCH] D123533: [clang][extract-api] Add support for true anonymous enums

2022-04-12 Thread Daniel Grumberg via Phabricator via cfe-commits
dang updated this revision to Diff 422296. dang marked an inline comment as done. dang added a comment. Add a second anonymous enum to the test case to make sure that distinct symbols are generated for both of them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D123547: [docs] Mention that we are in the process of removing the legacy PM for the optimization pipeline

2022-04-12 Thread Arthur Eubanks 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 rG9faab435a357: [docs] Mention that we are in the process of removing the legacy PM for the… (authored by aeubanks). Repository: rG LLVM Github

[clang] 9faab43 - [docs] Mention that we are in the process of removing the legacy PM for the optimization pipeline

2022-04-12 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2022-04-12T10:47:58-07:00 New Revision: 9faab435a35720fd7c6b3aeafe22c5dfb29f36e0 URL: https://github.com/llvm/llvm-project/commit/9faab435a35720fd7c6b3aeafe22c5dfb29f36e0 DIFF:

[PATCH] D118259: [AArch64] Adjust aarch64 constrained intrinsics tests and un-XFAIL

2022-04-12 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn accepted this revision. kpn added a comment. This revision is now accepted and ready to land. I trust you on the instruction set changes. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118259/new/ https://reviews.llvm.org/D118259

[PATCH] D118259: [AArch64] Adjust aarch64 constrained intrinsics tests and un-XFAIL

2022-04-12 Thread John Brawn via Phabricator via cfe-commits
john.brawn updated this revision to Diff 422285. john.brawn retitled this revision from "[AArch64] Adjust aarch64-neon-intrinsics-constrained test and un-XFAIL" to "[AArch64] Adjust aarch64 constrained intrinsics tests and un-XFAIL". john.brawn edited the summary of this revision. john.brawn

[PATCH] D119136: [clang] Implement Change scope of lambda trailing-return-type

2022-04-12 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 422282. cor3ntin added a comment. After offline discussion with Aaron, we decided that "can not appear here" was a sufficient diagnostic, so I have implemented that. A better solution would be to track which captures fail, and collect the diagnostics to

[PATCH] D123526: [clang][ExtractAPI][NFC] Fix sed delimiter in test

2022-04-12 Thread Zixu Wang 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 rGe08c435401bc: [clang][ExtractAPI][NFC] Fix sed delimiter in test (authored by zixuw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] e08c435 - [clang][ExtractAPI][NFC] Fix sed delimiter in test

2022-04-12 Thread Zixu Wang via cfe-commits
Author: Zixu Wang Date: 2022-04-12T10:00:15-07:00 New Revision: e08c435401bc335c687b693591feafd7dbca1455 URL: https://github.com/llvm/llvm-project/commit/e08c435401bc335c687b693591feafd7dbca1455 DIFF: https://github.com/llvm/llvm-project/commit/e08c435401bc335c687b693591feafd7dbca1455.diff

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 422272. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h

[PATCH] D123300: [Clang] Enable opaque pointers by default

2022-04-12 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. @mstorsjo Thanks! I've reduced this to a crash in `-argpromotion`: efine void @caller() { call i32 @callee(ptr null) ret void } define internal void @callee(ptr %p) { ret void } Similar issue with function type mismatch. Repository: rG LLVM

  1   2   >