[PATCH] D110808: [APInt] Stop using soft-deprecated constructors and methods in clang. NFC.

2021-10-03 Thread Chris Lattner via Phabricator via cfe-commits
lattner accepted this revision. lattner added a comment. This revision is now accepted and ready to land. Thank you Jay! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110808/new/ https://reviews.llvm.org/D110808

[PATCH] D110833: [clang-format] Add ControlStatementsAndFunctionDefinitionsExceptControlMacros option to SpaceBeforeParens

2021-10-03 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3649 ``SBPO_ControlStatementsExceptForEachMacros`` remains an alias for backward compatibility. HazardyKnusperkeks wrote: > crayroud wrote: > > MyDeveloperDay wrote: >

[PATCH] D111009: Update inline builtin handling to honor gnu inline attribute

2021-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Diff 376794 builds! Let's still add a test for inline __attribute__((__always_inline__)) __attribute__((gnu_inline)) void* memcpy() {} though. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111009/new/ https://reviews.llvm.org/D111009

[PATCH] D111009: Update inline builtin handling to honor gnu inline attribute

2021-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. With Diff 376790 inline __attribute__((__always_inline__)) __attribute__((gnu_inline)) void* memcpy() {} `clang -O2` is producing undefined references to `memcpy.inline`. Please add that to the new unit tests added here. diff --git

[PATCH] D111009: Update inline builtin handling to honor gnu inline attribute

2021-10-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 376794. serge-sans-paille added a comment. + fix linkage of generated function CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111009/new/ https://reviews.llvm.org/D111009 Files: clang/lib/AST/Decl.cpp clang/lib/CodeGen/CGExpr.cpp

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-10-03 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D95168#3038531 , @MyDeveloperDay wrote: > @tiagoma are you still interested in pursuing this? I have some suggestions > > 1. I'd like to move the BraceInserter Into its own .cpp and .h files (like I > did with the

[PATCH] D111009: Update inline builtin handling to honor gnu inline attribute

2021-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. With Diff 376790, I'm seeing a similar failure to https://github.com/ClangBuiltLinux/linux/issues/1466#issue-1011472964, but from different TUs. ld.lld: error: duplicate symbol: memcpy.inline >>> defined at file.c >>>

[PATCH] D111009: Update inline builtin handling to honor gnu inline attribute

2021-10-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 376790. serge-sans-paille added a comment. + extra test case + avoid Playing with Twines + fix storage of external declaration of inline builtins + minor nits CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111009/new/

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-10-03 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: clang/include/clang/Sema/Sema.h:5120 + /// + /// \param Statement If Statement is non-null, delay reporting the + /// diagnostic until the function body is parsed, and then do a basic xbolva00 wrote: > Please adjust

[clang] a944f80 - [Clang][NFC] Fix the comment for Sema::DiagIfReachable

2021-10-03 Thread Yuanfang Chen via cfe-commits
Author: Yuanfang Chen Date: 2021-10-03T13:03:24-07:00 New Revision: a944f801cacdaa40b3869986844a6ffa08b87c19 URL: https://github.com/llvm/llvm-project/commit/a944f801cacdaa40b3869986844a6ffa08b87c19 DIFF: https://github.com/llvm/llvm-project/commit/a944f801cacdaa40b3869986844a6ffa08b87c19.diff

[PATCH] D111009: Update inline builtin handling to honor gnu inline attribute

2021-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Here's a reduced test case from the kernel. Let's add a unit test for it. const void *con_unify_unimap_p1; extern inline __attribute__((__always_inline__)) __attribute__((gnu_inline)) int memcmp(const void *p, const void *q, unsigned long size) {

[PATCH] D111009: Update inline builtin handling to honor gnu inline attribute

2021-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:4911 + if (!Clone) { +Clone = llvm::Function::Create(Fn->getFunctionType(), Fn->getLinkage(), + Fn->getAddressSpace(), given the

[PATCH] D111009: Update inline builtin handling to honor gnu inline attribute

2021-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Note: kernel tests need to have `CONFIG_FORTIFY_SOURCE=y` enabled in the config to use the fortified routines; this isn't enabled by default in an x86_64 `defconfig` build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D111009: Update inline builtin handling to honor gnu inline attribute

2021-10-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. hmm...this seems to cause a bunch of ICEs building the kernel: Global is external, but doesn't have external or weak linkage! i64 (i8*)* @strlen fatal error: error in backend: Broken module found, compilation aborted! Global is external, but doesn't have

[PATCH] D110668: [clang-cl] Accept `#pragma warning(disable : N)` for some N

2021-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a subscriber: aaron.ballman. xbolva00 added a comment. In D110668#3036361 , @thakis wrote: > In D110668#3034576 , @xbolva00 > wrote: > >> Please next time give a bit more time to potential

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-10-03 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D110216#3038826 , @mizvekov wrote: > In D110216#3038797 , @v.g.vassilev > wrote: > >> Over the years we had some interest from people but never actually got >> implemented. Here

[PATCH] D110745: Redefine deref(N) attribute family as point-in-time semantics (aka deref-at-point)

2021-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. This really needs to be properly benchmarked. Comment at: llvm/test/Transforms/InstCombine/AMDGPU/memcpy-from-constant.ll:9 ; Simple memcpy to alloca from constant address space argument. define i8 @memcpy_constant_arg_ptr_to_alloca([32 x i8]

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-10-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. This patch needs rebasing to main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95168/new/

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-10-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D110216#3038797 , @v.g.vassilev wrote: > Over the years we had some interest from people but never actually got > implemented. Here > were some > ideas

[PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2021-10-03 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D110216#3035041 , @mizvekov wrote: > In D110216#3032626 , @v.g.vassilev > wrote: > >> Thanks for working on this!How hard would it be to support: >> >> using size_t =

[clang] fb84aa2 - Fixed warnings in target/parser codes produced by -Wbitwise-instead-of-logicala

2021-10-03 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2021-10-03T15:04:01+02:00 New Revision: fb84aa2a8f52272cd0cb9510bac5404a3d4ec565 URL: https://github.com/llvm/llvm-project/commit/fb84aa2a8f52272cd0cb9510bac5404a3d4ec565 DIFF:

[PATCH] D103938: Diagnose -Wunused-value based on CFG reachability

2021-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/include/clang/Sema/Sema.h:5120 + /// + /// \param Statement If Statement is non-null, delay reporting the + /// diagnostic until the function body is parsed, and then do a basic Please adjust documentation,

[PATCH] D111009: Update inline builtin handling to honor gnu inline attribute

2021-10-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added reviewers: kees, nickdesaulniers. serge-sans-paille requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Per the GCC info page: If the function is declared 'extern', then this

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-10-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/Format.cpp:2844 + +if (Style.InsertBraces != FormatStyle::BIS_Never) + Passes.emplace_back([&](const Environment ) { Why is this just C++ (LK_Cpp is also Objective C++ and C and

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-10-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:908 + /// If set to ``BIS_Always`` will always insert braces. + /// The default is the disabled value of ``BIS_Never``. + BraceInsertionStyle InsertBraces; Please add

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-10-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @tiagoma are you still interested in pursuing this? I have some suggestions 1. I'd like to move the BraceInserter Into its own .cpp and .h files (like I did with the QualifierAlignmentFixer) 2. I'd like to move the unit tests into their own .cpp file (because I

[clang] a76355d - Unbreak hexagon-check-builtins.c due to rGb1fcca388441

2021-10-03 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2021-10-03T13:19:34+02:00 New Revision: a76355d570a96ebcb4e790bc06020f184351500d URL: https://github.com/llvm/llvm-project/commit/a76355d570a96ebcb4e790bc06020f184351500d DIFF:

[clang] f59cc95 - Reland "[Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects"

2021-10-03 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2021-10-03T13:05:09+02:00 New Revision: f59cc9542bfb461d16ad12b2cc4be4abbfd9d96e URL: https://github.com/llvm/llvm-project/commit/f59cc9542bfb461d16ad12b2cc4be4abbfd9d96e DIFF:

[clang] b1fcca3 - Fixed warnings in LLVM produced by -Wbitwise-instead-of-logical

2021-10-03 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2021-10-03T13:04:18+02:00 New Revision: b1fcca38844138d1950e1b34eb2be65b3bfc7352 URL: https://github.com/llvm/llvm-project/commit/b1fcca38844138d1950e1b34eb2be65b3bfc7352 DIFF:

[PATCH] D111000: [clang-format] allow clang-format to be passed a file of filenames so we can add a regression suite of "clean clang-formatted files" from LLVM

2021-10-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D111000#3038308 , @HazardyKnusperkeks wrote: > Basically okay, I would have made 3 commits out of it: > > 1. Add the function to clang-format > 2. The code clean up of the python script > 3. The additional file

[clang] a4933f5 - Revert "[Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects"

2021-10-03 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2021-10-03T12:47:12+02:00 New Revision: a4933f57f3f0a45e1db1075f7285f0761a80fc06 URL: https://github.com/llvm/llvm-project/commit/a4933f57f3f0a45e1db1075f7285f0761a80fc06 DIFF:

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGf62d18ff140f: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side… (authored by xbolva00).

[clang] f62d18f - [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-10-03 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2021-10-03T11:06:40+02:00 New Revision: f62d18ff140f67a8776a7a3c62a75645d8d540b5 URL: https://github.com/llvm/llvm-project/commit/f62d18ff140f67a8776a7a3c62a75645d8d540b5 DIFF:

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-10-03 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp marked 3 inline comments as done. carlosgalvezp added a comment. Hi! Are there any more issues I should address? It would be nice to get it merged since it fixes quite a few FPs. Tagging also @mgartmann as original author of this check in case he wants to comment. Anyway this