[PATCH] D60605: [clangd] Revamp textDocument/onTypeFormatting.

2019-04-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Found today: if (something) return; // some long comment // that takes two lines.^ Expected: comment on last line is not re-indented. Actual (comment re-indented): if (something) return; // some long comment // that takes two lines. Rep

[PATCH] D61269: [CommandLine] Change help output to prefix long options with `--` instead of `-`. NFC . Part 3 of 5

2019-04-30 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 197267. hintonda added a comment. Herald added subscribers: cfe-commits, thopre. Herald added a project: clang. - Fix dashes in error messages and in tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61269/n

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2019-04-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus reopened this revision. Szelethus added a comment. This revision is now accepted and ready to land. Herald added a project: clang. Reverted in rCTE348344 . Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D5

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2019-04-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus commandeered this revision. Szelethus added a reviewer: donat.nagy. Szelethus added a comment. I'll take a look at this. In D54757#1319831 , @JonasToth wrote: > I had to revert this patch because it broke (at least one) buildbot with an > asser

[PATCH] D61270: [CommandLine] Enable Grouping for short options by default. Part 4 of 5

2019-04-30 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 197271. hintonda added a comment. Herald added subscribers: cfe-commits, thopre. Herald added a project: clang. - Fix test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61270/new/ https://reviews.llvm.org/D61

[PATCH] D61270: [CommandLine] Enable Grouping for short options by default. Part 4 of 5

2019-04-30 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 197272. hintonda added a comment. Minimize diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61270/new/ https://reviews.llvm.org/D61270 Files: llvm/include/llvm/Support/CommandLine.h llvm/lib/Support/Co

r359539 - [analyzer][UninitializedObjectChecker] PR41611: Regard vector types as primitive

2019-04-30 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Tue Apr 30 01:47:56 2019 New Revision: 359539 URL: http://llvm.org/viewvc/llvm-project?rev=359539&view=rev Log: [analyzer][UninitializedObjectChecker] PR41611: Regard vector types as primitive https://bugs.llvm.org/show_bug.cgi?id=41611 Similarly to D61106, the checker ra

[PATCH] D61246: [analyzer][UninitializedObjectChecker] PR41611: Regard vector types as primitive

2019-04-30 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL359539: [analyzer][UninitializedObjectChecker] PR41611: Regard vector types as primitive (authored by Szelethus, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Chan

Re: r359361 - Revert Fix interactions between __builtin_constant_p and constexpr to match current trunk GCC.

2019-04-30 Thread Eric Fiselier via cfe-commits
Jorge, Why did you revert this? /Eric On Sat, Apr 27, 2019 at 6:01 AM Roman Lebedev via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Sat, Apr 27, 2019 at 3:29 AM Jorge Gorbe Moya via cfe-commits > wrote: > > > > Author: jgorbe > > Date: Fri Apr 26 17:32:04 2019 > > New Revision: 35936

[PATCH] D61297: [clang-format] Fix bug that misses some function-like macro usages

2019-04-30 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: klimek, djasper, sammccall, krasimir, MyDeveloperDay. owenpan added a project: clang. Herald added a subscriber: cfe-commits. This patch fixes PR41483 . Repository: rC Clang https://reviews.ll

[PATCH] D59413: Fix isInSystemMacro in presence of macro and pasted token

2019-04-30 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @rsmith : up :-) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59413/new/ https://reviews.llvm.org/D59413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[PATCH] D61269: [CommandLine] Change help output to prefix long options with `--` instead of `-`. NFC . Part 3 of 5

2019-04-30 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre added inline comments. Comment at: llvm/lib/Support/CommandLine.cpp:95 + +static size_t argPrefixesSize(size_t len) { + if (len == 1) Any reason why not take a StringRef of the option to compute the prefix of? That would put the .size() gymnastic in one

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-04-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 197278. ilya-biryukov added a comment. - Revamp TokenSource, make it more principled Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59885/new/ https://reviews.llvm.org/D59885 Files: clang/include/clang/

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-04-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 197279. ilya-biryukov added a comment. - Simplify collection of tokens - Move dumping code to the bottom of the file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59887/new/ https://reviews.llvm.org/D5988

[PATCH] D61269: [CommandLine] Change help output to prefix long options with `--` instead of `-`. NFC . Part 3 of 5

2019-04-30 Thread Don Hinton via Phabricator via cfe-commits
hintonda marked an inline comment as done. hintonda added inline comments. Comment at: llvm/lib/Support/CommandLine.cpp:95 + +static size_t argPrefixesSize(size_t len) { + if (len == 1) thopre wrote: > Any reason why not take a StringRef of the option to compute

[PATCH] D61136: [Analyzer] IteratorChecker - Ensure end()>=begin() and refactor begin and end symbol creation

2019-04-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added inline comments. This revision now requires changes to proceed. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:1929-1930 + + auto &SymMgr = State->getSymbolManager(); + auto Sym = SymMgr.conjureSymbol(E,

[PATCH] D61288: [Diagnostics] Implemented support for -Wswitch-default

2019-04-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 marked an inline comment as done. xbolva00 added inline comments. Comment at: include/clang/Basic/DiagnosticIDs.h:39 DIAG_SIZE_CROSSTU = 100, - DIAG_SIZE_SEMA = 3500, + DIAG_SIZE_SEMA = 3600, DIAG_SIZE_ANALYSIS = 100

[PATCH] D61015: [LibTooling] Change Transformer's TextGenerator to a partial function.

2019-04-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:47 -using TextGenerator = -std::function; +// \c TextGenerator may fail, because it processes dynamically-bound match +// results. For example, a typo in the name of a bo

[PATCH] D61051: [analyzer] Treat functions without runtime branches as "small".

2019-04-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I mean, better late then never, but LGTM :^) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61051/new/ https://reviews.llvm.org/D61051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r359548 - Fix Wpedantic "default argument specified for lambda parameter" warning. NFCI.

2019-04-30 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Tue Apr 30 03:35:37 2019 New Revision: 359548 URL: http://llvm.org/viewvc/llvm-project?rev=359548&view=rev Log: Fix Wpedantic "default argument specified for lambda parameter" warning. NFCI. Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified: clang-tools

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-04-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 197288. kadircet added a comment. - Change logic to count references from only main files Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59481/new/ https://reviews.llvm.org/D59481 Files: clang-tools-extra/cl

[PATCH] D60934: [clang] adding explicit(bool) from c++2a

2019-04-30 Thread Tyker via Phabricator via cfe-commits
Tyker marked 2 inline comments as done. Tyker added inline comments. Comment at: clang/include/clang/AST/DeclBase.h:1539-1541 +uint64_t NumCtorInitializers : 64 - NumDeclContextBits - +NumFunctionDeclBits - +/*Other used bits in CXXConstructorDecl*/ 3; ---

r359550 - Fix gcc "-Wdangling-else" warnings. NFCI.

2019-04-30 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Tue Apr 30 03:57:02 2019 New Revision: 359550 URL: http://llvm.org/viewvc/llvm-project?rev=359550&view=rev Log: Fix gcc "-Wdangling-else" warnings. NFCI. Modified: cfe/trunk/unittests/AST/ASTImporterTest.cpp Modified: cfe/trunk/unittests/AST/ASTImporterTest.cpp URL: ht

r359551 - Fix gcc "-Wdangling-else" warning. NFCI.

2019-04-30 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Tue Apr 30 03:57:37 2019 New Revision: 359551 URL: http://llvm.org/viewvc/llvm-project?rev=359551&view=rev Log: Fix gcc "-Wdangling-else" warning. NFCI. Modified: cfe/trunk/unittests/Tooling/LookupTest.cpp Modified: cfe/trunk/unittests/Tooling/LookupTest.cpp URL: http:

[PATCH] D57858: [analyzer] Add a new frontend flag to display all checker options

2019-04-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested review of this revision. Szelethus added a comment. Similarly to D60925 , I plan to make a patch that will hide most the implementation options. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57858/new/ https://reviews.llvm.org/D57858

[PATCH] D61304: [OpenCL][PR41609] Deduce static data members to __global addr space

2019-04-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: svenvh, rjmccall. Herald added subscribers: ebevhan, yaxunl. Similarly to static variables in OpenCL, static class data members should be deduced to `__global` addr space. https://reviews.llvm.org/D61304 Files: lib/Sema/SemaType.cpp

[PATCH] D61274: [Sema][AST] Explicit visibility for OpenCL/CUDA kernels/variables

2019-04-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Seems reasonable for OpenCL kernels. You might want to add an AST dump test to check that the visibility is being set correctly in case it's being printed in AST. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61274/new/ https://review

[PATCH] D61288: [Diagnostics] Implemented support for -Wswitch-default

2019-04-30 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: include/clang/Basic/DiagnosticIDs.h:39 DIAG_SIZE_CROSSTU = 100, - DIAG_SIZE_SEMA = 3500, + DIAG_SIZE_SEMA = 3600, DIAG_SIZE_ANALYSIS = 100, xbolva00 wrote: > @rsm

[PATCH] D61015: [LibTooling] Change Transformer's TextGenerator to a partial function.

2019-04-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/lib/Tooling/Refactoring/Transformer.cpp:205 if (auto Err = TransformationsOrErr.takeError()) { -llvm::errs() << "Transformation failed: " << llvm::toString(std::move(Err)) -

r359558 - Fix inconsistency in calculating DIAG_START_ values.

2019-04-30 Thread Russell Gallop via cfe-commits
Author: russell_gallop Date: Tue Apr 30 05:53:19 2019 New Revision: 359558 URL: http://llvm.org/viewvc/llvm-project?rev=359558&view=rev Log: Fix inconsistency in calculating DIAG_START_ values. This was introduced at r313975. As DIAG_SIZE_CROSSTU and DIAG_SIZE_COMMENT are both 100 this should be

[PATCH] D61264: Fix inconsistency in calculating DIAG_START values

2019-04-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL359558: Fix inconsistency in calculating DIAG_START_ values. (authored by russell_gallop, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D61309: [clang] Add no-warn support for Wa

2019-04-30 Thread Brian Cain via Phabricator via cfe-commits
bcain created this revision. bcain added reviewers: pcc, kparzysz, sidneym. bcain added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D61309 Files: clang/include/clang/Basic/CodeGenOptions.def clang/include/clang/Driver/CC1Options.td clang/lib/CodeGen/Bac

[PATCH] D61015: [LibTooling] Change Transformer's TextGenerator to a partial function.

2019-04-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 197316. ymandel marked 2 inline comments as done. ymandel added a comment. Addresses comments, including error handling style and signature of ChangeConsumer. Updates testing code to use new ChangeConsumer signature. Repository: rG LLVM Github Monorepo

[PATCH] D61130: [llvm-mc] Add reportWarning() to MCContext

2019-04-30 Thread Brian Cain via Phabricator via cfe-commits
bcain updated this revision to Diff 197317. bcain changed the repository for this revision from rL LLVM to rG LLVM Github Monorepo. bcain added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add context, add clang update. Repository: rG LLVM Github Monorepo

[PATCH] D61015: [LibTooling] Change Transformer's TextGenerator to a partial function.

2019-04-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 4 inline comments as done. ymandel added inline comments. Comment at: clang/lib/Tooling/Refactoring/Transformer.cpp:164 return SmallVector(); -T.Replacement = Edit.Replacement(Result); +auto ReplacementOrErr = Edit.Replacement(Result); +if (auto

[clang-tools-extra] r359564 - [clangd] gen_std uses multiprocessing pool to be fast. While here, log ambiguous symbols. NFC

2019-04-30 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Apr 30 07:21:10 2019 New Revision: 359564 URL: http://llvm.org/viewvc/llvm-project?rev=359564&view=rev Log: [clangd] gen_std uses multiprocessing pool to be fast. While here, log ambiguous symbols. NFC Modified: clang-tools-extra/trunk/clangd/include-mapping/gen_s

[PATCH] D61187: [clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.

2019-04-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I'm confused by some of the decisions made in this change, see below. Comment at: clang-tools-extra/trunk/clangd/test/lit.cfg.in:29 + config.available_features.add('clangd-xpc-support') + trailing newline Comment at:

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-04-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Previously we were just jumping from the symbol index to the symbol page, and grabbing all the headers mentioned

[PATCH] D61187: [clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.

2019-04-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang-tools-extra/trunk/clangd/unittests/lit.cfg.in:1 +@LIT_SITE_CFG_IN_HEADER@ +# This is a shim to run the gtest unittests in ../unittests using lit. thakis wrote: > Every other LLVM project puts the lit.cfg.in for the

[PATCH] D61187: [clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.

2019-04-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang-tools-extra/trunk/clangd/test/CMakeLists.txt:5 + # No tests for these, but we should still make sure they build. + clangd-indexer + dexp Since you're touching this anyway, there's now one test that calls clang-i

[PATCH] D38061: Set AnonymousTagLocations false for ASTContext if column info is expected not to be used

2019-04-30 Thread Taewook Oh via Phabricator via cfe-commits
twoh added a comment. Friendly ping for comments. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D38061/new/ https://reviews.llvm.org/D38061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D61187: [clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.

2019-04-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang-tools-extra/trunk/clangd/unittests/lit.cfg.in:1 +@LIT_SITE_CFG_IN_HEADER@ +# This is a shim to run the gtest unittests in ../unittests using lit. thakis wrote: > thakis wrote: > > Every other LLVM project puts the

[PATCH] D61318: [Sema] Prevent binding references with mismatching address spaces to temporaries

2019-04-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, ebevhan. This is a straw-man idea for solving binding references with address spaces to temporaries. If the logic below makes sense I will apply it elsewhere in similar checks. Arbitrary address space references can't be boun

[PATCH] D61316: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-04-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 197350. sammccall added a comment. fix std::chrono regression Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61316/new/ https://reviews.llvm.org/D61316 Files: clangd/StdSymbolMap.inc clangd/include-mapping

[PATCH] D61015: [LibTooling] Change Transformer's TextGenerator to a partial function.

2019-04-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov 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/D61015/new/ https://reviews.llvm.org/D61015 _

[PATCH] D61032: [clang] Avoid defining duplicate header search paths for libc++ on Darwin

2019-04-30 Thread Louis Dionne via Phabricator via cfe-commits
ldionne abandoned this revision. ldionne added a comment. I decided to use a different approach and first refactor the header search logic from CC1 to the driver. A patch should come eventually when I've tested it properly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and include/c++

2019-04-30 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D59168#1480801 , @phosek wrote: > In D59168#1480428 , @jdenny wrote: > > > It seems we have roughly the same situation for their ABIs. That is, for > > .so files, someone noted that libc

[PATCH] D61319: [PR41674] [OpenCL] Fix initialisation of this via pointer

2019-04-30 Thread Kévin Petit via Phabricator via cfe-commits
kpet created this revision. kpet added reviewers: Anastasia, mikael. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. When the expression used to initialise this has a pointer type, check the address space of the pointee type instead of the pointer type to decide wheth

[PATCH] D58060: Fix diagnostic for addr spaces in reference binding

2019-04-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @rjmccall or @ebevhan do you have any more feedback for this patch? Btw, it has now dependency with https://reviews.llvm.org/D61318 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58060/new/ https://reviews.llvm.org/D58060 ___

[PATCH] D60907: [OpenMP] Add math functions support in OpenMP offloading

2019-04-30 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In D60907#1483660 , @jdoerfert wrote: > In D60907#1483615 , @hfinkel wrote: > > > In D60907#1479370 , @gtbercea > > wrote: > > > > > In D60907#14791

[PATCH] D61187: [clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.

2019-04-30 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 3 inline comments as done. sammccall added inline comments. Comment at: clang-tools-extra/trunk/clangd/unittests/lit.cfg.in:1 +@LIT_SITE_CFG_IN_HEADER@ +# This is a shim to run the gtest unittests in ../unittests using lit. MaskRay wrote: > thaki

r359574 - [LibTooling] Change Transformer's TextGenerator to a partial function.

2019-04-30 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Apr 30 09:48:33 2019 New Revision: 359574 URL: http://llvm.org/viewvc/llvm-project?rev=359574&view=rev Log: [LibTooling] Change Transformer's TextGenerator to a partial function. Summary: Changes the signature of the TextGenerator std::function to return an Expected ins

[PATCH] D61015: [LibTooling] Change Transformer's TextGenerator to a partial function.

2019-04-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ymandel marked an inline comment as done. Closed by commit rL359574: [LibTooling] Change Transformer's TextGenerator to a partial function. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a s

[PATCH] D61187: [clangd] Move clangd tests to clangd directory. check-clangd is no longer part of check-clang-tools.

2019-04-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang-tools-extra/trunk/clangd/unittests/lit.cfg.in:1 +@LIT_SITE_CFG_IN_HEADER@ +# This is a shim to run the gtest unittests in ../unittests using lit. sammccall wrote: > MaskRay wrote: > > thakis wrote: > > > thakis wrot

r359578 - [LibTooling] Fix broken test after r359574.

2019-04-30 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Tue Apr 30 10:24:36 2019 New Revision: 359578 URL: http://llvm.org/viewvc/llvm-project?rev=359578&view=rev Log: [LibTooling] Fix broken test after r359574. r359574 changed the way that failures are reported, which broke the test TransformerTest.NodePartNameDeclRefFailure wh

[PATCH] D61324: Make check-clang depend on the clang-check binary always

2019-04-30 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: rnk. Herald added subscribers: llvm-commits, mgorny. Herald added a project: LLVM. check-clang (the target that runs all clang tests) used to only depend on clang-check (a binary like clang-tidy, clang-refactor, etc) if the static analyzer is

[PATCH] D60907: [OpenMP] Add math functions support in OpenMP offloading

2019-04-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. +1 to Hal's comments. @jdoerfert : > I'd even go as far as to argue that __clang_cuda_device_functions.h should > include the internal math.h wrapper to get all math functions. See also the > next comment. I'd argue other way around -- include __clang_cuda_device_function

[PATCH] D61015: [LibTooling] Change Transformer's TextGenerator to a partial function.

2019-04-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This breaks a test: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/12112/steps/check-llvm%20check-clang%20stage3%2Fmsan/logs/stdio [--] 1 test from TransformerTest [ RUN ] TransformerTest.NodePartNameDeclRefFailure /b/s

[PATCH] D60934: [clang] adding explicit(bool) from c++2a

2019-04-30 Thread Tyker via Phabricator via cfe-commits
Tyker added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:2033 + + void setExplicitSpecifier(ExplicitSpecInfo ESI); + Tyker wrote: > Tyker wrote: > > rsmith wrote: > > > Generally we don't want to have setters in the AST; the AST is intended >

[PATCH] D61015: [LibTooling] Change Transformer's TextGenerator to a partial function.

2019-04-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D61015#1484669 , @thakis wrote: > This breaks a test: > http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/12112/steps/check-llvm%20check-clang%20stage3%2Fmsan/logs/stdio > > [--] 1 test f

[PATCH] D60974: Clang IFSO driver action.

2019-04-30 Thread Jake Ehrlich via Phabricator via cfe-commits
jakehehrlich added a comment. > Does llvm-elfabi consume your proposed Schema format? Has it landed yet? No, I just proposed it and explained my reasoning. If you wanted to add this format to TextAPI that would be acceptable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D50515: Re-push "[Option] Fix PR37006 prefix choice in findNearest"

2019-04-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Herald added a project: LLVM. I re-landed this to get access to the msan output, since the link above has long expired. Here's the new link: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/31821/steps/check-clang%20msan/logs/stdio Sadly, the bot outp

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and include/c++

2019-04-30 Thread Petr Hosek via Phabricator via cfe-commits
phosek marked an inline comment as done. phosek added inline comments. Comment at: libunwind/CMakeLists.txt:190 if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) - set(DEFAULT_INSTALL_PREFIX lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/${LLVM_DEFAULT_TARGET_TRIPLE}/) -

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and include/c++

2019-04-30 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D59168#1484467 , @jdenny wrote: > In D59168#1480801 , @phosek wrote: > > > In D59168#1480428 , @jdenny wrote: > > > > > It seems we have roughly th

[PATCH] D60907: [OpenMP] Add math functions support in OpenMP offloading

2019-04-30 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D60907#1484529 , @hfinkel wrote: > In D60907#1483660 , @jdoerfert wrote: > > > In D60907#1483615 , @hfinkel wrote: > > > > > In D60907#1479370 <

r359594 - AMDGPU: Enable _Float16

2019-04-30 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Apr 30 11:35:37 2019 New Revision: 359594 URL: http://llvm.org/viewvc/llvm-project?rev=359594&view=rev Log: AMDGPU: Enable _Float16 Added: cfe/trunk/test/CodeGenCXX/amdgpu-float16.cpp Modified: cfe/trunk/lib/Basic/Targets/AMDGPU.cpp Modified: cfe/trunk/lib/Basic/

[PATCH] D38061: Set AnonymousTagLocations false for ASTContext if column info is expected not to be used

2019-04-30 Thread Wenlei He via Phabricator via cfe-commits
wenlei added a comment. In D38061#1484486 , @dblaikie wrote: > Seems like the right thing would be for the DWARF code that wants a rendered > type name to pass its own printing policy, rather than changing some > relatively global one. > > (though also I

[PATCH] D38061: Set AnonymousTagLocations false for ASTContext if column info is expected not to be used

2019-04-30 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Seems like the right thing would be for the DWARF code that wants a rendered type name to pass its own printing policy, rather than changing some relatively global one. (though also I have my doubts about the whole approach - macro expansion can change the line number

[PATCH] D60907: [OpenMP] Add math functions support in OpenMP offloading

2019-04-30 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D60907#1484756 , @jdoerfert wrote: > I actually don't want to preinclude anything and my arguments are (mostly) > for the OpenMP offloading code path not necessarily Cuda. > Maybe to clarify, what I want is: > > 1. Make sure the `

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and include/c++

2019-04-30 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D59168#1484754 , @phosek wrote: > It's the `LIBCXX_ABI_VERSION` CMake option, see > https://github.com/llvm/llvm-project/blob/master/libcxx/CMakeLists.txt#L121 Thanks. Comment at: libunwind/CMakeLists.txt:1

[PATCH] D50515: Re-push "[Option] Fix PR37006 prefix choice in findNearest"

2019-04-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. vitalybuka told me that this should repro things locally: mkdir /tmp/bot cd /tmp/bot svn checkout https://llvm.org/svn/llvm-project/zorg BUILDBOT_CLOBBER= BUILDBOT_REVISION=YOUR_REV zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fast.sh 2>&1 | tee buildlog

[PATCH] D61220: lib/Header: Fix Visual Studio builds try #2

2019-04-30 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision. smeenai added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61220/new/ https://reviews.llvm.org/D61220 ___ cfe-commits mailing list cfe-commits@lists.llv

r359598 - Add requires amdgpu-registered-target for amdgpu-float16.cpp

2019-04-30 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Apr 30 12:06:15 2019 New Revision: 359598 URL: http://llvm.org/viewvc/llvm-project?rev=359598&view=rev Log: Add requires amdgpu-registered-target for amdgpu-float16.cpp Modified: cfe/trunk/test/CodeGenCXX/amdgpu-float16.cpp Modified: cfe/trunk/test/CodeGenCXX/amdgpu-

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2019-04-30 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the insightful explanation, Craig. As far as I understand, implementing intrinsics with builtins is possible but it is more complex and wasn't providing enough value to prefer it over inline assembly. If that is correct, I'd like to revive the abandoned imple

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2019-04-30 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Your understanding is correct. As far as testing I think the existing testing in the original patches is sufficient. I'm not sure I understand how a target specific intrinsic that only works on x86 in the bitcode is substantially better than inline assembly. Do y

[PATCH] D61333: [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

2019-04-30 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: shafik, teemperor, jingham, clayborg, a_sidorin. Herald added subscribers: lldb-commits, cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added projects: clang, LLDB. With LLDB we use localUncac

r359603 - [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-04-30 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Apr 30 12:35:14 2019 New Revision: 359603 URL: http://llvm.org/viewvc/llvm-project?rev=359603&view=rev Log: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux When compiler-rt is selected as the runtime library for Linux targets use its crtbegin.o/crtend.o impleme

[PATCH] D61333: [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

2019-04-30 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/lang/c/modules/main.c:8 int b; -} FILE; +} MYFILE; In TestCmodules.py we have `import Darwin` and then `expr *fopen("/dev/zero", "w")`

[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux

2019-04-30 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL359603: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux (authored by phosek, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D51329: [Attribute/Diagnostics] Print macro if definition is an attribute declaration

2019-04-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 197415. leonardchan marked 17 inline comments as done. leonardchan removed a reviewer: martong. Herald added a reviewer: martong. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51329/new/ https://reviews.llvm.

[PATCH] D51329: [Attribute/Diagnostics] Print macro if definition is an attribute declaration

2019-04-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:257-262 + bool AttrStartIsInMacro = + (StartLoc.isMacroID() && Lexer::isAtStartOfMacroExpansion( + StartLoc, SrcMgr, PP.getLangOpts())); + bool At

[PATCH] D59168: [runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and include/c++

2019-04-30 Thread Petr Hosek via Phabricator via cfe-commits
phosek marked an inline comment as not done. phosek added a subscriber: rsmith. phosek added inline comments. Comment at: libunwind/CMakeLists.txt:190 if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) - set(DEFAULT_INSTALL_PREFIX lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSI

[PATCH] D50515: Re-push "[Option] Fix PR37006 prefix choice in findNearest"

2019-04-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I think I figured it out. r359604 should fix the bug that caused this to be reverted twice. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50515/new/ https://reviews.llvm.org/D50515 ___ cfe-com

[PATCH] D51329: [Attribute/Diagnostics] Print macro if definition is an attribute declaration

2019-04-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 197416. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51329/new/ https://reviews.llvm.org/D51329 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/RecursiveASTVisitor.h clang/include/

[PATCH] D61335: [LibTooling] Add support to Transformer for composing rules as an ordered choice.

2019-04-30 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. Herald added a project: clang. This revision adds a new kind of rewrite rule, `CompositeRewriteRule`, which composes multiple subrules into a new rule that allows ordered-choice among its subrules. With this feature, users can

[PATCH] D38061: Set AnonymousTagLocations false for ASTContext if column info is expected not to be used

2019-04-30 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D38061#1484568 , @wenlei wrote: > In D38061#1484486 , @dblaikie wrote: > > > Seems like the right thing would be for the DWARF code that wants a > > rendered type name to pass its own p

[PATCH] D60848: [Parser] Avoid correcting delayed typos in array subscript multiple times.

2019-04-30 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 197421. vsapsai added a comment. - Add a test case with `-disable-free`. Thanks for the suggestion, Erik. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60848/new/ https://reviews.llvm.org/D60848 Files: clang/lib/Parse/ParseExpr.cpp clang/test/

[PATCH] D61280: Variable auto-init: don't initialize aggregate padding of all aggregates

2019-04-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. IIRC, C says *members* are initialized as if they were in static storage, which might mean that their interior padding should be zeroed, but I don't think says anything about the padding in the enclosing aggregate. But I think zero-initializing padding is probably the

[PATCH] D61280: Variable auto-init: don't initialize aggregate padding of all aggregates

2019-04-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. LGTM, I think this makes sense. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61280/new/ https://reviews.llvm.org/D61280 _

[PATCH] D61338: [WebAssembly] Use the "wasm32-wasi" triple in tests

2019-04-30 Thread Dan Gohman via Phabricator via cfe-commits
sunfish created this revision. sunfish added reviewers: dschuff, sbc100, aheejin. Herald added a subscriber: jgravelle-google. Herald added a project: clang. Similar to https://reviews.llvm.org/D61334, update clang tests to use the "wasm32-wasi" triple, removing the "-musl" environment and omitti

[PATCH] D60930: [codeview] Fix symbol names for dynamic initializers and atexit stubs

2019-04-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In Swift we basically shove *everything* through our corresponding linkage-entity structure, so I'm not opposed to the basic idea. That said, it's unfortunate that this needs to be raised to the AST level. Also, you have really been contributing to this project far to

[PATCH] D61280: Variable auto-init: don't initialize aggregate padding of all aggregates

2019-04-30 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D61280#1485073 , @rjmccall wrote: > IIRC, C says *members* are initialized as if they were in static storage, > which might mean that their interior padding should be zeroed, but I don't > think says anything about the padding in

[PATCH] D61280: Variable auto-init: don't initialize aggregate padding of all aggregates

2019-04-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I don't think the implication is supposed to be that padding is zero-initialized or not depending on where in the aggregate it appears, but it doesn't really matter, I don't think we're arguing about the goal of this patch. Repository: rC Clang CHANGES SINCE LAST A

[PATCH] D61304: [OpenCL][PR41609] Deduce static data members to __global addr space

2019-04-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Presumably a similar rule would apply to thread-locals if you supported them. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61304/new/ https://reviews.llvm.org/D61304 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D61280: Variable auto-init: don't initialize aggregate padding of all aggregates

2019-04-30 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D61280#1485115 , @rjmccall wrote: > I don't think the implication is supposed to be that padding is > zero-initialized or not depending on where in the aggregate it appears, but > it doesn't really matter, I don't think we're argu

[PATCH] D61274: [Sema][AST] Explicit visibility for OpenCL/CUDA kernels/variables

2019-04-30 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay. So it sounds like this should either be a device-only rule, with no warning in mixed-mode languages like CUDA, or we should take a different approach. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61274/new/ https://reviews.llvm

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-04-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I'd like to understand more about the intended use cases of this functionality. What information do clients want? Comment at: clang/lib/Lex/Preprocessor.cpp:870-900 + TokenSource Source; do { +Source = TokenSource(); + switch (CurLexerKind)

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-30 Thread Richard Townsend (Arm) via Phabricator via cfe-commits
richard.townsend.arm added inline comments. Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1106 + +FI.getReturnInfo().setInReg(isAArch64 && !IsSizeGreaterThan128(RD)); I'm not sure what the IsSizeGreaterThan128 check is doing here - if the return type is over

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-30 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 197436. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D51329: [Attribute/Diagnostics] Print macro if definition is an attribute declaration

2019-04-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:257-262 + bool AttrStartIsInMacro = + (StartLoc.isMacroID() && Lexer::isAtStartOfMacroExpansion( + StartLoc, SrcMgr, PP.getLangOpts())); + bool AttrEnd

  1   2   >