[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D38773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D38857: [OpenCL] Improve printing and semantic check related to implicit addr space

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Type.h:337 +Mask = (Mask & ~ImplicitAddrSpaceMask) | + (((uint32_t)Value) << ImplicitAddrSpaceShift); + } This is probably cleaner as: Mask = (Value ? (Mask | ImplicitAddrSpaceMask) :

[PATCH] D39174: [analyzer] Fix handling of labels in getLValueElement

2017-10-23 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Great. Probably one more reason to turn all `Loc`s into regions. Repository: rL LLVM https://reviews.llvm.org/D39174 ___ cfe-commits mailing list cf

[PATCH] D39008: [CodeGen] Propagate may-alias'ness of lvalues with TBAA info

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Well, I've been agreeing so far that it makes sense to propagate TBAA information separately from LValueBaseInfo, and this seems like a logical part of that, so okay. Repository: rL LL

[PATCH] D39057: [clangd][WIP] Integrate the refactoring actions into clangd

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdServer.cpp:500 +if (!RefactoringClient) + RefactoringClient = llvm::make_unique(); +Results = clangd::findAvailableRefactoringCommands(*RefactoringClient, *AST, Maybe initialize `Refacto

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:4811 + TemplateParameterList *Params = + cast(Template->getMostRecentDecl()) + ->getTemplateParameters(); erichkeane wrote: > mstorsjo wrote: > > erichkeane wrote: > > > mstorsjo

[PATCH] D38126: Make TBAA information to be part of LValueBaseInfo

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Hmm. I'm not sure I like the design of merging TBAAAccessInfo into LValueBaseInfo. LValueBaseInfo is currently the set of information that's generally preserved across l-value manipulations. It was extracted from LValue specifically to create an encapsulated entity

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. If this is something we generally need to be doing in all the places we temporarily save and restore the insertion point, we should fix the basic behavior of saveIP instead of adding explicit code to a bunch of separate places. Can we just override saveIP() on CGBuild

[PATCH] D38618: Do not add a colon chunk to the code completion of class inheritance access modifiers

2017-10-23 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. ping https://reviews.llvm.org/D38618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39177: [CodeGen] Generate TBAA info for reference loads

2017-10-23 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added a project: clang. Repository: rL LLVM https://reviews.llvm.org/D39177 Files: lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGStmtOpenMP.cpp lib/CodeGen/CodeGenFunction.h test/CodeGen/tbaa-ref

[PATCH] D39177: [CodeGen] Generate TBAA info for reference loads

2017-10-23 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added inline comments. Comment at: test/CodeGen/tbaa-reference.cpp:1 // RUN: %clang_cc1 -triple x86_64-linux -O1 -disable-llvm-passes %s -emit-llvm -o - | FileCheck %s // Changes for this test look somewhat complicated, so here's a short summary: * We

[PATCH] D38939: [clangd] Handle exit notification (proper shutdown)

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.cpp:59 void ClangdLSPServer::onShutdown(Ctx C, ShutdownParams &Params) { - IsDone = true; + // Before we reply, we could serialize the preambles to disk. For now, let's + // just say we're ready to exit.

r316314 - [rename] Don't overwrite the template argument when renaming a template function.

2017-10-23 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Oct 23 01:58:50 2017 New Revision: 316314 URL: http://llvm.org/viewvc/llvm-project?rev=316314&view=rev Log: [rename] Don't overwrite the template argument when renaming a template function. Reviewers: ioeric Reviewed By: ioeric Subscribers: cierpuchaw, cfe-commits, kli

[PATCH] D39120: [rename] Don't overwrite the template argument when renaming a template function.

2017-10-23 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316314: [rename] Don't overwrite the template argument when renaming a template… (authored by hokein). Repository: rL LLVM https://reviews.llvm.org/D39120 Files: cfe/trunk/lib/Tooling/Refactoring/Re

[PATCH] D39120: [rename] Don't overwrite the template argument when renaming a template function.

2017-10-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: unittests/Rename/RenameFunctionTest.cpp:232 + std::string Expected = R"( + namespace na { + template T Y(); cierpuchaw wrote: > Shouldn't this be `namespace nb {`? It is intended. We don't change the namespace

[PATCH] D37554: [libclang] Allow crash recovery with LIBCLANG_NOTHREADS

2017-10-23 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 119823. nik added a comment. Rebased and took over better wording/description from Ilya. https://reviews.llvm.org/D37554 Files: tools/libclang/CIndex.cpp tools/libclang/CIndexCodeCompletion.cpp tools/libclang/Indexing.cpp Index: tools/libclang/Indexing.

[PATCH] D37554: [libclang] Allow crash recovery with LIBCLANG_NOTHREADS

2017-10-23 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Hmm, apparently "arc diff --update https://reviews.llvm.org/D37554"; did not take the new commit message into account. Changed it manually with the web interface. Ilya, I hope it's OK if I take your description :) > That said, I am not familiar with the code you're changin

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/UnwindRegistersRestore.S:98 + # skip fs + # skip gs + movq 56(%rcx), %rsp # cut back rsp to new location mstorsjo wrote: > compnerd wrote: > > Doesn't Win64 ABI require some of the MMX registers be saved/restor

[PATCH] D39178: [rename] support renaming class member.

2017-10-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added subscribers: mgorny, klimek. https://reviews.llvm.org/D39178 Files: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp unittests/Rename/CMakeLists.txt unittests/Rename/RenameMemberTest.cpp Index: unittests/Rename/RenameMemberTest.cpp

Re: r316268 - [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-23 Thread Hans Wennborg via cfe-commits
This seems to have had the side effect of introducing a new warning in Chromium builds: ../../third_party/expat/files/lib/xmlparse.c(2429,24): error: comparison of integers of different signs: 'enum XML_Error' and 'unsigned int' [-Werror,-Wsign-compare] if (code > 0 && code < sizeof(message)/si

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 119833. lebedev.ri retitled this revision from "[Sema] -Wzero-as-null-pointer-constant: don't warn for system macros." to "[Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.". lebedev.ri edited the summary of this revisio

Re: r316268 - [Sema] Fixes for enum handling for tautological comparison diagnostics

2017-10-23 Thread Roman Lebedev via cfe-commits
On Mon, Oct 23, 2017 at 2:13 PM, Hans Wennborg wrote: Hi. > This seems to have had the side effect of introducing a new warning in > Chromium builds: > > ../../third_party/expat/files/lib/xmlparse.c(2429,24): error: > comparison of integers of different signs: 'enum XML_Error' and > 'unsigned in

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

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:103 + void AfterExecute(CompilerInstance &CI) override { +const SourceManager &SM = CI.getSourceManager(); Nebiroth wrote: > ilya-biryukov wrote: > > There's a much better public API to

[PATCH] D39179: [AArch64] Fix PR34625 -mtune without -mcpu should not set -target-cpu

2017-10-23 Thread Peter Smith via Phabricator via cfe-commits
peter.smith created this revision. Herald added subscribers: javed.absar, rengolin, aemerson. When -mtune is used on AArch64 the -target-cpu is passed the value of the cpu given to -mtune. As well as setting micro-architectural features of the -mtune cpu, this will also add the architectural fea

[PATCH] D38939: [clangd] Handle exit notification (proper shutdown)

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. Oh, and other than those NITs, LGTM. @rwols, you have commit access now, right?) https://reviews.llvm.org/D38939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

Re: [clang-tools-extra] r315323 - [clangd] Added forgotten return in UniqueFunction.

2017-10-23 Thread Ilya Biryukov via cfe-commits
Sorry for late response, was on vacation. The following commit (r315325) adds code coverage for this case. But you are correct, we were missing usages of the class with non-void return type before that. On Mon, Oct 16, 2017 at 7:12 PM, David Blaikie wrote: > Is there missing test coverage for

Re: Attribute spelling policy

2017-10-23 Thread Hal Finkel via cfe-commits
On 10/21/2017 10:14 AM, Aaron Ballman via cfe-commits wrote: Attributes come with multiple spelling flavors, but when it comes to adding new attributes that are not present in other compiler tools such as GCC or MSVC, we have done a poor job of being consistent with which spelling flavors we ado

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

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D35894#895023, @Nebiroth wrote: > I would like some feedback/suggestions on whether it's possible to "append" > information to a MarkedString to be displayed on client? You mean append **after** returning `MarkedString` to the client?

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

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > Another note: current implementation does not seem to handle macros at all > (it will only highlight definition of a macro, not its usages). Current implementation still doesn't highlight macro references, only definitions. I'd either disable `documentHighlight`

[clang-tools-extra] r316323 - [clangd] Updated outdated test comment. NFC.

2017-10-23 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Oct 23 07:08:52 2017 New Revision: 316323 URL: http://llvm.org/viewvc/llvm-project?rev=316323&view=rev Log: [clangd] Updated outdated test comment. NFC. Modified: clang-tools-extra/trunk/test/clangd/input-mirror.test Modified: clang-tools-extra/trunk/test/clangd/i

Re: [clang-tools-extra] r315287 - Revert "Revert r315214 since diff -Z isn't portable, this is breaking:"

2017-10-23 Thread Ilya Biryukov via cfe-commits
Missed that, will do, thanks. On Wed, Oct 11, 2017 at 1:39 AM, Bruno Cardoso Lopes < bruno.card...@gmail.com> wrote: > On Tue, Oct 10, 2017 at 2:08 AM, Ilya Biryukov via cfe-commits > wrote: > > Author: ibiryukov > > Date: Tue Oct 10 02:08:47 2017 > > New Revision: 315287 > > > > URL: http://llv

[PATCH] D38538: Avoid printing some redundant name qualifiers in completion

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Friendly ping. Would it be okay to make the new behaviour optional? (Leaving old behaviour to be the default). https://reviews.llvm.org/D38538 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

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

2017-10-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D35894#903542, @ilya-biryukov wrote: > In https://reviews.llvm.org/D35894#895023, @Nebiroth wrote: > > > I would like some feedback/suggestions on whether it's possible to "append" > > information to a MarkedString to be displayed on client?

Re: Attribute spelling policy

2017-10-23 Thread Aaron Ballman via cfe-commits
On Mon, Oct 23, 2017 at 9:48 AM, Hal Finkel wrote: > > On 10/21/2017 10:14 AM, Aaron Ballman via cfe-commits wrote: >> >> Attributes come with multiple spelling flavors, but when it comes to >> adding new attributes that are not present in other compiler tools >> such as GCC or MSVC, we have done

[clang-tools-extra] r316327 - [clangd] Allow to pass code completion opts to ClangdServer.

2017-10-23 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Oct 23 07:46:48 2017 New Revision: 316327 URL: http://llvm.org/viewvc/llvm-project?rev=316327&view=rev Log: [clangd] Allow to pass code completion opts to ClangdServer. Reviewers: bkramer, krasimir, sammccall Reviewed By: krasimir Subscribers: klimek, cfe-commits Di

[PATCH] D38731: [clangd] Allow to pass code completion opts to ClangdServer.

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D38731#898539, @krasimir wrote: > Great! I like the unit testing approach a lot! Thanks! Repository: rL LLVM https://reviews.llvm.org/D38731 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D38731: [clangd] Allow to pass code completion opts to ClangdServer.

2017-10-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316327: [clangd] Allow to pass code completion opts to ClangdServer. (authored by ibiryukov). Changed prior to commit: https://reviews.llvm.org/D38731?vs=118385&id=119849#toc Repository: rL LLVM htt

[PATCH] D37554: [libclang] Allow crash recovery with LIBCLANG_NOTHREADS

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D37554#903401, @nik wrote: > Ilya, I hope it's OK if I take your description :) Sure, no problem. https://reviews.llvm.org/D37554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D39178: [rename] support renaming class member.

2017-10-23 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. Nice! Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:251 + // Ignore implicit initializers. + if (!Initializer->isWritten()) +continue; -

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

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D35894#903552, @malaperle wrote: > I think he meant to have multiple sections in the hover, one C/C++ and one > not. But we noticed you can have an array of MarkedString in Hover so it > should be fine. I totally misunderstood the que

Re: Attribute spelling policy

2017-10-23 Thread Arthur O'Dwyer via cfe-commits
On Mon, Oct 23, 2017 at 7:33 AM, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, Oct 23, 2017 at 9:48 AM, Hal Finkel wrote: > > On 10/21/2017 10:14 AM, Aaron Ballman via cfe-commits wrote: > >> > >> Attributes come with multiple spelling flavors, but when it comes to

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

2017-10-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D35894#903594, @ilya-biryukov wrote: > In https://reviews.llvm.org/D35894#903552, @malaperle wrote: > > > I think he meant to have multiple sections in the hover, one C/C++ and one > > not. But we noticed you can have an array of MarkedStrin

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

2017-10-23 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. In https://reviews.llvm.org/D35894#903594, @ilya-biryukov wrote: > In https://reviews.llvm.org/D35894#903552, @malaperle wrote: > > > I think he meant to have multiple sections in the hover, one C/C++ and one > > not. But we noticed you can have an array of MarkedString

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

2017-10-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D35894#903607, @malaperle wrote: > Exactly! Although the without-language part, maybe it'll be "scope" > information first. Maybe documentation/comments in a second patch. Sure, whatever works/looks best. In https://reviews.llvm.org/D

r316335 - clang-cl: Expose --version.

2017-10-23 Thread Nico Weber via cfe-commits
Author: nico Date: Mon Oct 23 08:54:44 2017 New Revision: 316335 URL: http://llvm.org/viewvc/llvm-project?rev=316335&view=rev Log: clang-cl: Expose --version. This is for consistency with lld-link, see https://reviews.llvm.org/D38972 Also give --version a help text so it shows up in --help / /? o

[PATCH] D39184: CodeGen: Fix invalid bitcast in partial initialization of automatic arrary variable

2017-10-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. https://reviews.llvm.org/D39184 Files: lib/CodeGen/CGDecl.cpp test/CodeGenOpenCL/amdgcn-automatic-variable.cl Index: test/CodeGenOpenCL/amdgcn-automatic-variable.cl === --- test/CodeGenOpenCL/amdgc

Re: Attribute spelling policy

2017-10-23 Thread Aaron Ballman via cfe-commits
On Mon, Oct 23, 2017 at 11:16 AM, Arthur O'Dwyer wrote: > On Mon, Oct 23, 2017 at 7:33 AM, Aaron Ballman via cfe-commits > wrote: >> >> On Mon, Oct 23, 2017 at 9:48 AM, Hal Finkel wrote: >> > On 10/21/2017 10:14 AM, Aaron Ballman via cfe-commits wrote: >> >> >> >> Attributes come with multiple s

[PATCH] D39086: Performance tracing facility for clangd.

2017-10-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: clangd/Trace.cpp:87 + +static Tracer* T = nullptr; +} // namespace ilya-biryukov wrote: > Maybe use `unique_ptr` (or even `llvm::Optional`)? Otherwise > we leak memory and d

[PATCH] D39086: Performance tracing facility for clangd.

2017-10-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 119864. sammccall added a comment. Address FIXME now that r316330 is in. https://reviews.llvm.org/D39086 Files: clangd/CMakeLists.txt clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/JSONRPCDispatcher.cpp clangd/ProtocolHandlers.cpp clangd

[PATCH] D38704: [libunwind] Abstract rwlocks into a class, provide a SRW lock implementation for windows

2017-10-23 Thread Zachary Turner via Phabricator via cfe-commits
zturner accepted this revision. zturner added a comment. This revision is now accepted and ready to land. This looks much better than the previous solution. Thanks! https://reviews.llvm.org/D38704 ___ cfe-commits mailing list cfe-commits@lists.llvm

r316338 - Pull X86 "CPUKind" checking into .cpp file. [NFC]

2017-10-23 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Oct 23 09:20:15 2017 New Revision: 316338 URL: http://llvm.org/viewvc/llvm-project?rev=316338&view=rev Log: Pull X86 "CPUKind" checking into .cpp file. [NFC] Preparing to do a refactor of CPU/feature checking, this patch pulls the one CPU implementation from the .h fi

[PATCH] D39057: [clangd][WIP] Integrate the refactoring actions into clangd

2017-10-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. As noted on the other patch, I'm not sure EditorCommands is a useful abstraction. This shows up one of the problems: clangd is mostly decoupled from the actual behavior/semantics of the commands by the EditorCommands abstraction. However LSP doesn't say what the stru

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-23 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/Sema.cpp:445 + // If it is a macro from system header, and if the macro name is not "NULL", + // do not warn. + SourceLocation MaybeMacroLoc = E->getLocStart(); That comment doesn't really add anything IMO

[libcxx] r316343 - Fix misguided error message in debug mode. No functional change. Fixes PR#34966

2017-10-23 Thread Marshall Clow via cfe-commits
Author: marshall Date: Mon Oct 23 09:46:44 2017 New Revision: 316343 URL: http://llvm.org/viewvc/llvm-project?rev=316343&view=rev Log: Fix misguided error message in debug mode. No functional change. Fixes PR#34966 Modified: libcxx/trunk/include/list Modified: libcxx/trunk/include/list URL:

[PATCH] D38704: [libunwind] Abstract rwlocks into a class, provide a SRW lock implementation for windows

2017-10-23 Thread David Majnemer via Phabricator via cfe-commits
majnemer accepted this revision. majnemer added a comment. LGTM https://reviews.llvm.org/D38704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r316344 - [ASTMatchers] Expose forEachOverriden in dynamic AST matchers.

2017-10-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 23 09:48:46 2017 New Revision: 316344 URL: http://llvm.org/viewvc/llvm-project?rev=316344&view=rev Log: [ASTMatchers] Expose forEachOverriden in dynamic AST matchers. Modified: cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp Modified: cfe/trunk/lib/ASTMatchers/Dynami

[PATCH] D39184: CodeGen: Fix invalid bitcast in partial initialization of automatic arrary variable

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D39184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 119892. lebedev.ri marked an inline comment as done. lebedev.ri added a comment. Use `MaybeMacroLoc` variable in the other place too. Repository: rL LLVM https://reviews.llvm.org/D38954 Files: docs/ReleaseNotes.rst lib/Sema/Sema.cpp test/SemaCXX

[PATCH] D36347: Add new script to launch lldb and set breakpoints for diagnostics all diagnostics seen.

2017-10-23 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. Thanks for all the feedback. I'll report back once I've addressed all your suggestions. Thanks again... https://reviews.llvm.org/D36347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/Sema.cpp:445 + // If it is a macro from system header, and if the macro name is not "NULL", + // do not warn. + SourceLocation MaybeMacroLoc = E->getLocStart(); Rakete wrote: > That comment doesn't rea

[PATCH] D38704: [libunwind] Abstract rwlocks into a class, provide a SRW lock implementation for windows

2017-10-23 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. BTW LLVM requires a minimum of Windows 7 according to https://releases.llvm.org/3.8.0/docs/ReleaseNotes.html, so you can rely on SRW locks always being present. If LLVM still has a fallback path for when SRW locks are absent, that could be cleaned up. https://reviews.

[PATCH] D30946: [ScopePrinting] Added support to print full scopes of types and declarations.

2017-10-23 Thread Simon Schroeder via Phabricator via cfe-commits
schroedersi added a comment. Ping https://reviews.llvm.org/D30946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r316353 - CodeGen: Fix invalid bitcast in partial initialization of automatic arrary variable

2017-10-23 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Oct 23 10:49:26 2017 New Revision: 316353 URL: http://llvm.org/viewvc/llvm-project?rev=316353&view=rev Log: CodeGen: Fix invalid bitcast in partial initialization of automatic arrary variable Differential Revision: https://reviews.llvm.org/D39184 Modified: cfe/trunk

[PATCH] D39184: CodeGen: Fix invalid bitcast in partial initialization of automatic arrary variable

2017-10-23 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316353: CodeGen: Fix invalid bitcast in partial initialization of automatic arrary… (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D39184?vs=119861&id=119900#toc Repository:

[PATCH] D39179: [AArch64] Fix PR34625 -mtune without -mcpu should not set -target-cpu

2017-10-23 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. This should be fine for now. Thanks! -eric https://reviews.llvm.org/D39179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

Re: [PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread David Blaikie via cfe-commits
What John said, but also a narrower test would be good - checking that the appropriate call instruction gets a debug location, rather than checking that a bunch of inlining doesn't cause the assertion/verifier failure, would be good. (Clang tests should, as much as possible, not rely on or run the

RE: [PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread Liu, Yaxun (Sam) via cfe-commits
I will simplify the test. Thanks. Sam From: David Blaikie [mailto:dblai...@gmail.com] Sent: Monday, October 23, 2017 2:08 PM To: reviews+d39069+public+8da79e110d303...@reviews.llvm.org; Yaxun Liu via Phabricator ; Liu, Yaxun (Sam) ; rjmcc...@gmail.com Cc: cfe-commits@lists.llvm.org Subject: Re:

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D39069#903344, @rjmccall wrote: > If this is something we generally need to be doing in all the places we > temporarily save and restore the insertion point, we should fix the basic > behavior of saveIP instead of adding explicit code to a bun

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2017-10-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D27607#901882, @fjricci wrote: > On platforms where `BOOL` == `signed char`, is it actually undefined behavior > (or is it just bad programming practice) to store a value other than 0 or 1 > in your `BOOL`? I can't find any language specs suggest

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-23 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. Ping. https://reviews.llvm.org/D39079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r316362 - [OpenMP] Avoid VLAs for some reductions on array sections

2017-10-23 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Mon Oct 23 12:01:35 2017 New Revision: 316362 URL: http://llvm.org/viewvc/llvm-project?rev=316362&view=rev Log: [OpenMP] Avoid VLAs for some reductions on array sections In some cases the compiler can deduce the length of an array section as constants. With this information

[PATCH] D39136: [OpenMP] Avoid VLAs for some reductions on array sections

2017-10-23 Thread Jonas Hahnfeld via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316362: [OpenMP] Avoid VLAs for some reductions on array sections (authored by Hahnfeld). Changed prior to commit: https://reviews.llvm.org/D39136?vs=119689&id=119909#toc Repository: rL LLVM https:/

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. No tests? https://reviews.llvm.org/D39079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27607: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2017-10-23 Thread Francis Ricci via Phabricator via cfe-commits
fjricci added a comment. Awesome, good to know. Thanks! Repository: rL LLVM https://reviews.llvm.org/D27607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39201: [Analyzer] Handle implicit function reference in bodyfarming std::call_once

2017-10-23 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. Herald added subscribers: szepet, kristof.beyls, xazax.hun, javed.absar, aemerson. https://reviews.llvm.org/D39201 Files: lib/Analysis/BodyFarm.cpp test/Analysis/call_once.cpp Index: test/Analysis/call_once.cpp ===

[libunwind] r316364 - Abstract rwlocks into a class, provide a SRW lock implementation for windows

2017-10-23 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Mon Oct 23 12:29:36 2017 New Revision: 316364 URL: http://llvm.org/viewvc/llvm-project?rev=316364&view=rev Log: Abstract rwlocks into a class, provide a SRW lock implementation for windows This requires _WIN32_WINNT >= 0x0600. If someone wants to spend effort on supporting

[PATCH] D38704: [libunwind] Abstract rwlocks into a class, provide a SRW lock implementation for windows

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316364: Abstract rwlocks into a class, provide a SRW lock implementation for windows (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D38704?vs=119094&id=119914#toc Repository:

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 119918. yaxunl added a comment. Use InsertPointGuard and simplify test. https://reviews.llvm.org/D39069 Files: lib/CodeGen/CGExpr.cpp test/CodeGenOpenCL/func-call-dbg-loc.cl Index: test/CodeGenOpenCL/func-call-dbg-loc.cl ===

[PATCH] D39176: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 119923. Repository: rL LLVM https://reviews.llvm.org/D39176 Files: lib/Driver/ToolChains/Fuchsia.cpp lib/Driver/ToolChains/Fuchsia.h test/Driver/fuchsia.c test/Driver/fuchsia.cpp Index: test/Driver/fuchsia.cpp =

[PATCH] D39176: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. This seems like how it always should have been, since -fuse-ld=lld sets it to ld.lld, not lld. Looks to me like the existing MipsLinux and WebAssembly implementations are wrong too and onl

[PATCH] D39160: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-23 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D39160#902918, @spatel wrote: > Oops - I wrongly made llvm-commits a subscriber rather than cfe-commits. Let > me know if I should reopen under a new thread to get the patch to hit the > right mailing list. Yes, please reopen. https://rev

[PATCH] D39204: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-23 Thread Sanjay Patel via Phabricator via cfe-commits
spatel created this revision. Herald added a subscriber: mcrosier. This patch is intended to answer a question raised in PR27435: https://bugs.llvm.org/show_bug.cgi?id=27435 Is a programmer using __builtin_sqrt() invoking the compiler's intrinsic definition of sqrt or the mathlib definition of s

[PATCH] D39160: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-23 Thread Sanjay Patel via Phabricator via cfe-commits
spatel abandoned this revision. spatel added a comment. Reincarnated as https://reviews.llvm.org/D39204. https://reviews.llvm.org/D39160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D39079#904050, @lebedev.ri wrote: > No tests? +1, there should be an -emit-llvm test in clang/test/CodeGen/. Comment at: lib/CodeGen/CGCall.cpp:1859 +if (auto *Fn = dyn_cast(TargetDecl)) { + if (!Fn->isDefined() && !A

[PATCH] D38618: Do not add a colon chunk to the code completion of class inheritance access modifiers

2017-10-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Overall LGTM, just a couple of comments: Comment at: include/clang/Sema/Scope.h:131 + +/// We are between inheritance colon and the real class/struct definition scop

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: src/UnwindRegistersRestore.S:98 + # skip fs + # skip gs + movq 56(%rcx), %rsp # cut back rsp to new location mstorsjo wrote: > mstorsjo wrote: > > compnerd wrote: > > > Doesn't Win64 ABI require some of the MMX register

[PATCH] D39176: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316379: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D39176?vs=119923&id=119938#toc Repository: rL LLVM

r316379 - [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Oct 23 14:31:05 2017 New Revision: 316379 URL: http://llvm.org/viewvc/llvm-project?rev=316379&view=rev Log: [Driver] Use ld.lld directly for Fuchsia rather than passing flavor Passing a flavor to LLD requires command line argument, but if these are being passed through a

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/UnwindRegistersRestore.S:98 + # skip fs + # skip gs + movq 56(%rcx), %rsp # cut back rsp to new location rnk wrote: > mstorsjo wrote: > > mstorsjo wrote: > > > compnerd wrote: > > > > Doesn't Win64 ABI require

Re: r316379 - [Driver] Use ld.lld directly for Fuchsia rather than passing flavor

2017-10-23 Thread Rui Ueyama via cfe-commits
Nice. Dispatching based on argv[0] is more common and probably a recommended way now, so this patch aligned with that. On Mon, Oct 23, 2017 at 2:31 PM, Petr Hosek via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: phosek > Date: Mon Oct 23 14:31:05 2017 > New Revision: 316379 > > URL:

[PATCH] D39206: [libunwind] Add missing checks for register number

2017-10-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added a subscriber: JDevlieghere. Most other cases that touch `savedRegisters[reg]` have got this check, but these three seemed to lack it. https://reviews.llvm.org/D39206 Files: src/DwarfParser.hpp Index: src/DwarfParser.hpp =

[PATCH] D38939: [clangd] Handle exit notification (proper shutdown)

2017-10-23 Thread Raoul Wols via Phabricator via cfe-commits
rwols updated this revision to Diff 119941. rwols added a comment. - Clarify why we invert the tests in protocol.test, - Use a variable name to clarify why we exit with status code 1 (when run() returns true), - Reword misleading comment in onShutdown method. https://reviews.llvm.org/D38939 Fi

[PATCH] D39204: [CodeGen] __builtin_sqrt should map to the compiler's intrinsic sqrt function

2017-10-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The gcc documentation says "GCC includes built-in versions of many of the functions in the standard C library. These functions come in two forms: one whose names start with the `__builtin_` prefix, and the other without. Both forms have the same type (including prototy

[PATCH] D38939: [clangd] Handle exit notification (proper shutdown)

2017-10-23 Thread Raoul Wols via Phabricator via cfe-commits
rwols marked 3 inline comments as done. rwols added a comment. > you have commit access now, right? I'll have to think about if I want that responsibility! https://reviews.llvm.org/D38939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

r316381 - [Sema] Add support for flexible array members in Obj-C.

2017-10-23 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Mon Oct 23 15:01:41 2017 New Revision: 316381 URL: http://llvm.org/viewvc/llvm-project?rev=316381&view=rev Log: [Sema] Add support for flexible array members in Obj-C. Allow Obj-C ivars with incomplete array type but only as the last ivar. Also add a requirement for ivars th

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316381: [Sema] Add support for flexible array members in Obj-C. (authored by vsapsai). Changed prior to commit: https://reviews.llvm.org/D38773?vs=118990&id=119943#toc Repository: rL LLVM https://re

[PATCH] D39201: [Analyzer] Handle implicit function reference in bodyfarming std::call_once

2017-10-23 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D39201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D39069: CodeGen: Fix missing debug loc due to alloca

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The code looks fine to me. The test seems very vague to me, but I'd like Dave to weigh in on that, because I'm not sure it's reasonable to test the exact pattern here. Also, Dave, I don't know what the IR invariants around debug info are. Is this something we should

[PATCH] D38774: [CodeGen] Add support for IncompleteArrayType in Obj-C ivars.

2017-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/CodeGen/CGObjCMac.cpp:5095 +fieldType = fieldType->getAsArrayTypeUnsafe()->getElementType(); + } + rjmccall wrote: > You can't just use isa<> here; there can be typedefs of incomplete array type. Thanks fo

[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

2017-10-23 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram updated this revision to Diff 119950. tmsriram added a comment. Added test test/CodeGen/noplt.c https://reviews.llvm.org/D39079 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/CodeGen/CGCall.cpp lib/Driver/ToolChains/Clang.cpp lib/Frontend

  1   2   >