[PATCH] D41345: [clangd] Add more symbol information for code completion.

2017-12-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/index/Index.h:92 + // Documentation including comment for the symbol declaration. + std::string Documentation; AFAIK this information isn't needed for retrieval/scoring, just for display. LSP has `completio

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

2017-12-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added a comment. This revision now requires changes to proceed. Thanks for addressing the comments quickly. I took another look and added a few more comments. This moves in the right direction, though, this is really close to landing.

[PATCH] D41237: [Frontend] Handle skipped bodies in template instantiations

2017-12-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12184 Decl *Sema::ActOnSkippedFunctionBody(Decl *Decl) { - if (FunctionDecl *FD = dyn_cast_or_null(Decl)) + if (FunctionDecl *FD = Decl->getAsFunction()) FD->setHasSkippedBody(); sepav

[PATCH] D41237: [Frontend] Handle skipped bodies in template instantiations

2017-12-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Sema/SemaDecl.cpp:12184 Decl *Sema::ActOnSkippedFunctionBody(Decl *Decl) { - if (FunctionDecl *FD = dyn_cast_or_null(Decl)) + if (FunctionDecl *FD = Decl->getAsFunction()) FD->setHasSkippedBody(); ilya-

[PATCH] D41237: [Frontend] Handle skipped bodies in template instantiations

2017-12-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 127473. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - Added a check for null in ActOnSkippedBody Repository: rC Clang https://reviews.llvm.org/D41237 Files: lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantia

[clang-tools-extra] r321065 - [clangd] Add unit tests for signature help. SigHelp/CodeComplete lit tests are smoke only.

2017-12-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Dec 19 02:29:27 2017 New Revision: 321065 URL: http://llvm.org/viewvc/llvm-project?rev=321065&view=rev Log: [clangd] Add unit tests for signature help. SigHelp/CodeComplete lit tests are smoke only. Modified: clang-tools-extra/trunk/test/clangd/completion.test

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2017-12-19 Thread András Leitereg via Phabricator via cfe-commits
leanil created this revision. leanil added reviewers: dcoughlin, xazax.hun. Herald added subscribers: a.sidorin, rnkovacs, szepet. It is safe to copy a string literal to an array which is compile time known to be large enough. This reduces the number of false positives, while (hopefully) not intr

[PATCH] D41367: [clangd] Support filtering by fixing scopes in fuzzyFind.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127478. ioeric marked 3 inline comments as done. ioeric added a comment. - Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41367 Files: clangd/index/Index.h clangd/index/MemIndex.cpp clangd/index/SymbolCollector

[PATCH] D41367: [clangd] Support filtering by fixing scopes in fuzzyFind.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the review! Comment at: clangd/index/Index.h:127 /// \brief A query string for the fuzzy find. This is matched against symbols' - /// qualfified names. + /// qualified names. If any scope below is provided, \p Query is only matched + //

[PATCH] D41367: [clangd] Support filtering by fixing scopes in fuzzyFind.

2017-12-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. just nits, all this stuff up to you Comment at: clangd/index/Index.h:131 + /// un-qualified identifiers and should not contain qualifiers like "::". If + /// any scop

[PATCH] D41351: [clangd] Expose offset <-> LSP position functions, and fix bugs

2017-12-19 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 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D41367: [clangd] Support filtering by fixing scopes in fuzzyFind.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127484. ioeric marked 3 inline comments as done. ioeric added a comment. - Address a few more comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41367 Files: clangd/index/Index.h clangd/index/MemIndex.cpp clangd/index/SymbolColle

[PATCH] D41367: [clangd] Support filtering by fixing scopes in fuzzyFind.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127486. ioeric added a comment. - Minor cleanup Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41367 Files: clangd/index/Index.h clangd/index/MemIndex.cpp clangd/index/SymbolCollector.cpp clangd/index/SymbolYAML.cpp unittests/clang

[PATCH] D41367: [clangd] Support filtering by fixing scopes in fuzzyFind.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE321067: [clangd] Support filtering by fixing scopes in fuzzyFind. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D41367?vs=127486&id=127487#toc Repository: r

[clang-tools-extra] r321067 - [clangd] Support filtering by fixing scopes in fuzzyFind.

2017-12-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Dec 19 03:37:40 2017 New Revision: 321067 URL: http://llvm.org/viewvc/llvm-project?rev=321067&view=rev Log: [clangd] Support filtering by fixing scopes in fuzzyFind. Summary: When scopes are specified, only match symbols from scopes. Reviewers: sammccall Reviewed By: sa

[PATCH] D41386: [libunwind][PPC64] Port to ppc64le - initial version

2017-12-19 Thread Leandro Lupori via Phabricator via cfe-commits
luporl created this revision. luporl added a reviewer: mstorsjo. Initial working version of libunwind for PowerPC 64. Tested on little end ppc64 host only. Based on the existing PowerPC 32 code. It supports: - context save/restore (unw_getcontext, unw_init_local, unw_resume) - read/write from/t

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127488. ioeric added a comment. - Merged with origin/master - Merged with https://reviews.llvm.org/D41351 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41281 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/index/FileIndex.

[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127493. ioeric added a comment. - Merge with updated https://reviews.llvm.org/D41281 - Fix broken merge Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41289 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer

[clang-tools-extra] r321073 - [clangd] Expose offset <-> LSP position functions, and fix bugs

2017-12-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Dec 19 04:23:48 2017 New Revision: 321073 URL: http://llvm.org/viewvc/llvm-project?rev=321073&view=rev Log: [clangd] Expose offset <-> LSP position functions, and fix bugs Summary: - Moved these functions to SourceCode.h - added unit tests - fix off by one in positionT

[PATCH] D41351: [clangd] Expose offset <-> LSP position functions, and fix bugs

2017-12-19 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE321073: [clangd] Expose offset <-> LSP position functions, and fix bugs (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D41351?vs=127345&id=127495#toc Reposi

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added inline comments. This revision now requires changes to proceed. Comment at: include/clang/Frontend/PrecompiledPreamble.h:249 + /// from a CompilerInstance. + virtual void BeforeExecute(CompilerInstance &CI);

[PATCH] D40903: [Sanitizers] Basic Solaris sanitizer support (PR 33274)

2017-12-19 Thread Rainer Orth via Phabricator via cfe-commits
ro marked an inline comment as done. ro added inline comments. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:528 StringRef Sanitizer) { + // Solaris ld doesn't need this. Inhibit use of non-existant + // --export-dynamic. ---

[PATCH] D41387: Remove llvm::MemoryBuffer const_casts

2017-12-19 Thread Pavel Labath via Phabricator via cfe-commits
labath created this revision. labath added reviewers: dblaikie, rsmith. llvm has grown a WritableMemoryBuffer class, which is convertible (inherits from) a MemoryBuffer. We can use it to avoid conts_casting the buffer contents when we want to write to it. Repository: rC Clang https://reviews.

[PATCH] D40903: [Sanitizers] Basic Solaris sanitizer support (PR 33274)

2017-12-19 Thread Rainer Orth via Phabricator via cfe-commits
ro updated this revision to Diff 127499. ro marked an inline comment as done. ro added a comment. Reworded comment. Repository: rC Clang https://reviews.llvm.org/D40903 Files: include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains/CommonArgs.cpp lib/Driver/To

[PATCH] D40903: [Sanitizers] Basic Solaris sanitizer support (PR 33274)

2017-12-19 Thread Rainer Orth via Phabricator via cfe-commits
ro added a comment. There are two issues before the patch can be commited: - It depends on https://reviews.llvm.org/D35755 which needs minor changes. - I'm currently working with an experimental version of Solaris ld that *does* support generation of __start___sancov_guards etc. labels. This wi

Re: r320982 - Revert r320978 "No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17"

2017-12-19 Thread Richard Smith via cfe-commits
On 18 Dec 2017 15:23, "Stephan Bergmann via cfe-commits" < cfe-commits@lists.llvm.org> wrote: On 12/18/2017 03:05 PM, Richard Smith wrote: > Can we just strip the noexcept from the function type before emitting the > fsan type info? > As is apparently already done when emitting the (not noexcept

[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

2017-12-19 Thread Eniko Donatella Toth via Phabricator via cfe-commits
NorenaLeonetti added a comment. In https://reviews.llvm.org/D33826#935394, @lebedev.ri wrote: > Ping? Hi, I'm sorry I got a bit busy, I'll get back to it next year. Repository: rL LLVM https://reviews.llvm.org/D33826 ___ cfe-commits mailing li

Re: r320982 - Revert r320978 "No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17"

2017-12-19 Thread Stephan Bergmann via cfe-commits
On 12/19/2017 01:58 PM, Richard Smith wrote: On 18 Dec 2017 15:23, "Stephan Bergmann via cfe-commits" mailto:cfe-commits@lists.llvm.org>> wrote: On 12/18/2017 03:05 PM, Richard Smith wrote: Can we just strip the noexcept from the function type before emitting the fsan type

[PATCH] D40720: No -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17

2017-12-19 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. In https://reviews.llvm.org/D40720#958743, @vsk wrote: > > Would it be possible to fix this by stripping the noexcept specifiers from > > both the function type used in the check and the one that is embedded in > > the prefix data? The downside is that we won't catch the

[PATCH] D41386: [libunwind][PPC64] Port to ppc64le - initial version

2017-12-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: include/__libunwind_config.h:46 +# define _LIBUNWIND_CURSOR_SIZE 148 +# define _LIBUNWIND_HIGHEST_DWARF_REGISTER 110 # elif defined(__ppc__) Don't hardcode a number here; add a define `_LIBUNWIND_HIGHEST_DWARF_REGIS

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127509. ioeric added a comment. - Fixed a bug when completing scope that starts with '::'. - Diff base on origin/master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41281 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/in

[PATCH] D41391: [clangd] Use the clang-tools-extra as the official repo for `vscode-clangd` extension.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, krasimir. Herald added subscribers: ilya-biryukov, klimek. Previously, we use a separate GitHub repository (https://github.com/llvm-vs-code-extensions/vscode-clangd) for publishing `vscode-clangd` extension to marketplace. To reduc

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-12-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Sorry, I lost this patch. I've looked at the results and it still seems that the signal-to-noise ratio is quite low. There's definitely potential in using parameter name and argument spelling to detect possibly swapped arguments, and there's a recent research on this top

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/CodeComplete.cpp:334 + Item.insertTextFormat = InsertTextFormat::PlainText; + // FIXME: sort symbols appropriately. + Item.sortText = ""; ioeric wrote: > ilya-biryukov wrote: > > NIT: FIXME(ioeric)? > > A

[PATCH] D41386: [libunwind][PPC64] Port to ppc64le - initial version

2017-12-19 Thread Leandro Lupori via Phabricator via cfe-commits
luporl updated this revision to Diff 127516. luporl added a comment. Addressed review comments. https://reviews.llvm.org/D41386 Files: include/__libunwind_config.h include/libunwind.h src/AddressSpace.hpp src/Registers.hpp src/UnwindCursor.hpp src/UnwindRegistersRestore.S src/Unwi

[PATCH] D41386: [libunwind][PPC64] Port to ppc64le - initial version

2017-12-19 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. No further comments from my side, but it'd be good if @compnerd could have a look as well. https://reviews.llvm.org/D41386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D41386: [libunwind][PPC64] Port to ppc64le - initial version

2017-12-19 Thread Leandro Lupori via Phabricator via cfe-commits
luporl marked 3 inline comments as done. luporl added inline comments. Comment at: src/libunwind.cpp:84 #ifdef UNW_REMOTE +//TODO: add powerpc64 support /// Create a cursor into a thread in another process. mstorsjo wrote: > Why this comment here? Remote unwind

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/CodeComplete.cpp:111 + case SK::Using: +return CompletionItemKind::Reference; + case SK::Function: ioeric wrote: > sammcca

[PATCH] D41394: [CodeGen] Support generation of TBAA info in the new format

2017-12-19 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added reviewers: rjmccall, hfinkel. kosarev added a project: clang. Now that the MDBuilder helpers generating TBAA type and access descriptors in the new format are in place, we can teach clang to use them when requested. Repository: rL LLVM https://rev

[PATCH] D39834: [clang] -foptimization-record-file= should imply -fsave-optimization-record

2017-12-19 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. Thanks Dmitry, this LGTM! PS: Let me know if you don't have commit access and want me to commit it for you. https://reviews.llvm.org/D39834 ___

[PATCH] D41391: [clangd] Use the clang-tools-extra as the official repo for `vscode-clangd` extension.

2017-12-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/clients/clangd-vscode/README.md:16 +To use `vscode-clangd` extension in VS Code, you need to install `vscode-clangd` +from VS Code extension mar

[PATCH] D41077: [analyser] different.CallArgsOrder checker implementation

2017-12-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D41077#958819, @szepet wrote: > 4. FYI: There is a similar check under review which uses only the AST > provided information and implemented as a tidy-checker: > https://reviews.llvm.org/D20689 (As I see your checker does not uses symbolic >

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. ping, in case you miss this patch. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40299: [Complex] Don't use __div?c3 when building with fast-math.

2017-12-19 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm updated this revision to Diff 127528. paulwalker-arm added a comment. Query LangOpts for FastMast rather than IRBuilder and fleshed out the tests. https://reviews.llvm.org/D40299 Files: lib/CodeGen/CGExprComplex.cpp test/CodeGen/complex-math.c Index: test/CodeGen/complex-mat

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Sorry, I did miss it! Comment at: clangd/Protocol.h:326 +}; +/// A LSP-specific comparator used to find Disgnostic in a container like +/// std:map. ni

[PATCH] D40299: [Complex] Don't use __div?c3 when building with fast-math.

2017-12-19 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm marked 3 inline comments as done. paulwalker-arm added inline comments. Comment at: lib/CodeGen/CGExprComplex.cpp:773 // supported imaginary types in addition to complex types. -if (RHSi) { +if (RHSi && !FMF.isFast()) { BinOpInfo LibCallOp = Op;

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-19 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. LGTM. I still think that we should move the `SymbolIndex` out of the struct, but don't want to block this patch. Comment at: clangd/CodeComplete.h:64 + + // Populated internally by clangd, do not set. + ///

[PATCH] D41391: [clangd] Use the clang-tools-extra as the official repo for `vscode-clangd` extension.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 127529. hokein marked 3 inline comments as done. hokein added a comment. Address review comments and add license. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41391 Files: clangd/clients/clangd-vscode/LICENSE clangd/clients/clangd-vsco

[PATCH] D41394: [CodeGen] Support generation of TBAA info in the new format

2017-12-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Tests? Repository: rL LLVM https://reviews.llvm.org/D41394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r321080 - Rename sparc-myriad-elf triplet to sparc-myriad-rtems

2017-12-19 Thread Walter Lee via cfe-commits
Author: waltl Date: Tue Dec 19 08:19:11 2017 New Revision: 321080 URL: http://llvm.org/viewvc/llvm-project?rev=321080&view=rev Log: Rename sparc-myriad-elf triplet to sparc-myriad-rtems Summary: This is to be consistent with latest Movidius MDK releases. Also, don't inherit any gcc paths for shav

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127536. ioeric marked an inline comment as done. ioeric added a comment. - Move implementations around to make code easier to read. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41281 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h

[PATCH] D41368: [libc++] Ignore bogus tautologic comparison warnings

2017-12-19 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D41368#958865, @zturner wrote: > It would be better if we could just fix the code. I disagree (See discussion of https://reviews.llvm.org/D39149). Even if it was "just this one place" (which it isn't), this affects users of clang, not ju

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127538. ioeric added a comment. - Add a FIXME for Index in code completion options. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41281 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/index/FileIndex.cpp clangd/index/Fil

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.h:64 + + // Populated internally by clangd, do not set. + /// If `Index` is set, it is used to augment the code completion ilya-biryukov wrote: > sammccall wrote: > > ilya-biryukov wrote: > > > ioeri

[PATCH] D39834: [clang] -foptimization-record-file= should imply -fsave-optimization-record

2017-12-19 Thread Dmitry Venikov via Phabricator via cfe-commits
Quolyk added a comment. In https://reviews.llvm.org/D39834#959500, @JDevlieghere wrote: > Thanks Dmitry, this LGTM! > > PS: Let me know if you don't have commit access and want me to commit it for > you. I don't have commit access, please commit. Thanks for code review. https://reviews.llvm.

r321082 - Add renamed .o files that were omitted by "git llvm push" command

2017-12-19 Thread Walter Lee via cfe-commits
Author: waltl Date: Tue Dec 19 08:34:13 2017 New Revision: 321082 URL: http://llvm.org/viewvc/llvm-project?rev=321082&view=rev Log: Add renamed .o files that were omitted by "git llvm push" command Original commit is at: https://reviews.llvm.org/D41295. Added: cfe/trunk/test/Driver/Inputs/

[PATCH] D41368: [libc++] Ignore bogus tautologic comparison warnings

2017-12-19 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. @mclow.lists are you okay with this approach? I'm also fine using a cast to silence the warning, as @zturner suggested, but we should suppress the warning in some way, otherwise libc++ 6 is gonna have compile warnings with clang 6 out of the box, which isn't great. A t

[PATCH] D41368: [libc++] Ignore bogus tautologic comparison warnings

2017-12-19 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Also FWIW I agree with you that the warning is completely bogus here, but it looks like the fix to that warning isn't gonna make it into clang 6, at least, so we have to adjust accordingly. Repository: rCXX libc++ https://reviews.llvm.org/D41368 _

[PATCH] D41281: [clangd] Index-based code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321083: [clangd] Index-based code completion. (authored by ioeric, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41281 Files: clang-tools-extra/trunk/clangd/CodeComplete.cpp clang-

[clang-tools-extra] r321083 - [clangd] Index-based code completion.

2017-12-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Dec 19 08:50:37 2017 New Revision: 321083 URL: http://llvm.org/viewvc/llvm-project?rev=321083&view=rev Log: [clangd] Index-based code completion. Summary: Use symbol index to populate completion results for qualfified IDs e.g. "nx::A^". Reviewers: ilya-biryukov, sammcca

[PATCH] D41399: [CodeGen] Represent array members in new-format TBAA type descriptors

2017-12-19 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added reviewers: rjmccall, hfinkel. kosarev added a project: clang. Now that in the new TBAA format we allow access types to be of any object types, including aggregate ones, it becomes critical to specify types of all sub-objects such aggregates comprise a

[PATCH] D41077: [analyser] different.CallArgsOrder checker implementation

2017-12-19 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Alexey, This commit strongly needs testing on some real code. I cannot predict the TP rate of this checker now. Regarding implementation, you can find some remarks inline. Comment at: lib/StaticAnalyzer/Checkers/CallArgsOrderChecker.cpp:31 + +cla

[PATCH] D41368: [libc++] Ignore bogus tautologic comparison warnings

2017-12-19 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. In https://reviews.llvm.org/D41368#959579, @smeenai wrote: > @mclow.lists are you okay with this approach? I'm also fine using a cast to > silence the warning, as @zturner suggested, but we should suppress the > warning in some way, otherwise libc++ 6 is gonna have compil

[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127544. ioeric added a comment. - Merge with https://reviews.llvm.org/D41289. - Merge with origin/master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41289 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServe

[clang-tools-extra] r321086 - [clangd] Fix warnings/compiler pickiness after r321083

2017-12-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Dec 19 09:05:00 2017 New Revision: 321086 URL: http://llvm.org/viewvc/llvm-project?rev=321086&view=rev Log: [clangd] Fix warnings/compiler pickiness after r321083 Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp clang-tools-extra/trunk/unittests/clangd

[clang-tools-extra] r321087 - [clangd] Split findDefs/highlights into XRefs, from ClangdUnit. NFC

2017-12-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Dec 19 09:06:07 2017 New Revision: 321087 URL: http://llvm.org/viewvc/llvm-project?rev=321087&view=rev Log: [clangd] Split findDefs/highlights into XRefs, from ClangdUnit. NFC Going to add unit tests in the next patch. (Haha!) But seriously there's some work to do firs

r321090 - [clang] -foptimization-record-file= should imply -fsave-optimization-record

2017-12-19 Thread Jonas Devlieghere via cfe-commits
Author: jdevlieghere Date: Tue Dec 19 09:16:45 2017 New Revision: 321090 URL: http://llvm.org/viewvc/llvm-project?rev=321090&view=rev Log: [clang] -foptimization-record-file= should imply -fsave-optimization-record The Clang option -foptimization-record-file= controls which file an optimization r

[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. OK, this is pretty clean now! :-) Comment at: clangd/ClangdServer.cpp:139 + FileIdx(BuildDynamicSymbolIndex ? new FileIndex() : nullptr), + Units(FileIdx +

[PATCH] D39834: [clang] -foptimization-record-file= should imply -fsave-optimization-record

2017-12-19 Thread Jonas Devlieghere via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321090: [clang] -foptimization-record-file= should imply -fsave-optimization-record (authored by JDevlieghere, committed by ). Repository: rC Clang https://reviews.llvm.org/D39834 Files: lib/Driver/

[PATCH] D40939: [analyzer] Avoid element regions of void type.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127548. NoQ added a comment. - Fix comments as suggested by Devin. - Point out that arithmetic on void pointers is a GNU extension. https://reviews.llvm.org/D40939 Files: include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h lib/StaticAnalyzer/Core/Ex

Re: [PATCH] D40939: [analyzer] Avoid element regions of void type.

2017-12-19 Thread Roman Lebedev via cfe-commits
On Tue, Dec 19, 2017 at 8:26 PM, Artem Dergachev via Phabricator via cfe-commits wrote: > NoQ updated this revision to Diff 127548. > NoQ added a comment. > > - Fix comments as suggested by Devin. > - Point out that arithmetic on void pointers is a GNU extension. > > > https://reviews.llvm.org/D40

[PATCH] D41394: [CodeGen] Support generation of TBAA info in the new format

2017-12-19 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. There are more tests that we will need to rewrite during migration to the new format than I think we could handle with a single patch. I was going to address them with separate patches. Or, I can rewrite some most basic of them as part of this patch. Repository: rL

[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127554. ioeric marked 4 inline comments as done. ioeric added a comment. - Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41289 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp

[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the quick review! Comment at: clangd/ClangdUnit.cpp:617 + new CppFile(FileName, std::move(Command), StorePreamblesInMemory, + std::move(PCHs), std::move(ASTCallback))); } sammccall wrote: > CppFile doesn

[PATCH] D41289: [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE321092: [clangd] Build dynamic index and use it for code completion. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D41289?vs=127554&id=127555#toc Repository:

[clang-tools-extra] r321092 - [clangd] Build dynamic index and use it for code completion.

2017-12-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Dec 19 10:00:37 2017 New Revision: 321092 URL: http://llvm.org/viewvc/llvm-project?rev=321092&view=rev Log: [clangd] Build dynamic index and use it for code completion. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, cfe-commits Differen

[PATCH] D40939: [analyzer] Avoid element regions of void type.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a subscriber: lebedev.ri. NoQ added a comment. @lebedev.ri wrote: > No tests? This patch adds an assertion => Multiple existing tests immediately starts crashing => This patch fixes the crashes with the new functionality. So in my understanding the new assertion is all the tests we

[clang-tools-extra] r321094 - [clangd] Supress a log warning by putting it behind a condition.

2017-12-19 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Dec 19 10:10:32 2017 New Revision: 321094 URL: http://llvm.org/viewvc/llvm-project?rev=321094&view=rev Log: [clangd] Supress a log warning by putting it behind a condition. Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified: clang-tools-extra/trunk/cl

[PATCH] D41394: [CodeGen] Support generation of TBAA info in the new format

2017-12-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Rewriting some of the most basic tests would be fine. Please either use new FileCheck lines or clone the existing tests, since we don't really know how long this transition will last. Repository: rL LLVM https://reviews.llvm.org/D41394 _

[PATCH] D41250: [analyzer] Model implied cast around operator new().

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127549. NoQ added a comment. Rebase. > I also noticed that `evalCast` from `void *` to `T *` is uncomfortable to use > because sometimes it transforms `&SymRegion{$x}` into `&element{T, 0S32b, > SymRegion{$x}}` even when `$x` is already of type `T *`. The form

[PATCH] D41266: [analyzer] With c++-allocator-inlining, fix memory space for operator new pointers.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127560. NoQ added a comment. Rebase. Remove the redundant cast that is done in `c++-allocator-inlining` mode when modeling array new. After rebase it started causing two identical element regions top appear on top of each other. https://reviews.llvm.org/D4126

[PATCH] D39050: Add index-while-building support to Clang

2017-12-19 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes updated this revision to Diff 127568. nathawes added a comment. Fix out of data header comment in FileIndexData.h https://reviews.llvm.org/D39050 Files: include/clang/Basic/AllDiagnostics.h include/clang/Basic/CMakeLists.txt include/clang/Basic/Diagnostic.td include/clang/Basic

[PATCH] D41387: Remove llvm::MemoryBuffer const_casts

2017-12-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Seems good Repository: rC Clang https://reviews.llvm.org/D41387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: vsapsai, rsmith, george.burgess.iv. The commit r316245 introduced a regression that causes an assertion failure when Clang tries to cast an `IncompleteArrayType` to a `PointerType` when evaluating __builtin_object_size in this sample:

[PATCH] D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Note that even though there is a discrepancy between GCC and Clang, this patch does not change Clang's behavior in this instance as it emitted -1 previously as well Repository: rC Clang https://reviews.llvm.org/D41405

[PATCH] D39462: [Sema] Implement -Wmaybe-tautological-constant-compare for when the tautologicalness is data model dependent

2017-12-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. FWIW we've already rolled Clang that contains `-Wtautological-constant-compare` to our codebase and we had to set `-Wno-tautological-constant-compare` globally because we were getting bogus warnings in many places, similarly to https://reviews.llvm.org/D41368. If that wa

[PATCH] D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC321099: [driver][darwin] Take the OS version specified in "-target" as the target (authored by arphaman, committed by ).

r321099 - [driver][darwin] Take the OS version specified in "-target" as the target

2017-12-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Dec 19 11:05:04 2017 New Revision: 321099 URL: http://llvm.org/viewvc/llvm-project?rev=321099&view=rev Log: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment The OS version is specified in -target

[PATCH] D41406: [analyzer] Add a new checker callback, check::NewAllocator.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added a subscriber: rnkovacs. This patch is roughly based on the discussion we've had in http://lists.llvm.org/pipermail/cfe-dev/2017-December/056314.html about how our support for C

Re: r313729 - Implement C++ [basic.link]p8.

2017-12-19 Thread Alex L via cfe-commits
Hi Richard, This commit has caused a new regression in Clang which causes an assertion failure for extern "C" function definitions whose return type is a pointer to a record. I filed https://bugs.llvm.org/show_bug.cgi?id=35697 which contains the minimized test case for this issue. Do you mind taki

[PATCH] D39462: [Sema] Implement -Wmaybe-tautological-constant-compare for when the tautologicalness is data model dependent

2017-12-19 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. In https://reviews.llvm.org/D39462#959822, @phosek wrote: > FWIW we've already rolled Clang that contains > `-Wtautological-constant-compare` to our codebase and we had to set > `-Wno-tautological-constant-compare` globally because we were getting bogus > warnings in man

[PATCH] D41406: [analyzer] Add a new checker callback, check::NewAllocator.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 127579. NoQ added a comment. - Actually call the new callback when the allocator call is inlined. - Update checker documentation :) https://reviews.llvm.org/D41406 Files: include/clang/StaticAnalyzer/Core/Checker.h include/clang/StaticAnalyzer/Core/CheckerM

[PATCH] D41408: [analyzer] NFC: Fix nothrow operator new definition in a test.

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. Fun C++ fact: definition void *operator new(std::size_t size, std::nothrow_t ¬hrow) throw() { ... } does not override the global nothrow o

[PATCH] D41409: [analyzer] Fix intermediate diagnostics on paths that go through operator new().

2017-12-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. When operator new() is inlined, diagnostic pieces may appear within it. They'd be surrounded by `Calling 'operator new'` and `Returning from

r321102 - [driver][darwin] Set the 'simulator' environment when it's specified

2017-12-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Dec 19 11:56:14 2017 New Revision: 321102 URL: http://llvm.org/viewvc/llvm-project?rev=321102&view=rev Log: [driver][darwin] Set the 'simulator' environment when it's specified in '-target' rdar://35742458 Differential Revision: https://reviews.llvm.org/D41076 Modifie

[PATCH] D41076: [driver][darwin] Set the 'simulator' environment when it's specified in '-target'

2017-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321102: [driver][darwin] Set the 'simulator' environment when it's specified (authored by arphaman, committed by ). Repository: rC Clang https://reviews.llvm.org/D41076 Files: lib/Driver/ToolChains/

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

2017-12-19 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. I don't think any checks can be skipped in the newly-introduced calls to EmitTypeCheck. Clang uses EmitDynamicCast on arbitrary addresses, not just addresses which are known to be checked for alignment/etc. Regarding the test update, I think it makes sense to extend the run

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 127586. hokein marked an inline comment as done. hokein added a comment. Fix typos. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41280 Files: clangd/ClangdLSPServer.h clangd/Protocol.h Index: clangd/Protocol.h ===

[PATCH] D40478: Added control flow architecture protection Flag

2017-12-19 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/CodeGen/CodeGenFunction.cpp:876 // Apply xray attributes to the function (as a string, for now) - if (D && ShouldXRayInstrumentFunction()) { + bool InstrumentXray = Shoul

[PATCH] D40478: Added control flow architecture protection Flag

2017-12-19 Thread Oren Ben Simhon via Phabricator via cfe-commits
oren_ben_simhon updated this revision to Diff 127590. oren_ben_simhon added a reviewer: pcc. oren_ben_simhon added a comment. Implemented comments posted until 12/19 (Thanks Craig) Repository: rL LLVM https://reviews.llvm.org/D40478 Files: include/clang/Driver/Options.td include/clang/Fr

  1   2   >