[PATCH] D118879: [clang-format] Avoid merging macro definitions.

2022-02-02 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/42087. Repository: rG LLVM

[PATCH] D118876: [HIPSPV] Fix literals are mapped to Generic address space

2022-02-02 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki created this revision. Herald added a subscriber: yaxunl. linjamaki edited the summary of this revision. Herald added a subscriber: Anastasia. linjamaki published this revision for review. linjamaki added reviewers: Anastasia, yaxunl. Herald added a project: clang. Herald added a subscrib

[PATCH] D112353: [bazel] fixes for windows build

2022-02-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D112353#3291381 , @GMNGeoffrey wrote: > If you'd like to rebase this and see what's still outstanding, I can take > another look :-) Thanks for getting around to this. I rebased the patch and reran the build. It seems the new

[PATCH] D118875: [compiler-rt][builtins] build the macOS compiler-rt built-ins with Mac Catalyst support

2022-02-02 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: ravikandhadai, dexonsmith. Herald added subscribers: ributzka, mgorny, dberris. arphaman requested review of this revision. This patch extends compiler-rt's cmake config to build macOS builtins with both macOS and Mac Catalyst support. Thi

[PATCH] D118690: [analyzer] Prevent misuses of -analyze-function

2022-02-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal reopened this revision. steakhal added a comment. This revision is now accepted and ready to land. It broke some bots. I had to revert it in minutes it landed. Yet to be investigated how did it break something. Mind that I dont have any experience with objC. Repository: rG LLVM Githu

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-02 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3289073 , @nickdesaulniers wrote: > Diff 405119 still kernel panics for me. This is building the linux-next tree. > > $ qemu-system-x86_64 --version > QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-1) Works now. PTAL

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-02 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 405531. void added a comment. Make sure we're zeroing the registers in the return block, not just some random block. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 File

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

2022-02-02 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D118781#3291801 , @MaskRay wrote: > $ clang++ -E -Iinclude -I../llvm/include > ../llvm/lib/Transforms/Scalar/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc > -l > before: 10978519 > after: 11245451 > > The nu

[PATCH] D118873: [clang-format] Revert a feature in RemoveBracesLLVM

2022-02-02 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: curdeius, MyDeveloperDay, HazardyKnusperkeks. owenpan added a project: clang-format. owenpan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Revert the handling of a single-statement b

[PATCH] D118428: [clang-cl] Support the /JMC flag

2022-02-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/lib/CodeGen/CommandFlags.cpp:462 + static cl::opt EnableJMCInstrument( + "enable-jmc-instrument", + cl::desc("Instrument functions with a call to __CheckForDebuggerJustMyCode"), ychen wrote: > hans wrote:

[PATCH] D118428: [clang-cl] Support the /JMC flag

2022-02-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 405520. ychen added a comment. - Remove a file that is included by accident. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118428/new/ https://reviews.llvm.org/D118428 Files: clang/docs/ReleaseNotes.rst clan

[PATCH] D117603: [clang] Don't typo-fix an expression in a SFINAE context

2022-02-02 Thread Konstantin Varlamov via Phabricator via cfe-commits
var-const added a comment. @Quuxplusone Now that it's landed, do we still need `__workaround_52970` in libc++? (see https://github.com/llvm/llvm-project/blob/167b623a6af26802af47f455aaa3806faaa9da9e/libcxx/include/__concepts/class_or_enum.h#L28-L30) Repository: rG LLVM Github Monorepo CHANG

[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.

2022-02-02 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SmartPtrArrayMismatchCheck.h:40 + /// in this class. + virtual SmartPtrClassMatcher getSmartPointerClassMatcher() const = 0; + There's only one implementation of this ab

[PATCH] D118869: [clang-format] Non-latin comment prefix whitespace

2022-02-02 Thread ksyx via Phabricator via cfe-commits
ksyx added subscribers: byronhe, CoelacanthusHex. ksyx added a comment. Related discussion: https://reviews.llvm.org/D92257#3252060 Proposed by @byronhe cc @CoelacanthusHex Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118869/new/ https://reviews

[PATCH] D118869: [clang-format] Non-latin comment prefix whitespace

2022-02-02 Thread ksyx via Phabricator via cfe-commits
ksyx created this revision. ksyx added reviewers: HazardyKnusperkeks, MyDeveloperDay, curdeius. ksyx requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This commit changes the condition of requiring comment to start with alphabet characters to

[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] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2022-02-02 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. @aaron.ballman - can this land for Clang14, or does it have wait for 15? Are there any other reviewers that can approve this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54943/new/ https://reviews.llvm.org/D54943 __

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-02-02 Thread Devin Jeanpierre via Phabricator via cfe-commits
devin.jeanpierre added a comment. W! Thank you for submitting, and thanks everyone for the kind and helpful reviews. 😀 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114732/new/ https://reviews.llvm.org/D114732

[PATCH] D118428: [clang-cl] Support the /JMC flag

2022-02-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: llvm/lib/CodeGen/JMCInstrumenter.cpp:145 + LLVMContext &Ctx = M.getContext(); + bool UseX86FastCall = Triple(M.getTargetTriple()).getArch() == Triple::x86; + ychen wrote: > ychen wrote: > > hans wrote: > > > I still worry

[clang] 19aa2db - [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-02-02 Thread Richard Smith via cfe-commits
Author: Devin Jeanpierre Date: 2022-02-02T17:42:20-08:00 New Revision: 19aa2db023c0128913da223d4fb02c474541ee22 URL: https://github.com/llvm/llvm-project/commit/19aa2db023c0128913da223d4fb02c474541ee22 DIFF: https://github.com/llvm/llvm-project/commit/19aa2db023c0128913da223d4fb02c474541ee22.di

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-02-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG19aa2db023c0: [clang] Mark `trivial_abi` types as "trivially relocatable". (authored by devin.jeanpierre, committed by rsmith). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Florian Mayer via Phabricator via cfe-commits
fmayer added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:842 + if (!Args.hasArg(options::OPT_shared)) +SharedRuntimes.push_back("hwasan-preinit"); } pcc wrote: > morehouse wrote: > > eugenis wrote: > > > pcc wrote: >

[PATCH] D118511: Add a warning for not packing non-POD members in packed structs

2022-02-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:2029-2036 // The align if the field is not packed. This is to check if the attribute // was unnecessary (-Wpacked)

[PATCH] D117616: GCC ABI Compatibility: Preserve alignment of non-pod members in packed structs

2022-02-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1891 + llvm::Triple Target = Context.getTargetInfo().getTriple(); + bool FieldPacked = (Packed && (!FieldClass || FieldClass->isPOD() || + Context.getLangOpts().getCl

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2022-02-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Alternative fix landed in rG30baa5d2a450d5e302d8cba3fc7a26a59d4b7ae1 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103395/new/ https://reviews.llvm.org/

[clang] 30baa5d - PR45879: Fix assert when constant evaluating union assignment.

2022-02-02 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2022-02-02T17:02:47-08:00 New Revision: 30baa5d2a450d5e302d8cba3fc7a26a59d4b7ae1 URL: https://github.com/llvm/llvm-project/commit/30baa5d2a450d5e302d8cba3fc7a26a59d4b7ae1 DIFF: https://github.com/llvm/llvm-project/commit/30baa5d2a450d5e302d8cba3fc7a26a59d4b7ae1.diff

[PATCH] D118862: [clang][driver] add clang driver support for emitting macho files with two build version load commands

2022-02-02 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: ravikandhadai, egorzhdan, dexonsmith, steven_wu. Herald added subscribers: dang, ributzka. arphaman requested review of this revision. Herald added a project: clang. This patch extends clang driver to pass the right flags to the clang front

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

2022-02-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen accepted this revision. ychen added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118804/new/ https://reviews.llvm.org/D118804 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

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

2022-02-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D118804#3292263 , @jyknight wrote: > In D118804#3292185 , @ychen wrote: > >> I don't see why the patch is wrong... It uses the target/platform-specific >> `NewAlign`. If the platform all

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2022-02-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:1549 SubobjectDesignator Designator; +const Expr *LExpr = nullptr; bool IsNullPtr : 1; I don't think this is an appropriate approach. A source expression is fundamentally not

[PATCH] D118858: [OpenMP] Don't use bound architecture when checking cache on the host

2022-02-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. @thakis could you confirm that this works on your machine? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118858/new/ https://reviews.llvm.org/D118858 ___ cfe-commits mailing list

[PATCH] D118858: [OpenMP] Don't use bound architecture when checking cache on the host

2022-02-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added a reviewer: thakis. Herald added subscribers: guansong, yaxunl. jhuber6 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. When we are creating jobs for

[PATCH] D118311: [Clang][ModuleMap] Add conditional parsing via requires block declaration

2022-02-02 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese updated this revision to Diff 405482. Bigcheese added a comment. - Fixed documentation typo. - Made missing '{' diagnostic more clear. - Use `ModuleMapParser::skipUntil`. Emitting an actual fixup is kind of difficult from `ModuleMapParser` because the way it handles tokens makes it har

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

2022-02-02 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D118804#3292185 , @ychen wrote: > I don't see why the patch is wrong... It uses the target/platform-specific > `NewAlign`. If the platform allows customized memory allocation that assumes > weak alignment, it should set the

[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] D110280: [modules] Fix IRGen assertion on accessing ObjC ivar inside a method.

2022-02-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D110280#3289431 , @SharonXu wrote: > Hi @vsapsai, I checked out the apple `stable/20211026` llvm-project branch > at https://github.com/apple/llvm-project/tree/stable/20211026, and ran > check-clang locally, but the tested a

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

2022-02-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D118804#3292179 , @MaskRay wrote: > In D118804#3292176 , @xbolva00 > wrote: > Reintroducing an optimization like this with an additional check that the allocation size is l

[PATCH] D118855: [modules] Add a flag for TagDecl if it was a definition demoted to a declaration.

2022-02-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Relevant discussion on how this is used in Swift is in https://github.com/apple/swift/pull/41144 Also it contains links to various [successful] test runs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118855/new/ https://

[PATCH] D118855: [modules] Add a flag for TagDecl if it was a definition demoted to a declaration.

2022-02-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: rsmith, v.g.vassilev, jansvoboda11. Herald added a subscriber: ributzka. vsapsai requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For redeclaration chains we maintain an invariant of ha

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

2022-02-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Can you also confirm that there is no similar related to op new? Yes, we “can” this assumption by removing it but.. there should be consensus whether just this code is problematic or problem is bigger (as we use NewAlign..) Repository: rG LLVM Github Monorepo CHAN

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

2022-02-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. I don't see why the patch is wrong... It uses the target/platform-specific `NewAlign`. If the platform allows customized memory allocation that assumes weak alignment, it should set the `NewAlign` accordingly, no? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D118511: Add a warning for not packing non-POD members in packed structs

2022-02-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 405468. dblaikie added a comment. - Create a separate sub-warning flag of -Wpacked (-Wpacked-non-pod), in case you're just interested in the ABI breaks here - Warn only when this produces a different alignment requirement for the field Repository: rG LLV

[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] D118804: Revert "[Clang] Propagate guaranteed alignment for malloc and others"

2022-02-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> 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 LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D117924: [compiler_rt] Add a seperate runtime for Mac Catalyst

2022-02-02 Thread Byoungchan Lee via Phabricator via cfe-commits
bc-lee updated this revision to Diff 405461. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117924/new/ https://reviews.llvm.org/D117924 Files: clang/lib/Driver/ToolChains/Darwin.cpp clang/test/Driver/darwin-sanitizer-ld.c compiler-rt/cmake/bui

[PATCH] D117924: [compiler_rt] Add a seperate runtime for Mac Catalyst

2022-02-02 Thread Byoungchan Lee via Phabricator via cfe-commits
bc-lee added a comment. Some changes in this patch were applied as https://reviews.llvm.org/D118759, so I'm re-uploading this patch to get rid of merge conflicts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117924/new/ https://reviews.llvm.org/

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-02-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. gentle ping.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115844/new/ https://reviews.llvm.org/D115844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D118850: [PS4] Make __BIGGEST_ALIGNMENT__ 32bytes

2022-02-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen created this revision. ychen added a reviewer: probinson. ychen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. So it matches `__STDCPP_DEFAULT_NEW_ALIGNMENT__`. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D11885

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2022-02-02 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Hello, I know I'm not helping move this patch along because I'm not the right person to review this. However, I'd like to kindly reiterate that fixing this would be helpful for libc++. I just had to re-XFAIL one of our tuple tests because of this :-) Repository: rG

[PATCH] D117929: [XRay] Add support for RISCV

2022-02-02 Thread Ashwin Poduval via Phabricator via cfe-commits
ashwin98 added inline comments. Comment at: llvm/test/CodeGen/RISCV/xray-attribute-instrumentation.ll:1-2 +; RUN: llc -mtriple=riscv32-unknown-elf -mattr=+d -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK %s +; RUN: llc -mtriple=riscv32-unknown-linux-gnu -mattr=+d -v

[PATCH] D117929: [XRay] Add support for RISCV

2022-02-02 Thread Ashwin Poduval via Phabricator via cfe-commits
ashwin98 updated this revision to Diff 405432. ashwin98 added a comment. Updated the riscv64 sled function to get rid of the to fix the addition/shift operations and get rid of the superfluous slli and srli instructions. Cut out unnecessary comments in the ASM Printer. CHANGES SINCE LAST ACTIO

[PATCH] D118734: Added early exit for defaulted FunctionDecls. This prevents matching of defaulted comparison operators. fixes #53355

2022-02-02 Thread Fabian Keßler via Phabricator via cfe-commits
Febbe abandoned this revision. Febbe added a comment. Updated in https://reviews.llvm.org/D118847 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118734/new/ https://reviews.llvm.org/D118734 ___ cfe-commit

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:842 + if (!Args.hasArg(options::OPT_shared)) +SharedRuntimes.push_back("hwasan-preinit"); } morehouse wrote: > eugenis wrote: > > pcc wrote: > > > Shouldn't it be

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:842 + if (!Args.hasArg(options::OPT_shared)) +SharedRuntimes.push_back("hwasan-preinit"); } eugenis wrote: > pcc wrote: > > Shouldn't it be added to `HelperS

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 405435. morehouse marked 3 inline comments as done. morehouse added a comment. - Make __local_hwasan_preinit static. - Use HelperStaticRuntimes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118171/new/ https

[PATCH] D118847: Added early exit for defaulted FunctionDecls. This prevents matching of defaulted comparison operators. fixes llvm#53355

2022-02-02 Thread Fabian Keßler via Phabricator via cfe-commits
Febbe created this revision. Herald added a subscriber: carlosgalvezp. Febbe requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D118847 Files: clang-tools-extra/cla

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. The driver seems to always add sanitizer runtimes first on the linker command line. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:842 + if (!Args.hasArg(options::OPT_shared)) +SharedRuntimes.push_back("hwasan-preinit"); } ---

[PATCH] D118690: [analyzer] Prevent misuses of -analyze-function

2022-02-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:523 +"-analyze-function=foobar\n"; + } +} NoQ wrote: > NoQ wrote: > > 🥺 > You can use this for a test, should be in an .m file: > ```lang=objc > @in

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. What guarantee do we have that the `__hwasan_init` .preinit_array entry will be placed before the user's .preinit_array entries? Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:842 + if (!Args.hasArg(options::OPT_shared)) +SharedRuntime

[PATCH] D118690: [analyzer] Prevent misuses of -analyze-function

2022-02-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:523 +"-analyze-function=foobar\n"; + } +} NoQ wrote: > 🥺 You can use this for a test, should be in an .m file: ```lang=objc @interface MyClass -(int

[PATCH] D118632: [WIP][Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6023 + // llvm::OpenMPIRBuilder::InsertPointTy AllocaIP( + // CGF.AllocaInsertPt->getParent(), CGF.AllocaInsertPt->getIterator()); + leftover Comment at: clan

[PATCH] D118690: [analyzer] Prevent misuses of -analyze-function

2022-02-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:523 +"-analyze-function=foobar\n"; + } +} 🥺 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118690/ne

[PATCH] D118844: [clang-format] Avoid adding space after the name of a function-like macro when the name is a keyword.

2022-02-02 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/31086. Before the code: #d

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

2022-02-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. $ clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Transforms/Scalar/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l before: 10978519 after: 11245451 The number of lines is now larger? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-02 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3289073 , @nickdesaulniers wrote: > Diff 405119 still kernel panics for me. This is building the linux-next tree. > > $ qemu-system-x86_64 --version > QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-1) Okay. I can rep

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a subscriber: pcc. eugenis added a comment. LGTM, but I'd like @pcc to take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118171/new/ https://reviews.llvm.org/D118171 ___ cfe-commit

[PATCH] D113359: [Libomptarget][WIP] Introduce VGPU Plugin

2022-02-02 Thread Atmn Patel via Phabricator via cfe-commits
atmnpatel added inline comments. Comment at: openmp/libomptarget/test/CMakeLists.txt:23 +continue() + ENDIF() string(STRIP "${CURRENT_TARGET}" CURRENT_TARGET) jdoerfert wrote: > This is to disable the tests? Not sure this is a good way though. For one, >

[PATCH] D113359: [Libomptarget][WIP] Introduce VGPU Plugin

2022-02-02 Thread Atmn Patel via Phabricator via cfe-commits
atmnpatel updated this revision to Diff 405407. atmnpatel marked 7 inline comments as done. atmnpatel added a comment. updates Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113359/new/ https://reviews.llvm.org/D113359 Files: clang/lib/Basic/Targ

[PATCH] D118428: [clang-cl] Support the /JMC flag

2022-02-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen updated this revision to Diff 405406. ychen marked an inline comment as done. ychen added a comment. - Address feeback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118428/new/ https://reviews.llvm.org/D118428 Files: clang/docs/ReleaseNote

[PATCH] D118428: [clang-cl] Support the /JMC flag

2022-02-02 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added inline comments. Comment at: llvm/lib/CodeGen/CommandFlags.cpp:462 + static cl::opt EnableJMCInstrument( + "enable-jmc-instrument", + cl::desc("Instrument functions with a call to __CheckForDebuggerJustMyCode"), hans wrote: > ychen wrote:

[clang] e692654 - The methods visited for a special class must have an identifier.

2022-02-02 Thread Zahira Ammarguellat via cfe-commits
Author: Zahira Ammarguellat Date: 2022-02-02T13:12:33-08:00 New Revision: e692654a4dc017b0bddc4366b328dd6d68d2740a URL: https://github.com/llvm/llvm-project/commit/e692654a4dc017b0bddc4366b328dd6d68d2740a DIFF: https://github.com/llvm/llvm-project/commit/e692654a4dc017b0bddc4366b328dd6d68d2740a

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

2022-02-02 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. > For C++, I confess I have some problems interpreting this sentence: > > (https://eel.is/c++draft/cpp.predefined) > >> `__STDCPP_­DEFAULT_­NEW_­ALIGNMENT__`: An integer literal of type >> std::size_t whose value is the alignment guaranteed by a call to operator >> new

[PATCH] D117391: [AST] Ignore implicit nodes in CastExpr::getConversionFunction

2022-02-02 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added inline comments. Comment at: clang/lib/AST/Expr.cpp:1949-1950 if (E->getCastKind() == CK_ConstructorConversion) return cast(SubExpr)->getConstructor(); davrec wrote: > I think the errors prove we should fall back to the most conservati

[PATCH] D118632: [WIP][Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-02 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 405393. tianshilei1992 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118632/new/ https://reviews.llvm.org/D118632 Files: clang/include/clang/AST/StmtOpenMP.h clang/lib/AST/St

[PATCH] D116637: [Clang][Sema][OpenMP] Sema support for `atomic compare`

2022-02-02 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D116637#3291608 , @jdoerfert wrote: > In D116637#3284823 , > @tianshilei1992 wrote: > >> In D116637#3284773 , @ABataev >> wrote: >> >>

[PATCH] D116637: [Clang][Sema][OpenMP] Sema support for `atomic compare`

2022-02-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D116637#3284823 , @tianshilei1992 wrote: > In D116637#3284773 , @ABataev wrote: > >> sema and parsing tests? > > Tests will be in the patch for code gen. sema and parsing tests are

[PATCH] D117391: [AST] Ignore implicit nodes in CastExpr::getConversionFunction

2022-02-02 Thread David Rector via Phabricator via cfe-commits
davrec added inline comments. Comment at: clang/lib/AST/Expr.cpp:1949-1950 if (E->getCastKind() == CK_ConstructorConversion) return cast(SubExpr)->getConstructor(); I think the errors prove we should fall back to the most conservative possible fi

[PATCH] D118837: Methods visited for a special class must have an identifier.

2022-02-02 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam created this revision. zahiraam added reviewers: erichkeane, Fznamznon. zahiraam requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D118837 Files: clang/lib/Sema/SemaDecl.cpp clang/test/SemaSYCL/special-cl

[PATCH] D117391: [AST] Ignore implicit nodes in CastExpr::getConversionFunction

2022-02-02 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Here's the diff between my patch (main) and handling `FullExpr` in `skipImplicitTemporary` as in the diff I posted above (patch.txt): --- main.txt 2022-02-02 20:37:21.619534225 +0100 +++ patch.txt 2022-02-02 20:34:17.016949227 +0100 @@ -192,6 +192,13 @@ /home/kim

[PATCH] D118104: Make run-clang-tidy.py print the configured checks correctly

2022-02-02 Thread Salman Javed via Phabricator via cfe-commits
salman-javed-nz added a comment. Do you reckon it's worth expanding the test: https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/test/clang-tidy/infrastructure/run-clang-tidy.cpp to look at this issue? There isn't much testing of the run-clang-tidy.py at the moment, but it doesn't

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-02-02 Thread Han Zhu via Phabricator via cfe-commits
zhuhan0 added a comment. I verified this patch together with https://reviews.llvm.org/D116130 fix the issue https://github.com/llvm/llvm-project/issues/49689. I'm not an expert in this area. Could someone review this patch so we can move forward with the fix? Repository: rG LLVM Github Monor

[PATCH] D118657: [analyzer] Adds TrustReturnsNonnullChecker

2022-02-02 Thread Artem Dergachev 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 rGfaabdfcf7f67: [analyzer] Add support for __attribute__((returns_nonnull)). (authored by t-rasmud, committed by dergachev.a). Herald added a project:

[clang] faabdfc - [analyzer] Add support for __attribute__((returns_nonnull)).

2022-02-02 Thread Artem Dergachev via cfe-commits
Author: Rashmi Mudduluru Date: 2022-02-02T11:46:52-08:00 New Revision: faabdfcf7f6704d5a7241d8b79b4dd5cc7a5527e URL: https://github.com/llvm/llvm-project/commit/faabdfcf7f6704d5a7241d8b79b4dd5cc7a5527e DIFF: https://github.com/llvm/llvm-project/commit/faabdfcf7f6704d5a7241d8b79b4dd5cc7a5527e.di

[PATCH] D118632: [WIP][Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-02 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 405379. tianshilei1992 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118632/new/ https://reviews.llvm.org/D118632 Files: clang/include/clang/AST/StmtOpenMP.h clang/lib/AST/St

[PATCH] D118632: [WIP][Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-02 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 405378. tianshilei1992 added a comment. remove unrelated changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118632/new/ https://reviews.llvm.org/D118632 Files: clang/include/clang/AST/StmtOpenMP.h

[PATCH] D118632: [WIP][Clang]OpenMP] Add the codegen support for `atomic compare`

2022-02-02 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 updated this revision to Diff 405377. tianshilei1992 added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. rebase and finish the functionality Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D118762: Remove -Wweak-template-vtables

2022-02-02 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118762/new/ https://reviews.llvm.org/D118762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D117391: [AST] Ignore implicit nodes in CastExpr::getConversionFunction

2022-02-02 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Alright, with this diff: diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index d502b3f1e93e..1716ac0be7ef 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -1908,6 +1908,9 @@ namespace { if (auto *Binder = dyn_cast(E))

[PATCH] D116052: [clang] fix out of bounds access in an empty string when lexing a _Pragma with missing string token

2022-02-02 Thread Alex Lorenz 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 rG979d0ee8ab30: [clang] fix out of bounds access in an empty string when lexing a _Pragma with… (authored by arphaman). Repository: rG LLVM Github M

[clang] 979d0ee - [clang] fix out of bounds access in an empty string when lexing a _Pragma with missing string token

2022-02-02 Thread Alex Lorenz via cfe-commits
Author: Alex Lorenz Date: 2022-02-02T11:16:11-08:00 New Revision: 979d0ee8ab30a175220af3b39a6df7d56de9d2c8 URL: https://github.com/llvm/llvm-project/commit/979d0ee8ab30a175220af3b39a6df7d56de9d2c8 DIFF: https://github.com/llvm/llvm-project/commit/979d0ee8ab30a175220af3b39a6df7d56de9d2c8.diff L

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

2022-02-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> mimalloc uses 8-byte alignment for 64-bit Darwin, not 16-byte alignment. Than they are doing something fishy if I understood rjmccall’s comment correctly about darwin. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1188

[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#3291060 , @xbolva00 wrote: > Or can we bailout just for gnu? and preserve this for darwin? As is, the original patch applies the C++ getNewAlign to C calloc/malloc/strdup/etc. This is outright wrong. For C++, I confe

[PATCH] D112353: [bazel] fixes for windows build

2022-02-02 Thread Geoffrey Martin-Noble via Phabricator via cfe-commits
GMNGeoffrey added a comment. If you'd like to rebase this and see what's still outstanding, I can take another look :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112353/new/ https://reviews.llvm.org/D112353 ___

[PATCH] D118815: [Clang][Docs] Add documention for new OpenMP offloading driver

2022-02-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/docs/OffloadingDesign.rst:25 +Clang supports OpenMP target offloading to several different architectures such +as NVPTX, AMDGPU, and X86_64. Offloading code is generated by Clang and then +executed using the ``libomptarget`` runtim

[PATCH] D118815: [Clang][Docs] Add documention for new OpenMP offloading driver

2022-02-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/docs/OffloadingDesign.rst:25 +Clang supports OpenMP target offloading to several different architectures such +as NVPTX, AMDGPU, and X86_64. Offloading code is generated by Clang and then +executed using the ``libomptarget`` runtim

[PATCH] D91607: [clang][Sparc] Fix __builtin_extract_return_addr etc.

2022-02-02 Thread Rainer Orth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGefdd0a29b7eb: [clang][Sparc] Fix __builtin_extract_return_addr etc. (authored by ro). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91607/new/ https://revie

[clang] efdd0a2 - [clang][Sparc] Fix __builtin_extract_return_addr etc.

2022-02-02 Thread Rainer Orth via cfe-commits
Author: Rainer Orth Date: 2022-02-02T19:20:02+01:00 New Revision: efdd0a29b7eb6f3b6ca3fe9182a6c1085806c73a URL: https://github.com/llvm/llvm-project/commit/efdd0a29b7eb6f3b6ca3fe9182a6c1085806c73a DIFF: https://github.com/llvm/llvm-project/commit/efdd0a29b7eb6f3b6ca3fe9182a6c1085806c73a.diff L

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-02 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 D117887#3289481 , @jchlanda wrote: > `ptxas` is happy with asm generated from both `math-intrins-sm86-ptx72.ll` > and `math-intrins-sm80-ptx70.ll` Thank

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

2022-02-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Or can we bailout just for gnu? and preserve this for darwin? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118804/new/ https://reviews.llvm.org/D118804 ___ cfe-commits mailing

[PATCH] D118815: [Clang][Docs] Add documentino for new OpenMP offloading driver

2022-02-02 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 405331. jhuber6 added a comment. Forgot to include new file in index. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118815/new/ https://reviews.llvm.org/D118815 Files: clang/docs/ClangCommandLineReference.rs

  1   2   >