[PATCH] D70366: Add new 'flatten' LLVM attribute to fix clang's 'flatten' function attribute

2020-04-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. The semantics of this llvm attribute seem to better match 'flatten'. However, it is unfortunate that this doesn't change any clang tests. Can you add/alter a test in clang to validate the IR? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70366/new/ https:

[PATCH] D75661: Remove SequentialType from the type heirarchy.

2020-04-03 Thread Christopher Tetreault via Phabricator via cfe-commits
ctetreau added a comment. Herald added a subscriber: grosul1. What's the status on this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75661/new/ https://reviews.llvm.org/D75661 ___ cfe-commits mailing

[PATCH] D76949: Replace subtract-from-zero float in version with fneg in PowerPC special fma compiler builtins

2020-04-03 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGba87430cadb2: [PowerPC] Replace subtract-from-zero float in version with fneg in PowerPC… (authored by ajwock, committed by kpn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D77184: Make it possible for lit.site.cfg to contain relative paths, and use it for llvm and clang

2020-04-03 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. grimar, andrewng: You both have checkout and build on different drives too, yes? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77184/new/ https://reviews.llvm.org/D77184 ___ cfe

[clang] 9f1c35d - Revert "[PowerPC] Replace subtract-from-zero float in version with fneg in PowerPC special fma compiler builtins"

2020-04-03 Thread Kevin P. Neal via cfe-commits
Author: Kevin P. Neal Date: 2020-04-03T15:47:19-04:00 New Revision: 9f1c35d8b14f026b7bc4b21b9eecafbbb42c42a2 URL: https://github.com/llvm/llvm-project/commit/9f1c35d8b14f026b7bc4b21b9eecafbbb42c42a2 DIFF: https://github.com/llvm/llvm-project/commit/9f1c35d8b14f026b7bc4b21b9eecafbbb42c42a2.diff

[PATCH] D76572: Replace `T(x)` with `reinterpret_cast(x)` everywhere it means reinterpret_cast. No functional change

2020-04-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone marked an inline comment as done. Quuxplusone added a comment. @DiggerLin @ahatanak @espindola @reames Gentle ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76572/new/ https://reviews.llvm.org/D76572

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 254889. rnk added a comment. Herald added subscribers: usaxena95, kadircet, arphaman, jkorous. - seems to build all.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76184/new/ https://reviews.llvm.org/D76184 Files:

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk commandeered this revision. rnk edited reviewers, added: jdoerfert; removed: rnk. rnk added a comment. This revision now requires review to proceed. I got it building... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76184/new/ https://reviews.l

[PATCH] D77427: [X86] Add tests to clang Driver to ensure that SLH/Retpoline features are not enabled with LVI-CFI

2020-04-03 Thread Scott Constable via Phabricator via cfe-commits
sconstab created this revision. sconstab added a reviewer: craig.topper. https://reviews.llvm.org/D77427 Files: clang/test/Driver/x86-target-features.c Index: clang/test/Driver/x86-target-features.c === --- clang/test/Driver/x86-

[PATCH] D77390: Fix __builtin_amdgcn_workgroup_size_x/y/z return type

2020-04-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl closed this revision. yaxunl added a comment. b72fce1ffd0a0de5b46b486c7030d54cc5d8c225 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77390/new/ https://reviews.llvm.org/D77390 __

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-04-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 254890. njames93 added a comment. - Address nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77085/new/ https://reviews.llvm.org/D77085 Files: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp clang-tools

[PATCH] D77184: Make it possible for lit.site.cfg to contain relative paths, and use it for llvm and clang

2020-04-03 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I pushed Andrew's fix (thanks!) (with minor formatting tweaks) in dbb0d8ecb3a024bd6817ebd8ad8c5c199a51d933 . Let me know if you still see issues. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling

2020-04-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:647-653 CmdLineOption ]>, Ah, okay, I see which one you refer to. We should totally make this non-user facing as well. Repository: rG LLVM Github Mo

[PATCH] D66490: [NewPM] Enable the New Pass Manager by Default in Clang

2020-04-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > It seems that we can go ahead with this patch if there's no other objections. > I reran a `ninja check-clang` with this patch and all tests seem to pass (at > least when running on x64-linux). Actually disregard this. It seems that there are some compiler-rt tests

[PATCH] D77028: [NFC] Refactor DeferredDiagsEmitter and skip redundant visit

2020-04-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1508 void checkFunc(SourceLocation Loc, FunctionDecl *FD) { +auto DiagsCountIt = DiagsCount.find(FD); FunctionDecl *Caller = UseStack.empty() ? nullptr : UseStac

[clang] c74dd64 - [X86] Add a Pass that builds a Condensed CFG for Load Value Injection (LVI) Gadgets

2020-04-03 Thread Craig Topper via cfe-commits
Author: Scott Constable Date: 2020-04-03T13:02:04-07:00 New Revision: c74dd640fd740c6928f66a39c7c15a014af3f66f URL: https://github.com/llvm/llvm-project/commit/c74dd640fd740c6928f66a39c7c15a014af3f66f DIFF: https://github.com/llvm/llvm-project/commit/c74dd640fd740c6928f66a39c7c15a014af3f66f.dif

[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]

2020-04-03 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc74dd640fd74: [X86] Add a Pass that builds a Condensed CFG for Load Value Injection (LVI)… (authored by sconstab, committed by craig.topper). Herald added a project: clang. Changed prior to commit: htt

[clang-tools-extra] ba1ffd2 - [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-04-03 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2020-04-03T13:27:52-07:00 New Revision: ba1ffd25c1f7a3564136b13e49fb1a7185561613 URL: https://github.com/llvm/llvm-project/commit/ba1ffd25c1f7a3564136b13e49fb1a7185561613 DIFF: https://github.com/llvm/llvm-project/commit/ba1ffd25c1f7a3564136b13e49fb1a7185561613.diff

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-04-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp:25 + llvm::raw_svector_ostream Output(Buffer); + Output << "warning: Option not found '" << OptionName << "'\n"; + return std::string(Buffer); aaron.ballman wrote:

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-03 Thread Mike Rice via Phabricator via cfe-commits
mikerice added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1698 + auto *CE = cast(R.get()); + return SemaRef.ActOnOpenMPCall(R, nullptr, CE->getRParenLoc(), + MultiExprArg(CE->getArgs(), CE->getNumArgs()),

[PATCH] D76184: [OpenMP][NFC] Remove the need to include `OpenMPClause.h`

2020-04-03 Thread Reid Kleckner 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 rGba1ffd25c1f7: [OpenMP][NFC] Remove the need to include `OpenMPClause.h` (authored by rnk). Changed prior to commit: htt

[PATCH] D76572: Replace `T(x)` with `reinterpret_cast(x)` everywhere it means reinterpret_cast. No functional change

2020-04-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. I am guessing @DiggerLin was pinged with regards to `XCOFFObjectFile.cpp`. @jhenderson already reviewed and approved the changes to that file (it falls under libObject). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D77290: [OpenMP] Specialize OpenMP calls after template instantiation

2020-04-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:1698 + auto *CE = cast(R.get()); + return SemaRef.ActOnOpenMPCall(R, nullptr, CE->getRParenLoc(), + MultiExprArg(C

[PATCH] D76572: Replace `T(x)` with `reinterpret_cast(x)` everywhere it means reinterpret_cast. No functional change

2020-04-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added subscribers: kparzysz, Bigcheese. Quuxplusone added a comment. Ah. Then I'm not sure who else to ping, or even which pieces remain in need of review. CODE_OWNERS.TXT isn't being very helpful here... @kparzysz for HexagonCommonGEP.cpp ("Hexagon backend")? @Bigcheese for Binary.h

[PATCH] D77431: [X86] Add tests to clang Driver to ensure that SLH/Retpoline features are not enabled with LVI-hardening

2020-04-03 Thread Scott Constable via Phabricator via cfe-commits
sconstab created this revision. sconstab added a reviewer: craig.topper. https://reviews.llvm.org/D77431 Files: clang/test/Driver/x86-target-features.c Index: clang/test/Driver/x86-target-features.c === --- clang/test/Driver/x86-

[PATCH] D76572: Replace `T(x)` with `reinterpret_cast(x)` everywhere it means reinterpret_cast. No functional change

2020-04-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. All these changes are rather NFCI, i'm not sure each one needs to be reviewed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76572/new/ https://reviews.llvm.org/D76572 ___ c

[PATCH] D76572: Replace `T(x)` with `reinterpret_cast(x)` everywhere it means reinterpret_cast. No functional change

2020-04-03 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese accepted this revision. Bigcheese added a comment. LGTM for llvm/{lib,include/llvm}/Object/* and llvm/tools/llvm-readobj/*. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76572/new/ https://reviews.llvm.org/D76572 __

[PATCH] D77432: [DebugInfo] Change to constructor homing debug info mode: skip literal types

2020-04-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. akhuang added reviewers: rnk, dblaikie. Herald added subscribers: cfe-commits, aprantl. Herald added a project: clang. In constructor type homing mode sometimes complete debug info for constexpr types was missing, because there was not a constructor emitted. This cha

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-04-03 Thread Atmn Patel via Phabricator via cfe-commits
atmnpatel updated this revision to Diff 254917. atmnpatel added a comment. Fixes clang-tidy check, and hopefully the other unrelated test failure too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75591/new/ https://reviews.llvm.org/D75591 Files:

[PATCH] D77244: [part 1] sancov/inline-bool-flag instrumentation.

2020-04-03 Thread Pratyai Mazumder via Phabricator via cfe-commits
pratyai updated this revision to Diff 254919. pratyai retitled this revision from "sancov/inline-bool-flag feature + tests + docs." to "[part 1] sancov/inline-bool-flag instrumentation.". pratyai added a comment. Herald added a project: LLVM. Dropped files from outside llvm/.../Instrumentation* a

[PATCH] D77028: [NFC] Refactor DeferredDiagsEmitter and skip redundant visit

2020-04-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1508 void checkFunc(SourceLocation Loc, FunctionDecl *FD) { +auto DiagsCountIt = DiagsCount.find(FD); FunctionDecl *Caller = UseStack.empty() ? nullptr : UseStack.back(); yaxunl wrote

[PATCH] D75044: [AArch64] __builtin_extract_return_addr for PAuth.

2020-04-03 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 254921. danielkiss added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/arm64-extractreturnaddress.c llvm/docs/LangRef

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-04-03 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 8 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp:25 + llvm::raw_svector_ostream Output(Buffer); + Output << "warning: Option not found '" << OptionName << "'\n"; + return std::string(Buffer);

[clang] ba8b305 - [Driver] Handle all optimization-record options for Darwin LTO

2020-04-03 Thread Francis Visoiu Mistrih via cfe-commits
Author: Francis Visoiu Mistrih Date: 2020-04-03T15:30:08-07:00 New Revision: ba8b3052b59ebee4311d10bee5209dac8747acea URL: https://github.com/llvm/llvm-project/commit/ba8b3052b59ebee4311d10bee5209dac8747acea DIFF: https://github.com/llvm/llvm-project/commit/ba8b3052b59ebee4311d10bee5209dac8747a

[PATCH] D77379: [FPEnv] Use single enum to represent rounding mode

2020-04-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: llvm/include/llvm/ADT/FloatingPointMode.h:26 +/// assigned to the rounding modes must agree with the values used by FLT_ROUNDS +/// (C11, 5.2.4.2.2p8). +enum class RoundingMode : int8_t { I agree that we should use one

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2020-04-03 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. For a more direct comparison, I offer https://godbolt.org/z/fqAhUC . The lack of optimization in the later case is because we're forced to mark the call to `__builtin_memcpy` in the inline memcpy as `nobuiltin`. If we instead rename things, this issue doesn't

[PATCH] D77432: [DebugInfo] Change to constructor homing debug info mode: skip literal types

2020-04-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77432/new/ https://reviews.llvm.org/D77432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D76782: [CodeGenObjC] Fix a crash when attempting to copy a zero-sized bit-field in a non-trivial C struct

2020-04-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Thanks for fixing this! Comment at: clang/lib/CodeGen/CGNonTrivialStruct.cpp:545 LValue DstLV, SrcLV; if (FD) { + // No need to copy zero-length bit-fields. Can you add the same check to `GenBinaryFuncName::visitVolatile

[PATCH] D75431: [analyzer][NFC] Merge checkNewAllocator's paramaters into CXXAllocatorCall

2020-04-03 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Hmm, upon taking a look at alignment new in previous patches, I think implementing a checker for MEM57-CPP. Avoid using default operator new for over-aligned types

[PATCH] D77436: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-04-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. akhuang added reviewers: rnk, dblaikie, aprantl. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change adds DIFlagNonTrivial to forward declarations of DICompositeType. It adds the flag to nontrivial types and types with unknown trivialit

[PATCH] D77432: [DebugInfo] Change to constructor homing debug info mode: skip literal types

2020-04-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:2263 if (DebugKind == codegenoptions::DebugInfoConstructor && - !CXXDecl->isLambda() && !isClassOrMethodDLLImport(CXXDecl)) { -for (const auto *Ctor : CXXDecl->ctors()) { + !CXXDecl->is

[PATCH] D77432: [DebugInfo] Change to constructor homing debug info mode: skip literal types

2020-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:2263 if (DebugKind == codegenoptions::DebugInfoConstructor && - !CXXDecl->isLambda() && !isClassOrMethodDLLImport(CXXDecl)) { -for (const auto *Ctor : CXXDecl->ctors()) { + !CXXDecl->isLambd

[PATCH] D76572: Replace `T(x)` with `reinterpret_cast(x)` everywhere it means reinterpret_cast. No functional change

2020-04-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I'm not sure which part I'm supposed to look at, but the changes LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76572/new/ https://reviews.llvm.org/D76572 ___ cfe-commits

[clang] a8c8b62 - [ObjC generics] Fix not inheriting type bounds in categories/extensions.

2020-04-03 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2020-04-03T16:29:02-07:00 New Revision: a8c8b627f23f204fb621bd2a8c495cfc8bc16ae7 URL: https://github.com/llvm/llvm-project/commit/a8c8b627f23f204fb621bd2a8c495cfc8bc16ae7 DIFF: https://github.com/llvm/llvm-project/commit/a8c8b627f23f204fb621bd2a8c495cfc8bc16ae7.di

[clang] e62dc1f - [MS] Fix assert handling enum forward decls in hasVisibleDefinition

2020-04-03 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2020-04-03T16:46:07-07:00 New Revision: e62dc1f6252c1dcdcc2a64e8e3b07a32412e9d89 URL: https://github.com/llvm/llvm-project/commit/e62dc1f6252c1dcdcc2a64e8e3b07a32412e9d89 DIFF: https://github.com/llvm/llvm-project/commit/e62dc1f6252c1dcdcc2a64e8e3b07a32412e9d89.diff

[PATCH] D77341: [DomTree] Replace ChildrenGetter with GraphTraits over GraphDiff.

2020-04-03 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea added inline comments. Comment at: llvm/include/llvm/Support/GenericDomTreeConstruction.h:185 + std::make_pair(GDTmp, BB); + for (auto &Pair : children(GDNodePair)) { +const NodePtr Succ = Pair.second; kuhar wrote: > Won't children

[PATCH] D77432: [DebugInfo] Change to constructor homing debug info mode: skip constexpr constructed types

2020-04-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 254942. akhuang added a comment. Change check to hasConstexprNonCopyMoveConstructor() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77432/new/ https://reviews.llvm.org/D77432 Files: clang/lib/CodeGen/CGDebug

[PATCH] D72872: [ObjC generics] Fix not inheriting type bounds in categories/extensions.

2020-04-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72872/new/ https://reviews.llvm.org/D72872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D77341: [DomTree] Replace ChildrenGetter with GraphTraits over GraphDiff.

2020-04-03 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea updated this revision to Diff 254943. asbirlea marked 16 inline comments as done. asbirlea added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77341/new/ https://reviews.llvm.org/D77341 Files: clang/include/

[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]

2020-04-03 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added inline comments. Comment at: llvm/lib/Target/X86/ImmutableGraph.h:46-56 + using NodeValueT = _NodeValueT; + using EdgeValueT = _EdgeValueT; + using size_type = _SizeT; + class Node; + class Edge { +friend class ImmutableGraph; +template friend class

[PATCH] D73245: Avoid using std::max_align_t in pre-C++11 mode

2020-04-03 Thread Joerg Sonnenberger via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Revision". This revision was automatically updated to reflect the committed changes. Closed by commit rG98f77828a98f: Avoid using std::max_align_t in pre-C++11 mode (authored by joerg). Herald added a project: libc++. Herald

[PATCH] D77440: [Hexagon] Update include paths for linux/musl

2020-04-03 Thread Sid Manning via Phabricator via cfe-commits
sidneym created this revision. sidneym added reviewers: kparzysz, bcain, bcahoon, adasgupt. Herald added a project: clang. Herald added a subscriber: cfe-commits. Update CXX paths for linux/musl. And update the sysroot expectation to match other targets. At this point I might pull out th

[PATCH] D72872: [ObjC generics] Fix not inheriting type bounds in categories/extensions.

2020-04-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa8c8b627f23f: [ObjC generics] Fix not inheriting type bounds in categories/extensions. (authored by vsapsai). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D77432: [DebugInfo] Change to constructor homing debug info mode: skip constexpr constructed types

2020-04-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:2263 if (DebugKind == codegenoptions::DebugInfoConstructor && - !CXXDecl->isLambda() && !isClassOrMethodDLLImport(CXXDecl)) { -for (const auto *Ctor

[clang] 1d42c0d - Revert "[X86] Add a Pass that builds a Condensed CFG for Load Value Injection (LVI) Gadgets"

2020-04-03 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2020-04-03T16:56:08-07:00 New Revision: 1d42c0db9a2b27c149c5bac373caa5a6d38d1f74 URL: https://github.com/llvm/llvm-project/commit/1d42c0db9a2b27c149c5bac373caa5a6d38d1f74 DIFF: https://github.com/llvm/llvm-project/commit/1d42c0db9a2b27c149c5bac373caa5a6d38d1f74.diff

[PATCH] D77436: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk 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/D77436/new/ https://reviews.llvm.org/D77436 ___ cfe-

[PATCH] D77432: [DebugInfo] Change to constructor homing debug info mode: skip constexpr constructed types

2020-04-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Sounds good to me, lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77432/new/ https://reviews.llvm.org/D77432 __

[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]

2020-04-03 Thread Matthew Riley via Phabricator via cfe-commits
mattdr added a comment. Adding a few early style notes for the next round, but overall echo @chandlerc that this seems significantly outside of normal LLVM code. Comment at: llvm/lib/Target/X86/ImmutableGraph.h:26 + +#ifndef IMMUTABLEGRAPH_H +#define IMMUTABLEGRAPH_H -

[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]

2020-04-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/X86/ImmutableGraph.h:46-56 + using NodeValueT = _NodeValueT; + using EdgeValueT = _EdgeValueT; + using size_type = _SizeT; + class Node; + class Edge { +friend class ImmutableGraph; +template friend cla

[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]

2020-04-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 254962. craig.topper marked an inline comment as done. craig.topper added a comment. Fix include guard on ImmutableGraph.h CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75936/new/ https://reviews.llvm.org/D75936 Files: clang/include/clang/Dr

[clang] 83fa811 - [clang][opaque pointers] Fix up a bunch of "getType()->getElementType()"

2020-04-03 Thread Eli Friedman via cfe-commits
Author: Eli Friedman Date: 2020-04-03T18:00:33-07:00 New Revision: 83fa811e5bf5b291eafd900f3072b961f64f039c URL: https://github.com/llvm/llvm-project/commit/83fa811e5bf5b291eafd900f3072b961f64f039c DIFF: https://github.com/llvm/llvm-project/commit/83fa811e5bf5b291eafd900f3072b961f64f039c.diff

[clang] b11decc - [clang codegen][opaque pointers] Remove use of deprecated constructor

2020-04-03 Thread Eli Friedman via cfe-commits
Author: Eli Friedman Date: 2020-04-03T18:00:33-07:00 New Revision: b11decc221a65d2c7290b93a4662a607a63b6d86 URL: https://github.com/llvm/llvm-project/commit/b11decc221a65d2c7290b93a4662a607a63b6d86 DIFF: https://github.com/llvm/llvm-project/commit/b11decc221a65d2c7290b93a4662a607a63b6d86.diff

[PATCH] D76269: [opaque pointer types] Remove deprecated Instruction/IRBuilder APIs.

2020-04-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma updated this revision to Diff 254971. efriedma added a comment. Herald added a project: LLVM. Commited the non-header changes separately Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76269/new/ https://reviews.llvm.org/D76269 Files: llv

[clang] 4ede887 - PR45402: Make the restrictions on constant evaluation of memcmp and

2020-04-03 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-04-03T18:26:14-07:00 New Revision: 4ede8879924c08ae5b495d3f421c167d822a60be URL: https://github.com/llvm/llvm-project/commit/4ede8879924c08ae5b495d3f421c167d822a60be DIFF: https://github.com/llvm/llvm-project/commit/4ede8879924c08ae5b495d3f421c167d822a60be.diff

[PATCH] D77414: [OpenMP] Add match_{all,any,none} declare variant selector extensions.

2020-04-03 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 254983. jdoerfert added a comment. Allow the new match clauses to be used in `begin/end declare variant` as well (with their respective effect) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77414/new/ https:

[PATCH] D77451: Accept -x cu to indicate language is CUDA, transfer CUDA language flag to header-file arguments

2020-04-03 Thread ADRA via Phabricator via cfe-commits
ADRAADRA created this revision. ADRAADRA added a reviewer: tra. ADRAADRA added a project: clang. Herald added subscribers: cfe-commits, yaxunl. - accept -x cu to indicate language is CUDA - transfer CUDA language flag to header-file arguments Repository: rG LLVM Github Monorepo https://review

[PATCH] D77184: Make it possible for lit.site.cfg to contain relative paths, and use it for llvm and clang

2020-04-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This has broken my ability to run the `check-clang` target on Linux. There are symlinks in the path from which I run my builds, and this patch is computing incorrect relative paths in that situation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D77184: Make it possible for lit.site.cfg to contain relative paths, and use it for llvm and clang

2020-04-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D77184#1961208 , @rsmith wrote: > This has broken my ability to run the `check-clang` target on Linux. There > are symlinks in the path from which I run my builds, and this patch is > computing incorrect relative paths in that

[clang] 179f4ba - Don't treat a CXXScopeSpec with a nested name specifier but no location

2020-04-03 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-04-03T20:20:48-07:00 New Revision: 179f4baba0672a5e85c5db91095c4cd701a2d32d URL: https://github.com/llvm/llvm-project/commit/179f4baba0672a5e85c5db91095c4cd701a2d32d DIFF: https://github.com/llvm/llvm-project/commit/179f4baba0672a5e85c5db91095c4cd701a2d32d.diff

[PATCH] D77184: Make it possible for lit.site.cfg to contain relative paths, and use it for llvm and clang

2020-04-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D77184#1961214 , @rsmith wrote: > In D77184#1961208 , @rsmith wrote: > > > This has broken my ability to run the `check-clang` target on Linux. There > > are symlinks in the path from whi

[PATCH] D68049: Propeller: Clang options for basic block sections

2020-04-03 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram updated this revision to Diff 254999. tmsriram marked 4 inline comments as done. tmsriram added a comment. Fix test and make error check at driver. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68049/new/ https://reviews.llvm.org/D68049 Files: clang/include/clang/Basic/CodeG

[PATCH] D68049: Propeller: Clang options for basic block sections

2020-04-03 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added inline comments. Comment at: clang/test/CodeGen/basicblock-sections.c:35 +// +// BB_WORLD: .section .text.world,"ax",@progbits +// BB_WORLD: world MaskRay wrote: > I haven't read through the previous threads whether we should use a .c -> .s > test

[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]

2020-04-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 255000. craig.topper added a comment. Remove underscores from names. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75936/new/ https://reviews.llvm.org/D75936 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Arch/X86

[PATCH] D73290: [PowerPC] Add clang -msvr4-struct-return for 32-bit ELF

2020-04-03 Thread Justin Hibbits via Phabricator via cfe-commits
jhibbits edited reviewers, added: jhibbits; removed: chmeee. jhibbits accepted this revision. jhibbits added a comment. This revision is now accepted and ready to land. Code looks fine, and others have tested it. Good to see a reversion of the ABI to expected for GCC compatibility on the BSDs.

[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]

2020-04-03 Thread Scott Constable via Phabricator via cfe-commits
sconstab added inline comments. Comment at: llvm/lib/Target/X86/ImmutableGraph.h:318 +} +auto *VertexArray = new Node[VertexSize + 1 /* terminator node */]; +auto *EdgeArray = new Edge[EdgeSize]; mattdr wrote: > As a general rule `new` is a code-smell

[clang-tools-extra] a975fde - [clang] Annotate trivial getters and setters on hover.

2020-04-03 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-04-04T07:15:12+02:00 New Revision: a975fde23a5e64721d75022b2a072a0b19f4b279 URL: https://github.com/llvm/llvm-project/commit/a975fde23a5e64721d75022b2a072a0b19f4b279 DIFF: https://github.com/llvm/llvm-project/commit/a975fde23a5e64721d75022b2a072a0b19f4b279.diff LO

[PATCH] D77408: [clang] Annotate trivial getters and setters on hover.

2020-04-03 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rGa975fde23a5e: [clang] Annotate trivial getters and setters on hover. (authored by sammccall). Changed prior to commit: https://reviews.llvm.org/D77408?vs=2548

[clang-tools-extra] ebd522a - [clangd] Tweak parseDocumentation loop to use raw lines. NFC

2020-04-03 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-04-04T08:07:51+02:00 New Revision: ebd522aaa8aad74ea44db5bb4b74f1b784da9f99 URL: https://github.com/llvm/llvm-project/commit/ebd522aaa8aad74ea44db5bb4b74f1b784da9f99 DIFF: https://github.com/llvm/llvm-project/commit/ebd522aaa8aad74ea44db5bb4b74f1b784da9f99.diff LO

[PATCH] D71082: Allow system header to provide their own implementation of some builtin

2020-04-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D71082#1958597 , @manojgupta wrote: > Yes, it'd be nice if all of the FORTIFY handling can be improved. For a > simple call like memcpy of 8 bytes in the example, there is no reason to emit > all these stack/range ch

[PATCH] D77335: [AST] clang::VectorType supports any size (that fits in unsigned)

2020-04-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77335/new/ https://reviews.llvm.org/D77335 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D77150: [Analyzer] New Option for ContainerModeling: AggressiveEraseModeling

2020-04-03 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp:692-699 + std::tie(StateEnd, StateNotEnd) = State->assume(*RetEnd); + if (StateEnd) { +

[clang] 5b519cf - [X86] Add Indirect Thunk Support to X86 to mitigate Load Value Injection (LVI)

2020-04-03 Thread Craig Topper via cfe-commits
Author: Scott Constable Date: 2020-04-03T00:34:39-07:00 New Revision: 5b519cf1fc6737054cf90b53667e7ddd3a51225f URL: https://github.com/llvm/llvm-project/commit/5b519cf1fc6737054cf90b53667e7ddd3a51225f DIFF: https://github.com/llvm/llvm-project/commit/5b519cf1fc6737054cf90b53667e7ddd3a51225f.dif

[PATCH] D77348: [clangd] Enable some nice clang-tidy checks by default.

2020-04-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:695 +auto EmptyDefaults = tidy::ClangTidyOptions::getDefaults(); +EmptyDefaults.Checks.reset(); // So we

[PATCH] D76812: [X86] Add Indirect Thunk Support to X86 to mitigate Load Value Injection (LVI) [3/3]

2020-04-03 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5b519cf1fc67: [X86] Add Indirect Thunk Support to X86 to mitigate Load Value Injection (LVI) (authored by sconstab, committed by craig.topper). Herald added a project: clang. Changed prior to commit: h

[PATCH] D77184: Make it possible for lit.site.cfg to contain relative paths, and use it for llvm and clang

2020-04-03 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In D77184#1957632 , @thakis wrote: > Thanks! Hi, After the series of changes you have done, I am experiencing a build error on Windows. These are some of the errors: - Attribute ignored -- Loadable modules not s

[PATCH] D77373: Add more -fsanitize=array-bounds tests

2020-04-03 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D77373 Files: clang/test/CodeGen/bounds-checking.c clang/test/CodeGen/bounds-checking.cpp Index: clang/test/CodeGen/bounds-

[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-04-03 Thread Marcus Johnson via Phabricator via cfe-commits
MarcusJohnson91 added a comment. I agree that changing formatting randomly isn't a good idea, and I think converting AfterExternBlock to an enum is the way to go, but I'm just not sure on how it should be implemented. Ok, I've got an idea to deprecate the AfterExternBlock option and map it to a

[PATCH] D77374: Fix -fsanitize=array-bounds with comma operator

2020-04-03 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka marked 2 inline comments as done. vitalybuka added inline comments. Comment at: clang/test/CodeGen/bounds-checking.c:116 + // CHECK-NOT: @llvm.trap + return (s->t, s->a)[i]; + // CHECK: } C version works even without patch Repository: rG LLVM Gi

[PATCH] D77374: Fix -fsanitize=array-bounds with comma operator

2020-04-03 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. vitalybuka added a reviewer: rsmith. vitalybuka updated this revision to Diff 254728. vitalybuka added a comment. vitalybuka marked 2 inline comments as done. remove debug dump =

[PATCH] D77229: [Analyzer][WIP] Avoid handling of LazyCompundVals in IteratorModeling

2020-04-03 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:436 + /// context from where the region of its return value can be retrieved. + const ConstructionContext *getConstructionContext(unsigned BlockCount) const; +

[PATCH] D77374: Fix -fsanitize=array-bounds with comma operator

2020-04-03 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 254728. vitalybuka added a comment. remove debug dump Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77374/new/ https://reviews.llvm.org/D77374 Files: clang/lib/CodeGen/CGExpr.cpp clang/test/CodeGen/boun

[PATCH] D77194: [clang] Persist Attr::IsPackExpansion into the serialized AST

2020-04-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77194/new/ https://reviews.llvm.org/D77194 ___

[PATCH] D77373: Add more -fsanitize=array-bounds tests

2020-04-03 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 254729. vitalybuka added a comment. tmp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77373/new/ https://reviews.llvm.org/D77373 Files: clang/test/CodeGen/bounds-checking.c clang/test/CodeGen/bounds-che

[PATCH] D77355: [clangd] show layout info when hovering on a class/field definition.

2020-04-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:571 +if (auto Size = Ctx.getTypeSizeInCharsIfKnown(RD->getTypeForDecl())) + HI.Size = Size->getQuantity(); + QuantityType seems to be an alias for int64_t, not sure how likely

[PATCH] D77335: [AST] clang::VectorType supports any size (that fits in unsigned)

2020-04-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added inline comments. Comment at: clang/include/clang/AST/Type.h:3236 QualType ElementType; + unsigned NumElements; I think you could keep NumElements in VectorTypeBitfields (just remove the bit specifier), as the size of those bitfields can be up t

[PATCH] D76680: [SveEmitter] Add immediate checks for lanes and complex imms

2020-04-03 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Looks good to me, but just one question about the tests. If I haven't overlooked anything, I don't see tests that check the new diagnostics: "argument should be the value 90 or 270" "argument should be the value 0,90,180 or 270" Should they be here, or are they some

[PATCH] D70265: [clang-tidy] Add CppCoreGuidelines I.2 "Avoid non-const global variables" check

2020-04-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D70265#1954925 , @vingeldal wrote: > After looking more closely at the code I think the issue is within > hasLocalStorage() which is called in hasGlobalStorage(). My expectation would > be that anything inside of function s

[PATCH] D77378: [Clang] Include size and maximum in vector size error message.

2020-04-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: hokein, sammccall, rnk. Herald added a project: clang. The error message for invalid vector sizes can be a bit more helpful by including the actual maximum. This should match the recently added suggestions for error messages in the coding standar

[PATCH] D77311: clang-format: [JS] detect C++ keywords.

2020-04-03 Thread Martin Probst via Phabricator via cfe-commits
mprobst added a comment. Thanks for the feedback. Indeed, whitelisting the JS keywords is better, but we still needed a way to blacklist all C++ keywords then - Krasimir's suggestion with the #include did the trick, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-04-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > Ok, I've got an idea to deprecate the AfterExternBlock option and map it to a > new option Really? can't you just model IndentExternBlock as an enum? then say bool shouldIndent = Style.IndentExternBlock==Indented || ( Aft

<    1   2   3   >