[PATCH] D40451: [OpenMP] Add function attribute for triggering shared memory lowering in the LLVM backend

2017-11-24 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 124246. Repository: rL LLVM https://reviews.llvm.org/D40451 Files: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp test/OpenMP/nvptx_data_sharing.cpp Index: test/OpenMP/nvptx_data_sharing.cpp ===

[PATCH] D40451: [OpenMP] Add function attribute for triggering shared memory lowering in the LLVM backend

2017-11-24 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. Herald added a subscriber: jholewinski. Since OpenMP and CUDA share the same toolchain we need to disable: - the lowering of variables to shared memory in the LLVM NVPTX backend - the emission of the shared depot - the emission of shared stack pointers when compil

[PATCH] D40450: [clangd] Refactoring of GlobalCompilationDatabase

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. The interface used is now tooling::CompilationDatabase. The various behaviors of the existing CDB implementation is decomposed into several classes responsible for one aspect each. - The fallback commands are now a FixedCompilationDatabase. For now, this is done

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D30610#934891, @malcolm.parsons wrote: > I have 1000s of warnings from this check. > > A lot of them are about google tests: > warning: class 'Foo_Bar_Test' defines a copy constructor and a copy > assignment operator but does not define

[PATCH] D38978: [OpenMP] Enable the lowering of implicitly shared variables in OpenMP GPU-offloaded target regions to the GPU shared memory

2017-11-24 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 124243. gtbercea added a comment. Add regression tests and allow for shared memory lowering to be disabled at function level. Repository: rL LLVM https://reviews.llvm.org/D38978 Files: include/llvm/CodeGen/TargetPassConfig.h lib/CodeGen/TargetPassC

[PATCH] D37903: Fix assume-filename handling in clang-format.el

2017-11-24 Thread Micah Werbitt via Phabricator via cfe-commits
werbitt updated this revision to Diff 124242. werbitt edited the summary of this revision. werbitt added a comment. Updating for upstream head https://reviews.llvm.org/D37903 Files: tools/clang-format/clang-format.el Index: tools/clang-format/clang-format.el

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-11-24 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. I have 1000s of warnings from this check. A lot of them are about google tests: warning: class 'Foo_Bar_Test' defines a copy constructor and a copy assignment operator but does not define a destructor [cppcoreguidelines-special-member-functions] I'd like an opti

[PATCH] D40448: Add a printing policy for AST dumping

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. The AST dump functionality does not currently make use of a printing policy, so when dumping C++ code, you will see `_Bool`, `struct Foo` and other C-isms in the output. This patch adds a `PrintingPolicy` object to the AST dumper to get slightly improved out

[PATCH] D40445: [C++17] Allow an empty expression in an if init statement

2017-11-24 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 124239. Rakete edited the summary of this revision. Rakete added a comment. Added more test coverage for compatibility warnings, and fixed a bug at the same time :). https://reviews.llvm.org/D40445 Files: lib/Parse/ParseExprCXX.cpp test/CXX/

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124238. Nebiroth marked 3 inline comments as done. Nebiroth added a comment. Fixed test checking for values from an incorrect bit shift https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-11-24 Thread Florian Gross via Phabricator via cfe-commits
fgross added a comment. > If you've written your own copy functions then you probably want to write > your own move functions to allow moving, so `AllowMissingMoveFunctions` > doesn't make sense. The scenario I had in mind was legacy code which was written back when it still was the "rule of t

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle requested changes to this revision. malaperle added inline comments. This revision now requires changes to proceed. Comment at: test/clangd/documenthighlight.test:1 +# RUN: clangd -run-synchronously < %s | FileCheck %s +# It is absolutely vital that this file has CRLF l

[PATCH] D40445: [C++17] Allow an empty expression in an if init statement

2017-11-24 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 124237. Rakete marked an inline comment as done. Rakete added a comment. Moved the while test outside of the #ifdef region for better coverage :) https://reviews.llvm.org/D40445 Files: lib/Parse/ParseExprCXX.cpp test/CXX/stmt.stmt/stmt.select

[PATCH] D40445: [C++17] Allow an empty expression in an if init statement

2017-11-24 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 124236. Rakete added a comment. Addressed final review comments by adding the appropriate warnings that were missing previously. https://reviews.llvm.org/D40445 Files: lib/Parse/ParseExprCXX.cpp test/CXX/stmt.stmt/stmt.select/p3.cpp Index: test

[PATCH] D40445: [C++17] Allow an empty expression in an if init statement

2017-11-24 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete updated this revision to Diff 124235. Rakete added a comment. Added a test for the switch statement and added full context to the diff. https://reviews.llvm.org/D40445 Files: lib/Parse/ParseExprCXX.cpp test/CXX/stmt.stmt/stmt.select/p3.cpp Index: test/CXX/stmt.stmt/stmt.sel

[PATCH] D40445: [C++17] Allow an empty expression in an if init statement

2017-11-24 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi, thanks for working on this! Can you add tests to make sure that this also works with switch statements (which also have this bug), and not with while? Also, it makes it a lot easier to review these patches if you add context lines to the diff. Thanks, Erik

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39722#934783, @aaron.ballman wrote: > In https://reviews.llvm.org/D39722#934781, @tk1012 wrote: > > > Hello Aaron, > > > > I remove the semicolon. > > > > > Is this type actually correct for C++? > > > > Yes, it is. > > clang generates

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In https://reviews.llvm.org/D39722#934781, @tk1012 wrote: > Hello Aaron, > > I remove the semicolon. > > > Is this type actually correct for C++? > > Yes, it is. > clang generates the AST for `declToImport` struct like this. >

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Takafumi Kubota via Phabricator via cfe-commits
tk1012 updated this revision to Diff 124232. tk1012 added a comment. Hello Aaron, I remove the semicolon. > Is this type actually correct for C++? Yes, it is. clang generates the AST for `declToImport` struct like this. |-CXXRecordDecl 0x8b19fe0 col:29 implicit struct declToImport `-CXXMe

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2017-11-24 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood updated this revision to Diff 124231. hamzasood added a comment. Good idea, I've added that to the test. I'll give Richard some time to look over this before committing. https://reviews.llvm.org/D40443 Files: lib/Sema/SemaDecl.cpp test/CXX/modules-ts/basic/basic.def.odr/p6/module-

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124230. Nebiroth marked 6 inline comments as done. Nebiroth added a comment. Fixed a few outstanding issues that were reported as completed https://reviews.llvm.org/D38425 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer

[clang-tools-extra] r318961 - Fix MSVC double-float implicit truncation warning. NFCI

2017-11-24 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Nov 24 10:18:42 2017 New Revision: 318961 URL: http://llvm.org/viewvc/llvm-project?rev=318961&view=rev Log: Fix MSVC double-float implicit truncation warning. NFCI Modified: clang-tools-extra/trunk/clangd/ClangdUnit.cpp Modified: clang-tools-extra/trunk/clangd/Clang

[PATCH] D39722: [ASTImporter] Support TypeTraitExpr Importing

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:553 + EXPECT_TRUE(testImport("template struct declToImport {" + " void m() { __is_pod(T); };" + "};" Drop the spurious semicolon a

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle requested changes to this revision. malaperle added inline comments. This revision now requires changes to proceed. Comment at: clangd/ClangdLSPServer.cpp:242 + + auto Items = Server + .findDocumentHighlights(Params.textDocument.uri.file,

[PATCH] D40435: [clang-format] Deduplicate using declarations

2017-11-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318960: [clang-format] Deduplicate using declarations (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D40435 Files: cfe/trunk/lib/Format/UsingDeclarationsSorter.cpp cfe/trunk/

r318960 - [clang-format] Deduplicate using declarations

2017-11-24 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Fri Nov 24 10:00:01 2017 New Revision: 318960 URL: http://llvm.org/viewvc/llvm-project?rev=318960&view=rev Log: [clang-format] Deduplicate using declarations Summary: This deduplicated equivalent using declarations within a block. Reviewers: bkramer Reviewed By: bkramer

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D30610#934704, @malcolm.parsons wrote: > In https://reviews.llvm.org/D30610#934617, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D30610#934452, @malcolm.parsons wrote: > > > > > I'd like an `AllowDeletedCopyFunctions` option th

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 124224. Nebiroth marked an inline comment as done. Nebiroth added a comment. Getting DocumentHighlightKind is now done in DocumentHighlightsFinder Removed duplicated and unused code Refactored method and variable names https://reviews.llvm.org/D38425 Files

[PATCH] D40445: [C++17] Allow an empty expression in an if init statement

2017-11-24 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete created this revision. Rakete added a project: clang. This fixes PR35381 . https://reviews.llvm.org/D40445 Files: lib/Parse/ParseExprCXX.cpp test/CXX/stmt.stmt/stmt.select/p3.cpp Index: test/CXX/stmt.stmt/stmt.select/p3.cpp

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2017-11-24 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. LGTM. Maybe it makes sense to also test that an unrelated translation unit that imports module 'test' sees neither 'a' nor 'b'. https://reviews.llvm.org/D40443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-11-24 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D30610#934617, @aaron.ballman wrote: > In https://reviews.llvm.org/D30610#934452, @malcolm.parsons wrote: > > > I'd like an `AllowDeletedCopyFunctions` option that allows move and > > destructor functions to be missing when copying is

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread William Enright via Phabricator via cfe-commits
Nebiroth marked 31 inline comments as done. Nebiroth added inline comments. Comment at: clangd/ClangdServer.h:291 + /// Get document highlights for a symbol hovered on. + Tagged> findDocumentHighlights(PathRef File, +

r318959 - clang-format: [JS] do not break in ArrayType[].

2017-11-24 Thread Martin Probst via cfe-commits
Author: mprobst Date: Fri Nov 24 09:05:56 2017 New Revision: 318959 URL: http://llvm.org/viewvc/llvm-project?rev=318959&view=rev Log: clang-format: [JS] do not break in ArrayType[]. Summary: Wrapping between the type name and the array type indicator creates invalid syntax in TypeScript. Before:

r318958 - clang-format: [JS] do not wrap before yield.

2017-11-24 Thread Martin Probst via cfe-commits
Author: mprobst Date: Fri Nov 24 09:05:35 2017 New Revision: 318958 URL: http://llvm.org/viewvc/llvm-project?rev=318958&view=rev Log: clang-format: [JS] do not wrap before yield. Summary: The same rules apply as for `return`. Reviewers: djasper Subscribers: klimek Differential Revision: https:

r318957 - clang-format: [JS] space between ! assert and in.

2017-11-24 Thread Martin Probst via cfe-commits
Author: mprobst Date: Fri Nov 24 09:04:40 2017 New Revision: 318957 URL: http://llvm.org/viewvc/llvm-project?rev=318957&view=rev Log: clang-format: [JS] space between ! assert and in. Summary: Before: x = y!in z; After: x = y! in z; Reviewers: djasper Subscribers: klimek Differential R

[PATCH] D40424: clang-format: [JS] handle semis in generic types.

2017-11-24 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. https://reviews.llvm.org/D40424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D40435: [clang-format] Deduplicate using declarations

2017-11-24 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D40435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D40443: [Modules TS] Make imports from an interface unit visible to its implementation units

2017-11-24 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood created this revision. This provides an implementation for the changes outlined in section 4.1 of P0731r0, which clarifies the intended behaviour regarding implementation units being able to see imports made within their corresponding interface unit. https://reviews.llvm.org/D40443

[PATCH] D40435: [clang-format] Deduplicate using declarations

2017-11-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 124215. krasimir added a comment. - Address review comments https://reviews.llvm.org/D40435 Files: lib/Format/UsingDeclarationsSorter.cpp unittests/Format/UsingDeclarationsSorterTest.cpp Index: unittests/Format/UsingDeclarationsSorterTest.cpp ===

[PATCH] D40381: Parse concept definition

2017-11-24 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/clang/Sema/Sema.h:6194 +SourceLocation TemplateLoc, +const TemplateArgumentListInfo *TemplateArgs); + Indentation issue here too. =

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-11-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D30610#934452, @malcolm.parsons wrote: > I'd like an `AllowDeletedCopyFunctions` option that allows move and > destructor functions to be missing when copying is disabled. > > struct A { > A(const A&) = delete; > A& operator=(c

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-11-24 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:694 + } else if (Optional BE = P.getAs()) { +CFGElement BlockFront = BE->getBlock()->front(); +if (BlockFront.getKind() == CFGElement::Statement) { MTC wrote: > dcoug

[PATCH] D40288: [clang-format] Add option to group multiple #include blocks when sorting includes

2017-11-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir removed a reviewer: krasimir. krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Thank you! Do you have commit access? Repository: rL LLVM https://reviews.llvm.org/D40288 ___ cfe-c

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124204. sammccall added a comment. rebase https://reviews.llvm.org/D40399 Files: clangd/JSONExpr.cpp clangd/JSONExpr.h unittests/clangd/JSONExprTests.cpp Index: unittests/clangd/JSONExprTests.cpp

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for the review! I think you're right about new names. Comment at: clangd/JSONExpr.h:368 +// Typed accessors return None/nullptr if the element has the wrong type. +llvm::Optional null(size_t I) const { + return (*this)[I].null(); -

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124203. sammccall marked 2 inline comments as done. sammccall added a comment. Renames to address review comments https://reviews.llvm.org/D40399 Files: clangd/ClangdUnit.cpp clangd/JSONExpr.cpp clangd/JSONExpr.h clangd/JSONRPCDispatcher.cpp cla

[PATCH] D40259: [libcxx] LWG2993: reference_wrapper

2017-11-24 Thread Agustín Bergé via Phabricator via cfe-commits
K-ballo updated this revision to Diff 124201. K-ballo edited the summary of this revision. K-ballo added a comment. Turn fail test into SFINAE based pass test, mark XFAIL for clang. https://reviews.llvm.org/D40259 Files: include/__functional_base include/functional test/std/utilities/fun

[PATCH] D40310: Restructure how we break tokens.

2017-11-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Started the review. It would take a few cycles 💃 Comment at: lib/Format/ContinuationIndenter.cpp:1518 + unsigned RemainingTokenColumns = 0; + // The column number we're currently at. + unsigned ContentStartColumn = 0; Could you plea

[PATCH] D40381: Parse concept definition

2017-11-24 Thread Saar Raz via Phabricator via cfe-commits
saar.raz added inline comments. Comment at: test/CXX/concepts-ts/expr/expr.prim/expr.prim.id/p3.cpp:1 +// RUN: %clang_cc1 -std=c++1z -fconcepts-ts -fcxx-exceptions -x c++ -verify %s +// expected-no-diagnostics hubert.reinterpretcast wrote: > saar.raz wrote: > >

[PATCH] D40381: Parse concept definition

2017-11-24 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: test/CXX/concepts-ts/expr/expr.prim/expr.prim.id/p3.cpp:1 +// RUN: %clang_cc1 -std=c++1z -fconcepts-ts -fcxx-exceptions -x c++ -verify %s +// expected-no-diagnostics saar.raz wrote: > Rakete wrote: >

[clang-tools-extra] r318951 - [clang-tidy] rename_check.py: fix header guard handling

2017-11-24 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Nov 24 06:33:06 2017 New Revision: 318951 URL: http://llvm.org/viewvc/llvm-project?rev=318951&view=rev Log: [clang-tidy] rename_check.py: fix header guard handling Modified: clang-tools-extra/trunk/clang-tidy/rename_check.py Modified: clang-tools-extra/trunk/clang-ti

[PATCH] D40439: [Tooling] Remove file/command enumeration from CompilationDatabase.

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added a subscriber: klimek. In practice, these methods aren't used, and several databases don't implement them. They remain in libclang as a stub for binary compatibility. c-index-tests are modified not to rely on them. https://reviews.llvm.org/D40439 Fil

[PATCH] D40435: [clang-format] Deduplicate using declarations

2017-11-24 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added inline comments. Comment at: lib/Format/UsingDeclarationsSorter.cpp:115 +bool usingDeclarationsEqual(const UsingDeclaration &a, +const UsingDeclaration &b) { I'd use a lambda instead. https://reviews.llvm.org/D40435

[PATCH] D30610: [clang-tidy] Added options to cppcoreguidelines-special-member-functions check

2017-11-24 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. I'd like an `AllowDeletedCopyFunctions` option that allows move and destructor functions to be missing when copying is disabled. struct A { A(const A&) = delete; A& operator=(const A&) = delete; } https://reviews.llvm.org/D30610 _

[PATCH] D40381: Parse concept definition

2017-11-24 Thread Saar Raz via Phabricator via cfe-commits
saar.raz added inline comments. Comment at: test/CXX/concepts-ts/expr/expr.prim/expr.prim.id/p3.cpp:1 +// RUN: %clang_cc1 -std=c++1z -fconcepts-ts -fcxx-exceptions -x c++ -verify %s +// expected-no-diagnostics Rakete wrote: > There is no `-fconcepts-ts` flag

[PATCH] D40426: [clang-tidy] Move a few more checks from misc to bugprone.

2017-11-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D40426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D38843: [ASTImporter] Support importing CXXPseudoDestructorExpr

2017-11-24 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 124173. szepet marked 3 inline comments as done. szepet added a comment. Herald added a subscriber: rnkovacs. Thank you for the review! Updated according to review comments. https://reviews.llvm.org/D38843 Files: lib/AST/ASTImporter.cpp unittests/AST/AS

[clang-tools-extra] r318946 - [clangd] Sort list of sources in CMakeLists.txt. NFC

2017-11-24 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Nov 24 05:13:41 2017 New Revision: 318946 URL: http://llvm.org/viewvc/llvm-project?rev=318946&view=rev Log: [clangd] Sort list of sources in CMakeLists.txt. NFC Modified: clang-tools-extra/trunk/clangd/CMakeLists.txt Modified: clang-tools-extra/trunk/clangd/CMakeL

[PATCH] D40302: Avoid copying the data of in-memory preambles

2017-11-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318945: Avoid copying the data of in-memory preambles (authored by ibiryukov). Repository: rL LLVM https://reviews.llvm.org/D40302 Files: cfe/trunk/include/clang/Frontend/PrecompiledPreamble.h cfe

r318945 - Avoid copying the data of in-memory preambles

2017-11-24 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Nov 24 05:12:38 2017 New Revision: 318945 URL: http://llvm.org/viewvc/llvm-project?rev=318945&view=rev Log: Avoid copying the data of in-memory preambles Summary: Preambles are large and we should avoid copying them. Reviewers: bkramer, klimek Reviewed By: bkramer S

[PATCH] D40301: [clangd] Ensure preamble outlives the AST

2017-11-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318944: [clangd] Ensure preamble outlives the AST (authored by ibiryukov). Repository: rL LLVM https://reviews.llvm.org/D40301 Files: clang-tools-extra/trunk/clangd/ClangdUnit.cpp clang-tools-extr

[clang-tools-extra] r318944 - [clangd] Ensure preamble outlives the AST

2017-11-24 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Nov 24 05:04:21 2017 New Revision: 318944 URL: http://llvm.org/viewvc/llvm-project?rev=318944&view=rev Log: [clangd] Ensure preamble outlives the AST Summary: In-memory preambles will not be copied anymore, so we need to make sure they outlive the AST. Reviewers: bkra

[PATCH] D40301: [clangd] Ensure preamble outlives the AST

2017-11-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 124167. ilya-biryukov added a comment. - Moved PreambleData declaration up to avoid fwd-decl. https://reviews.llvm.org/D40301 Files: clangd/ClangdUnit.cpp clangd/ClangdUnit.h Index: clangd/ClangdUnit.h

[PATCH] D39279: Stringizing raw string literals containing newline

2017-11-24 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added inline comments. Comment at: lib/Lex/Lexer.cpp:217 +void StringifyImpl(T& Str, char Quote) { + unsigned i = 0, e = Str.size(); + while (i < e) { Wouldn't **auto** or **typename T::size_type** instead of **unsigned** be more appropriate here

[PATCH] D40381: Parse concept definition

2017-11-24 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Parse/ParseTemplate.cpp:161 // Parse the actual template declaration. - return ParseSingleDeclarationAfterTemplate(Context, - ParsedTemplateInfo(&ParamLists, -

[PATCH] D40426: [clang-tidy] Move a few more checks from misc to bugprone.

2017-11-24 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. Herald added subscribers: kbarton, xazax.hun, javed.absar, mgorny, nemanjai. clang_tidy/rename_check.py misc-assert-side-effect bugprone-assert-side-effect clang_tidy/rename_check.py misc-bool-pointer-implicit-conversion bugprone-bool-pointer-implicit-conversion clan

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/JSONRPCDispatcher.h:47 + // Whether output should be pretty-printed. + const bool Pretty; + ioeric wrote: > It seems that we are piggybacking a state of clangd with `JSONOutput`. It > might make sense to stor

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 124163. sammccall marked an inline comment as done. sammccall added a comment. Herald added a subscriber: ilya-biryukov. Use llvm::toString https://reviews.llvm.org/D40406 Files: clangd/ClangdLSPServer.cpp clangd/JSONExpr.h clangd/JSONRPCDispatcher.

[PATCH] D40409: [Tooling] Acknowledge that many CompilationDatabases don't support enumeration.

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318943: [Tooling] Acknowledge that many CompilationDatabases don't support enumeration. (authored by sammccall). Repository: rL LLVM https://reviews.llvm.org/D40409 Files: cfe/trunk/include/clang/To

r318943 - [Tooling] Acknowledge that many CompilationDatabases don't support enumeration.

2017-11-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 24 04:13:55 2017 New Revision: 318943 URL: http://llvm.org/viewvc/llvm-project?rev=318943&view=rev Log: [Tooling] Acknowledge that many CompilationDatabases don't support enumeration. Summary: Provide default implementations so that only getCompileCommands() is ma

[PATCH] D40409: [Tooling] Acknowledge that many CompilationDatabases don't support enumeration.

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: include/clang/Tooling/CompilationDatabase.h:122 + /// can enumerate their source files. + virtual std::vector getAllFiles() const { return {}; } grandinj wrote: > I know very little about LLVM's standards, so ignor

[PATCH] D40424: clang-format: [JS] handle semis in generic types.

2017-11-24 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. Herald added a subscriber: klimek. TypeScript generic type arguments can contain object (literal) types, which in turn can contain semicolons: const x: Array<{a: number; b: string;} = []; Previously, clang-format would incorrectly categorize the braced list as a

[PATCH] D40415: [libcxx

2017-11-24 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki created this revision. Herald added a reviewer: EricWF. https://reviews.llvm.org/D40415 Files: include/iterator test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/equal.pass.cpp Index: test/std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/

[PATCH] D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid

2017-11-24 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg updated this revision to Diff 124154. sberg added a comment. Oh, I'd meant to upload the version of the patch where the newly added calls to EmitTypeCheck use the default Alignment and SkippedChecks arguments, instead of explicitly skipping Alignment and ObjectSize checks. (That's the ve

[PATCH] D40409: [Tooling] Acknowledge that many CompilationDatabases don't support enumeration.

2017-11-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D40409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D37437: [analyzer] Fix some checker's output plist not containing the checker name

2017-11-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. @dcoughlin do you have some input on this? https://reviews.llvm.org/D37437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40406: [clangd] Switch from YAMLParser to JSONExpr

2017-11-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/JSONRPCDispatcher.cpp:221 +Out.log("<-- " + JSONRef + "\n"); +handleAllErrors(Doc.takeError(), [&](const llvm::ErrorInfoBase &Err) { + Out.log(llvm::Twine("JSON parse error: ") + Err.message() + "\n");

r318942 - clang-format: [JS] handle destructuring `of`.

2017-11-24 Thread Martin Probst via cfe-commits
Author: mprobst Date: Fri Nov 24 02:48:25 2017 New Revision: 318942 URL: http://llvm.org/viewvc/llvm-project?rev=318942&view=rev Log: clang-format: [JS] handle destructuring `of`. Summary: Previously, clang-format would drop a space character between `of` and then following (non-identifier) token

[PATCH] D40409: [Tooling] Acknowledge that many CompilationDatabases don't support enumeration.

2017-11-24 Thread Noel Grandin via Phabricator via cfe-commits
grandinj added inline comments. Comment at: include/clang/Tooling/CompilationDatabase.h:122 + /// can enumerate their source files. + virtual std::vector getAllFiles() const { return {}; } I know very little about LLVM's standards, so ignore me if I'm wrong,

[PATCH] D40410: clang-format: [JS] disable ASI on decorators.

2017-11-24 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. Herald added a subscriber: klimek. Automatic Semicolon Insertion in clang-format tries to guess if a line wrap should insert an implicit semicolong. The previous heuristic would not trigger ASI if a token was immediately preceded by an `@` sign: function foo(@Bar

[PATCH] D40409: [Tooling] Acknowledge that many CompilationDatabases don't support enumeration.

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added a subscriber: klimek. Provide default implementations so that only getCompileCommands() is mandatory. https://reviews.llvm.org/D40409 Files: include/clang/Tooling/CompilationDatabase.h lib/Tooling/CompilationDatabase.cpp Index: lib/Tooling/Comp

[PATCH] D40389: [clang-tidy] rename_check.py misc-dangling-handle bugprone-dangling-handle

2017-11-24 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318941: [clang-tidy] rename_check.py misc-dangling-handle bugprone-dangling-handle (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D40389?vs=124072&id=124136#toc Repository: r

[clang-tools-extra] r318941 - [clang-tidy] rename_check.py misc-dangling-handle bugprone-dangling-handle

2017-11-24 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Nov 24 01:52:05 2017 New Revision: 318941 URL: http://llvm.org/viewvc/llvm-project?rev=318941&view=rev Log: [clang-tidy] rename_check.py misc-dangling-handle bugprone-dangling-handle Reviewers: hokein Reviewed By: hokein Subscribers: mgorny, xazax.hun, cfe-commits Diff

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/JSONExpr.h:368 +// Typed accessors return None/nullptr if the element has the wrong type. +llvm::Optional null(size_t I) const { + return (*this)[I].null(); ioeric wrote: > Why is this needed? `v[x]

[PATCH] D40399: [clangd] Add missing (but documented!) JSONExpr typed accessors

2017-11-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/JSONExpr.h:368 +// Typed accessors return None/nullptr if the element has the wrong type. +llvm::Optional null(size_t I) const { + return (*this)[I].null(); Why is this needed? `v[x].null()` seems to b

[PATCH] D40389: [clang-tidy] rename_check.py misc-dangling-handle bugprone-dangling-handle

2017-11-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D40389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2017-11-24 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. We take the conservative approach there: if a function has no `throw` specifier we handle it as it would have a `noexcept` specifier. https://reviews.llvm.org/D33537 ___ cfe-commits mailing list cfe-commits@lists