[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-09 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui updated this revision to Diff 428301. ken-matsui added a comment. Add a test file that uses the `-Wsystem-headers` option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124534/new/ https://reviews.llvm.org/D124534 Files: clang/include

[PATCH] D125272: [clang] Add -fcheck-new support

2022-05-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5984 + if (Args.hasFlag(options::OPT_fcheck_new, options::OPT_fno_check_new, false)) +CmdArgs.push_back("-fcheck-new"); See `addOptInFlag` in this file. Com

[PATCH] D124750: [MLIR] Add a utility to sort the operands of commutative ops

2022-05-09 Thread Srishti Srivastava via Phabricator via cfe-commits
srishti-pm updated this revision to Diff 428300. srishti-pm added a comment. Make the sorting strictly stable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124750/new/ https://reviews.llvm.org/D124750 Files: clang/docs/tools/clang-formatted-fil

[PATCH] D124815: [libclang] Fall back to getMainExecutable when dladdr fails

2022-05-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I think the file is linked into `libclang.so`. The resource directory is relative to`libclang.so` but may not be relative to the main executable... So getMainExecutable will be incorrect. Comment at: clang/tools/libclang/CIndexer.cpp:142 +// error

[PATCH] D124341: [clang-tidy][NFC] Replace many instances of std::string where a StringRef would suffice.

2022-05-09 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. Hi, I noticed that this patch isn't NFC. If I run clang-tidy -checks='*' empty.c -- on an empty file empty.c I get the following printouts with this patch: 'addr=address' 'arr=array' 'attr=attribute' 'buf=buffer' 'cl=client' 'cnt=count' 'col=column'

[PATCH] D125203: [PowerPC] Fix PPCISD::STBRX selection issue on A2

2022-05-09 Thread Ting Wang via Phabricator via cfe-commits
tingwang added a comment. In D125203#3502433 , @nemanjai wrote: > Why not also fix this in the front end so that we allow the builtin on the A2 > CPU as well (since it's supported)? Oh I missed that. Thank you for pointing out! Just now updated the pat

[PATCH] D125203: [PowerPC] Fix PPCISD::STBRX selection issue on A2

2022-05-09 Thread Ting Wang via Phabricator via cfe-commits
tingwang updated this revision to Diff 428294. tingwang added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Update according to Nemanja's comment: add A2 to frontend isa-v206-instructions feature list, together with test case update. Repository: rG LLVM Git

[PATCH] D121733: Clean pathnames in FileManager.

2022-05-09 Thread Paul Pluzhnikov via Phabricator via cfe-commits
ppluzhnikov updated this revision to Diff 428293. ppluzhnikov added a comment. Herald added subscribers: usaxena95, kadircet. Fix FIXME in CanonicalIncludesTests.cpp (yet another Winx64 failure). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121733/

[PATCH] D121733: Clean pathnames in FileManager.

2022-05-09 Thread Paul Pluzhnikov via Phabricator via cfe-commits
ppluzhnikov updated this revision to Diff 428275. ppluzhnikov added a comment. Fix one more Winx64 failure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121733/new/ https://reviews.llvm.org/D121733 Files: clang-tools-extra/clang-tidy/google/Upg

[PATCH] D27068: Improve string::find

2022-05-09 Thread JianYongChan via Phabricator via cfe-commits
Tangmou added inline comments. Comment at: libcxx/trunk/include/__string:557 + _CharT __f2 = *__first2; + while (true) { +__len1 = __last1 - __first1; Tangmou wrote: > Sorry for the comment after such a long time, but I have a question about > this patch.

[PATCH] D125095: [Clang][AIX] Add .ref in frontend for AIX XCOFF to support `-bcdtors:csect` linker option

2022-05-09 Thread Ting Wang via Phabricator via cfe-commits
tingwang updated this revision to Diff 428268. tingwang added a comment. Update the three test cases introduced in this patch to use opaque-pointer clang/test/CodeGen/PowerPC/aix-init-ref-null.cpp clang/test/CodeGen/PowerPC/aix-ref-static-var.cpp clang/test/CodeGen/PowerPC/aix-ref-tls_init.cpp R

[PATCH] D125157: [clang][Driver] Add more tests for riscv

2022-05-09 Thread Ben Shi 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 rG88c336d8eff0: [clang][Driver] Add more tests for riscv (authored by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[clang] 88c336d - [clang][Driver] Add more tests for riscv

2022-05-09 Thread Ben Shi via cfe-commits
Author: Ben Shi Date: 2022-05-10T02:27:56Z New Revision: 88c336d8eff03fc59a669c9ae4f2e415d95ff07c URL: https://github.com/llvm/llvm-project/commit/88c336d8eff03fc59a669c9ae4f2e415d95ff07c DIFF: https://github.com/llvm/llvm-project/commit/88c336d8eff03fc59a669c9ae4f2e415d95ff07c.diff LOG: [clan

[PATCH] D113545: [C++20] [Module] Support reachable definition initially/partially

2022-05-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113545/new/ https://reviews.llvm.org/D113545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D125162: [clang-format] fix alignment w/o binpacked args

2022-05-09 Thread cha5on via Phabricator via cfe-commits
cha5on marked 3 inline comments as done. cha5on added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:17321 + +verifyFormat(Expected, ToFormat, Alignment); + } curdeius wrote: > I don't think you need to create variables, just online the s

[PATCH] D113545: [C++20] [Module] Support reachable definition initially/partially

2022-05-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 428263. ChuanqiXu added a comment. Code Cleanups CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113545/new/ https://reviews.llvm.org/D113545 Files: clang/include/clang/AST/DeclBase.h clang/include/clang/Basic/LangOptions.def clang/include/cl

[PATCH] D125162: [clang-format] fix alignment w/o binpacked args

2022-05-09 Thread cha5on via Phabricator via cfe-commits
cha5on updated this revision to Diff 428262. cha5on added a comment. Update for review - Add and link bug report. - Remove braces per LLVM style. - Shrink down test case and add second case for direct-list-initialization alignment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D124149: [NFC] follow up code cleanup after D123837

2022-05-09 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdebd9bf3f019: [NFC] follow up code cleanup after D123837 (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124149/new/ https://reviews.

[clang] debd9bf - [NFC] follow up code cleanup after D123837

2022-05-09 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-05-10T10:01:06+08:00 New Revision: debd9bf3f0198984cb4ae66c16758e0c8eeb2e9e URL: https://github.com/llvm/llvm-project/commit/debd9bf3f0198984cb4ae66c16758e0c8eeb2e9e DIFF: https://github.com/llvm/llvm-project/commit/debd9bf3f0198984cb4ae66c16758e0c8eeb2e9e.diff LO

[PATCH] D124149: [NFC] follow up code cleanup after D123837

2022-05-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D124149#3500423 , @iains wrote: > sorry for being slow, concentrating on module initialisers! > > this LGTM (but we can still probably make the visibility code cleaner - > perhaps after we get the main functionality installe

[PATCH] D124909: Fix issues with using clangd with C++ modules

2022-05-09 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D124909#3501896 , @sammccall wrote: > I think first steps are pretty high level, to understand: > > - what the goals are (e.g. performance, easier integration with build system, > work with modules syntax features, ...) I'll s

[PATCH] D124750: [MLIR] Add a utility to sort the operands of commutative ops

2022-05-09 Thread Srishti Srivastava via Phabricator via cfe-commits
srishti-pm added a comment. In D124750#3502295 , @mehdi_amini wrote: > You're telling me "what" while I'm actually more interested in the "why" here? I'm not sure what your question is, with a "why". Let me think about this a bit. I'll get back to you.

[PATCH] D125272: [clang] Add -fcheck-new support

2022-05-09 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:2 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang -fcheck-new --target=x86_64-linux-gnu -emit-llvm -S %s -o - | opt -S -mem2reg | FileCheck %s +

[PATCH] D125272: [clang] Add -fcheck-new support

2022-05-09 Thread Pedro Falcato via Phabricator via cfe-commits
heatd added inline comments. Comment at: clang/test/Driver/clang_f_opts.c:73 - // RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s jrtc27 wrote: > Hmmm Huh, running clang-format on clang_f_opts.c m

[PATCH] D125272: [clang] Add -fcheck-new support

2022-05-09 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:1 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang -fcheck-new --target=x86_64-linux-gnu -emit-llvm -S %s -o - | opt -S -mem2reg | FileCheck %s --

[PATCH] D125272: [clang] Add -fcheck-new support

2022-05-09 Thread Pedro Falcato via Phabricator via cfe-commits
heatd updated this revision to Diff 428254. heatd added a comment. Re-did the test, deleted redundant minus line diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125272/new/ https://reviews.llvm.org/D125272 Files: clang/include/clang/Basic/La

[PATCH] D125272: [clang] Add -fcheck-new support

2022-05-09 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:2 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang -fcheck-new -emit-llvm -S %s -o - -O2 | FileCheck %s + heatd wrote: > jrtc27 wrote: > >

[PATCH] D125272: [clang] Add -fcheck-new support

2022-05-09 Thread Pedro Falcato via Phabricator via cfe-commits
heatd added inline comments. Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:2 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang -fcheck-new -emit-llvm -S %s -o - -O2 | FileCheck %s + jrtc27 wrote: > Do you really wan

[PATCH] D124750: [MLIR] Add a utility to sort the operands of commutative ops

2022-05-09 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D124750#3502228 , @srishti-pm wrote: > In D124750#3500748 , @mehdi_amini > wrote: > >> Seems like this should be added to canonicalization? The "push constants to >> the right ha

[PATCH] D124750: [MLIR] Add a utility to sort the operands of commutative ops

2022-05-09 Thread Srishti Srivastava via Phabricator via cfe-commits
srishti-pm updated this revision to Diff 428240. srishti-pm added a comment. Within constant-like ops, removed the requirement for them being sorted alphabetically. Basically, all constants will be treated as equals by the sorting algorithm and it will not distinguish between, say, `arith.consta

[PATCH] D124147: [clang][cmake] correct grammar and style inconsistency

2022-05-09 Thread Mohammed Keyvanzadeh via Phabricator via cfe-commits
VoltrexMaster updated this revision to Diff 428235. VoltrexMaster added a comment. Rebase and add upstream changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124147/new/ https://reviews.llvm.org/D124147 Files: clang/CMakeLists.txt Index: clang/CMakeLists.txt

[PATCH] D124750: [MLIR] Add a utility to sort the operands of commutative ops

2022-05-09 Thread Srishti Srivastava via Phabricator via cfe-commits
srishti-pm added a comment. In D124750#3500748 , @mehdi_amini wrote: > Seems like this should be added to canonicalization? The "push constants to > the right hand side" is there already. I think this was not added to canonicalization because we wanted

[PATCH] D124435: [X86] Always extend the integer parameters in callee

2022-05-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:3028 +extend the small integer argument in both caller and callee. Using other +value can disable this, which may improve performance and code size. + > Specifies how to handle s

[PATCH] D124736: [CodeGen] Use ABI alignment for placement new

2022-05-09 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall 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/D124736/new/ https://reviews.llvm.org/D124736 ___

[PATCH] D124736: [CodeGen] Use ABI alignment for placement new

2022-05-09 Thread Daniel Bertalan via Phabricator via cfe-commits
BertalanD updated this revision to Diff 428225. BertalanD added a comment. Use ABI alignment for allocating operator new as well. Sorry for the delay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124736/new/ https://reviews.llvm.org/D124736 File

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/test/SemaCXX/annotate-type.cpp:2 +// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -verify + +struct S1 { mboehme wrote: > aaron.ballman wrote: > > mboehme wrote: > > > aaron.ballman wrote: > > > > mboehme wrote: > >

[PATCH] D125272: [clang] Add -fcheck-new support

2022-05-09 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/test/CodeGenCXX/fcheck-new.cpp:2 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang -fcheck-new -emit-llvm -S %s -o - -O2 | FileCheck %s + Do you really want -O2 or do you

[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode

2022-05-09 Thread Kees Cook via Phabricator via cfe-commits
kees updated this revision to Diff 428224. kees edited the summary of this revision. kees added a comment. add release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125142/new/ https://reviews.llvm.org/D125142 Files: clang/docs/ClangComman

[clang] 42915e2 - [gn build] (manually) port a2f2dfde48ac (clang-fuzzer-dictionary)

2022-05-09 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2022-05-09T18:28:58-04:00 New Revision: 42915e2be231983a6476eabc059d114d60742ded URL: https://github.com/llvm/llvm-project/commit/42915e2be231983a6476eabc059d114d60742ded DIFF: https://github.com/llvm/llvm-project/commit/42915e2be231983a6476eabc059d114d60742ded.diff LO

[PATCH] D124836: [AArch64] Add support for -fzero-call-used-regs

2022-05-09 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 428218. void added a comment. - Used lists of argument registers generated from AArch64CallingConv.td. - Add more tests for floating point and SVE. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124836/new/ https:/

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 428209. python3kgae added a comment. Rebase to main for fix merge conflict. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124751/new/ https://reviews.llvm.org/D124751 Files: clang/include/clang/Basic/Dia

[PATCH] D119296: KCFI sanitizer

2022-05-09 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 428208. samitolvanen added a comment. - Handle FP, LR, and XZR register arguments in the AArch64 `llvm.kcfi.check` lowering. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119296/new/ https://reviews.llvm.

[PATCH] D125165: [Clang] Introduce clang-offload-binary tool to bundle device files

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Thanks for the comments. Comment at: clang/docs/ClangOffloadBinary.rst:8 + +.. _clang-offload-binary: + tra wrote: > Naming nit: `binary` may not be the best term for what we're trying to do > here. Perhaps something like `package`, `c

[PATCH] D125272: [clang] Add -fcheck-new support

2022-05-09 Thread Pedro Falcato via Phabricator via cfe-commits
heatd created this revision. Herald added a project: All. heatd requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Add -fcheck-new and -fno-check-new, from GCC, which make the compiler not assume pointers returned from operator new are

[PATCH] D125165: [Clang] Introduce clang-offload-binary tool to bundle device files

2022-05-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/docs/ClangOffloadBinary.rst:8 + +.. _clang-offload-binary: + Naming nit: `binary` may not be the best term for what we're trying to do here. Perhaps something like `package`, `container` or `collection` would work bet

[PATCH] D124909: Fix issues with using clangd with C++ modules

2022-05-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Hi Kugan, I apologize in advance for a frustrating and long-winded answer... There's no modules support in clangd in large part because we don't know where to start. - clangd devs so far are not experts in modules and didn't have a burning use case, I suspect you can

[PATCH] D124701: [clang] Honor __attribute__((no_builtin("foo"))) on functions

2022-05-09 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 428195. steplong added a comment. clang-formatted patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124701/new/ https://reviews.llvm.org/D124701 Files: clang/lib/CodeGen/CGExpr.cpp clang/lib/Sema/SemaDeclAttr.cpp clang/test/CodeGen/no-buil

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4267 + bool IsConstant = CLETy.isConstant(Info.Ctx); + if (!IsConstant && CLETy->isArrayType()) { +Info.FFDiag(Conv); serge-sans-paille wrote: > efriedma wrote: > > Is th

[PATCH] D125195: [asan][ARMCXXABI] Added missing asan poison array cookie hooks.

2022-05-09 Thread Roy Sundahl via Phabricator via cfe-commits
rsundahl added a comment. Adding dialog to comments made by reviewers. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2443 + // Handle poisoning the array cookie in asan + if (CGM.getLangOpts().Sanitize.has(SanitizerKind::Address) && AS == 0 && + (expr->getOperatorNew()

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

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 428188. jhuber6 added a comment. Clang format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123471/new/ https://reviews.llvm.org/D123471 Files: clang/include/clang/Basic/LangOptions.def clang/include/clang

[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword

2022-05-09 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 D124866#3501641 , @yaxunl wrote: > If we are to add `__forceinline__` as a keyword, I feel it better be a > separate patch to be cleaner. Fine with me.

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

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 428186. jhuber6 added a comment. Updating comments to desceibe usage of flags with zero size. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123471/new/ https://reviews.llvm.org/D123471 Files: clang/include/c

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

2022-05-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58 + /// Mark the entry as a global variable. + OffloadGlobalEntry = 0x0, + /// Mark the entry as a managed global variable. jhuber6 wrote: > tra wrote: > > jhuber6 wrote: > >

[PATCH] D125231: [pseudo] Compile cxx grammar.

2022-05-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Cool! High level thoughts: **Motivation** What's the win here? performance of loading/compiling the grammar? self-contained-ness? how much are we saving? Doing the compilation at build time seems likely to be good for performance, but we should have numbers. And there

[PATCH] D125265: [OpenMP] Don't include the device wrappers if -nostdinc is used

2022-05-09 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 in general. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1311 if (JA.isDeviceOffloading(Action::OFK_OpenMP) && + !Args.hasArg(options::OPT_nostdlib) && (ge

[PATCH] D125265: [OpenMP] Don't include the device wrappers if -nostdinc is used

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 428181. jhuber6 added a comment. Fix using `nostdlib` instead of `nostdinc` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125265/new/ https://reviews.llvm.org/D125265 Files: clang/lib/Driver/ToolChains/Clang

[PATCH] D125265: [OpenMP] Don't include the device wrappers if -nostdinc is used

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1311 if (JA.isDeviceOffloading(Action::OFK_OpenMP) && + !Args.hasArg(options::OPT_nostdlib) && (getToolChain().getTriple().isNVPTX() || tra wrote: > Did you mean `nost

[PATCH] D125265: [OpenMP] Don't include the device wrappers if -nostdinc is used

2022-05-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1311 if (JA.isDeviceOffloading(Action::OFK_OpenMP) && + !Args.hasArg(options::OPT_nostdlib) && (getToolChain().getTriple().isNVPTX() || Did you mean `nostdinc` ? Reposit

[PATCH] D125256: [OpenMP] Add `__CUDA_ARCH__` definition when offloading with OpenMP

2022-05-09 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 accepted this revision. tianshilei1992 added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125256/new/ https://reviews.llvm.org/D125256 _

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

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58 + /// Mark the entry as a global variable. + OffloadGlobalEntry = 0x0, + /// Mark the entry as a managed global variable. tra wrote: > jhuber6 wrote: > > tra wrote: > >

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

2022-05-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDARuntime.h:58 + /// Mark the entry as a global variable. + OffloadGlobalEntry = 0x0, + /// Mark the entry as a managed global variable. jhuber6 wrote: > tra wrote: > > jhuber6 wrote: > >

[PATCH] D125265: [OpenMP] Don't include the device wrappers if -nostdinc is used

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, ABataev, tra. Herald added subscribers: guansong, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald add

[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode

2022-05-09 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. Worth mentioning the deprecation plans in `clang/docs/ReleaseNotes.rst` and updaing the commit message+description on phab? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D12514

[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode

2022-05-09 Thread Kees Cook via Phabricator via cfe-commits
kees updated this revision to Diff 428173. kees added a comment. This revision is now accepted and ready to land. update with suggestions - Add FIXME comment with deprecation schedule - Report deprecation warning when -enable flag is used Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D125259: [C11] Diagnose unreachable generic selection associations

2022-05-09 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision. tahonermann added a comment. Looks good to me! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125259/new/ https://reviews.llvm.org/D125259 ___ cfe-commits mailing list

[PATCH] D125259: [C11] Diagnose unreachable generic selection associations

2022-05-09 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. One minor preference, otherwise LGTM. Comment at: clang/lib/Sema/SemaExpr.cpp:1702 + + if (Reason) +Diag(Types[i]->getTypeLoc().getBeginLoc(), --

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-09 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4267 + bool IsConstant = CLETy.isConstant(Info.Ctx); + if (!IsConstant && CLETy->isArrayType()) { +Info.FFDiag(Conv); efriedma wrote: > Is the "isArrayType()" ch

[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword

2022-05-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 428167. yaxunl marked 2 inline comments as done. yaxunl added a comment. removed diagnostics and added more tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124866/new/ https://reviews.llvm.org/D124866 Files: clang/docs/ReleaseNotes.rst clang

[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword

2022-05-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 4 inline comments as done. yaxunl added a comment. In D124866#3501203 , @aaron.ballman wrote: >> `__forceinline__` does not have the issue as `__noinline__` has since it is >> not a GCC attribute. The current CUDA/HIP implementation of >>

[PATCH] D124836: [AArch64] Add support for -fzero-call-used-regs

2022-05-09 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. @peterwaller-arm @sdesmalen Could you comment on what is considered the canonical way to zero Arm registers? Is `mov x1, #0` the way or `mov x1, xzr` or some other way? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124836/new

[PATCH] D124836: [AArch64] Add support for -fzero-call-used-regs

2022-05-09 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: llvm/test/CodeGen/AArch64/zero-call-used-regs.ll:233 + +attributes #0 = { mustprogress nofree norecurse nosync nounwind readnone willreturn uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-p

[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword

2022-05-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D124866#3501203 , @aaron.ballman wrote: >>> Should we do `__forceinline__` at the same time so that there's consistency? > > Primarily to reduce user confusion. It's kind of weird for `__noinline__` to > be a keyword and `__force

[PATCH] D125259: [C11] Diagnose unreachable generic selection associations

2022-05-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: tahonermann, jyknight, eli.friedman, clang-language-wg. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. The controlling expression of a `_Generic` selection expression

[PATCH] D125258: [docs][pp-trace] Remove FileNotFound callback

2022-05-09 Thread Tommy Chiang via Phabricator via cfe-commits
oToToT created this revision. oToToT added a reviewer: jansvoboda11. Herald added a project: All. oToToT requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. `FileNotFound` preprocessor callback is removed in D119708

[PATCH] D125006: [pseudo] Support parsing variant target symbols.

2022-05-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Very nice! And change to compiled grammar size is small. Would including *every* nonterminal as a start symbol would blow the size up a bit? This would eliminate some complexity in the in

[PATCH] D125256: [OpenMP] Add __CUDA_ARCH__ definition when offloading with OpenMP

2022-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tra, tianshilei1992. Herald added subscribers: mattd, gchakrabarti, asavonic, guansong, yaxunl, jholewinski. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. H

[PATCH] D125167: [WIP] Fix member access of anonymous struct/union fields in C

2022-05-09 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Consider adding an AST test; that was something that came up in my patch https://reviews.llvm.org/D95408. > I'm pushing back on the WG14 lists to see if this is a good opport

[PATCH] D124790: [HLSL] Enable half type for hlsl.

2022-05-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 428153. python3kgae added a comment. Add Sema test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124790/new/ https://reviews.llvm.org/D124790 Files: clang/include/clang/Driver/Options.td clang/lib/Bas

[PATCH] D95408: [Sema][C] members of anonymous struct inherit QualType

2022-05-09 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers abandoned this revision. nickdesaulniers added a comment. Herald added a project: All. Prefer https://reviews.llvm.org/D125167. Comment at: clang/test/AST/ast-dump-decl.c:132 +// CHECK: IndirectFieldDecl{{.*}} Test48755Const 'int' +// CHECK-NEXT: Field{{.*}} '

[PATCH] D125254: [clang] Allow all string types for all attribute(format) styles

2022-05-09 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier created this revision. fcloutier added reviewers: NoQ, ahatanak, aaron.ballman. Herald added a project: All. fcloutier requested review of this revision. Herald added a project: clang. It's not unusual to see functions like this: void log(const char *fmt, ...) { va_list ap;

[PATCH] D120301: clang-tools-extra: Make test dependency on LLVMHello optional

2022-05-09 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: clang-tools-extra/test/CMakeLists.txt:107 + if (TARGET LLVMHello) +list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) + endif() Shouldn't this be LLVMHello? Repository: rG LLVM Github Monorepo CHAN

[PATCH] D122766: [clang] Add the flag -ffile-reproducible

2022-05-09 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 428139. ayzhao added a comment. Clarify --fno-file-reproducible HelpText Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122766/new/ https://reviews.llvm.org/D122766 Files: clang/include/clang/Basic/LangOptions

[PATCH] D122766: [clang] Add the flag -ffile-reproducible

2022-05-09 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. I still wish this could just be the default behavior, but this flag seems a good compromise. LGTM (but please wait for Aaron too) Comment at: clang/include/clang/Driver/Options

[PATCH] D124974: [clang] Include clang config.h in LangStandards.cpp

2022-05-09 Thread Cassie Jones via Phabricator via cfe-commits
porglezomp added a comment. Unless anyone has an idea about how to test this, I'm going to commit this without adding a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124974/new/ https://reviews.llvm.org/D124974 _

[PATCH] D125195: [asan][ARMCXXABI] Added missing asan poison array cookie hooks.

2022-05-09 Thread Julian Lettner via Phabricator via cfe-commits
yln added inline comments. Comment at: compiler-rt/lib/asan/asan_poisoning.cpp:262 *reinterpret_cast(s) = kAsanArrayCookieMagic; + // The ARM64 cookie has a second "elementSize" entry so poison it as well + #if SANITIZER_ARM64 yln wrote: > yln wrote: > > Nit

[PATCH] D125195: [asan][ARMCXXABI] Added missing asan poison array cookie hooks.

2022-05-09 Thread Julian Lettner via Phabricator via cfe-commits
yln added inline comments. Comment at: compiler-rt/lib/asan/asan_poisoning.cpp:262 *reinterpret_cast(s) = kAsanArrayCookieMagic; + // The ARM64 cookie has a second "elementSize" entry so poison it as well + #if SANITIZER_ARM64 yln wrote: > Nitpicking extreme

[PATCH] D125195: [asan][ARMCXXABI] Added missing asan poison array cookie hooks.

2022-05-09 Thread Julian Lettner via Phabricator via cfe-commits
yln added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2453 +CGF.Builder.CreateCall(F, cookie.getRawPointer(CGF)); + } This code is very similar to what we have in `ItaniumCXXABI::InitializeArrayCookie()`. Can we try to extract a loca

[PATCH] D125195: [asan][ARMCXXABI] Added missing asan poison array cookie hooks.

2022-05-09 Thread Roy Sundahl via Phabricator via cfe-commits
rsundahl added reviewers: vitalybuka, kcc. rsundahl added a comment. Adding Vitaly Buka and Kostya Serebryany (sanitizer maintainers). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125195/new/ https://reviews.llvm.org/D125195 _

[PATCH] D125195: [asan][ARMCXXABI] Added missing asan poison array cookie hooks.

2022-05-09 Thread Dan Liew via Phabricator via cfe-commits
delcypher added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:2443 + // Handle poisoning the array cookie in asan + if (CGM.getLangOpts().Sanitize.has(SanitizerKind::Address) && AS == 0 && + (expr->getOperatorNew()->isReplaceableGlobalAllocationFunction(

[PATCH] D124038: [clang] Prevent folding of non-const compound expr

2022-05-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4267 + bool IsConstant = CLETy.isConstant(Info.Ctx); + if (!IsConstant && CLETy->isArrayType()) { +Info.FFDiag(Conv); Is the "isArrayType()" check here necessary? CHANG

[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword

2022-05-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/CodeGenCUDA/noinline.cu:1 +// optimization is needed, otherwise by default all functions have noinline. + aaron.ballman wrote: > I've asked @erichkeane to weigh in on whether there's a better approach here

[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword

2022-05-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: erichkeane. aaron.ballman added a comment. In D124866#3501181 , @yaxunl wrote: > In D124866#3500761 , @aaron.ballman > wrote: > >> Should we do `__forceinline__` at the same time

[PATCH] D122766: [clang] Add the flag -ffile-reproducible

2022-05-09 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao updated this revision to Diff 428121. ayzhao marked 4 inline comments as done. ayzhao added a comment. code review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122766/new/ https://reviews.llvm.org/D122766 Files: clang/include/cl

[PATCH] D125078: Implement a feature to show line numbers in diagnostics

2022-05-09 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D125078#3501061 , @cjdb wrote: > I'm in favour of this, but @rsmith warned me a little while ago that we > mightn't be able to have stuff like this on by default because scripts > probably depend on specific compiler output.

[PATCH] D124776: [SPIR-V] Allow setting SPIR-V version via target triple

2022-05-09 Thread Thorsten via Phabricator via cfe-commits
tschuett added inline comments. Comment at: llvm/docs/SPIRVUsage.rst:14 + +The SPIR-V target provides code generation for the SPIR-V binary format desribed +in `the official SPIR-V specification `_. described CHANGES

[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword

2022-05-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D124866#3500761 , @aaron.ballman wrote: > Should we do `__forceinline__` at the same time so that there's consistency? `__forceinline__` does not have the issue as `__noinline__` has since it is not a GCC attribute. The curre

[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode

2022-05-09 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. It looks like clang still produces meaningful diagnostics from `-Wuninitialized` and `-Wsometimes-uninitialized` even with `-ftrivial-auto-var-init=zero`. Same for `[clang-

[PATCH] D125142: [clang][auto-init] Remove -enable flag for "zero" mode

2022-05-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Also, you should definitely add some release notes for this change. Comment at: clang/include/clang/Driver/Options.td:2700-2701 MarshallingInfoEnum, "Uninitialized">; def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-ini

[PATCH] D124776: [SPIR-V] Allow setting SPIR-V version via target triple

2022-05-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 428118. Anastasia added a comment. - Added v1.5. - Changed wording in documentation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124776/new/ https://reviews.llvm.org/D124776 Files: llvm/docs/SPIRVUsage.rst llvm/docs/UserGuides.rst llvm/in

[PATCH] D125243: [OpenCL] Make -cl-ext a driver option

2022-05-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: svenvh. Herald added subscribers: Naghasan, ebevhan, yaxunl. Herald added a project: All. Anastasia requested review of this revision. Herald added a subscriber: MaskRay. For generic targets such as SPIR-V clang sets all OpenCL extension

  1   2   3   >