[PATCH] D34494: fix determination of whether declarations are visible during ObjC lookups

2017-06-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. Herald added subscribers: javed.absar, sanjoy. Determining whether a declaration is visible or not requires knowledge of the context in which the question is asked: for instance, during template instantiation, additional modules might be visible, and with local

[PATCH] D29651: [OpenMP] Consider LIBRARY_PATH when selecting library paths for NVPTX targets in OpenMP mode.

2017-06-21 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D29651#720179, @tstellar wrote: > Why is this necessary? To put it another way, what is special about LIBRARY_PATH in this regard? Do we already pass paths specified with `-L`? I'm also slightly concerned here with the custom parsing code.

Re: r303322 - [modules] Switch from inferring owning modules based on source location to

2017-06-21 Thread Bruno Cardoso Lopes via cfe-commits
On Wed, Jun 21, 2017 at 4:56 PM, Richard Smith wrote: > On 21 June 2017 at 16:55, Bruno Cardoso Lopes > wrote: >> >> On Wed, Jun 21, 2017 at 4:44 PM, Richard Smith >> wrote: >> > On 21 June 2017 at 14:51, Bruno Cardoso Lopes

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-06-21 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In general, this patch seems to be missing tests (unless it is actually NFC, or you can't write tests yet, which, in either case, need to be explained). Comment at: lib/Driver/ToolChains/Cuda.cpp:217 + std::vector GPUArchNames; + // If this is an

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-06-21 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel accepted this revision. hfinkel added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D29654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[libcxxabi] r305977 - Add some catch(...) blocks to the tests so that if they fail, we get a good error message. No functional change.

2017-06-21 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jun 21 19:49:03 2017 New Revision: 305977 URL: http://llvm.org/viewvc/llvm-project?rev=305977=rev Log: Add some catch(...) blocks to the tests so that if they fail, we get a good error message. No functional change. Modified:

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:7031 +Introduced) && +!S.Diags.isIgnored(diag::warn_unguarded_availability_new, Loc); +diag = NewWarning ? diag::warn_partial_availability_new arphaman wrote: >

[PATCH] D34489: [scan-build-py] Patch to fix "-analyzer-config" option

2017-06-21 Thread Haowei Wu via Phabricator via cfe-commits
haowei created this revision. Herald added a subscriber: whisperity. I noticed that when I use "-analyze-config" option in scan-build-py, it behaves differently from original perl based scan-build. For example, command: $ scan-build -analyzer-config ipa=basic-inlining make Will work without

Re: r303322 - [modules] Switch from inferring owning modules based on source location to

2017-06-21 Thread Richard Smith via cfe-commits
On 21 June 2017 at 16:55, Bruno Cardoso Lopes wrote: > On Wed, Jun 21, 2017 at 4:44 PM, Richard Smith > wrote: > > On 21 June 2017 at 14:51, Bruno Cardoso Lopes > > wrote: > >> > >> Hi Richard, > >> > >> Somehow this

Re: r303322 - [modules] Switch from inferring owning modules based on source location to

2017-06-21 Thread Bruno Cardoso Lopes via cfe-commits
On Wed, Jun 21, 2017 at 4:44 PM, Richard Smith wrote: > On 21 June 2017 at 14:51, Bruno Cardoso Lopes > wrote: >> >> Hi Richard, >> >> Somehow this commit caused some methods in ObjC to do not become >> visible in an interface when compiling with

Re: r303322 - [modules] Switch from inferring owning modules based on source location to

2017-06-21 Thread Richard Smith via cfe-commits
On 21 June 2017 at 14:51, Bruno Cardoso Lopes wrote: > Hi Richard, > > Somehow this commit caused some methods in ObjC to do not become > visible in an interface when compiling with modules on. I filed > https://bugs.llvm.org/show_bug.cgi?id=33552, any idea what could

Re: r303322 - [modules] Switch from inferring owning modules based on source location to

2017-06-21 Thread Bruno Cardoso Lopes via cfe-commits
Hi Richard, Somehow this commit caused some methods in ObjC to do not become visible in an interface when compiling with modules on. I filed https://bugs.llvm.org/show_bug.cgi?id=33552, any idea what could have gone wrong here? `hasVisibleDeclarationImpl` doesn't seem to have changed the logic.

r305956 - SwiftCC: Perform physical layout when computing coercion types

2017-06-21 Thread Arnold Schwaighofer via cfe-commits
Author: arnolds Date: Wed Jun 21 16:43:40 2017 New Revision: 305956 URL: http://llvm.org/viewvc/llvm-project?rev=305956=rev Log: SwiftCC: Perform physical layout when computing coercion types We need to take type alignment padding into account whe computing physical layouts. The layout must be

[libcxx] r305955 - Attempt to avoid static init ordering issues with globalMemCounter

2017-06-21 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Jun 21 16:42:50 2017 New Revision: 305955 URL: http://llvm.org/viewvc/llvm-project?rev=305955=rev Log: Attempt to avoid static init ordering issues with globalMemCounter Modified: libcxx/trunk/test/support/count_new.hpp Modified:

[PATCH] D34425: Unified ARM logic for computing target ABI.

2017-06-21 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 is OK once the dependent revision is approved. https://reviews.llvm.org/D34425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34454: SwiftCC: Perform physical layout when computing coercion types

2017-06-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Looks great, thanks! https://reviews.llvm.org/D34454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-06-21 Thread Richard Smith via cfe-commits
There's plenty of precedent for supporting a name we like for a flag, and also supporting an alias for GCC compatibility (especially for warning flags). On 21 June 2017 at 10:56, Raphael Isemann via Phabricator < revi...@reviews.llvm.org> wrote: > teemperor added a comment. > > @ahatanak I think

[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

2017-06-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. It'd be good to also add tests for the other traits you're changing. https://reviews.llvm.org/D34198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

2017-06-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4128 +return true; +} + rjmccall wrote: > puneetha wrote: > > rjmccall wrote: > > > I don't understand the difference you're creating between traits

[PATCH] D34454: SwiftCC: Perform physical layout when computing coercion types

2017-06-21 Thread Arnold Schwaighofer via Phabricator via cfe-commits
aschwaighofer updated this revision to Diff 103459. aschwaighofer added a comment. Same patch bug with added diff context. https://reviews.llvm.org/D34454 Files: lib/CodeGen/SwiftCallingConv.cpp test/CodeGen/64bit-swiftcall.c Index: test/CodeGen/64bit-swiftcall.c

[PATCH] D34454: SwiftCC: Perform physical layout when computing coercion types

2017-06-21 Thread Arnold Schwaighofer via Phabricator via cfe-commits
aschwaighofer updated this revision to Diff 103458. aschwaighofer retitled this revision from "SwiftAggregateLowering: Use type alloc size to determine the size of types" to "SwiftCC: Perform physical layout when computing coercion types". aschwaighofer edited the summary of this revision.

[PATCH] D34304: Allow CompilerInvocations to generate .d files.

2017-06-21 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a comment. > Actually, now that I figured out you mean ArgumentAdjusters, I am making > progress. Unfortunately, ArgumentAdjusters only work on vector, and while ToolInvocation::Invocation takes its arguments in that form, tooling::newInvocation (which returns a

[PATCH] D34475: [RFC] [AArch64] Add support for __builtin_ms_va_list on aarch64

2017-06-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added subscribers: kristof.beyls, javed.absar, rengolin, aemerson. This behaves mostly the same as __builtin_ms_va_list on x86_64; a va_list on windows on aarch64 is a single pointer. In order to signal the kind of va_list to llvm for handling of va_start,

[PATCH] D22128: Make CastExpr::getSubExprAsWritten look through implicit temporary under CK_ConstructorConversion

2017-06-21 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg updated this revision to Diff 103449. sberg added a comment. Herald added subscribers: kristof.beyls, mgorny, klimek. added test https://reviews.llvm.org/D22128 Files: lib/AST/Expr.cpp unittests/Tooling/CMakeLists.txt unittests/Tooling/CastExprTest.cpp Index:

[PATCH] D32332: Add support for transparent overloadable functions in clang

2017-06-21 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Thank you both for the comments! Comment at: include/clang/Basic/DiagnosticSemaKinds.td:3294-3295 +def err_attribute_overloadable_multiple_unmarked_overloads : Error< + "at most one 'overloadable' function for a given name may lack the " +

[PATCH] D32332: Add support for transparent overloadable functions in clang

2017-06-21 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 103448. george.burgess.iv marked 6 inline comments as done. george.burgess.iv added a comment. Addressed all feedback https://reviews.llvm.org/D32332 Files: include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D30863: [clang-format] make docs/tools/{dump_format_style.py, dump_ast_matchers.py} flake8 compliant

2017-06-21 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. @klimek ping? https://reviews.llvm.org/D30863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r305947 - [test] Make absolute line numbers relative; NFC

2017-06-21 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Jun 21 14:59:05 2017 New Revision: 305947 URL: http://llvm.org/viewvc/llvm-project?rev=305947=rev Log: [test] Make absolute line numbers relative; NFC Done to remove noise from https://reviews.llvm.org/D32332 (and to make this test more resilient to changes in general).

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added inline comments. Comment at: clangd/ClangdUnit.cpp:276 +class DeclarationLocationsFinder : public index::IndexDataConsumer { + std::unique_ptr DeclarationLocations; + const SourceLocation malaperle-ericsson wrote: >

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added inline comments. Comment at: clangd/ClangdUnit.cpp:276 +class DeclarationLocationsFinder : public index::IndexDataConsumer { + std::unique_ptr DeclarationLocations; + const SourceLocation ilya-biryukov wrote: > Why do we

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Looks good now, but I think we definitely need to change `unique_ptr` to `vector` before submitting it. I won't be available until next Wednesday, so feel free to submit without my final approval. Comment at: clangd/ClangdUnit.cpp:276

[PATCH] D34470: [clangd] Allow to override resource dir in ClangdServer.

2017-06-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. https://reviews.llvm.org/D34470 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/ClangdUnitStore.h Index: clangd/ClangdUnitStore.h

[PATCH] D34469: Use vfs::FileSystem in ASTUnit when creating CompilerInvocation.

2017-06-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. It used to always call into the RealFileSystem before. https://reviews.llvm.org/D34469 Files: include/clang/Frontend/Utils.h lib/Frontend/ASTUnit.cpp lib/Frontend/CreateInvocationFromCommandLine.cpp Index:

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-21 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added inline comments. Comment at: include/clang/Tooling/ASTDiff/ASTDiff.h:57 +/// Within a tree, this identifies a node by its preorder offset. +using NodeId = int; + arphaman wrote: > I think that it's better to make make `NodeId` a structure as well

r305940 - [preprocessor] Fix assertion hit when 'SingleFileParseMode' option is enabled and #if with an undefined identifier and without #else

2017-06-21 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Wed Jun 21 13:52:44 2017 New Revision: 305940 URL: http://llvm.org/viewvc/llvm-project?rev=305940=rev Log: [preprocessor] Fix assertion hit when 'SingleFileParseMode' option is enabled and #if with an undefined identifier and without #else 'HandleEndifDirective' asserts

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-21 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 103432. https://reviews.llvm.org/D34329 Files: include/clang/Tooling/ASTDiff/ASTDiff.h lib/Tooling/ASTDiff/ASTDiff.cpp lib/Tooling/ASTDiff/CMakeLists.txt lib/Tooling/CMakeLists.txt test/Tooling/clang-diff-basic.cpp tools/CMakeLists.txt

[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

2017-06-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4128 +return true; +} + puneetha wrote: > rjmccall wrote: > > I don't understand the difference you're creating between traits here. > > Three specific traits about

[PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-06-21 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. @ahatanak I think we can leave the more expressive clang name for this warning and just add the bit cryptic GCC name for compability. But I don't have a strong opinion on this. https://reviews.llvm.org/D34439 ___

Re: [PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-06-21 Thread Raphael Isemann via cfe-commits
I couldn't find a case where both gcc and clang agreed at the same time that they should emit this warning, but I think that's just bugs in the way we detect these cases. From the near-identical warning message I would say they both should emit warnings for the same cases (and probably will in the

Re: [PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-06-21 Thread Richard Smith via cfe-commits
Does the GCC warning warn on the same cases? On 21 Jun 2017 10:24 am, "Akira Hatanaka via Phabricator" < revi...@reviews.llvm.org> wrote: > ahatanak added a comment. > > I didn't know gcc had its own option. This change seems reasonable to me. > > Since c++1z-compat-mangling was added just a few

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 103421. bader added a comment. This revision is now accepted and ready to land. Added test case reproducing the issue described in the description. Removed test cases from test/SemaOpenCL/sampler_t.cl covered by test/CodeGenOpenCL/sampler.cl. While I was

[PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-06-21 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I didn't know gcc had its own option. This change seems reasonable to me. Since c++1z-compat-mangling was added just a few days ago, should we just rename it instead of adding an alias? https://reviews.llvm.org/D34439

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. The API looks better IMHO. Some more comments: Comment at: include/clang/Tooling/ASTDiff/ASTDiff.h:57 +/// Within a tree, this identifies a node by its preorder offset. +using NodeId = int; + I think that it's better to make make

r305930 - Use -NOT prefix instead of adding `not` to FileCheck.

2017-06-21 Thread Rui Ueyama via cfe-commits
Author: ruiu Date: Wed Jun 21 11:50:38 2017 New Revision: 305930 URL: http://llvm.org/viewvc/llvm-project?rev=305930=rev Log: Use -NOT prefix instead of adding `not` to FileCheck. If we want to make sure that a particular string is not in an output, the regular way of doing it is to add `-NOT`

[PATCH] D34455: Correct VectorCall x86 (32 bit) behavior for SSE Register Assignment

2017-06-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Thanks Reid! Repository: rL LLVM https://reviews.llvm.org/D34455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34462: [index] "SpecializationOf" relation should be added even to forward declarations of class template specializations

2017-06-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch fixes an issue where a forward declaration of a class template specialization was not related to the base template. We need to relate even forward declarations because specializations don't have to be defined. Repository: rL LLVM

r305928 - Correct VectorCall x86 (32 bit) behavior for SSE Register Assignment

2017-06-21 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Jun 21 11:37:22 2017 New Revision: 305928 URL: http://llvm.org/viewvc/llvm-project?rev=305928=rev Log: Correct VectorCall x86 (32 bit) behavior for SSE Register Assignment In running some internal vectorcall tests in 32 bit mode, we discovered that the behavior I'd

[PATCH] D34455: Correct VectorCall x86 (32 bit) behavior for SSE Register Assignment

2017-06-21 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305928: Correct VectorCall x86 (32 bit) behavior for SSE Register Assignment (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D34455?vs=103391=103412#toc Repository: rL

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-21 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:157 + int Leaves = 0; + std::function Traverse = [&](NodeId Id) { +const Node = getNode(Id); arphaman wrote: > you should be able to use `auto` instead of

[PATCH] D34329: [GSoC] Clang AST diffing

2017-06-21 Thread Johannes Altmanninger via Phabricator via cfe-commits
johannes updated this revision to Diff 103409. johannes marked 4 inline comments as done. johannes added a comment. - move some unnecessary things out of the public header Is this a proper way to declutter the header file? Using inheritance would also be possible. I have to define a destructor

[PATCH] D34455: Correct VectorCall x86 (32 bit) behavior for SSE Register Assignment

2017-06-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Oh joy. :) lgtm, thanks for debugging this. The difference makes sense after the fact when you think about Win x64's approach to va_arg and /homeparams, and how that isn't relevant for x86.

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added inline comments. Comment at: clangd/ClangdUnit.cpp:303 + // fo|o -> foo| good! + if (InputLocation == SourceLocationBeg && Pos.character > 0) { +SourceLocation PeekBeforeLocation = Unit->getLocation(FE, Pos.line + 1, ilya-biryukov

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson updated this revision to Diff 103405. malaperle-ericsson marked 12 inline comments as done. malaperle-ericsson added a comment. Address comments https://reviews.llvm.org/D34269 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp

[libunwind] r305924 - Change -1LL to -1ULL to silence a gcc warning about left shifting a negative value. Fixes https://bugs.llvm.org/show_bug.cgi?id=33358

2017-06-21 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jun 21 11:02:53 2017 New Revision: 305924 URL: http://llvm.org/viewvc/llvm-project?rev=305924=rev Log: Change -1LL to -1ULL to silence a gcc warning about left shifting a negative value. Fixes https://bugs.llvm.org/show_bug.cgi?id=33358 Modified:

[PATCH] D33719: Add _Float16 as a C/C++ source language type

2017-06-21 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer updated this revision to Diff 103397. SjoerdMeijer added a comment. This fixes the “DefaultVariadicArgumentPromotion” for Float16: they should be promoted to double, which makes now e.g. printf work. I have added printf tests to both the AST and codegen test to check variadic

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-21 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. I think I found the way to reproduce the issue. There are two pre-requisites: sampler must be declared in the constant address space and clang must be build in Debug mode. I'll fix the test and add the test cases from test/SemaOpenCL/sampler_t.cl as mentioned earlier.

[PATCH] D34455: Correct VectorCall x86 (32 bit) behavior for SSE Register Assignment

2017-06-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. In running some internal vectorcall tests in 32 bit mode, we discovered that the behavior I'd previously implemented for x64 (and applied to x32) regarding the assignment of SSE registers was incorrect. See spec here:

[PATCH] D34449: [clang-tidy] Enable constexpr definitions in headers.

2017-06-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/misc-definitions-in-headers.hpp:1 -// RUN: %check_clang_tidy %s misc-definitions-in-headers %t +// RUN: %check_clang_tidy %s misc-definitions-in-headers %t -- -- -std=c++1z The original code should work

[PATCH] D34454: SwiftAggregateLowering: Use type alloc size to determine the size of types

2017-06-21 Thread Arnold Schwaighofer via Phabricator via cfe-commits
aschwaighofer created this revision. The layout must be compatible with the input layout, offsets are defined in terms of offsets within a packed struct which are computed in terms of the alloc size of a type. Using the store size we would insert padding for the following type for example:

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-06-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for the fix! The implementation looks correct. A couple of misc comments: - Please move the test to `test/Index` (Since it uses `c-index-test`). - In the future please upload patches with full context (`git diff -U`). Comment at:

[PATCH] D33722: [clang-tidy] Add checker for undelegated copy of base classes

2017-06-21 Thread Dominik Szabó via Phabricator via cfe-commits
szdominik updated this revision to Diff 103385. szdominik marked 4 inline comments as done. szdominik added a comment. Updated loop for searching the beginning of the initlist. https://reviews.llvm.org/D33722 Files: clang-tidy/misc/CMakeLists.txt

[PATCH] D34342: [OpenCL] Fix code generation of function-scope constant samplers.

2017-06-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D34342#785454, @bader wrote: > Wow... > Nice catch. > For some reason I can't reproduce the problem neither. > I will drop source code change, but I'd like to modify the test anyway. I think we probably had this issue at some point...

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-06-21 Thread Dominik Szabó via Phabricator via cfe-commits
szdominik updated this revision to Diff 103378. szdominik marked 3 inline comments as done. szdominik added a comment. Fixed alpha.core.CallAndMessageUnInitRefArg. https://reviews.llvm.org/D33645 Files: www/analyzer/alpha_checks.html www/analyzer/available_checks.html

[PATCH] D34449: [clang-tidy] Enable constexpr definitions in headers.

2017-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/misc-definitions-in-headers.hpp:180 +class CE { + constexpr static int i = 5; // OK: constexpr definition. +}; This is not as safe as you might think. As-is, this is fine, however, if the class

[PATCH] D34430: [Clang][TypoCorrection] Clang hangs in typo correction

2017-06-21 Thread Oleg Ranevskyy via Phabricator via cfe-commits
iid_iunknown added a comment. No hang with this patch on the test case from PR33484. Clang reports a number of expected compilation errors instead. Repository: rL LLVM https://reviews.llvm.org/D34430 ___ cfe-commits mailing list

[PATCH] D34449: [Clang-tidy] Enable constexpr definitions in headers.

2017-06-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. xazax.hun added a project: clang-tools-extra. Herald added a subscriber: whisperity. Constexpr variable definitions should be ok in headers. https://stackoverflow.com/questions/34445336/constexpr-global-constants-in-a-header-file-and-odr Repository: rL LLVM

[PATCH] D34399: clang-format: introduce InlineOnly short function style

2017-06-21 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305912: clang-format: introduce InlineOnly short function style (authored by Typz). Changed prior to commit: https://reviews.llvm.org/D34399?vs=103357=103370#toc Repository: rL LLVM

r305912 - clang-format: introduce InlineOnly short function style

2017-06-21 Thread Francois Ferrand via cfe-commits
Author: typz Date: Wed Jun 21 08:56:02 2017 New Revision: 305912 URL: http://llvm.org/viewvc/llvm-project?rev=305912=rev Log: clang-format: introduce InlineOnly short function style Summary: This is the same as Inline, except it does not imply all empty functions are merged: with this style,

[PATCH] D34392: [index] Nested class declarations should be annotated with the "specializationOf" relation if they pseudo-override a type in the base template

2017-06-21 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305911: [index] Nested class declarations should be annotated with the (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D34392?vs=103179=103369#toc Repository: rL LLVM

r305911 - [index] Nested class declarations should be annotated with the

2017-06-21 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jun 21 08:51:04 2017 New Revision: 305911 URL: http://llvm.org/viewvc/llvm-project?rev=305911=rev Log: [index] Nested class declarations should be annotated with the "specializationOf" relation if they pseudo-override a type in the base template This commit fixes an

[PATCH] D30375: Function with unparsed body is a definition

2017-06-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Initial commit (r305379) was reverted (r305381) because it broke self builds. The reason was not related to the WillHaveBody flag but was due to the change: if (isFriend) { Function->setObjectOfFriendDecl(); if (FunctionTemplate)

r305903 - Function with unparsed body is a definition

2017-06-21 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Wed Jun 21 07:46:57 2017 New Revision: 305903 URL: http://llvm.org/viewvc/llvm-project?rev=305903=rev Log: Function with unparsed body is a definition While a function body is being parsed, the function declaration is not considered as a definition because it does not

r305902 - Fixed compiler warnings after r305890.

2017-06-21 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jun 21 07:34:27 2017 New Revision: 305902 URL: http://llvm.org/viewvc/llvm-project?rev=305902=rev Log: Fixed compiler warnings after r305890. Should fix buildbots that pass -Werror. Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp Modified:

[PATCH] D34444: Teach codegen to work in incremental processing mode.

2017-06-21 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 103360. v.g.vassilev added a comment. Fix compilation issue. https://reviews.llvm.org/D3 Files: include/clang/CodeGen/ModuleBuilder.h lib/CodeGen/ModuleBuilder.cpp Index: lib/CodeGen/ModuleBuilder.cpp

[PATCH] D34444: Teach codegen to work in incremental processing mode.

2017-06-21 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. When `isIncrementalProcessingEnabled` is on we might call multiple times `HandleEndOfTranslationUnit`. This would complete the `llvm::Module` CodeGen is writing to. This patch allows the clients to start a new `llvm::Module`, allowing CodeGen to continue

[PATCH] D34399: clang-format: introduce InlineOnly short function style

2017-06-21 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. https://reviews.llvm.org/D34399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33823: [clang-format] Support sorting using declarations

2017-06-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305901: [clang-format] Support sorting using declarations (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33823?vs=103032=103359#toc Repository: rL LLVM

r305901 - [clang-format] Support sorting using declarations

2017-06-21 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed Jun 21 07:03:12 2017 New Revision: 305901 URL: http://llvm.org/viewvc/llvm-project?rev=305901=rev Log: [clang-format] Support sorting using declarations Summary: This patch adds UsingDeclarationsSorter, a TokenAnalyzer that sorts consecutive using declarations.

[PATCH] D34399: clang-format: introduce InlineOnly short function style

2017-06-21 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 103357. Typz marked an inline comment as done. Typz added a comment. Fix according to review comments https://reviews.llvm.org/D34399 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/TokenAnnotator.cpp

[PATCH] D34399: clang-format: introduce InlineOnly short function style

2017-06-21 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked 3 inline comments as done. Typz added inline comments. Comment at: include/clang/Format/Format.h:234 + bool allowEmptyFunctionsOnASingleLine() const { + return AllowShortFunctionsOnASingleLine >= ShortFunctionStyle::SFS_Empty; djasper wrote:

[PATCH] D34404: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output

2017-06-21 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun updated this revision to Diff 103353. vladimir.plyashkun added a comment. correct revision with all changes Repository: rL LLVM https://reviews.llvm.org/D34404 Files: include/clang/Tooling/DiagnosticsYaml.h unittests/Tooling/CMakeLists.txt

[PATCH] D34441: [clang-format] Support text proto messages

2017-06-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Tests for `<>`-style message fields are missing because I discovered that they don't really work in a multiline setting in proto options anyways. I'll address this problem separately. https://reviews.llvm.org/D34441 ___

[PATCH] D34441: [clang-format] Support text proto messages

2017-06-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 103352. krasimir added a comment. - Remove newline https://reviews.llvm.org/D34441 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineParser.cpp

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-06-21 Thread wangxin via Phabricator via cfe-commits
wangxindsb added a comment. > Oh, I think I see how it works now. How about: > > > struct A; > struct X { > void callFooOfA(A*); > }; > struct A { > A() { > X x; > x.virtualMethod(); // this virtual call is ok > x.callFooOfA(this) > } > virtual foo();

[PATCH] D34277: [analyzer] Bump default performance thresholds?

2017-06-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305900: [analyzer] Bump a few default performance thresholds. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D34277?vs=102816=103349#toc Repository: rL LLVM

r305900 - [analyzer] Bump a few default performance thresholds.

2017-06-21 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 21 06:29:35 2017 New Revision: 305900 URL: http://llvm.org/viewvc/llvm-project?rev=305900=rev Log: [analyzer] Bump a few default performance thresholds. This makes the analyzer around 10% slower by default, allowing it to find deeper bugs. Default values for the

r305898 - Fix unused-variable compilation error.

2017-06-21 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jun 21 06:26:58 2017 New Revision: 305898 URL: http://llvm.org/viewvc/llvm-project?rev=305898=rev Log: Fix unused-variable compilation error. Modified: cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp Modified: cfe/trunk/lib/Frontend/PrecompiledPreamble.cpp URL:

[PATCH] D34404: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output

2017-06-21 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun updated this revision to Diff 103341. vladimir.plyashkun added a comment. Herald added subscribers: xazax.hun, mgorny. updated CMakeLists.txt Repository: rL LLVM https://reviews.llvm.org/D34404 Files: unittests/Tooling/CMakeLists.txt Index:

[PATCH] D34102: [analyzer] Add portability package for the checkers.

2017-06-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D34102#783161, @zaks.anna wrote: > > eg. checkers for portability across linux/bsd should be off on windows by > > default, checkers for non-portable C++ APIs should be off in plain C code, > > etc > > Is the checker you are moving to

[PATCH] D34266: Static Analyzer - Localizability Checker: New Localizable APIs for macOS High Sierra & iOS 11

2017-06-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305896: [analyzer] LocalizationChecker: Support new localizable APIs. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D34266?vs=102771=103347#toc Repository: rL LLVM

r305896 - [analyzer] LocalizationChecker: Support new localizable APIs.

2017-06-21 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 21 06:12:07 2017 New Revision: 305896 URL: http://llvm.org/viewvc/llvm-project?rev=305896=rev Log: [analyzer] LocalizationChecker: Support new localizable APIs. Add support for new methods that were added in macOS High Sierra & iOS 11 and require a localized

[PATCH] D34440: [Clang] Expand response files before loading compilation database

2017-06-21 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun created this revision. vladimir.plyashkun added a project: clang. Herald added a subscriber: mgorny. Due to command line length restrictions, arguments can be passed through response files. Before trying to load compilation database from command line, response files should

[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

2017-06-21 Thread Puneetha K via Phabricator via cfe-commits
puneetha marked 2 inline comments as done. puneetha added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4128 +return true; +} + rjmccall wrote: > I don't understand the difference you're creating between traits here. Three > specific traits

[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.

2017-06-21 Thread Puneetha K via Phabricator via cfe-commits
puneetha updated this revision to Diff 103337. puneetha added a comment. Updated files to address the review comments. https://reviews.llvm.org/D34198 Files: lib/Sema/SemaExprCXX.cpp test/SemaCXX/type-traits.cpp Index: test/SemaCXX/type-traits.cpp

[PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-06-21 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. GCC has named this `-Wnoexcept-type`, so let's add an alias to stay compatible with the GCC flags. https://reviews.llvm.org/D34439 Files: include/clang/Basic/DiagnosticGroups.td test/SemaCXX/cxx1z-noexcept-function-type.cpp Index:

r305891 - Revert r305678: [driver][macOS] Pick the system version for the

2017-06-21 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jun 21 05:27:24 2017 New Revision: 305891 URL: http://llvm.org/viewvc/llvm-project?rev=305891=rev Log: Revert r305678: [driver][macOS] Pick the system version for the deployment target if the SDK is newer than the system This commit also reverts follow-up commits

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305890: Moved code hanlding precompiled preamble out of the ASTUnit. (authored by ibiryukov). Changed prior to commit: https://reviews.llvm.org/D34287?vs=103216=103338#toc Repository: rL LLVM

r305890 - Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-21 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jun 21 05:24:58 2017 New Revision: 305890 URL: http://llvm.org/viewvc/llvm-project?rev=305890=rev Log: Moved code hanlding precompiled preamble out of the ASTUnit. Reviewers: bkramer, krasimir, arphaman, akyrtzi, klimek Reviewed By: klimek Subscribers: mgorny,

[PATCH] D33823: [clang-format] Support sorting using declarations

2017-06-21 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D33823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34287: Moved code hanlding precompiled preamble out of the ASTUnit.

2017-06-21 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D34287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

  1   2   >