[PATCH] D98726: [analyzer] Enabling MallocChecker to take up after SmartPtrModelling

2021-04-23 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. Okay, this is alarming. The following code yields a leak warning: #include #include struct A { int field; A(int f = 0) : field{f} {} void foo() { std::cout << "Field: " << field << "\n"; } }; void foo() { int *raw = new int(10);

[PATCH] D101097: [Sema] Don't set BlockDecl's DoesNotEscape bit If the block is being passed to a function taking a reference parameter

2021-04-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/test/SemaObjCXX/noescape.mm:20 +template +void noescapeFunc5(__attribute__((noescape)) T); // expected-warning {{'noescape' attribute only applies to pointer arguments}} +template I didn't realize clang

[PATCH] D101097: [Sema] Don't set BlockDecl's DoesNotEscape bit If the block is being passed to a function taking a reference parameter

2021-04-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 340234. ahatanak added a comment. Check that the parameter has a block pointer type. Add more test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101097/new/ https://reviews.llvm.org/D101097 Files:

[PATCH] D100611: [Clang] Add clang attribute `clang_builtin_alias`.

2021-04-23 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai updated this revision to Diff 340232. HsiangKai added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100611/new/ https://reviews.llvm.org/D100611 Files: clang/include/clang/Basic/Attr.td

[PATCH] D100611: [Clang] Add clang attribute `clang_builtin_alias`.

2021-04-23 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai added inline comments. Comment at: clang/include/clang/Basic/Attr.td:646 +def BuiltinAlias : Attr { + let Spellings = [Clang<"clang_builtin_alias">]; + let Args = [IdentifierArgument<"BuiltinName">]; aaron.ballman wrote: > Hrm, this is interesting --

[PATCH] D98726: [analyzer] Enabling MallocChecker to take up after SmartPtrModelling

2021-04-23 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. I think something is wrong about the way we are investigating this or I don't understand the `MallocChecker`. The following doesn't yield a bug report! => https://godbolt.org/z/Y57G7zE5j Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D101191: [InstCombine] Fully disable select to and/or i1 folding

2021-04-23 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2680 +// select c, (select a, true, b), false -> select c, a, false +// if c implies that b is false. +if (match(CondVal, m_Select(m_Value(A), m_One(), m_Value(B))) &&

[PATCH] D101191: [InstCombine] Fully disable select to and/or i1 folding

2021-04-23 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added inline comments. Comment at: llvm/test/Transforms/InstCombine/logical-select.ll:385 +; CHECK-NEXT:[[OR:%.*]] = select i1 [[AND1]], i1 true, i1 [[AND2]] +; CHECK-NEXT:ret i1 [[OR]] ; nikic wrote: > It looks like this fold could be salvaged,

[PATCH] D101194: [Driver] Push multiarch path setup to individual drivers

2021-04-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Different platforms use different rules for multiarch triples so it's > difficult to provide a single method for all platforms. Guess this is a Linux/Hurd/Fuchsia specific thing. I don't know much about the runtime build but I hope the hierarchy is not set in stone.

[PATCH] D100673: [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D100673#2714087 , @jdoerfert wrote: > I think this broke GridMini (https://github.com/meifeng/GridMini/tree/openmp) > :( Will investigate this on Monday. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D100673: [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I think this broke GridMini (https://github.com/meifeng/GridMini/tree/openmp) :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100673/new/ https://reviews.llvm.org/D100673 ___

[PATCH] D100919: [AArch64] Support customizing stack protector guard

2021-04-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3114 if (Arg *A = Args.getLastArg(options::OPT_mstack_protector_guard_offset_EQ)) { StringRef Value = A->getValue(); nickdesaulniers wrote: > TODO: GCC treats

[PATCH] D100919: [AArch64] Support customizing stack protector guard

2021-04-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 340212. nickdesaulniers added a comment. This revision is now accepted and ready to land. - combine tests, clean up Clang drivers slightly Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100919/new/

[PATCH] D79714: [Diagnostics] Restore -Wdeprecated warning when user-declared copy assignment operator is defined as deleted (PR45634)

2021-04-23 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. The fixes in https://reviews.llvm.org/D101214 are sufficient to bring the -Werror bootstrap back to green. Please review the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79714/new/ https://reviews.llvm.org/D79714

[PATCH] D101214: Disable deprecated-copy warnings on various LLVM code to bring the bot back to green

2021-04-23 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai created this revision. nemanjai added reviewers: xbolva00, rsmith. nemanjai requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: llvm-commits. Bootstrap with `-Werror` is currently broken due to https://reviews.llvm.org/D79714. This patch is

[PATCH] D101212: [AST][JSON] Fix null ptr crash dumping TemplateTemplateParmDecl

2021-04-23 Thread David Tolnay via Phabricator via cfe-commits
dtolnay created this revision. dtolnay added a reviewer: aaron.ballman. Herald added a subscriber: kristof.beyls. dtolnay requested review of this revision. Herald added a project: clang. Minimal repro-- the following program winds up with D->getDefaultArgStorage().getInheritedFrom() == nullptr

[PATCH] D79714: [Diagnostics] Restore -Wdeprecated warning when user-declared copy assignment operator is defined as deleted (PR45634)

2021-04-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D79714#2713921 , @nemanjai wrote: > In D79714#2713610 , @xbolva00 wrote: > >> I pushed a fix to just disable this warning for googlemock/gtest. > > There are still more of these. I will

[PATCH] D79714: [Diagnostics] Restore -Wdeprecated warning when user-declared copy assignment operator is defined as deleted (PR45634)

2021-04-23 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. In D79714#2713610 , @xbolva00 wrote: > I pushed a fix to just disable this warning for googlemock/gtest. There are still more of these. I will apply the same fix to `utils/unittest/googlemock/include/gmock/gmock.h` unless you

[PATCH] D101209: [PowerPC] Provide fastmath sqrt and div functions in altivec.h

2021-04-23 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai created this revision. nemanjai added reviewers: cebowleratibm, bmahjour, PowerPC. Herald added subscribers: shchenz, kbarton. nemanjai requested review of this revision. Herald added a project: clang. This adds the long overdue implementations of these functions that have been part of

[PATCH] D99975: [clangd][ObjC] Improve support for class properties

2021-04-23 Thread David Goldman via Phabricator via cfe-commits
dgoldman added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:309-313 +// FIXME: visiting this here allows us to hover on UIColor in +// `UIColor.blackColor` but then `blackColor` no longer refers to the +// method. +// if

[PATCH] D100919: [AArch64] Support customizing stack protector guard

2021-04-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:1914-1915 + BuildMI(MBB, MI, DL, get(AArch64::LDRXui)) + .addReg(Reg, getKillRegState(false)) + .addReg(Reg, RegState::Define) +

[PATCH] D100919: [AArch64] Support customizing stack protector guard

2021-04-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: llvm/test/CodeGen/AArch64/stack-guard-sysreg-nonzero-offset.ll:1 +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc %s --stack-protector-guard=sysreg \ This can be

[PATCH] D100919: [AArch64] Support customizing stack protector guard

2021-04-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 340192. nickdesaulniers added a comment. This revision is now accepted and ready to land. - fix 32b ARM triple, add test for non-zero offset, actually load ptr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D100919: [AArch64] Support customizing stack protector guard

2021-04-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Herald added a subscriber: tmatheson. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3104 << A->getAsString(Args) << TripleStr; -if (Value != "tls" && Value != "global") { +if (Value != "tls" && Value != "global" &&

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I'm fixing the tests now, also realized that the `omp allocate` handling now always creates definitions, which is bad. I'll upload a new version soon, test case for this, which shows we also don't do a good job now, is here: https://godbolt.org/z/T9od5Mq7h

[PATCH] D99975: [clangd][ObjC] Improve support for class properties

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Herald added a subscriber: cfe-commits. Comment at: clang-tools-extra/clangd/FindTarget.cpp:309-313 +// FIXME: visiting this here allows us to hover on UIColor in +// `UIColor.blackColor` but then `blackColor` no longer refers to

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:171 + +#define wasm_v128_load8_lane(__ptr, __vec, __i) \ + ((v128_t)__builtin_wasm_load8_lane((signed char *)(__ptr), (__i8x16)(__vec), \ aheejin wrote:

[PATCH] D101095: [clang][amdgpu] Use implicit code object version

2021-04-23 Thread Jon Chesterfield via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfc88d927e30d: [clang][amdgpu] Use implicit code object version (authored by JonChesterfield). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101095/new/

[clang] fc88d92 - [clang][amdgpu] Use implicit code object version

2021-04-23 Thread Jon Chesterfield via cfe-commits
Author: Jon Chesterfield Date: 2021-04-23T23:52:50+01:00 New Revision: fc88d927e30de93bf75aef8cd2a835675fe904bc URL: https://github.com/llvm/llvm-project/commit/fc88d927e30de93bf75aef8cd2a835675fe904bc DIFF:

[PATCH] D101095: [clang][amdgpu] Use implicit code object version

2021-04-23 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D101095#2713652 , @yaxunl wrote: > In general we think we should move toward the direction of clang being > agnostic about code object version and let backend decide which code object > version to use This sounds

[PATCH] D98984: [clangd] Improve handling of Objective-C protocols in types

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Oops, meant to approve with above comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98984/new/ https://reviews.llvm.org/D98984

[PATCH] D98984: [clangd] Improve handling of Objective-C protocols in types

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. LG apart from a few nits & reverting the whitespace changes to unrelated tests. Comment at: clang-tools-extra/clangd/FindTarget.cpp:435 void VisitObjCObjectType(const ObjCObjectType *OOT) { -// FIXME: ObjCObjectTypeLoc has no children

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:171 + +#define wasm_v128_load8_lane(__ptr, __vec, __i) \ + ((v128_t)__builtin_wasm_load8_lane((signed char *)(__ptr), (__i8x16)(__vec), \ tlively wrote:

[PATCH] D101097: [Sema] Don't set BlockDecl's DoesNotEscape bit If the block is being passed to a function taking a reference parameter

2021-04-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:5917 if (auto *BE = dyn_cast(Arg->IgnoreParenNoopCasts(Context))) BE->getBlockDecl()->setDoesNotEscape(); rjmccall wrote: > ahatanak wrote: > > rjmccall wrote: > > > We

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-04-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen abandoned this revision. ychen added a comment. Pursue D100739 instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97915/new/ https://reviews.llvm.org/D97915

[PATCH] D100823: [RISCV] Implement the pseudo compare builtin.

2021-04-23 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper 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/D100823/new/ https://reviews.llvm.org/D100823

[PATCH] D101143: [RISCV] [1/2] Add IR intrinsic for Zbe extension

2021-04-23 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoB.td:36 def riscv_unshflw: SDNode<"RISCVISD::UNSHFLW",SDT_RISCVIntBinOpW>; +def riscv_bcompress: SDNode<"RISCVISD::BCOMPRESS", SDTIntBinOp>; +def riscv_bcompressw :

[PATCH] D101095: [clang][amdgpu] Use implicit code object version

2021-04-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. I talked with Tony about the code object version arguments of clang. In general we think we should move toward the direction of clang being agnostic about code object version and let backend

[PATCH] D99056: [clangd] Use HeuristicResolver to produce a better semantic token for name referring to UnresolvedUsingValueDecl

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Herald added a subscriber: cfe-commits. Very nice :-D Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99056/new/

[PATCH] D99052: [clangd] Produce semantic token for name referring to UnresolvedUsingValueDecl

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Herald added a subscriber: cfe-commits. Comment at: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp:655 +struct $Class_decl[[Derived]] :

[PATCH] D101097: [Sema] Don't set BlockDecl's DoesNotEscape bit If the block is being passed to a function taking a reference parameter

2021-04-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:5917 if (auto *BE = dyn_cast(Arg->IgnoreParenNoopCasts(Context))) BE->getBlockDecl()->setDoesNotEscape(); ahatanak wrote: > rjmccall wrote: > > We need to be checking

[PATCH] D101202: Thread safety analysis: Fix false negative on break

2021-04-23 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang/test/SemaCXX/warn-thread-safety-analysis.cpp:341 + sls_mu.Unlock(); // \ +// expected-warning{{releasing mutex 'sls_mu' that was not held}} } This is just a side effect, not the reason I did the change.

[PATCH] D99540: [clangd] Preserve diags between tweak enumeration and execution

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Herald added a subscriber: cfe-commits. Sorry about taking forever to get around to this, I kept looking at it and not understanding it. IIUC the idea is: - tweaks depend on various data from the codeAction request - but we only have the codeAction request when

[PATCH] D79714: [Diagnostics] Restore -Wdeprecated warning when user-declared copy assignment operator is defined as deleted (PR45634)

2021-04-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D79714#2713311 , @nemanjai wrote: > This breaks Clang's ability to bootstrap LLVM with `-Werror` as evidenced by > the buildbot failure https://lab.llvm.org/buildbot/#/builders/36/builds/7587. > Please revert or fix the

[PATCH] D101097: [Sema] Don't set BlockDecl's DoesNotEscape bit If the block is being passed to a function taking a reference parameter

2021-04-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:5917 if (auto *BE = dyn_cast(Arg->IgnoreParenNoopCasts(Context))) BE->getBlockDecl()->setDoesNotEscape(); rjmccall wrote: > We need to be checking that the parameter

[PATCH] D100739: [Coroutines] Handle overaligned frame allocation (2)

2021-04-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D100739#2712268 , @lxfind wrote: >> Sorry for the confusion. I think either overaligned or under-aligned could >> be used here to describe the problem: either "Handle overaligned frame" or >> "Fix under-aligned frame". Since

[PATCH] D100739: [Coroutines] Handle overaligned frame allocation (2)

2021-04-23 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. In D100739#2711698 , @ChuanqiXu wrote: >> This is an alternative to D97915 which >> missed proper deallocation of the over-allocated frame. This patch handles >> both allocations and

[clang] 572fe08 - Thread safety analysis: Simplify intersectAndWarn (NFC)

2021-04-23 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2021-04-23T23:19:15+02:00 New Revision: 572fe087765626529d63eaaefb2e1c5ba277f756 URL: https://github.com/llvm/llvm-project/commit/572fe087765626529d63eaaefb2e1c5ba277f756 DIFF: https://github.com/llvm/llvm-project/commit/572fe087765626529d63eaaefb2e1c5ba277f756.diff

[PATCH] D101139: Create install targets for scan-build-py.

2021-04-23 Thread Yu Shan via Phabricator via cfe-commits
aabbaabb added a comment. In D101139#2713450 , @phosek wrote: > I don't think this is sufficient. First, we want to be explicit and always > list individual files to install, we don't use patterns. Second, since > libscanbuild is a library, it

[PATCH] D101202: Thread safety analysis: Fix false negative on break

2021-04-23 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, delesley. aaronpuchert requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We weren't modifying the lock set when intersecting with one coming from a

[PATCH] D101139: Create install targets for scan-build-py.

2021-04-23 Thread Yu Shan via Phabricator via cfe-commits
aabbaabb added a comment. The python script assumes relative directory while finding things. For example, for resources folder, it uses os.path.join(this_dir, 'resources') in report.py, which means resource need to be in the same dir as report.py. Similarly for the libscanbuild. it assumes the

[PATCH] D100715: [clangd] Omit parameter hint if parameter name comment is present

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Herald added a subscriber: cfe-commits. Just a few optional ideas, this is fine as-is Comment at: clang-tools-extra/clangd/InlayHints.cpp:108 +// Allow the comment

[PATCH] D101192: Add support for #elifdef and #elifndef

2021-04-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I have one 'nit of preference', otherwise I think I don't want to +1 this without giving people a few days to take a look. Based on my looks through the surrounding code, this _LOOKS_ right enough as far as I can tell, but I still want to give others a few days.

[clang] 94340dd - Enable AST introspection on non-X86

2021-04-23 Thread Stephen Kelly via cfe-commits
Author: Stephen Kelly Date: 2021-04-23T21:56:36+01:00 New Revision: 94340dd5bb23fb7c4bc7d91d5ac0608eb25660a8 URL: https://github.com/llvm/llvm-project/commit/94340dd5bb23fb7c4bc7d91d5ac0608eb25660a8 DIFF: https://github.com/llvm/llvm-project/commit/94340dd5bb23fb7c4bc7d91d5ac0608eb25660a8.diff

[PATCH] D101192: Add support for #elifdef and #elifndef

2021-04-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 340157. aaron.ballman marked 4 inline comments as done. aaron.ballman added a comment. Updated based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101192/new/ https://reviews.llvm.org/D101192 Files:

[PATCH] D100841: [clangd][Index][NFC] Make local class collection optional

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Herald added a subscriber: cfe-commits. This seems reasonable, but having found the problem, do we still want to land it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100841/new/ https://reviews.llvm.org/D100841

[PATCH] D98984: [clangd] Improve handling of Objective-C protocols in types

2021-04-23 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. Herald added a subscriber: cfe-commits. Friendly ping, not sure if there's something in here and https://reviews.llvm.org/D99975 that I'm missing to properly support the one decl/type loc to multiple references here Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D101139: Create install targets for scan-build-py.

2021-04-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I don't think this is sufficient. First, we want to be explicit and always list individual files to install, we don't use patterns. Second, since libscanbuild is a library, it shouldn't be installed inside the `bin` directory. I think those should go either into `lib`

[PATCH] D100731: [clangd] Omit parameter hint for setter functions

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Herald added a subscriber: cfe-commits. Comment at: clang-tools-extra/clangd/InlayHints.cpp:114 +// void setTimeout(int timeoutMillis); +return

[PATCH] D70340: Add a key method to Sema to optimize debug info size

2021-04-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I guess my point is: a better comment would have saved me some time. Basically point out that the 'debug' info for the whole type is emitted with a virtual method, and that non-virtual types have it emitted in every TU. Also that this causes it to be emitted in

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively 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 rG502f54049d17: [WebAssembly] Finalize wasm_simd128.h intrinsics (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] 502f540 - [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via cfe-commits
Author: Thomas Lively Date: 2021-04-23T13:37:27-07:00 New Revision: 502f54049d17f5a107f833596fb2c31297a99773 URL: https://github.com/llvm/llvm-project/commit/502f54049d17f5a107f833596fb2c31297a99773 DIFF: https://github.com/llvm/llvm-project/commit/502f54049d17f5a107f833596fb2c31297a99773.diff

[PATCH] D100741: [clangd] Rename HeuristicResolver::resolveCallExpr() to resolveReturnTypeOfCallExpr()

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Herald added a subscriber: cfe-commits. Agree this is confusing, thanks for fixing! Comment at: clang-tools-extra/clangd/HeuristicResolver.h:57 + std::vector +

[PATCH] D100798: [clangd][ObjC] Fix issue completing a method decl by name

2021-04-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Herald added a subscriber: cfe-commits. The test results look good, but I have trouble following the code, I think more comments might help :-) Comment at: clang-tools-extra/clangd/CodeCompletionStrings.cpp:140 + // similar except that we use

[PATCH] D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use

2021-04-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I don't see any checks to ensure that the selected ABI is compatible with the specified target, is that something you plan on implementing in a follow up change? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85802/new/

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:969 +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_ceil(v128_t __a) { + return (v128_t)__builtin_wasm_ceil_f32x4((__f32x4)__a); +} aheejin wrote: > Sometimes builtin names seem

[PATCH] D101130: [PowerPC] Provide XL-compatible builtins in altivec.h

2021-04-23 Thread Nemanja Ivanovic 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 rG19b29b1ed1ba: [PowerPC] Provide XL-compatible builtins in altivec.h (authored by nemanjai). Changed prior to commit:

[clang] 19b29b1 - [PowerPC] Provide XL-compatible builtins in altivec.h

2021-04-23 Thread Nemanja Ivanovic via cfe-commits
Author: Nemanja Ivanovic Date: 2021-04-23T15:13:46-05:00 New Revision: 19b29b1ed1baa3c91a8e48204a8fb229bf07f548 URL: https://github.com/llvm/llvm-project/commit/19b29b1ed1baa3c91a8e48204a8fb229bf07f548 DIFF:

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101030/new/ https://reviews.llvm.org/D101030

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:171 + +#define wasm_v128_load8_lane(__ptr, __vec, __i) \ + ((v128_t)__builtin_wasm_load8_lane((signed char *)(__ptr), (__i8x16)(__vec), \ dschuff wrote:

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D101030#2713117 , @ABataev wrote: > Looks good, but would be nice to check with sanitizers that there are no > uses-after-delete. There is no heap allocation anymore but I guess I could have messed up the stack stuff. I

[PATCH] D79714: [Diagnostics] Restore -Wdeprecated warning when user-declared copy assignment operator is defined as deleted (PR45634)

2021-04-23 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. This breaks Clang's ability to bootstrap LLVM with `-Werror` as evidenced by the buildbot failure https://lab.llvm.org/buildbot/#/builders/36/builds/7587. Please revert or fix the `googletest` code that trips this warning. Pertinent file: FAILED:

[PATCH] D101194: [Driver] Push multiarch path setup to individual drivers

2021-04-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: MaskRay. Herald added subscribers: jgravelle-google, sbc100, dschuff. phosek requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. Different platforms use different rules for

[PATCH] D98746: [clang][amdgpu] Use implicit code object default

2021-04-23 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield abandoned this revision. JonChesterfield added a comment. Abandoning in favour of the more conservative D101095 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98746/new/

[PATCH] D101192: Add support for #elifdef and #elifndef

2021-04-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Lex/PPDirectives.cpp:642 + + CheckEndOfDirective(IsElifDef ? "elifdef" : "elifndef"); + aaron.ballman wrote: > erichkeane wrote: > > Can you just pass 'Directive' here? > I think I'd have to pass

[PATCH] D100782: [PowerPC] Improve f32 to i32 bitcast code gen

2021-04-23 Thread Albion Fung via Phabricator via cfe-commits
Conanap updated this revision to Diff 340141. Conanap added a comment. Updated to remove uncessary `xrsp` and other `xxsldwi` as well CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100782/new/ https://reviews.llvm.org/D100782 Files: llvm/lib/Target/PowerPC/PPCInstrVSX.td

[PATCH] D101192: Add support for #elifdef and #elifndef

2021-04-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 4 inline comments as done. aaron.ballman added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:754 break; + case tok::pp_elifdef: + case tok::pp_elifndef: erichkeane wrote: > Just looking through this, so forgive

[clang-tools-extra] 81dae18 - [clangd] Allow AST request without range

2021-04-23 Thread Sam McCall via cfe-commits
Author: Christian Kandeler Date: 2021-04-23T21:35:42+02:00 New Revision: 81dae18dff7fe8c2783c7b73e5c08167d6c60b47 URL: https://github.com/llvm/llvm-project/commit/81dae18dff7fe8c2783c7b73e5c08167d6c60b47 DIFF:

[PATCH] D101057: [clangd] Allow AST request without range

2021-04-23 Thread Sam McCall 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 rG81dae18dff7f: [clangd] Allow AST request without range (authored by ckandeler, committed by sammccall). Changed prior to commit:

[PATCH] D101192: Add support for #elifdef and #elifndef

2021-04-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:754 break; + case tok::pp_elifdef: + case tok::pp_elifndef: Just looking through this, so forgive me if I there is something I don't understand... Why is this not

[PATCH] D45639: [Driver] Support default libc++ library location on Darwin

2021-04-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. FYI I had to revert this change again because it broke ubsan build. The problem is that ubsan for Darwin is built as universal shared library and it links against libc++abi, but we currently don't support building libc++ and libc++abi as universal binaries in the

[PATCH] D101192: Add support for #elifdef and #elifndef

2021-04-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, rjmccall, mibintc, erichkeane. Herald added subscribers: dexonsmith, arphaman, kbarton, nemanjai. aaron.ballman requested review of this revision. Herald added a project: clang. WG14 adopted N2645 and WG21 EWG has

[PATCH] D101191: [InstCombine] Fully disable select to and/or i1 folding

2021-04-23 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: llvm/test/Transforms/InstCombine/logical-select.ll:385 +; CHECK-NEXT:[[OR:%.*]] = select i1 [[AND1]], i1 true, i1 [[AND2]] +; CHECK-NEXT:ret i1 [[OR]] ; It looks like this fold could be salvaged, if we wanted to:

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D101112#2710521 , @aheejin wrote: > General question about SIMD intrinsics: So we make dedicated wasm intrinsics > only for the cases there are not general intrinsics people can use instead? No, every instruction in the

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Looks good, but would be nice to check with sanitizers that there are no uses-after-delete. Comment at: clang/lib/CodeGen/CGDecl.cpp:2618-2619 + for (const Expr *E : D->varlists()) { +auto *DE = cast(E); +auto *VD = cast(DE->getDecl()); +

[PATCH] D101030: [OpenMP] Overhaul `declare target` handling

2021-04-23 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 340126. jdoerfert added a comment. Avoid heap memory, copy when necessary, add documentation, address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101030/new/ https://reviews.llvm.org/D101030

[PATCH] D99993: [clang-tidy] bugprone-argument-comment: ignore name mismatches for decls from system headers

2021-04-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! I don't think we need to add an option for this until a user requests one, but I don't feel strongly either way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-23 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield added a comment. Great. If it's been approved, I am not able to commit, so I think someone else will have to do that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100581/new/ https://reviews.llvm.org/D100581

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively updated this revision to Diff 340109. tlively added a comment. - "stand" => "standard" - Update builtins for v128.any_true Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101112/new/ https://reviews.llvm.org/D101112 Files:

[clang] a92dbad - [OpenMP] Fix -Wdeprecated-copy

2021-04-23 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-04-23T10:49:19-07:00 New Revision: a92dbadffe4ff81cbae7303b0f3e723e26fa77b1 URL: https://github.com/llvm/llvm-project/commit/a92dbadffe4ff81cbae7303b0f3e723e26fa77b1 DIFF: https://github.com/llvm/llvm-project/commit/a92dbadffe4ff81cbae7303b0f3e723e26fa77b1.diff

[PATCH] D101017: [NewPM] Make GlobalsAA available earlier in the pipeline

2021-04-23 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. ah the issue is LoopIdiomRecognize can't recognize the following as a memcpy: @__const.f.c = private unnamed_addr constant [20 x double] [double 1.051000e-01, double 1.57e-02, double 1.85e-02, double 0x3F823A29C779A6B5, double 2.19e-02, double

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:171 + +#define wasm_v128_load8_lane(__ptr, __vec, __i) \ + ((v128_t)__builtin_wasm_load8_lane((signed char *)(__ptr), (__i8x16)(__vec), \ tlively wrote:

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:171 + +#define wasm_v128_load8_lane(__ptr, __vec, __i) \ + ((v128_t)__builtin_wasm_load8_lane((signed char *)(__ptr), (__i8x16)(__vec), \ aheejin wrote:

[PATCH] D92024: [clang] Implement P0692R1 from C++20 (access checking on specializations and instantiations)

2021-04-23 Thread Alex Orlov via Phabricator via cfe-commits
aorlov updated this revision to Diff 340099. aorlov added a comment. Updated. @krisb, please, verify. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92024/new/ https://reviews.llvm.org/D92024 Files: clang/include/clang/Parse/Parser.h

[PATCH] D101051: [clang][deps] Only generate absolute paths when asked to

2021-04-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM, with one nit to pick. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:392 std::vector ModuleDeps; -std::vector AdditonalCommandLine; +

[PATCH] D101108: [PR49761] Fix variadic arg handling in matcher

2021-04-23 Thread Chris Hamilton 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 rGcae3b70cebc1: [PR49761] Fix variadic arg handling in matcher (authored by chrish_ericsson_atx). Repository: rG LLVM Github Monorepo CHANGES

[clang] cae3b70 - [PR49761] Fix variadic arg handling in matcher

2021-04-23 Thread via cfe-commits
Author: Chris Hamilton Date: 2021-04-23T12:07:14-05:00 New Revision: cae3b70cebc1b7b762a8b466cafca2d4189e72a7 URL: https://github.com/llvm/llvm-project/commit/cae3b70cebc1b7b762a8b466cafca2d4189e72a7 DIFF:

[PATCH] D92024: [clang] Implement P0692R1 from C++20 (access checking on specializations and instantiations)

2021-04-23 Thread Alex Orlov via Phabricator via cfe-commits
aorlov updated this revision to Diff 340095. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92024/new/ https://reviews.llvm.org/D92024 Files: clang/include/clang/Parse/Parser.h clang/include/clang/Sema/DelayedDiagnostic.h

[PATCH] D101108: [PR49761] Fix variadic arg handling in matcher

2021-04-23 Thread Chris Hamilton via Phabricator via cfe-commits
chrish_ericsson_atx updated this revision to Diff 340094. chrish_ericsson_atx added a comment. Addressed feedback from aaron.ballman. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101108/new/ https://reviews.llvm.org/D101108 Files:

[PATCH] D100501: [cland] Dont emit missing newline warnings when building preamble

2021-04-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. > Hit send too soon. But IIRC PP knows whether it's building a preamble. That's a good point. But PP doesn't know if there's trailing content or not (in clangd's case). So we'll end up not showing the diag even when we should (i.e. whole file is preamble without a new

  1   2   3   >