[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 _

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] 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

[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] 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

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

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

[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

[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] 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 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] 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] 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] 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] 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] 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

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] 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

[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] 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] 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

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] 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

[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] 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

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] 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: > > > >

[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#1559880 , @dexonsmith wrote: > In D63048#1558806 , @sylvestre.ledru > wrote: > > > @dexonsmith ping? > > > ... > FWIW, I feel similarly about `-dumpversion` (better to remo

[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

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] 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

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
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 _

[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] 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] 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] D63638: [clang][NewPM] Add new pass manager RUN lines to avx512f-builtins.c

2019-06-26 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. @chandlerc ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63638/new/ https://reviews.llvm.org/D63638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[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] D63638: [clang][NewPM] Add new pass manager RUN lines to avx512f-builtins.c

2019-06-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Any updates on this? I'm thinking that in the meantime maybe we could commit D63174 and work on this while that lands. If so, we could get an upstream new PM buildbot that can catch any new PM regressions. CHANGES SINCE LAST ACTIO

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh 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, ar

[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] D63742: [WebAssembly] Implement Address Sanitizer for Emscripten

2019-06-26 Thread Guanzhong Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364468: [WebAssembly] Implement Address Sanitizer for Emscripten (authored by quantum, committed by ). Changed prior to commit: https://reviews.llvm.org/D63742?vs=206719&id=206732#toc Repository: rL

[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 planned changes to this revision. ahatanak added a comment. This patch should diagnose lvalue-to-rvalue conversion of volatile non-trivial C unions too, but it currently doesn't. void test(volatile union U0 *a) { (void)*a; } Repository: rC Clang CHANGES SINCE LAST ACTION

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh 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, ar

[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

[clang-tools-extra] r364464 - BitStream reader: propagate errors

2019-06-26 Thread JF Bastien via cfe-commits
Author: jfb Date: Wed Jun 26 12:50:12 2019 New Revision: 364464 URL: http://llvm.org/viewvc/llvm-project?rev=364464&view=rev Log: BitStream reader: propagate errors The bitstream reader handles errors poorly. This has two effects: * Bugs in file handling (especially modules) manifest as an "une

r364464 - BitStream reader: propagate errors

2019-06-26 Thread JF Bastien via cfe-commits
Author: jfb Date: Wed Jun 26 12:50:12 2019 New Revision: 364464 URL: http://llvm.org/viewvc/llvm-project?rev=364464&view=rev Log: BitStream reader: propagate errors The bitstream reader handles errors poorly. This has two effects: * Bugs in file handling (especially modules) manifest as an "une

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 2 inline comments as done. lildmh 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, ar

[PATCH] D63786: Print NULL as "(null)" in diagnostic message

2019-06-26 Thread Xing Xue via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364462: Print NULL as "(null)" in diagnostic message (authored by xingxue, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews

r364462 - Print NULL as "(null)" in diagnostic message

2019-06-26 Thread Xing Xue via cfe-commits
Author: xingxue Date: Wed Jun 26 12:27:16 2019 New Revision: 364462 URL: http://llvm.org/viewvc/llvm-project?rev=364462&view=rev Log: Print NULL as "(null)" in diagnostic message Summary: Passing a null pointer to the printf family for a %s format specifier leads to undefined behaviour. The test

[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] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D62977#1559637 , @astrelni wrote: > In D62977#1559628 , @lebedev.ri > wrote: > > > It //sounds// correct, but i don't see accompanying test changes, so i > > can't be sure. > > > The

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-26 Thread Alex Strelnikov via Phabricator via cfe-commits
astrelni added a comment. In D62977#1559628 , @lebedev.ri wrote: > It //sounds// correct, but i don't see accompanying test changes, so i can't > be sure. The tests as they are cover the positive case in that they would not show warning or fixes if we

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

2019-06-26 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a subscriber: rnk. aganea added a comment. A bit more detail on what we're seeing on our end (specs in the post above). The 'Count' column represents the number of 1ms samples taken in that function. The 'Weight' column is cumulated times for all cores, for a given process, in ms.

[PATCH] D63623: [clang-tidy] new check: bugprone-posix-return

2019-06-26 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PosixReturnCheck.cpp:49 +diag(OperatorLoc, "POSIX functions (except posix_openpt) never return negative values") +<< FixItHint::CreateReplacement(OperatorLoc, Twine(">").str()); +r

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-06-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This change mostly aims to illustrate that `TreeBuilder` seems to be powerful enough to go beyond basic nodes. But it also introduces enough nodes to make the syntax trees minimally useful for traversing statement nodes. Hopefully that could become a good basis to

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. It //sounds// correct, but i don't see accompanying test changes, so i can't be sure. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62977/new/ https://reviews.llvm.org/D62977 ___ cfe-commits mailing list cfe-com

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-26 Thread Alex Strelnikov via Phabricator via cfe-commits
astrelni added a comment. In D62977#1559344 , @lebedev.ri wrote: > In D62977#1559334 , @astrelni wrote: > > > In D62977#1556346 , @lebedev.ri > > wrote: > > > > > In D62977#

[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

2019-06-26 Thread Alex Strelnikov via Phabricator via cfe-commits
astrelni updated this revision to Diff 206720. astrelni marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62977/new/ https://reviews.llvm.org/D62977 Files: clang-tools-extra/clang-tidy/google/CMakeLists.txt clang-tools-extra/clang-tidy/google/GoogleTidyM

[PATCH] D63835: [Syntax] Add nodes for most common statements

2019-06-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added a project: clang. ilya-biryukov added a parent revision: D61637: [Syntax] Introduce syntax trees. Most of the statements mirror the ones provided by clang AST. Major differences are: - expressions are wra

[PATCH] D63742: [WebAssembly] Implement Address Sanitizer for Emscripten

2019-06-26 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. This revision is now accepted and ready to land. Remember to remove "A symbol __global_base is added so that code may know where the shadow memory ends and real memory begins." from the CL description. Repository: rG LLVM Github Monorepo

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2019-06-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/llvm/IR/IntrinsicInst.h:235 + ebStrict ///< This corresponds to "fpexcept.strict". }; kpn wrote: > rjmccall wrote: > > kpn wrote: > > > rjmccall wrote: > > > > Is it okay that `ebUnspecifie

[PATCH] D63742: [WebAssembly] Implement Address Sanitizer for Emscripten

2019-06-26 Thread Guanzhong Chen via Phabricator via cfe-commits
quantum updated this revision to Diff 206719. quantum added a comment. Split wasm-ld change into D63833 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63742/new/ https://reviews.llvm.org/D63742 Files: clang/lib/

[PATCH] D61637: [Syntax] Introduce syntax trees

2019-06-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This is now in a pretty good shape, I've incorporated changes after our offline discussions about child roles. The builder interface is also much richer now, removing a requirement that the tree has to be traversed left-to-right (bottom-up is still required!). Re

[PATCH] D61637: [Syntax] Introduce syntax trees

2019-06-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 206715. ilya-biryukov added a comment. - Remove (outdated) changes to gn files Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61637/new/ https://reviews.llvm.org/D61637 Files: clang/include/clang/Toolin

[PATCH] D63623: [clang-tidy] new check: bugprone-posix-return

2019-06-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 marked 2 inline comments as done. jcai19 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PosixReturnCheck.cpp:49 +diag(OperatorLoc, "POSIX functions (except posix_openpt) never return negative values") +<< FixItHint::CreateReplacement(

[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

2019-06-26 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: include/llvm/IR/IntrinsicInst.h:235 + ebStrict ///< This corresponds to "fpexcept.strict". }; rjmccall wrote: > kpn wrote: > > rjmccall wrote: > > > Is it okay that `ebUnspecified` and `ebInvalid` overl

[PATCH] D61637: [Syntax] Introduce syntax trees

2019-06-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 206714. ilya-biryukov added a comment. - Introduce roles to allow distinguishing the child nodes. - Remove recovery node, use an unknown role instead. - TreeBuidler now can consume children at any point, not just suffix nodes. Repository: rG LLVM Git

[PATCH] D63734: Update CODE_OWNERS.txt for clang-doc

2019-06-26 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63734/new/ https://reviews.llvm.org/D63734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 2 inline comments as done. lildmh 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, ar

r364453 - Make AddLastArg() variadic and use it more. No behavior change.

2019-06-26 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Jun 26 10:51:47 2019 New Revision: 364453 URL: http://llvm.org/viewvc/llvm-project?rev=364453&view=rev Log: Make AddLastArg() variadic and use it more. No behavior change. Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp Modified: cfe/trunk/lib/Driver/ToolChains/Cla

[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] D63518: BitStream reader: propagate errors

2019-06-26 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I think this is ready to go! I rebased and ran `check-all` for LLVM / clang / clang-tools-extras and everything passes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63518/new/ https://reviews.llvm.org/D63518 __

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:744 OMPRTL__tgt_target_data_update_nowait, + // Call to int64_t __tgt_mapper_num_components(void *rt_mapper_handle); + OMPRTL__tgt_mapper_num_components, --

[PATCH] D61989: [clang-tidy] enable modernize-concat-nested-namespaces on header files

2019-06-26 Thread Xiao Shi via Phabricator via cfe-commits
shixiao added a comment. Ping =) @JonasToth Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61989/new/ https://reviews.llvm.org/D61989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-06-26 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63082/new/ https://reviews.llvm.org/D63082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh 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, ar

[PATCH] D63822: [Driver] Delete --print-supported-cpus in favor of -mcpu=? or -mtune=?

2019-06-26 Thread Ziang Wan via Phabricator via cfe-commits
ziangwan added a comment. Hey @MaskRay , can you explain why we should remove --print-supported-cpus. There already are similar options in clang such as `--print-effective-triple` and `--print-libgcc-file-name`. On the other hand, I almost never see an option goes like `-xxx=?`. Repository:

[clang-tools-extra] r364442 - [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Jun 26 09:04:38 2019 New Revision: 364442 URL: http://llvm.org/viewvc/llvm-project?rev=364442&view=rev Log: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator. Summary: Tidy check behavior often depends on language and/or clang-tidy options. This

[clang-tools-extra] r364435 - [clang-tidy] Fix ClangTidyTest to initialize context before checks.

2019-06-26 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Wed Jun 26 08:04:33 2019 New Revision: 364435 URL: http://llvm.org/viewvc/llvm-project?rev=364435&view=rev Log: [clang-tidy] Fix ClangTidyTest to initialize context before checks. Summary: Currently, `clang::tidy::test::runCheckOnCode()` constructs the check instances *befor

[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.

2019-06-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:47 #include +#include NIT: This include is redundant, maybe remove? Probably added by accident. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:71

[PATCH] D63288: [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.

2019-06-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 206668. ymandel added a comment. resp. to comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63288/new/ https://reviews.llvm.org/D63288 Files: clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck

[PATCH] D63784: [clang-tidy] Fix ClangTidyTest to initialize context before checks.

2019-06-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h:48 + +template class TestClangTidyAction : public ASTFrontendAction { gribozavr wrote: > "CheckTypes"? 'cause "Checks" below is also technically a "check list". A

[PATCH] D63784: [clang-tidy] Fix ClangTidyTest to initialize context before checks.

2019-06-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 206667. ymandel marked 3 inline comments as done. ymandel added a comment. responded to comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63784/new/ https://reviews.llvm.org/D63784 Files: clang-tools-e

[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.

2019-06-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked 3 inline comments as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:75 + if (!SM->isInMainFile(D->getLocation())) +// This decl comes from another file and should not be included in the +// top leve

[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.

2019-06-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 206664. jvikstrom added a comment. Removed comment, getting SM from Decl and removed old check for checking the file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63817/new/ https://reviews.llvm.org/D63817

[PATCH] D63773: [clangd] dummy variable extraction on a function scope

2019-06-26 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 206663. SureYeaah marked 4 inline comments as done. SureYeaah added a comment. Refactored code - Refactored code as pointed by kadircet - Fixed crash for if statements without an else clause Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D63822: [Driver] Delete --print-supported-cpus in favor of -mcpu=? or -mtune=?

2019-06-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: kongyi, ziangwan. Herald added subscribers: cfe-commits, srhines. Herald added a project: clang. Also fix some style issues after D63105 . Repository: rC Clang https://reviews.llvm.org/D63822 Files: do

[PATCH] D62574: Initial draft of target-configurable address spaces.

2019-06-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked 3 inline comments as done. ebevhan added a comment. In D62574#1552220 , @Anastasia wrote: > Ok, I think at some point you might want to test extra functionality that > doesn't fit into OpenCL model, for example explicit conversion over > n

r364428 - Make CodeGen depend on ASTMatchers

2019-06-26 Thread Michael Liao via cfe-commits
Author: hliao Date: Wed Jun 26 07:13:43 2019 New Revision: 364428 URL: http://llvm.org/viewvc/llvm-project?rev=364428&view=rev Log: Make CodeGen depend on ASTMatchers - Shared library builds are broken due to the missing dependency. Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt Modified: c

[PATCH] D63821: [clangd] Added C++ API code for semantic highlighting

2019-06-26 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, javed.absar. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63821 Files: clang-tools-

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-06-26 Thread serge via Phabricator via cfe-commits
serge-sans-paille marked 10 inline comments as done. serge-sans-paille added inline comments. Comment at: llvm/cmake/modules/AddLLVM.cmake:808 +if(NOT llvm-pass-plugins) +# Target used to hold global properties referencable from generator-expression Meiner

[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

2019-06-26 Thread Djordje Todorovic via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364424: [clang/DIVar] Emit the flag for params that have unmodified value (authored by djtodoro, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to com

[PATCH] D63561: [OpenCL] Improve diagnostic for placement new

2019-06-26 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364423: [OpenCL] Improve diagnostic for placement new (authored by svenvh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews

[PATCH] D63773: [clangd] dummy variable extraction on a function scope

2019-06-26 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah marked 12 inline comments as done. SureYeaah added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:54 + +// RAV subclass to find all DeclRefs in a given Stmt +class FindDeclRefsVisitor kadircet wrote: > I believ

r364424 - [clang/DIVar] Emit the flag for params that have unmodified value

2019-06-26 Thread Djordje Todorovic via cfe-commits
Author: djtodoro Date: Wed Jun 26 06:32:02 2019 New Revision: 364424 URL: http://llvm.org/viewvc/llvm-project?rev=364424&view=rev Log: [clang/DIVar] Emit the flag for params that have unmodified value Emit the debug info flag that indicates that a parameter has unchanged value throughout a functi

r364423 - [OpenCL] Improve diagnostic for placement new

2019-06-26 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Wed Jun 26 06:31:24 2019 New Revision: 364423 URL: http://llvm.org/viewvc/llvm-project?rev=364423&view=rev Log: [OpenCL] Improve diagnostic for placement new Without an explicit declaration for placement new, clang would reject uses of placement new with "'default new' is not

[PATCH] D61446: Generalize the pass registration mechanism used by Polly to any third-party tool

2019-06-26 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 206648. serge-sans-paille marked an inline comment as done. serge-sans-paille added a comment. @Meinersbur your comment and my devs crossed, but this should be fine. This update enables new PM static plugin support for clang, something that was lac

[PATCH] D63817: [clangd] No longer getting template instantiations from header files in Main AST.

2019-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdUnit.cpp:74 + if (!SM->isInMainFile(D->getLocation())) +// This decl comes from another file and should not be included in the you could get SourceManager from `D->getASTConte

  1   2   >