[PATCH] D42995: [ThinLTO] Ignore object files with empty ThinLTO index

2018-02-15 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 134385. vitalybuka added a comment. Herald added a subscriber: hiraditya. Don't use empty index file https://reviews.llvm.org/D42995 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/Inputs/thinlto-distributed-backend-skip.bc clang/test/C

[libcxx] r325219 - Merging r325147:

2018-02-15 Thread Hans Wennborg via cfe-commits
Author: hans Date: Thu Feb 15 00:22:12 2018 New Revision: 325219 URL: http://llvm.org/viewvc/llvm-project?rev=325219&view=rev Log: Merging r325147: r325147 | marshall | 2018-02-14 19:05:25 +0100 (Wed, 14 Feb 2018) | 3 lines

[PATCH] D43272: [clangd] Fix tracing now that spans lifetimes can overlap on a thread.

2018-02-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 134386. sammccall added a comment. address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43272 Files: clangd/Trace.cpp clangd/Trace.h test/clangd/trace.test unittests/clangd/TraceTests.cpp Index: unittests/clangd

[PATCH] D43272: [clangd] Fix tracing now that spans lifetimes can overlap on a thread.

2018-02-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/Trace.cpp:133 +std::atomic EndTime; // Filled in by endSpan(). +std::string Name; +const uint64_t TID; ilya-biryukov wrote: > Maybe make all fields except `EndTime` const? Good idea - what's safe to

[clang-tools-extra] r325220 - [clangd] Fix tracing now that spans lifetimes can overlap on a thread.

2018-02-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Feb 15 00:40:54 2018 New Revision: 325220 URL: http://llvm.org/viewvc/llvm-project?rev=325220&view=rev Log: [clangd] Fix tracing now that spans lifetimes can overlap on a thread. Summary: The chrome trace viewer requires events within a thread to strictly nest. So we n

[PATCH] D43272: [clangd] Fix tracing now that spans lifetimes can overlap on a thread.

2018-02-15 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325220: [clangd] Fix tracing now that spans lifetimes can overlap on a thread. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.

r325221 - [clang-format] Improve ObjC headers detection

2018-02-15 Thread Jacek Olesiak via cfe-commits
Author: jolesiak Date: Thu Feb 15 00:47:56 2018 New Revision: 325221 URL: http://llvm.org/viewvc/llvm-project?rev=325221&view=rev Log: [clang-format] Improve ObjC headers detection Summary: Detect ObjC characteristic types when they start a line and add additional keywords. Reviewers: benhamilt

[PATCH] D43124: [clang-format] Improve ObjC headers detection

2018-02-15 Thread Jacek Olesiak via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC325221: [clang-format] Improve ObjC headers detection (authored by jolesiak, committed by ). Changed prior to commit: https://reviews.llvm.org/D43124?vs=134180&id=134388#toc Repository: rC Clang htt

[clang-tools-extra] r325222 - [clang-tidy] New checker for exceptions that are created but not thrown

2018-02-15 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Thu Feb 15 01:08:51 2018 New Revision: 325222 URL: http://llvm.org/viewvc/llvm-project?rev=325222&view=rev Log: [clang-tidy] New checker for exceptions that are created but not thrown Patch by: Kristof Umann Differential Revision: https://reviews.llvm.org/D43120 Added: c

[PATCH] D43120: [clang-tidy] New checker for exceptions that are created but not thrown

2018-02-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325222: [clang-tidy] New checker for exceptions that are created but not thrown (authored by xazax, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit: https://revie

[clang-tools-extra] r325223 - [clang-tidy] Minor documentation fix

2018-02-15 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Thu Feb 15 01:19:23 2018 New Revision: 325223 URL: http://llvm.org/viewvc/llvm-project?rev=325223&view=rev Log: [clang-tidy] Minor documentation fix Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/bugprone-throw-keyword-missing.rst Modified: clang-tools-extra/t

[clang-tools-extra] r325225 - [clang-tidy] Make a test pass on platforms where exceptions disabled by default.

2018-02-15 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Thu Feb 15 01:24:55 2018 New Revision: 325225 URL: http://llvm.org/viewvc/llvm-project?rev=325225&view=rev Log: [clang-tidy] Make a test pass on platforms where exceptions disabled by default. Modified: clang-tools-extra/trunk/test/clang-tidy/bugprone-throw-keyword-missing

[PATCH] D38639: [clangd] #include statements support for Open definition

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Last drop of NITs. After they're fixed, this change is ready to land! Comment at: unittests/clangd/XRefsTests.cpp:282 + const char *HeaderContents = R"cpp([[]]int a;)cpp"; + Annotations HeaderAnnoations(HeaderContents); + FS.Files[FooH] = Heade

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-15 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. The clang-tidy code looks good. If no one has further comments, feel free to commit it. Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:46 + + static const llvm:

[PATCH] D43229: [clangd] Enable snippet completion based on client capabilities.

2018-02-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Comment at: clangd/ClangdLSPServer.cpp:90 void ClangdLSPServer::onInitialize(InitializeParams &Params) { + if (Params.rootUri && !Params.rootUri->file.empty()) +Se

[PATCH] D42640: [clangd] collect symbol #include & insert #include in global code completion.

2018-02-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 134394. ioeric added a comment. - Merged with origin/master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42640 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/CodeCompl

[PATCH] D43240: [OpenCL] Fix __enqueue_block for block with captures

2018-02-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks for looking at this. Just one thing, I was wondering whether it would be cleaner way if we extend test/CodeGenOpenCL/cl20-device-side-enqueue.cl instead of adding a new one

[PATCH] D43331: [WIP][Parser][FixIt] Better diagnostics for omitted template keyword (type dependent template names)

2018-02-15 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple created this revision. What I would love to have is FixIt for this kind of situation: template void foo() { T::bar(); /* missing template keyword */ } which currently gets not that helpful diagnostics: > clang misleading.cpp misleading.cpp:2:15: error: expected '('

[PATCH] D35894: [clangd] Code hover for Clangd

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Just a few last remarks and this is good to go. Should I land it for you after the last comments are fixed? Comment at: clangd/XRefs.cpp:354 + + return Name; +} We should call `flush()` before returning `Name` here. The `raw_stri

Re: [clang-tools-extra] r325097 - [clangd] Configure clangd tracing with CLANGD_TRACE env instead of -trace flag

2018-02-15 Thread Ilya Biryukov via cfe-commits
On Thu, Feb 15, 2018 at 8:29 AM Sam McCall wrote: > On Wed, Feb 14, 2018 at 10:45 AM Ilya Biryukov > wrote: > >> Personally, I'm not a big fan of environment variables. There are harder >> to discover than command-line flags and I still have to change editor >> config often to switch between dif

[PATCH] D43303: [Format] Fix for bug 35641

2018-02-15 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. Thanks for the fix. Comment at: unittests/Format/FormatTest.cpp:9453 + + // Bug 35641 + Alignment.AlignConsecutiveDeclarations = true; Make this "See llv

[PATCH] D43229: [clangd] Enable snippet completion based on client capabilities.

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 134405. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Remove initializers from Optional<> fields Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43229 Files: clangd/ClangdLSPServer.cpp clangd/Prot

[PATCH] D43229: [clangd] Enable snippet completion based on client capabilities.

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:90 void ClangdLSPServer::onInitialize(InitializeParams &Params) { + if (Params.rootUri && !Params.rootUri->file.empty()) +Server.setRootPath(Params.rootUri->file); ioeric wrote: > T

Re: [PATCH] D43120: [clang-tidy] New checker for exceptions that are created but not thrown

2018-02-15 Thread Aaron Ballman via cfe-commits
On Thu, Feb 15, 2018 at 4:11 AM, Phabricator via Phabricator wrote: > This revision was automatically updated to reflect the committed changes. > Closed by commit rL325222: [clang-tidy] New checker for exceptions that are > created but not thrown (authored by xazax, committed by ). There's nothi

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-15 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Yes, that's what I mean. What do you mean, the style is too error prone? Repository: rC Clang https://reviews.llvm.org/D43183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D43227: [clangd] Make functions of ClangdServer callback-based

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 134406. ilya-biryukov added a comment. - Rebase onto head Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43227 Files: clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h unittests/clangd/ClangdTests.cpp

Re: [PATCH] D43120: [clang-tidy] New checker for exceptions that are created but not thrown

2018-02-15 Thread Roman Lebedev via cfe-commits
On Thu, Feb 15, 2018 at 3:48 PM, Aaron Ballman via cfe-commits wrote: > On Thu, Feb 15, 2018 at 4:11 AM, Phabricator via Phabricator > wrote: >> This revision was automatically updated to reflect the committed changes. >> Closed by commit rL325222: [clang-tidy] New checker for exceptions that are

[PATCH] D43229: [clangd] Enable snippet completion based on client capabilities.

2018-02-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/tool/ClangdMain.cpp:60 -static llvm::cl::opt EnableSnippets( -"enable-snippets", ilya-biryukov wrote: > ioeric wrote: > > Would we still have a way to disable snippets (e.g. for debugging) even if > > cli

[PATCH] D43312: [clang-format] fix handling of consecutive unary operators

2018-02-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:1497 +!(PrevToken->is(tok::exclaim) && + Style.Language == FormatStyle::LK_JavaScript)) // There aren't any trailing unary operators except for TypeScript's I think

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-15 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon marked 5 inline comments as done. oren_ben_simhon added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:1990 -bool Sema::CheckNoReturnAttr(const AttributeList &Attrs) { - if (!checkAttributeNumArgs(*this, Attrs, 0)) { -Attrs.setInvalid(); +static voi

[PATCH] D43290: clang-format: tweak formatting of variable initialization blocks

2018-02-15 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Tweaking the penalty handling would still be needed in any case, since the problem happens also when Cpp11BracedListStyle is true (though the effect is more subtle) Generally, I think it is better to just rely on penalties, since it gives a way to compare and weight each

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-15 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon updated this revision to Diff 134407. oren_ben_simhon added a comment. Implemented comments posted until 02/15 (Thanks Aaron) Repository: rL LLVM https://reviews.llvm.org/D41880 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

[clang-tools-extra] r325233 - [clangd] Make functions of ClangdServer callback-based

2018-02-15 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Feb 15 05:15:47 2018 New Revision: 325233 URL: http://llvm.org/viewvc/llvm-project?rev=325233&view=rev Log: [clangd] Make functions of ClangdServer callback-based Summary: As a consequence, all LSP operations are now handled asynchronously, i.e. they never block the ma

[PATCH] D43227: [clangd] Make functions of ClangdServer callback-based

2018-02-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325233: [clangd] Make functions of ClangdServer callback-based (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D43227 File

[PATCH] D43229: [clangd] Enable snippet completion based on client capabilities.

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: test/clangd/completion-snippets-disabled.test:1 +# RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s +# RUN: clangd -lit-test -pch-storage=memory < %s | FileCheck -strict-whitespace %s sammccall wrote:

[PATCH] D43298: [clang-format] Support repeated field lists in protos

2018-02-15 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. Comment at: lib/Format/TokenAnnotator.cpp:2355 + ((Right.MatchingParen->is(TT_ArrayInitializerLSquare) && + (Style.SpacesInContainerLitera

[PATCH] D43272: [clangd] Fix tracing now that spans lifetimes can overlap on a thread.

2018-02-15 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. Hi, It seems that your submission have broken the Windows and Linux Builds for 'clangd'. This is the error message: /home/xxx/llvm-root/llvm/tools/clang/tools/extra/clangd/Trace.cpp:54:76: error: call of overloaded ‘make_unique(clang::clangd::trace::{anony

[PATCH] D43290: clang-format: tweak formatting of variable initialization blocks

2018-02-15 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 134411. Typz marked an inline comment as done. Typz added a comment. Address review comments. Repository: rC Clang https://reviews.llvm.org/D43290 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.

r325236 - Add -no-canonical-prefixes to allow different build modes.

2018-02-15 Thread Martin Bohme via cfe-commits
Author: mboehme Date: Thu Feb 15 05:50:07 2018 New Revision: 325236 URL: http://llvm.org/viewvc/llvm-project?rev=325236&view=rev Log: Add -no-canonical-prefixes to allow different build modes. Modified: cfe/trunk/test/Driver/amdgcn-toolchain-pic.cl Modified: cfe/trunk/test/Driver/amdgcn-tool

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:1990 -bool Sema::CheckNoReturnAttr(const AttributeList &Attrs) { - if (!checkAttributeNumArgs(*this, Attrs, 0)) { -Attrs.setInvalid(); +static void handleNoCfCheckAttr(Sema &S, Decl *D, const Attrib

[PATCH] D43303: [Format] Fix for bug 35641

2018-02-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 134414. kadircet added a comment. Changed description of unit test to include direct link to bug. Used different variable types to make sure alignment happens. Repository: rC Clang https://reviews.llvm.org/D43303 Files: unittests/Format/FormatTest.cpp

r325238 - Add Xray instrumentation compile-time/link-time support to FreeBSD

2018-02-15 Thread Kamil Rytarowski via cfe-commits
Author: kamil Date: Thu Feb 15 06:12:21 2018 New Revision: 325238 URL: http://llvm.org/viewvc/llvm-project?rev=325238&view=rev Log: Add Xray instrumentation compile-time/link-time support to FreeBSD Summary: Similarly to the GNU driver version, adding proper compile and linker flags. Patch by:

[PATCH] D43279: Add Xray instrumentation compile-time/link-time support to FreeBSD

2018-02-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC325238: Add Xray instrumentation compile-time/link-time support to FreeBSD (authored by kamil, committed by ). Repository: rC Clang https://reviews.llvm.org/D43279 Files: lib/Driver/ToolChains/FreeB

[clang-tools-extra] r325239 - [clangd] Fix make_unique ambiguity, NFC

2018-02-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Feb 15 06:16:17 2018 New Revision: 325239 URL: http://llvm.org/viewvc/llvm-project?rev=325239&view=rev Log: [clangd] Fix make_unique ambiguity, NFC Modified: clang-tools-extra/trunk/clangd/Trace.cpp Modified: clang-tools-extra/trunk/clangd/Trace.cpp URL: http://l

[PATCH] D43272: [clangd] Fix tracing now that spans lifetimes can overlap on a thread.

2018-02-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. r325239 should fix, sorry! Repository: rL LLVM https://reviews.llvm.org/D43272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r325241 - Adding msan support for FreeBSD

2018-02-15 Thread Kamil Rytarowski via cfe-commits
Author: kamil Date: Thu Feb 15 06:19:23 2018 New Revision: 325241 URL: http://llvm.org/viewvc/llvm-project?rev=325241&view=rev Log: Adding msan support for FreeBSD Summary: Enabling memory sanitiser for X86_64 arch only. To match the sanitiser counterpart. Patch by: David CARLIER Reviewers: kr

[PATCH] D43148: Adding msan support for FreeBSD

2018-02-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC325241: Adding msan support for FreeBSD (authored by kamil, committed by ). Repository: rC Clang https://reviews.llvm.org/D43148 Files: lib/Driver/ToolChains/FreeBSD.cpp Index: lib/Driver/ToolChai

[PATCH] D34367: CodeGen: Fix address space of indirect function argument

2018-02-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 134416. yaxunl edited the summary of this revision. yaxunl added a comment. Revised by John's comments. Removed address space from CallArg and added l-value expression instead. https://reviews.llvm.org/D34367 Files: lib/CodeGen/CGCall.cpp lib/CodeGen/CG

[PATCH] D34367: CodeGen: Fix address space of indirect function argument

2018-02-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/CGCall.h:211 + push_back(CallArg(rvalue, type, needscopy, AS)); } rjmccall wrote: > Ah, I think I understand what's going on here now. "indirect byval" > arguments include an implicit copy to the

[PATCH] D43229: [clangd] Enable snippet completion based on client capabilities.

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 134420. ilya-biryukov added a comment. - Use default values for configuration instead of using Optional<> fields. - Removed redundant tests. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43229 Files: clangd/ClangdLSPServer.cpp cl

[PATCH] D43229: [clangd] Enable snippet completion based on client capabilities.

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 134421. ilya-biryukov added a comment. - Removed completion-snippets-missing.test Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43229 Files: clangd/ClangdLSPServer.cpp clangd/Protocol.cpp clangd/Protocol.h clangd/tool/ClangdM

[PATCH] D43229: [clangd] Enable snippet completion based on client capabilities.

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. As discussed offline with @sammccall, we don't really need to hold `Optional<>` fields for configuration entries, as we only consume them in clangd and therefore can just set the default values explicitly. Makes the code simpler and requires only one extra test (wi

[PATCH] D43229: [clangd] Enable snippet completion based on client capabilities.

2018-02-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325242: [clangd] Enable snippet completion based on client capabilities. (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D4

[clang-tools-extra] r325242 - [clangd] Enable snippet completion based on client capabilities.

2018-02-15 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Feb 15 06:32:57 2018 New Revision: 325242 URL: http://llvm.org/viewvc/llvm-project?rev=325242&view=rev Log: [clangd] Enable snippet completion based on client capabilities. Summary: And remove -enable-snippets flag. Reviewers: hokein, ioeric, sammccall Reviewed By: i

[PATCH] D43240: [OpenCL] Fix __enqueue_block for block with captures

2018-02-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D43240#1008560, @Anastasia wrote: > LGTM! Thanks for looking at this. Just one thing, I was wondering whether it > would be cleaner way if we extend > test/CodeGenOpenCL/cl20-device-side-enqueue.cl instead of adding a new one > here? Because

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-15 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D43183#1008632, @djasper wrote: > Yes, that's what I mean. What do you mean, the style is too error prone? When `IndentCaseLabels` is false, the code gets formatted in a way that "hides" the structure of the code, by indenting the end of the ca

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-15 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. That doesn't explain to me how this is error prone. I can't think how you'd create an error by this that would not be caught by the compiler. Much less if you consistently use clang-format. It's fundamentally what you get for IndentCaseLabels: false. Even without brace

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-15 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon marked an inline comment as done. oren_ben_simhon added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:1990 -bool Sema::CheckNoReturnAttr(const AttributeList &Attrs) { - if (!checkAttributeNumArgs(*this, Attrs, 0)) { -Attrs.setInvalid(); +static voi

[PATCH] D43272: [clangd] Fix tracing now that spans lifetimes can overlap on a thread.

2018-02-15 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D43272#1008703, @sammccall wrote: > r325239 should fix, sorry! Build now is OK. Thanks @sammccall. Repository: rL LLVM https://reviews.llvm.org/D43272 ___ cfe-commits mailing lis

[PATCH] D43298: [clang-format] Support repeated field lists in protos

2018-02-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 134427. krasimir added a comment. - Pull out check in lambda - Address review comments Repository: rC Clang https://reviews.llvm.org/D43298 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestProto.cpp unittests/Format/FormatTestTextPr

[PATCH] D43227: [clangd] Make functions of ClangdServer callback-based

2018-02-15 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. Hi, It seems that your submission broke the Windows/Linux builds for 'clangd'. The generated error message is: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\future(263): error C2512: 'llvm::Expected>>': no appropriate default constructo

r325252 - [clang-format] Support repeated field lists in protos

2018-02-15 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Thu Feb 15 07:30:22 2018 New Revision: 325252 URL: http://llvm.org/viewvc/llvm-project?rev=325252&view=rev Log: [clang-format] Support repeated field lists in protos Summary: This patch adds support for list initialization of proto repeated fields: ``` keys: [1, 2, 3] ```

[PATCH] D43298: [clang-format] Support repeated field lists in protos

2018-02-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325252: [clang-format] Support repeated field lists in protos (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D43298 Files:

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2018-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 134430. ahatanak marked 14 inline comments as done. ahatanak added a comment. Address review comments. https://reviews.llvm.org/D41228 Files: docs/LanguageExtensions.rst include/clang/AST/Decl.h include/clang/AST/Type.h include/clang/Basic/Diagnost

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2018-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/AST/Type.h:1137 +return isNonTrivialToPrimitiveDestroy() == PCK_Struct; + } + rjmccall wrote: > Are these four queries really important enough to provide API for them on > QualType? I removed these f

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-15 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. A user can create an error by reasoning like this, after the code has been formatted this way (a long time ago) : "oh, I need to make an extra function call, but in all cases ah, here is the end of the switch, let's put my function call here". I am not saying it happe

[PATCH] D43232: clang-format: use AfterControlStatement to format ObjC control blocks

2018-02-15 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D43232#1008004, @benhamilton wrote: > Thanks! Can you add a test for this, please? There are actually tests, though they are performed by activating Allman brace wrapping mode. I am trying to change them, but this highlights another issue: when

[PATCH] D43232: clang-format: use AfterControlStatement to format ObjC control blocks

2018-02-15 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > This used to happen before as well, and would require fixing > UnwrappedLineFormatter.cpp to understand that these blocks are linked to the > previous ObjC keyword. Good find! Looks like we should fix that and add some more tests with AfterControlStatement set to

[clang-tools-extra] r325254 - [clangd] Fixed compilation with MVSC.

2018-02-15 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Feb 15 07:41:49 2018 New Revision: 325254 URL: http://llvm.org/viewvc/llvm-project?rev=325254&view=rev Log: [clangd] Fixed compilation with MVSC. Modified: clang-tools-extra/trunk/unittests/clangd/SyncAPI.cpp Modified: clang-tools-extra/trunk/unittests/clangd/Sync

Re: [PATCH] D43227: [clangd] Make functions of ClangdServer callback-based

2018-02-15 Thread Ilya Biryukov via cfe-commits
Sorry about that, fixed in r325254. I keep hitting this MSVC compilation error all the time. On Thu, Feb 15, 2018 at 4:26 PM Carlos Alberto Enciso via Phabricator < revi...@reviews.llvm.org> wrote: > CarlosAlbertoEnciso added a comment. > > Hi, > > It seems that your submission broke the Windows

[PATCH] D38639: [clangd] #include statements support for Open definition

2018-02-15 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 134432. malaperle added a comment. Use EXPECT_THAT in a few places and clean-ups in tests. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D38639 Files: clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/Protocol.h clangd/SourceCode.c

[PATCH] D43232: clang-format: use AfterControlStatement to format ObjC control blocks

2018-02-15 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. I'll try to fix this. Can you please review D43114 in the mean time? This patch depends on it, so it must be merged first. Repository: rC Clang https://reviews.llvm.org/D43232 ___ cfe-comm

[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch

2018-02-15 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. In https://reviews.llvm.org/D43183#1008784, @Typz wrote: > A user can create an error by reasoning like this, after the code has been > formatted this way (a long time ago) : "oh, I need to make an extra function > call, but in all cases ah, here is the end of the s

[PATCH] D43114: clang-format: fix formatting of ObjC @synchronized blocks

2018-02-15 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. Just a question on the test. Comment at: unittests/Format/FormatTestObjC.cpp:193-198 + verifyFormat("@synchronized(self) {\n" + " f();\n" +

[clang-tools-extra] r325257 - [clangd] Use explicit env in test to make lit+windows happy. NFC

2018-02-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Feb 15 08:20:33 2018 New Revision: 325257 URL: http://llvm.org/viewvc/llvm-project?rev=325257&view=rev Log: [clangd] Use explicit env in test to make lit+windows happy. NFC Modified: clang-tools-extra/trunk/test/clangd/trace.test Modified: clang-tools-extra/trunk/

[clang-tools-extra] r325260 - [clangd] Create trace::Span when running ASTCallback

2018-02-15 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Feb 15 08:24:34 2018 New Revision: 325260 URL: http://llvm.org/viewvc/llvm-project?rev=325260&view=rev Log: [clangd] Create trace::Span when running ASTCallback Modified: clang-tools-extra/trunk/clangd/ClangdUnit.cpp Modified: clang-tools-extra/trunk/clangd/Clangd

r325261 - Amend r325256. This change was not properly merged locally before the commit happened.

2018-02-15 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Feb 15 08:28:10 2018 New Revision: 325261 URL: http://llvm.org/viewvc/llvm-project?rev=325261&view=rev Log: Amend r325256. This change was not properly merged locally before the commit happened. Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp Modified: cfe/trunk

[PATCH] D35894: [clangd] Code hover for Clangd

2018-02-15 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/XRefs.cpp:354 + + return Name; +} ilya-biryukov wrote: > We should call `flush()` before returning `Name` here. The > `raw_string_ostream` is buffered. I replaced it with `Stream.str()`. Commen

[PATCH] D35894: [clangd] Code hover for Clangd

2018-02-15 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 134437. simark added a comment. New version - Rebase on master, change findHover to have a callback-based interface - Fix nits from previous review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D35894 Files: clangd/ClangdLSPServe

[PATCH] D35894: [clangd] Code hover for Clangd

2018-02-15 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D35894#1008593, @ilya-biryukov wrote: > Just a few last remarks and this is good to go. > Should I land it for you after the last comments are fixed? I just received my commit access, so if you are ok with it, I would try to push it once I g

[PATCH] D35894: [clangd] Code hover for Clangd

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Only the naming of fields left. Also, please make sure to run `git-clang-format` on the code before submitting to make sure it's formatted properly. Comment at: clangd/ClangdLSPServer.cpp:331 + if (!H) { +

r325264 - [OpenCL] Fix __enqueue_block for block with captures

2018-02-15 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Feb 15 08:39:19 2018 New Revision: 325264 URL: http://llvm.org/viewvc/llvm-project?rev=325264&view=rev Log: [OpenCL] Fix __enqueue_block for block with captures The following test case causes issue with codegen of __enqueue_block void (^block)(void) = ^{ callee(id, out);

[PATCH] D43240: [OpenCL] Fix __enqueue_block for block with captures

2018-02-15 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325264: [OpenCL] Fix __enqueue_block for block with captures (authored by yaxunl, committed by ). Herald added subscribers: llvm-commits, nhaehnle. Changed prior to commit: https://reviews.llvm.org/D432

[PATCH] D38639: [clangd] #include statements support for Open definition

2018-02-15 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. LGTM modulo the `ASSERT_TRUE` nit. Comment at: unittests/clangd/XRefsTests.cpp:295 + runFindDefinitions(Server, FooCpp, SourceAnnotations.point()); + EXPE

[PATCH] D41880: Adding nocf_check attribute for cf-protection fine tuning

2018-02-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:1990 -bool Sema::CheckNoReturnAttr(const AttributeList &Attrs) { - if (!checkAttributeNumArgs(*this, Attrs, 0)) { -Attrs.setInvalid(); +static void handleNoCfCheckAttr(Sema &S, Decl *D, const Attrib

[PATCH] D35894: [clangd] Code hover for Clangd

2018-02-15 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D35894#1008861, @ilya-biryukov wrote: > Only the naming of fields left. > > Also, please make sure to run `git-clang-format` on the code before > submitting to make sure it's formatted properly. Ahh, I was running clang-format by hand, didn't

[PATCH] D35894: [clangd] Code hover for Clangd

2018-02-15 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 134440. simark added a comment. Fix some nits - Revert case change of struct fields in Protocol.h - Change return formatting in onHover - Use flush() + return Name in NamedDeclQualifiedName and TypeDeclToString Repository: rCTE Clang Tools Extra https://r

[PATCH] D43114: clang-format: fix formatting of ObjC @synchronized blocks

2018-02-15 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked an inline comment as done. Typz added inline comments. Comment at: unittests/Format/FormatTestObjC.cpp:193-198 + verifyFormat("@synchronized(self) {\n" + " f();\n" + "}\n" + "@synchronized(self) {\n" + " f();\

[PATCH] D35894: [clangd] Code hover for Clangd

2018-02-15 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. Thanks for fixing all the NITs! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D35894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

Re: r325175 - [Debug] Annotate compiler generated range-for loop variables.

2018-02-15 Thread Galina Kistanova via cfe-commits
Hello Matt, This commit broke tests on one of our builders: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/7920 . . . Failing Tests (1): Clang :: CodeGenCXX/debug-info-range-for-var-names.cpp Please have a look? Thanks Galina On Wed, Feb 14, 2018 at 1:22 PM

RE: r325175 - [Debug] Annotate compiler generated range-for loop variables.

2018-02-15 Thread via cfe-commits
From: Galina Kistanova [mailto:gkistan...@gmail.com] > Sent: Thursday, February 15, 2018 9:33 AM > To: Davis, Matthew > Cc: cfe-commits > Subject: Re: r325175 - [Debug] Annotate compiler generated range-for loop > variables. > > Hello Matt, > > This commit broke tests on one of our builders: >

[PATCH] D43226: __threading_support: Remove (void) in favor of ().

2018-02-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Herald added a subscriber: christof. Which clang-tidy module generates this warning, and what is the actual warning? Repository: rCXX libc++ https://reviews.llvm.org/D43226 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D42606: [Coroutines] Use allocator overload when available

2018-02-15 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov accepted this revision. GorNishanov added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D42606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D43340: Clean up AMDGCN tests

2018-02-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: t-tye, b-sumner. Remove amdgiz and use AMDGCN as check prefix. https://reviews.llvm.org/D43340 Files: test/CodeGen/address-space.c test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp test/CodeGenCXX/vla.cpp test/CodeGenOpenCL/ad

[PATCH] D43248: [Attr] Fix printing of parameter indices in attributes

2018-02-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:182 + // it would always be false. + string DisallowImplicitThisParamName = disallowImplicitThisParamName; +} Is there much benefit to forcing the attribute author to pick a name for t

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 134446. MaskRay marked 4 inline comments as done. MaskRay added a comment. Update .rst Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42983 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp

[PATCH] D43273: [libcxx] [test] Fix MSVC warnings and errors.

2018-02-15 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. The `` bit is fine. The `veryLarge` is "ok". The rest of them are just bogus. https://reviews.llvm.org/D43273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 134447. MaskRay marked 2 inline comments as done. MaskRay added a comment. Update Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42983 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: test/clang-tidy/readability-simd-intrinsics-ppc.cpp:3 +// RUN: -config='{CheckOptions: [ \ +// RUN:{key: readability-simd-intrinsics.Suggest, value: 1} \ +// RUN: ]}' -- -target ppc64le -maltivec -std=c++11 hokein

r325271 - [Test] Remove mangled name from test.

2018-02-15 Thread Matt Davis via cfe-commits
Author: mattd Date: Thu Feb 15 09:55:52 2018 New Revision: 325271 URL: http://llvm.org/viewvc/llvm-project?rev=325271&view=rev Log: [Test] Remove mangled name from test. This line is not needed in the test, and breaks Windows testing. Fixes the test added in r325175. Modified: cfe/trunk/tes

  1   2   >