[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, lild

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-06-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:633 + "capture a variable of type %1}3 " + "since it %select{contains a union that |}2is non-trivial to " + "%select{default-initialize|destruct|copy}0">; Should this be "`%

[PATCH] D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos

2019-06-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks, this looks good; just some nits. Comment at: lib/Sema/SemaExprCXX.cpp:7616 /// anything (having been passed an empty TypoCorrection). - void EmitAllDiagnostics() { + void EmitAllDiagnostics(bool isAmbiguous) { for (TypoExpr *TE : TypoEx

[PATCH] D63681: [clang-scan-deps] Introduce the DependencyScanning library with the thread worker code and better error handling

2019-06-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:29 +/// sources either using a fast mode where the source files are minimized, or +/// using the regular processing ru

[PATCH] D63681: [clang-scan-deps] Introduce the DependencyScanning library with the thread worker code and better error handling

2019-06-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. @aganea The FS `status` and most of file reads will be cached with the shared FS. Hopefully I can put up a patch for it this week. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63681/new/ https://reviews.llvm.org/D63681 _

r364474 - [clang-scan-deps] Introduce the DependencyScanning library with the

2019-06-26 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jun 26 14:11:51 2019 New Revision: 364474 URL: http://llvm.org/viewvc/llvm-project?rev=364474&view=rev Log: [clang-scan-deps] Introduce the DependencyScanning library with the thread worker code and better error handling This commit extracts out the code that will power

[PATCH] D63681: [clang-scan-deps] Introduce the DependencyScanning library with the thread worker code and better error handling

2019-06-26 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364474: [clang-scan-deps] Introduce the DependencyScanning library with the (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to c

r364476 - Revert r363191 "[MS] Pretend constexpr variable template specializations are inline"

2019-06-26 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Jun 26 14:16:51 2019 New Revision: 364476 URL: http://llvm.org/viewvc/llvm-project?rev=364476&view=rev Log: Revert r363191 "[MS] Pretend constexpr variable template specializations are inline" The next Visual Studio update will fix this issue, and it doesn't make sense to i

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D63048#1558806 , @sylvestre.ledru wrote: > @dexonsmith ping? I think I'd be a little more comfortable dropping `__VERSION__` entirely. There's already a way to access the clang version, and anyone with code that relies

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D63048#1559880 , @dexonsmith wrote: > In D63048#1558806 , @sylvestre.ledru > wrote: > > > @dexonsmith ping? > > > ... > FWIW, I feel similarly about `-dumpversion` (better to remo

[PATCH] D63845: [WIP] Create a clang attribute that lets users specify LLVM attributes

2019-06-26 Thread William Moses via Phabricator via cfe-commits
wsmoses created this revision. wsmoses added a reviewer: jdoerfert. Herald added a project: clang. Herald added a subscriber: cfe-commits. This (work in progress) diff adds three new attributes to clang (__attribute__((LLVMFN(string))), __attribute__((LLVMARG(paramidx, string))), __attribute__((

[PATCH] D63048: Update __VERSION__ to remove the hardcoded 4.2.1 version

2019-06-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D63048#1559894 , @lebedev.ri wrote: > In D63048#1559880 , @dexonsmith > wrote: > > > In D63048#1558806 , > > @sylvestre.ledru wrote: > > > >

r364479 - [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf

2019-06-26 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Wed Jun 26 14:36:35 2019 New Revision: 364479 URL: http://llvm.org/viewvc/llvm-project?rev=364479&view=rev Log: [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf Summary: The changes in D59673 made the choice redundant, since we can achieve single-file

[PATCH] D63789: [ODRHash] Fix null pointer dereference for ObjC selectors with empty slots.

2019-06-26 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added inline comments. Comment at: clang/lib/AST/ODRHash.cpp:73 AddBoolean(S.isUnarySelector()); unsigned NumArgs = S.getNumArgs(); for (unsigned i = 0; i < NumArgs; ++i) { vsapsai wrote: > rtrieu wrote: > > There's actually a second bug her

[PATCH] D63167: [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf

2019-06-26 Thread Aaron Puchert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364479: [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf (authored by aaronpuchert, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D63845: [WIP] Create a clang attribute that lets users specify LLVM attributes

2019-06-26 Thread William Moses via Phabricator via cfe-commits
wsmoses updated this revision to Diff 206751. wsmoses added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. Actually upload full patch so far (and not just the last commit). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

r364480 - Fix formatting after r364479

2019-06-26 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Wed Jun 26 14:39:19 2019 New Revision: 364480 URL: http://llvm.org/viewvc/llvm-project?rev=364480&view=rev Log: Fix formatting after r364479 The reflowing obscurs the functional changes, so here is a separate commit. Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D63167: [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf

2019-06-26 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Thanks for the reviews! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63167/new/ https://reviews.llvm.org/D63167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D63846: [clang] Preserve names of addrspacecast'ed values.

2019-06-26 Thread Vyacheslav Zakharin via Phabricator via cfe-commits
vzakhari created this revision. vzakhari added a reviewer: rjmccall. Herald added subscribers: cfe-commits, jfb, jvesely. Herald added a project: clang. Attach ".ascast" suffix to a value name when generating addrspacecast for it. This improves IR readability, e.g. for alloca variables, since al

[PATCH] D63845: [WIP] Create a clang attribute that lets users specify LLVM attributes

2019-06-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Please add full context to the patches (http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface) Also, some general comments inlined. Comment at: clang/include/clang/Basic/Attr.td:1652 + let Args = [StringArgument<"AttrName">

[PATCH] D63845: [WIP] Create a clang attribute that lets users specify LLVM attributes

2019-06-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. What's the target use-case here? What can't be solved with normal attributes? I wonder if this should go to cfe+llvm -dev lists first, it's kinda intrusive. I also wonder if all these should cause a clang diagnostic, at least under `-Wall`. How is versioning expected t

r364489 - [ObjC] Improve error message for a malformed objc-type-name

2019-06-26 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Wed Jun 26 16:39:23 2019 New Revision: 364489 URL: http://llvm.org/viewvc/llvm-project?rev=364489&view=rev Log: [ObjC] Improve error message for a malformed objc-type-name If the type didn't exist, we used to emit a really bad error: t.m:3:12: error: expected ')' -(nullable N

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-06-26 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added a reviewer: chandlerc. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. This change adds an AssemblerInvocation class, similar to the CompilerInvocation class. It can be used to invoke cc1as directly. The project I'm working

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-06-26 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 206769. aykevl added a comment. - removed useless anonymous namespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 Files: clang/include/clang/Frontend/AssemblerInvo

[PATCH] D63854: [NFC] Convert large lambda into method

2019-06-26 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added a reviewer: pcc. Herald added projects: clang, LLDB. Herald added subscribers: lldb-commits, cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63854 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CodeGenFunc

[PATCH] D63854: [NFC] Convert large lambda into method

2019-06-26 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 206771. vitalybuka added a comment. remove unrelated file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63854/new/ https://reviews.llvm.org/D63854 Files: clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/C

[PATCH] D63856: [ObjC] Add a -Wtautological-compare warning for BOOL

2019-06-26 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, steven_wu, rsmith. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. On macOS, BOOL is a typedef for signed char, but it should never hold a value that isn't 1 or 0. Any code that expects

[PATCH] D63857: [clang-doc] Structured HTML generator

2019-06-26 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran created this revision. DiegoAstiazaran added reviewers: juliehockett, jakehehrlich, lebedev.ri. DiegoAstiazaran added a project: clang-tools-extra. Nodes are used to represent each part of the HTML file. There are TagNodes that represent every HTML tag (p, h1, div, ...) and they h

[PATCH] D63180: [clang-doc] Adds HTML generator

2019-06-26 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran marked 4 inline comments as done. DiegoAstiazaran added inline comments. Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:106-107 + + std::string Buffer; + llvm::raw_string_ostream Members(Buffer); + if (!I.Members.empty()) jakehehrlic

[PATCH] D63857: [clang-doc] Structured HTML generator

2019-06-26 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:21 +class HTMLTag { +public: Put the class definitions in an anonymous namespace (https://llvm.org/docs/CodingStandards.html#anonymous-namespaces)

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-06-26 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 2 inline comments as done. ahatanak added inline comments. Comment at: include/clang/Sema/Sema.h:2126 +NTCUC_AutoVar, +// Initializer expression for object with automatic storage duration. +NTCUC_AutoObjInit, rjmccall wrote: > Please e

r364492 - [NFC] Remove unneeded local variables

2019-06-26 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Wed Jun 26 18:34:21 2019 New Revision: 364492 URL: http://llvm.org/viewvc/llvm-project?rev=364492&view=rev Log: [NFC] Remove unneeded local variables Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp URL: http://llvm.org/viewvc/ll

r364495 - [NFC] Return early for types with size zero

2019-06-26 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Wed Jun 26 19:08:15 2019 New Revision: 364495 URL: http://llvm.org/viewvc/llvm-project?rev=364495&view=rev Log: [NFC] Return early for types with size zero Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp URL: http://llvm.org/vie

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-06-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11085 +if (isa(I)) + continue; +if (auto E = dyn_cast(I)) ahatanak wrote: > rjmccall wrote: > > Why is this okay? Don't we need to check default-initialization for these? > I didn't c

[PATCH] D63856: [ObjC] Add a -Wtautological-compare warning for BOOL

2019-06-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. This only applies to relational operators, right? I'm a little uncomfortable with calling this "tautological" since it's not like it's *undefined behavior* to have `(BOOL) 2`, it's just *unwise*. But as long as we aren't warning about reasonable idioms that are inten

[PATCH] D63856: [ObjC] Add a -Wtautological-compare warning for BOOL

2019-06-26 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D63856#1560180 , @rjmccall wrote: > This only applies to relational operators, right? I'm a little uncomfortable > with calling this "tautological" since it's not like it's *undefined > behavior* to have `(BOOL) 2`, i

r364502 - [clang] Add DISuprogram and DIE for a func decl

2019-06-26 Thread Djordje Todorovic via cfe-commits
Author: djtodoro Date: Wed Jun 26 23:44:44 2019 New Revision: 364502 URL: http://llvm.org/viewvc/llvm-project?rev=364502&view=rev Log: [clang] Add DISuprogram and DIE for a func decl Attach a unique DISubprogram to a function declaration that will be used for call site debug info. ([7/13] Introd

[PATCH] D61479: Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"

2019-06-26 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a subscriber: cfe-commits. sberg added a comment. Any thoughts on this? (cfe-commits had inadvertently been missing from subscribers, it touches clang as well as compiler-rt.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61479/new/ https://reviews.llvm.org/D61479 _

<    1   2