[PATCH] D106925: COFF/ELF: Place llvm.global_ctors elements in llvm.used if comdat is used

2021-07-28 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG828767f325b5: COFF/ELF: Place llvm.global_ctors elements in llvm.used if comdat is used (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D67429: Improve code generation for thread_local variables:

2021-07-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D67429#2566099 , @wolfgangp wrote: > Ping. Just wondering if there are any new insights on the issue reported in > PR48030 . I confirm that https://bugs.llvm.org/show_bug.cgi?id=480

[PATCH] D106899: [LLVM][NFC] Remove LLVM_ATTRIBUTE_NORETURN and use [[noreturn]] directly

2021-07-29 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. Drop llvm/include/llvm/Support/Compiler.h change. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106899/new/ https://reviews.llvm.org/D106899 ___

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. release/13.x has been created. This if merged will go into 14.x. We have plenty of time making more format changes if needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104556/new/ https://reviews.llvm.org/D104556

[PATCH] D102343: [clang][patch][FPEnv] Make Initialization of C++ globals strictfp aware

2021-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. If you upload a diff via "Upload Diff" on webUI or `arc diff 'HEAD^'`, by default the subject/summary are not updated. After editing your local commit message, please update the review as well to be synchronized. The patch changed the signature of `FunctionDecl::Create

[PATCH] D106899: [LLVM][NFC] Replace LLVM_ATTRIBUTE_NORETURN with [[noreturn]]

2021-07-29 Thread Fangrui Song 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 rG09529892b518: [Support] Remove LLVM_ATTRIBUTE_NORETURN (authored by gAlfonso-bit, committed by MaskRay). Changed prior to commit: https://reviews.

[PATCH] D106899: [Support] Remove LLVM_ATTRIBUTE_NORETURN

2021-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D106899#2913925 , @gAlfonso-bit wrote: > Still not passing (what is going on?) If you click a harbomaster URI, sometimes the builds are good x64 debian passed x64 windows passed and sometimes there may be failures appar

[PATCH] D102343: [clang][patch][FPEnv] Make Initialization of C++ globals strictfp aware

2021-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:19531 +SC_None, S.getCurFPFeatures().isFPConstrained(), +false /*isInlineSpecified*/, FD->hasPrototype(), /*ConstexprKind*/ ConstexprSpecKind::Unspecified); ---

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. My previous feeling still applies. It seems to me that the clang driver patch should be the last. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105907/new/ https://reviews.llvm.org/D105907

[PATCH] D121175: [clang] Add -Wstart-no-unknown-warning-option/-Wend-no-unknown-warning-option.

2022-03-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I am also unsure about the usefulness. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121175/new/ https://reviews.llvm.org/D121175 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-03-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/SanitizerArgs.h:67 + std::string MemtagMode = ""; + Comment at: clang/lib/Driver/SanitizerArgs.cpp:658 +Args.getLastArgValue(options::OPT_fsanitize_memtag_mode_EQ

[PATCH] D109977: LLVM Driver Multicall tool

2022-03-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Herald added a project: All. In D109977#3282545 , @MaskRay wrote: > I have tried the latest diff but > `-DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;flang;lldb;lld;compiler-rt;openmp;mlir;cross-project-tests' > -DLLVM_TOOL_LL

[PATCH] D121512: [Support] Change zlib::compress to return void

2022-03-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 414896. MaskRay retitled this revision from "[Support] zlib::compress: replace compress2 with iterative deflate" to "[Support] Change zlib::compress to return void". MaskRay edited the summary of this revision. MaskRay added a comment. Herald added subscriber

[PATCH] D121560: [clang][Opt] Add NoArgUnusedWith to not warn for unused redundant options

2022-03-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > This patch adds an example for -static-libcxx and -nostdlib. We have -static-libstdc++ but not -static-libc++. (D53238 attempts to add `-static` and name it `-static=c++stdlib`) > NoArgUnusedWith can be used for options which togethe

[PATCH] D121512: [Support] Change zlib::compress to return void

2022-03-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 415167. MaskRay marked an inline comment as done. MaskRay added a comment. Simplify CompressedSection::CompressedSection in llvm-objcopy. CompressedSection::create can be further simplified, but I'll leave that as a future change. Repository: rG LLVM Git

[PATCH] D121512: [Support] Change zlib::compress to return void

2022-03-14 Thread Fangrui Song 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 rG407c721ceb93: [Support] Change zlib::compress to return void (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D121683: Emit a warning if -xc/-xc++ is after the last input file

2022-03-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/x-args.c:1 +// RUN: %clang -fsyntax-only -Werror -xc %s +// RUN: %clang -fsyntax-only -Werror %s -xc %s The first two RUN lines are unneeded Comment at: clang/test/Driver/x-args.c:8 +

[PATCH] D121683: Emit a warning if -xc/-xc++ is after the last input file

2022-03-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:369 +def warn_drv_unused_x : Warning< + "‘-x %0’ after last input file has no effect">, + InGroup; Use ASCII punctuation marks Repository: rG LLVM Github Monorepo

[PATCH] D121683: Emit a warning if -xc/-xc++ is after the last input file

2022-03-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2316 +if (LastInputArg->getIndex() < LastXArg->getIndex()) { + Diag(clang::diag::warn_drv_unused_x) << LastXArg->getValue(); +} https://llvm.org/docs/CodingStandards.html#don-t-us

[PATCH] D121683: Emit a warning if -xc/-xc++ is after the last input file

2022-03-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/x-args.c:1 +// RUN: %clang -fsyntax-only -Werror -xc %s +// RUN: %clang -fsyntax-only -Werror %s -xc %s MaskRay wrote: > The first two RUN lines are unneeded Sorry, they are needed because of -Werror.

[PATCH] D122258: [MC][RFC] Omit DWARF unwind info if compact unwind is present for all archs

2022-03-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Previously, omitting unnecessary DWARF unwinds was only done for watchOS, I have looked at compact unwind descriptors in 2020-11 to write https://maskray.me/blog/2020-11-08-stack-unwinding#compact-unwind-descriptors I vaguely remember there is a place where DWARF unwin

[PATCH] D121868: [cc1as] Add support for emitting the build version load command for -darwin-target-variant

2022-03-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Herald added a subscriber: StephenFan. This may need a test in `clang/test/Misc/cc1as-*`. Can you add to the description what the `clang -cc1as` usage looks like? Comment at: clang/tools/driver/cc1as_main.cpp:217 +llvm::Triple TVT(A->getValue()); +

[PATCH] D120305: [Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON

2022-04-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The ScudoCUnitTest-mips64el-Test failure looks like a mips64el specific issue. FAILED: lib/scudo/standalone/tests/ScudoCUnitTest-mips64el-Test cd /b/sanitizer-x86_64-linux-qemu/build/llvm_build2_debug_mips64el_qemu/lib/scudo/standalone/tests && /b/sanitizer-x86_64-

[PATCH] D120272: [CUDA] Add driver support for compiling CUDA with the new driver

2022-04-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/cuda-openmp-driver.cu:10 +// CHECK: "nvptx64-nvidia-cuda" - "clang", inputs: ["[[INPUT:.+]]"], output: "[[PTX_SM_35:.+]]" +// CHECK: "nvptx64-nvidia-cuda" - "NVPTX::Assembler", inputs: ["[[PTX_SM_35]]"], output: "[[CU

[PATCH] D120272: [CUDA] Add driver support for compiling CUDA with the new driver

2022-04-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/cuda-openmp-driver.cu:1 +// REQUIRES: clang-driver +// REQUIRES: x86-registered-target clang-driver is unneeded. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-04-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:475 def err_stack_tagging_requires_hardware_feature : Error< - "'-fsanitize=memtag' requires hardware s

[PATCH] D121560: [clang][Opt] Add NoArgUnusedWith to not warn for unused redundant options

2022-04-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. If you need a -static-libstdc++ not subject to unused argument warning, D53238 -static=c++stdlib may be a better choice. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121560/new/ https://reviews.llvm.org/D121560 __

[PATCH] D122992: Remove wrong warning. Fix for https://github.com/llvm/llvm-project/issues/54625

2022-04-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Remove wrong warning. Fix for > https://github.com/llvm/llvm-project/issues/54625 It's sufficient to reference https://github.com/llvm/llvm-project/issues/54625 in the commit message body. For the subject line, just use some shorter IDs, e.g. `issue 54625` Repositor

[PATCH] D121984: [RISCV] Moving RVV intrinsic type related util to clang/Support

2022-04-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a subscriber: aaron.ballman. MaskRay added a comment. llvm-tblgen only depends on LLVMSupport. As analogy, clang-tblgen depending on the new clangSupport makes sense to me. Target-specific files in a `*Support` library is still a bit weird, but I can

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

2022-04-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. You can use llvm::shuffle to avoid STL impl difference Comment at: clang/lib/AST/Randstruct.cpp:160 +if (!B->isBitfieldRun()) + std::shuffle(std::begin(RandFields), std::end(RandFields), RNG); + `llvm::shuffle` to avoid Repo

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

2022-04-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Windows test is still failing after the std::shuffle => llvm::shuffle change, guess time for revert. ../../clang/unittests/AST/RandstructTest.cpp(165): error: Expected equality of these values: Expected Which is: { "lettuce", "bacon", "mayonnaise", "tomato"

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

2022-04-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/AST/Randstruct.cpp:156 + // Produce the new ordering of the elements from the Buckets. + SmallVector FinalOrder; + for (const std::unique_ptr &B : Buckets) { Comment at: clang/lib/Driver/

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

2022-04-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4244 + if (const Arg *A = Args.getLastArg(OPT_frandomize_layout_seed_file_EQ)) { +std::ifstream SeedFile(A->getValue(0)); void wrote: > MaskRay wrote: > > Why is -frandomi

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

2022-04-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4244 + if (const Arg *A = Args.getLastArg(OPT_frandomize_layout_seed_file_EQ)) { +std::ifstream SeedFile(A->getValue(0)); aaron.ballman wrote: > MaskRay wrote: > > void wr

[PATCH] D123468: [Driver] Simplify hasFlag pattern with addOptInFlag/addOptOutFlag helpers

2022-04-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: jkorous, dexonsmith. Herald added subscribers: StephenFan, hiraditya. Herald added a project: All. MaskRay requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository:

[PATCH] D123468: [Driver] Simplify hasFlag pattern with addOptInFlag/addOptOutFlag helpers

2022-04-11 Thread Fangrui Song 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 rGaefa4b60ceba: [Driver] Simplify hasFlag pattern with addOptInFlag/addOptOutFlag helpers (authored by MaskRay). Repository: rG LLVM Github Monorepo

[PATCH] D122234: [clang] Link libbitint for large division of _BitInt

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Hexagon.cpp:456 if (IncStdLib && IncDefLibs) { +addBitIntRuntime(HTC, CmdArgs, Args); + The runtime library order matters and roughly reflects a topological order. For instances, -lc is

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

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:910 -.. option:: -flegacy-pass-manager, -fno-legacy-pass-manager - This is generated by clang-tblgen. You can drop the help message from `clang/include/clang/Driver/Options.td`

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

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The relanded form still lacks the -f option testing I requested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 ___ cfe-commits mailin

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

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. 7aa8c38a9e190aea14116028c38b1d9f54cbb0b3 still uses `std::shuffle`, not incorporating the `llvm::shuffle` fixes I did. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

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

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D121556#3444015 , @void wrote: > In D121556#3444006 , @MaskRay wrote: > >> The relanded form still lacks the -f option testing I requested. > > The unit test tests the `-frandomize-layo

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

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D121556#3444131 , @void wrote: > In D121556#3444021 , @MaskRay wrote: > >> 7aa8c38a9e190aea14116028c38b1d9f54cbb0b3 >>

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

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D121556#3444260 , @void wrote: > In D121556#3444221 , @MaskRay wrote: > >> In D121556#3444131 , @void wrote: >> >>> In D121556#3444021

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

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The main user of the feature is the the Linux kernel. Does it still work with the change? If so, LG. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123544/new/ https://reviews.llvm.org/D123544 _

[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Initial support for a new target has a high standard. It needs to show decent support, otherwise it may just invite fixups which may in the end waste review resources. Showing that these files buildable is far from enough. You'd need to show that the run-time tests actu

[PATCH] D123200: [compiler-rt][CMake] Add initial support of target AVR

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Basic/Targets/AVR.cpp:380 Builder.defineMacro("__AVR"); + Builder.defineMacro("__avr"); Builder.defineMacro("__AVR__"); The clang preprocessor changes are unrelated to compiler-rt and should be contribu

[PATCH] D123567: [clang][AVR] add more builtin macros

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `avr-gcc -E -dM -xc /dev/null -dM | grep __avr` has no result, so I am not sure this is correct. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123567/new/ https://reviews.llvm.org/D123567

[PATCH] D123567: [clang][AVR] add more builtin macros

2022-04-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. In D123567#3444613 , @benshi001 wrote: > In D123567#3444579 , @MaskRay wrote: > >> `avr-gcc -E -d

[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] 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 randomization

[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] 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 l

[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] 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 l

[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 https://reviews.llvm.org/D123438/ne

[PATCH] D123655: [clang-tidy] Add portability-std-allocator-const-t check

2022-04-12 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: alexfh, aaron.ballman, njames93, whisperity. Herald added subscribers: carlosgalvezp, StephenFan, rnkovacs, xazax.hun, mgorny. Herald added a project: All. MaskRay requested review of this revision. Herald added a project: clang-tools-extra.

[PATCH] D123655: [clang-tidy] Add portability-std-allocator-const-t check

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 422579. MaskRay marked 10 inline comments as done. MaskRay edited the summary of this revision. MaskRay added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123655/new/ https://review

[PATCH] D123655: [clang-tidy] Add portability-std-allocator-const-t check

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang-tools-extra/clang-tidy/portability/PortabilityTidyModule.cpp:28 +CheckFactories.registerCheck( +"portability-std-allocator-const-t"); } sammccall wrote: > w

[PATCH] D123655: [clang-tidy] Add portability-std-allocator-const-t check

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 422619. MaskRay marked 3 inline comments as done. MaskRay edited the summary of this revision. MaskRay added a comment. Catch std::vector Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123655/new/ https://review

[PATCH] D123655: [clang-tidy] Add portability-std-allocator-const-t check

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 422640. MaskRay added a comment. improve test. mention in the diagnostic this is a deprecated libc++ extension Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123655/new/ https://reviews.llvm.org/D123655 Files:

[PATCH] D123655: [clang-tidy] Add portability-std-allocator-const-t check

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/portability-std-allocator-const.cpp:76 +void temp() { + std::vector v; + // CHECK-MESSAGES: [[#@LINE-1]]:8: warning: container sammccall wrote: > This case will always be an

[PATCH] D121560: [clang][Opt] Add NoArgUnusedWith to not warn for unused redundant options

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D121560#3448733 , @abrachet wrote: > In D121560#3439570 , @MaskRay wrote: > >> If you need a -static-libstdc++ not subject to unused argument warning, >> --start-no-unused-arguments an

[PATCH] D121560: [clang][Opt] Add NoArgUnusedWith to not warn for unused redundant options

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. FWIW I interpreted dexonsmith's resign from the patch as his ambivalence or minor objection to the direction, otherwise I'd expect a LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121560/new/ https://reviews.llvm.org/D121560 __

[PATCH] D123682: [clang-tblgen] Automatically document options values

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added subscribers: dexonsmith, aaron.ballman. MaskRay added a comment. cd clang path/to/clang-tblgen --gen-opt-docs -I ../llvm/include -I include/clang/Driver include/clang/Driver/ClangOptionDocs.td > /tmp/0 nvim -d docs/ClangCommandLineReference.rst /tmp/0 Hope a native speaker (@

[PATCH] D123744: [Driver] Change CLANG_ENABLE_OPAQUE_POINTERS_INTERNAL to affect driver default instead of cc1 default

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: opaque-pointers, rsmith, aeubanks, nikic. Herald added a subscriber: StephenFan. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald added a project: All. MaskRay requested review of this revision. Herald added a proje

[PATCH] D123744: [Driver] Change CLANG_ENABLE_OPAQUE_POINTERS_INTERNAL to affect driver default instead of cc1 default

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 422692. MaskRay edited the summary of this revision. MaskRay added a comment. Herald added a subscriber: mgorny. Add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123744/new/ https://reviews.llvm.org/D123

[PATCH] D123744: [Driver] Change CLANG_ENABLE_OPAQUE_POINTERS_INTERNAL to affect driver default instead of cc1 default

2022-04-13 Thread Fangrui Song 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 rGab8abeaf48ab: [Driver] Change CLANG_ENABLE_OPAQUE_POINTERS_INTERNAL to affect driver default… (authored by MaskRay). Changed prior to commit: htt

[PATCH] D123297: [flang][driver] Add support for -mmlir

2022-04-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:3272 MarshallingInfoStringVector>; +def mmlir : Separate<["-"], "mmlir">,Flags<[CoreOption,FC1Option,FlangOption]>, + HelpText<"Additional arguments to forward to MLIR's option processing">;

[PATCH] D123655: [clang-tidy] Add portability-std-allocator-const check

2022-04-13 Thread Fangrui Song 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 rG73da7eed8fac: [clang-tidy] Add portability-std-allocator-const check (authored by MaskRay). Changed prior to commit: https://reviews.llvm.org/D123

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

2022-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/unittests/AST/RandstructTest.cpp:40 -static std::unique_ptr makeAST(const std::string &SourceCode) { +static std::string Seed = "1234567890abcdef"; + `constexpr llvm::StringLiteral Seed = ...` or `constexpr char

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

2022-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/unittests/AST/RandstructTest.cpp:72 + + return std::tuple(AST.release(), ASTFileSeed.release()); +}; void wrote: > MaskRay wrote: > > aaron.ballman wrote: > > > void wrote: > > > > aaron.ballman wrote: > > > > >

[PATCH] D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified

2022-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. LGTM if you use `addOptOutFlag` Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:764 CmdArgs.push_back(MArchName.data()); +if (!Args.hasFlag(options::OPT_mrelax, options::OPT_mno_relax, true)) + CmdArgs.push_

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2022-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Beside the concern raised by platform maintainers: the cc1 default switch part should be made separately from the patch. This makes revert easy and leaves fewer churn to the test suite. If -fno-sized-deallocation is a better cc1 default (but not Driver's), I can make su

[PATCH] D123836: [Driver] Move Lanai IAS enabling to Generic_GCC::IsIntegratedAssemblerDefault, NFC

2022-04-15 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. Looks great! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123836/new/ https://reviews.llvm.org/D123836 _

[PATCH] D123763: [randstruct] Enforce using a designated init for a randomized struct

2022-04-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Sema/init-randomized-struct.c:30 +} __attribute__((randomize_layout)); + +struct other_test t5 = { .a = foo, .b[0] = foo }; // Okay Perhaps test an empty struct with randomize_layout and a struct with one fiel

[PATCH] D123763: [randstruct] Enforce using a designated init for a randomized struct

2022-04-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. LGTM, too. It may be worthwhile adding a file-level comment at the header. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123763/new/ https://reviews.llvm.org/D123763 ___

[PATCH] D123874: [Clang][IA] support -generate-unused-section-symbols={yes|no}

2022-04-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I wish we don't do this. https://sourceware.org/pipermail/binutils/2022-March/119940.html (`RFC: GAS: Add option to generate unused section symbols`): > This problem was fixed in the kernel (and backported by distros to their kernels if binutils was updated); it's fair

[PATCH] D123874: [Clang][IA] support -generate-unused-section-symbols={yes|no}

2022-04-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Add support to clang (-Wa,-generate-unused-section-symbols={yes|no}) and > llvm-mc. > This feature might be used by the Linux kernel. > https://lore.kernel.org/linux-toolchains/ylluqpk4cwzeh...@hirez.programming.kicks-ass.net/ > This has been supported by GNU bin

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

2022-04-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:6701 + class DXCJoinedOrSeparate : Option<["/", "-"], name, delete Comment at: clang/include/clang/Driver/Options.td:6715 + Group, Flags<[DXCOption, NoXarchOpt

[PATCH] D121868: [cc1as] Add support for emitting the build version load command for -darwin-target-variant

2022-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Darwin.h:495 + Optional getTargetVariantTriple() const override { +return TargetVariantTriple; + } llvm::

[PATCH] D124063: [LegacyPM] Rename and deprecate populateModulePassManager

2022-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: aeubanks, nikic. Herald added a reviewer: deadalnix. Herald added subscribers: ormris, StephenFan, kbarton, hiraditya, nemanjai. Herald added a reviewer: bollu. Herald added a reviewer: ctetreau. Herald added a reviewer: ctetreau. Herald added

[PATCH] D121868: [cc1as] Add support for emitting the build version load command for -darwin-target-variant

2022-04-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Darwin.h:495 + Optional getTargetVariantTriple() const override { +return TargetVariantTriple; + } bc-lee wrote: > MaskRay wrote: > > llvm::None > Do you mean to modify the method in `cl

[PATCH] D124063: [LegacyPM] Rename and deprecate populateModulePassManager

2022-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added a comment. In D124063#3461133 , @nikic wrote: > Please do not change names in the FFI API at least. It's okay to drop it > entirely, but renaming is unnecessarily hostile for FFI APIs. Why? Repos

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

2022-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Sorry but I've reverted this patch and all its fixups in c79e6007edef4b0044be93c464dc806ac687 and 0f5dbfd29ae0df215a01aff80d29255bb799fed0

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

2022-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D119136#3462579 , @aaron.ballman wrote: > In D119136#3462570 , @MaskRay wrote: > >> Sorry but I've reverted this patch and all its fixups in >> c79e6007edef4b0044be93c464dc806ac68

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

2022-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks for being willing to wait a bit and collect usage. Given current feedback, I am not going to simply undo the reverts. @cor3ntin To get one patch other folks can try: git revert -n c79e6007edef4b0044be93c464dc806ac687 git revert -n 0f5dbfd29ae0df215a01aff8

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

2022-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added subscribers: Meinersbur, MaskRay. MaskRay added a comment. In D122983#3463521 , @nemanjai wrote: > This is still causing failures when building `test-suite`: > https://lab.llvm.org/buildbot/#/builders/105/builds/24292 > > Why don't we just t

[PATCH] D123907: [HLSL] Add shader attribute

2022-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/SemaHLSL/shader_type_attr.hlsl:1 +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s -DFAIL

[PATCH] D123907: [HLSL] Add shader attribute

2022-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:6391 +where the string literal is one of: "pixel", "vertex", "geometry", "hull", + "domain", "compute", "raygeneration", "intersection", "anyhit", "closesthit", + "mis

[PATCH] D124199: [randstruct] Check final randomized layout ordering

2022-04-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/AST/Randstruct.cpp:153 - std::shuffle(std::begin(Buckets), std::end(Buckets), RNG); + llvm::shuffle(std::begin(Buckets), std::end(Buckets), RNG); This was my original fix and your reland dropped it :( =

[PATCH] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D118804#3292176 , @xbolva00 wrote: >>> Reintroducing an optimization like this with an additional check that the >>> allocation size is large enough should be valid everywhere. > > Should not be hard, could you do it? Then LGT

[PATCH] D118700: Add support to --gcc-toolchain flag for GCC compiled with --enable-version-specific-runtime-libs.

2022-02-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks for the output. Seems like `addLibStdCXXIncludePaths` is needed, but the `addPathIfExists` library path seems unnecessary? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118700/new/ https://reviews.llvm.org/D118700 ___

[PATCH] D118070: Make lld-link work in a non-MSVC shell

2022-02-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D118070#3290194 , @aganea wrote: > In D118070#3289227 , @MaskRay wrote: > >> I know that you want a place to be accessed by both clang driver and >> lld-link but I am a bit nervous ab

[PATCH] D118781: Reduce dependencies on llvm/BinaryFormat/Dwarf.h

2022-02-03 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. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118781/new/ https://reviews.llvm.org/D118781

[PATCH] D118942: [Driver][Android] Removed obsoleted --warn-shared-textrel

2022-02-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: danalbert, srhines. Herald added a subscriber: danielkiss. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. --warn-shared-textrel is ignored in ld.lld and obsoleted in GNU ld (h

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I haven't investigated the use case yet, just commented a few things. Please split the patch into 3: - BinaryFormat/ELF.h (see an inline comment) - lld/ELF - clang Comment at: lld/ELF/SyntheticSections.cpp:3842 +static constexpr char kMemtagAndroidN

[PATCH] D118948: [MTE] Add -fsanitize=memtag* and friends.

2022-02-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/ELF/SyntheticSections.cpp:3871 + return sizeof(llvm::ELF::Elf64_Nhdr) + + /* namesz */ sizeof(kMemtagAndroidNoteName) + + /* descsz */ sizeof(uint32_t); `/*namesz=*/` Comment at: l

[PATCH] D118942: [Driver][Android] Removed obsoleted --warn-shared-textrel

2022-02-04 Thread Fangrui Song 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 rG679c77ede35a: [Driver][Android] Removed obsoleted --warn-shared-textrel (authored by MaskRay). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D110663: [Driver] Support Debian multiarch style lib/clang/14.0.0/x86_64-linux-gnu runtime path and include/x86_64-linux-gnu/c++/v1 libc++ path

2022-02-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping @phosek Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110663/new/ https://reviews.llvm.org/D110663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D116753: [Driver] Default to -fno-math-errno for musl too

2022-02-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I am testing check-clang-driver and will cherry pick this into release/14.x. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116753/new/ https://reviews.llvm.org/D116753 ___ cfe-co

<    5   6   7   8   9   10   11   12   13   14   >