[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clangd/ASTManager.cpp:69 + // our one-element queue is empty. + if (!RequestIsPending && !Done) +ClangRequestCV.wait(Lock); arphaman wrote: > This is just a suggestion based on personal opinion:

[PATCH] D29908: Disallow returning a __block variable via a move

2017-02-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Posting John's review comment, which was sent to the review I abandoned: "Hmm. The behavior I think we actually want here is that we should move out of the __block variable but not perform NRVO, essentially like we would if the variable were a parameter. The block

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-14 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere updated this revision to Diff 88409. JDevlieghere marked 4 inline comments as done. JDevlieghere added a comment. - Updated the diff with comments from @alexfh Thanks for mentioning the check fixes pattern, it's quite crucial but I never really thought about that! Repository:

r295094 - Finish a comment + remove trailing whitespace. NFC

2017-02-14 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Feb 14 13:34:33 2017 New Revision: 295094 URL: http://llvm.org/viewvc/llvm-project?rev=295094=rev Log: Finish a comment + remove trailing whitespace. NFC Modified: cfe/trunk/include/clang/AST/DeclBase.h Modified: cfe/trunk/include/clang/AST/DeclBase.h URL:

r295085 - [profiling] Update test case to deal with name variable change (NFC)

2017-02-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Feb 14 12:49:03 2017 New Revision: 295085 URL: http://llvm.org/viewvc/llvm-project?rev=295085=rev Log: [profiling] Update test case to deal with name variable change (NFC) The 'profn' name variables shouldn't show up after we run the instrprof pass, see

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-14 Thread Yaron Keren via Phabricator via cfe-commits
yaron.keren added a comment. OK. https://reviews.llvm.org/D29464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29908: Disallow returning a __block variable via a move

2017-02-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D29908#676589, @ahatanak wrote: > Posting John's review comment, which was sent to the review I abandoned: > > "Hmm. The behavior I think we actually want here is that we should move out > of the __block variable but not perform NRVO,

Re: r294855 - docs: update docs for objc_storeStrong behaviour

2017-02-14 Thread Hans Wennborg via cfe-commits
Sure, r295076. Thanks, Hans On Sat, Feb 11, 2017 at 12:29 PM, Saleem Abdulrasool wrote: > Hi Hans, > > Would you mind grabbing this for the 4.0 release as well? It's merely > correcting the documentation, so should have no impact on the toolchain > itself. > > On Sat,

[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-14 Thread Will Dietz via Phabricator via cfe-commits
dtzWill added a comment. In https://reviews.llvm.org/D29369#673064, @vsk wrote: > In https://reviews.llvm.org/D29369#672166, @dtzWill wrote: > > > After some thought, can we discuss why this is a good idea? > > > The goal is to lower ubsan's compile-time + instrumentation overhead at -O0, >

[PATCH] D29830: [OpenCL][Doc] Relase 4.0 notes for OpenCL

2017-02-14 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. Thanks for writing these! Go ahead and commit to the branch, or let me know if you'd like me to do it. https://reviews.llvm.org/D29830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. So far as I can tell, Clang on Linux supports none of the headers under discussion here, and that's been OK for some time. None of the headers in question appear to actually work today, so I think we should remove them from the search path.

[PATCH] D29692: [clang-tidy] add check modernize-use-const-instead-of-define

2017-02-14 Thread Alexander Lanin via Phabricator via cfe-commits
AlexanderLanin added a comment. Thanks for the feedback. As I'm new to this I cannot say whether checking only the file in question fits better with clang-tidy’s policy or not. Also, I’m not sure about ODR. Of course, it’s a possibility, but isn’t the programmer responsible for that? This will

[PATCH] D29951: Load lazily the template specialization in multi-module setups.

2017-02-14 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. Currently, we load all template specialization if we have more than one module attached and we touch anything around the template definition. This patch registers the template specializations as a lazily-loadable entities. This reduces the amount of

Re: r294800 - Don't let EvaluationModes dictate whether an invalid base is OK

2017-02-14 Thread Hans Wennborg via cfe-commits
Merged in r295087. On Fri, Feb 10, 2017 at 5:00 PM, Hans Wennborg wrote: > Sgtm. Go ahead and merge when the bots have chewed on it for a bit, > otherwise I'll do it next week. > > Thanks, > Hans > > On Fri, Feb 10, 2017 at 3:06 PM, George Burgess IV >

[PATCH] D26057: [coroutines] Add DependentCoawaitExpr and fix re-building CoroutineBodyStmt.

2017-02-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 88319. EricWF added a comment. - More cleanup - Rename `BuildCoawaitExpr` -> `BuildResolvedCoawaitExpr` and `BuildDependentCoawaitExpr` -> `BuildUnresolvedCoawaitExpr`. https://reviews.llvm.org/D26057 Files: include/clang/AST/ExprCXX.h

[PATCH] D29899: [clang-tidy] Add support for NOLINTNEXTLINE.

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Awesome! LG with one nit. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:300 + // Now skip any newlines. + // FIXME: We want to skip over exactly one line, not an

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-14 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Sorry for the delay, I have commented inline. For me, this patch looks like a strict improvement. I think, after some clean up this can be accepted. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:442 + +const RecordDecl *RD =

[PATCH] D29928: [clang-tidy] Improve diagnostic message for misc-definitions-in-header.

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you! https://reviews.llvm.org/D29928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29928: [clang-tidy] Improve diagnostic message for misc-definitions-in-header.

2017-02-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: JDevlieghere. Users might get confused easily when they see the check's message on full template function speciliations. Add a note to the output message, which mentions these kind of function specializations are treated as regular

[PATCH] D23421: [Clang-tidy] CERT-MSC53-CPP (checker for std namespace modification)

2017-02-14 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 88333. xazax.hun marked 9 inline comments as done. xazax.hun added a comment. - Updated to latest trunk. - The cert rule was renamed, the patch is updated accordingly. - Fixes as per review comments. https://reviews.llvm.org/D23421 Files:

[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. A few more nits. Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:66 + auto Diag = diag(Loc, "to avoid repeating the return type from the " +

[PATCH] D29930: Add `__is_direct_constructible` trait for checking safe reference initialization.

2017-02-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. The STL types `std::pair` and `std::tuple` can both store reference types. However their constructors cannot adequately check if the initialization of reference types is safe. For example: std::tuple t = 42; // The stored reference is

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/ASTManager.cpp:148 + std::string Error; + I = tooling::CompilationDatabase::autoDetectFromSource(Uri, Error); + return I.get(); Do you have an idea about a proper error handling if Error?

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-14 Thread Mateusz Mikuła via Phabricator via cfe-commits
mati865 added a comment. @yaron.keren, @rnk I would like to see OpenMP support by MinGW Clang but using GCC "internal" headers is just wrong. > For example, the most popular (37089 download this week) > https://sourceforge.net/projects/mingw-w64 distribuion for Windows had > elected to place

[PATCH] D29928: [clang-tidy] Improve diagnostic message for misc-definitions-in-header.

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:131-135 +if (FD->getTemplateSpecializationKind() != TSK_Undeclared) +

[PATCH] D19586: Misleading Indentation check

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Gábor, thank you for picking up this patch and finishing it! https://reviews.llvm.org/D19586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D19586: Misleading Indentation check

2017-02-14 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:79 + Finder->addMatcher( + compoundStmt(anyOf(has(ifStmt()), has(forStmt()), has(whileStmt( + .bind("compound"), alexfh wrote: > xazax.hun

r295043 - [scan-build-py] use subprocess wrapper to execute build

2017-02-14 Thread Laszlo Nagy via cfe-commits
Author: rizsotto Date: Tue Feb 14 04:30:50 2017 New Revision: 295043 URL: http://llvm.org/viewvc/llvm-project?rev=295043=rev Log: [scan-build-py] use subprocess wrapper to execute build Modified: cfe/trunk/tools/scan-build-py/libscanbuild/__init__.py

[PATCH] D19586: Misleading Indentation check

2017-02-14 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 88330. xazax.hun marked 7 inline comments as done. xazax.hun added a comment. - Added a note to make it easier to understand the diagnostics. - Reworded the error message about dangling else. - Fixed other review comments. https://reviews.llvm.org/D19586

[PATCH] D19586: Misleading Indentation check

2017-02-14 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Thank you for the review! Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:79 + Finder->addMatcher( + compoundStmt(anyOf(has(ifStmt()), has(forStmt()), has(whileStmt( + .bind("compound"), alexfh

[PATCH] D29928: [clang-tidy] Improve diagnostic message for misc-definitions-in-header.

2017-02-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:131-135 +if (FD->getTemplateSpecializationKind() != TSK_Undeclared) + diag(FD->getLocation(), "this is a full function template specilization

r295045 - [scan-build-py] move function report_directory from report module to analyze module

2017-02-14 Thread Laszlo Nagy via cfe-commits
Author: rizsotto Date: Tue Feb 14 04:43:38 2017 New Revision: 295045 URL: http://llvm.org/viewvc/llvm-project?rev=295045=rev Log: [scan-build-py] move function report_directory from report module to analyze module Differential Revision: https://reviews.llvm.org/D29255 Modified:

[PATCH] D19586: Misleading Indentation check

2017-02-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:79 + Finder->addMatcher( + compoundStmt(anyOf(has(ifStmt()), has(forStmt()), has(whileStmt( +

[clang-tools-extra] r295041 - [clang-tidy] Add readability-misleading-indentation check.

2017-02-14 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Tue Feb 14 04:03:27 2017 New Revision: 295041 URL: http://llvm.org/viewvc/llvm-project?rev=295041=rev Log: [clang-tidy] Add readability-misleading-indentation check. Differential Revision: https://reviews.llvm.org/D19586 Added:

[PATCH] D19586: Misleading Indentation check

2017-02-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295041: [clang-tidy] Add readability-misleading-indentation check. (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D19586?vs=88330=88334#toc Repository: rL LLVM

[PATCH] D29928: [clang-tidy] Improve diagnostic message for misc-definitions-in-header.

2017-02-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 88336. hokein added a comment. Address review comment. https://reviews.llvm.org/D29928 Files: clang-tidy/misc/DefinitionsInHeadersCheck.cpp test/clang-tidy/misc-definitions-in-headers.hpp Index: test/clang-tidy/misc-definitions-in-headers.hpp

r295044 - [clang-format] Remove dead code in FormatTestComments, NFC

2017-02-14 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue Feb 14 04:35:42 2017 New Revision: 295044 URL: http://llvm.org/viewvc/llvm-project?rev=295044=rev Log: [clang-format] Remove dead code in FormatTestComments, NFC Modified: cfe/trunk/unittests/Format/FormatTestComments.cpp Modified:

[PATCH] D29928: [clang-tidy] Improve diagnostic message for misc-definitions-in-header.

2017-02-14 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rL295048: [clang-tidy] Improve diagnostic message for misc-definitions-in-header. (authored by hokein). Changed prior to commit:

[clang-tools-extra] r295048 - [clang-tidy] Improve diagnostic message for misc-definitions-in-header.

2017-02-14 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Feb 14 06:39:22 2017 New Revision: 295048 URL: http://llvm.org/viewvc/llvm-project?rev=295048=rev Log: [clang-tidy] Improve diagnostic message for misc-definitions-in-header. Summary: Users might get confused easily when they see the check's message on full template

[clang-tools-extra] r295049 - [clang-tidy] Add support for NOLINTNEXTLINE.

2017-02-14 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 14 06:47:56 2017 New Revision: 295049 URL: http://llvm.org/viewvc/llvm-project?rev=295049=rev Log: [clang-tidy] Add support for NOLINTNEXTLINE. Reviewers: alexfh Subscribers: JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D29899 Added:

[PATCH] D29899: [clang-tidy] Add support for NOLINTNEXTLINE.

2017-02-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295049: [clang-tidy] Add support for NOLINTNEXTLINE. (authored by d0k). Changed prior to commit: https://reviews.llvm.org/D29899?vs=88352=88353#toc Repository: rL LLVM

[PATCH] D29899: [clang-tidy] Add support for NOLINTNEXTLINE.

2017-02-14 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer updated this revision to Diff 88352. bkramer added a comment. - Simplify code by not worrying about \r - Don't allow blank lines between NOLINTNEXTLINE and the warning https://reviews.llvm.org/D29899 Files: clang-tidy/ClangTidyDiagnosticConsumer.cpp

[PATCH] D29910: [OpenMP] Specialize default schedule on a worksharing loop on the NVPTX device.

2017-02-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D29910#676186, @arpith-jacob wrote: > Hi Alexey, > > Thank you for your review. The main difference in the specialized codegen > (if vs. else part in CGStmtOpenMP.cpp). > > If-part: emitForStaticInit uses the Chunk parameter (else has it set

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-14 Thread Yaron Keren via Phabricator via cfe-commits
yaron.keren added a comment. If something is broken now we don't break it even more. __float128 remain be fixed to be compatible, not only some poor developer would have to fix the missing headers bug one day, he will have to re-fix limits.h the right way and undo this "fix". There is a

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-14 Thread Mateusz Mikuła via Phabricator via cfe-commits
mati865 added a comment. Final decision is left for @rnk and @asl but I'm still against using GCC "internal" headers in the way they aren't supposed to be used. And have MinGW Clang behaving like Linux Clang. > developer would have to fix the missing headers bug one day Solving general Clang

[PATCH] D29910: [OpenMP] Specialize default schedule on a worksharing loop on the NVPTX device.

2017-02-14 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob added a comment. Hi Alexey, Thank you for your review. The main difference in the specialized codegen (if vs. else part in CGStmtOpenMP.cpp). If-part: emitForStaticInit uses the Chunk parameter (else has it set to null). If-part: does not use EmitIgnoredExpr() I can combine if-

Re: [PATCH] Improved plugin/tool support by expanding an existing attribute

2017-02-14 Thread Marcwell Helpdesk via cfe-commits
The intention of the patch is to extend the functionality of annotations while utilizing existing infrastructure in the AST and IR as much as possible. Annotations are indeed a general purpose solution, sufficient for many use cases, and a complement, not mutual exclusive to pluggable attributes.

[PATCH] D29858: [clang-tidy] Catch trivially true statements like a != 1 || a != 3

2017-02-14 Thread Etienne Bergeron via Phabricator via cfe-commits
etienneb added inline comments. Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:244 + // x != 5 || x != 10 + if (OpcodeLHS == BO_NE || OpcodeLHS == BO_NE) +return true; etienneb wrote: > The good news is that this code will be catch by this check!

Re: [PATCH] D29944: libclang: Print namespaces for typedefs and type aliases

2017-02-14 Thread Michael via cfe-commits
As an explanation for this patch my original mail to cfe-dev: I'm using libclang to parse header files and generate code from them. I found that clang_getTypeSpelling() usually includes the namespace(s) a type was declared in. However with the exception being typedefs (and same for "using A =

[PATCH] D29944: libclang: Print namespaces for typedefs and type aliases

2017-02-14 Thread Michael via Phabricator via cfe-commits
redm123 created this revision. Printing typedefs or type aliases using clang_getTypeSpelling() is missing the namespace they are defined in. This is in contrast to other types that always yield the full typename including namespaces. https://reviews.llvm.org/D29944 Files:

[PATCH] D29910: [OpenMP] Specialize default schedule on a worksharing loop on the NVPTX device.

2017-02-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. General comment: do you really need to define default schedule kind in Sema? Could you do it during codegen phase? Comment at: include/clang/Basic/OpenMPKinds.h:23-25 +class Sema; +class OMPClause; + No way, these classes should not

r295083 - Remove unnecessary std::string construction

2017-02-14 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Feb 14 12:38:40 2017 New Revision: 295083 URL: http://llvm.org/viewvc/llvm-project?rev=295083=rev Log: Remove unnecessary std::string construction Modified: cfe/trunk/lib/Lex/PPDirectives.cpp Modified: cfe/trunk/lib/Lex/PPDirectives.cpp URL:

r295082 - Fix some warnings in intrin.h

2017-02-14 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Feb 14 12:38:19 2017 New Revision: 295082 URL: http://llvm.org/viewvc/llvm-project?rev=295082=rev Log: Fix some warnings in intrin.h Modified: cfe/trunk/lib/Headers/intrin.h Modified: cfe/trunk/lib/Headers/intrin.h URL:

Re: [libcxx] r294696 - Fully qualify (preprend ::) calls to math functions from libc

2017-02-14 Thread Hans Wennborg via cfe-commits
I'm guessing this isn't addressing a new issue in 4.0, so perhaps we should take the safe alternative and not merge this one. Thanks, Hans On Thu, Feb 9, 2017 at 11:35 PM, Eric Fiselier wrote: > I'm a bit paranoid one of the names we just qualified will end up being > defined as a

[PATCH] D29879: [OpenMP] Teams reduction on the NVPTX device.

2017-02-14 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob updated this revision to Diff 88407. arpith-jacob added a comment. Use SizeTy instead of assuming 64 bits! https://reviews.llvm.org/D29879 Files: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp lib/CodeGen/CGStmtOpenMP.cpp test/OpenMP/nvptx_teams_reduction_codegen.cpp Index:

[PATCH] D29879: [OpenMP] Teams reduction on the NVPTX device.

2017-02-14 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob marked 8 inline comments as done. arpith-jacob added a comment. Alexey, thank you for your review. I have used SizeTy instead of assuming 64-bits. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:725 +/*isVarArg=*/false); +

[PATCH] D29910: [OpenMP] Specialize default schedule on a worksharing loop on the NVPTX device.

2017-02-14 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob updated this revision to Diff 88423. arpith-jacob added a comment. Hi Alexey, Thank you for reviewing this patch. > I don't like the idea of adding some kind of default scheduling, that is not > defined in standard in Sema Actually, "default scheduling" is defined in the OpenMP

[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D29369#676521, @dtzWill wrote: > In https://reviews.llvm.org/D29369#673064, @vsk wrote: > > > In https://reviews.llvm.org/D29369#672166, @dtzWill wrote: > > > > > After some thought, can we discuss why this is a good idea? > > > > > > The goal is

r295107 - MS inline asm: Filter MXCSR out of the inferred clobber list

2017-02-14 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Feb 14 15:38:17 2017 New Revision: 295107 URL: http://llvm.org/viewvc/llvm-project?rev=295107=rev Log: MS inline asm: Filter MXCSR out of the inferred clobber list Since r295004, LLVM has started modelling this new register, but we don't have GCC constraint inline asm

[PATCH] D23421: [Clang-tidy] CERT-MSC53-CPP (checker for std namespace modification)

2017-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cert/DontModifyStdNamespaceCheck.cpp:34 + + diag(N->getLocation(), + "modification of '%0' namespace can result in undefined behavior") I think this will still trigger false positives because

[PATCH] D29957: [clang-tidy] Ignore instantiated functions and static data members of classes in misc-definitions-in-headers.

2017-02-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: JDevlieghere. https://reviews.llvm.org/D29957 Files: clang-tidy/misc/DefinitionsInHeadersCheck.cpp test/clang-tidy/misc-definitions-in-headers.hpp Index: test/clang-tidy/misc-definitions-in-headers.hpp

[PATCH] D29908: Disallow returning a __block variable via a move

2017-02-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D29908#676788, @rjmccall wrote: > Oh, I see. Just to clarify: it doesn't matter that the object "ret" used to > point to has been destructed, what matters is that "ret" now holds a null > reference because it's been moved out of. Yes,

[PATCH] D29930: Add `__is_direct_constructible` trait for checking safe reference initialization.

2017-02-14 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: include/clang/Basic/TokenKinds.def:418 TYPE_TRAIT_N(__is_nothrow_constructible, IsNothrowConstructible, KEYCXX) +TYPE_TRAIT_N(__is_direct_constructible, IsDirectConstructible, KEYCXX) Should this trait be grouped

[PATCH] D29908: Disallow returning a __block variable via a move

2017-02-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D29908#676601, @ahatanak wrote: > In https://reviews.llvm.org/D29908#676589, @ahatanak wrote: > > > Posting John's review comment, which was sent to the review I abandoned: > > > > "Hmm. The behavior I think we actually want here is that we

[PATCH] D29908: Disallow returning a __block variable via a move

2017-02-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 88430. ahatanak added a comment. Update comment. https://reviews.llvm.org/D29908 Files: lib/Sema/SemaStmt.cpp test/SemaObjCXX/blocks.mm Index: test/SemaObjCXX/blocks.mm === ---

r295100 - Revert "[profiling] Update test case to deal with name variable change (NFC)"

2017-02-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Feb 14 14:03:53 2017 New Revision: 295100 URL: http://llvm.org/viewvc/llvm-project?rev=295100=rev Log: Revert "[profiling] Update test case to deal with name variable change (NFC)" This reverts commit r295085, because the corresponding llvm change was reverted.

r295101 - [profiling] Update test cases to deal with name variable change (NFC)

2017-02-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Feb 14 14:03:56 2017 New Revision: 295101 URL: http://llvm.org/viewvc/llvm-project?rev=295101=rev Log: [profiling] Update test cases to deal with name variable change (NFC) This is a re-try of r295085: fix up some test cases that assume that profile name variables are

[PATCH] D29748: [cxx1z-constexpr-lambda] Implement captures - thus completing implementation of constexpr lambdas.

2017-02-14 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: lib/AST/ExprConstant.cpp:428-429 +llvm::DenseMap LambdaCaptureFields; +FieldDecl *LambdaThisCaptureField; + I'm a little concerned

r295113 - [Driver] Report available language standards on user error

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 16:44:20 2017 New Revision: 295113 URL: http://llvm.org/viewvc/llvm-project?rev=295113=rev Log: [Driver] Report available language standards on user error In case user did not provide valid standard name for -std option, available values (with short description)

[PATCH] D29967: Get class property selectors from property decl if it exists

2017-02-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Can you please post the patch with full context (http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface)? https://reviews.llvm.org/D29967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-14 Thread Mateusz Mikuła via Phabricator via cfe-commits
mati865 added a comment. If there are no further objections it can be committed by somebody. https://reviews.llvm.org/D29464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-14 Thread Anton Korobeynikov via Phabricator via cfe-commits
asl accepted this revision. asl added a comment. This revision is now accepted and ready to land. We shouldn't add resource dirs to the path. After all, these headers could use, for example, gcc-only extensions. https://reviews.llvm.org/D29464 ___

[PATCH] D29930: Add `__is_direct_constructible` trait for checking safe reference initialization.

2017-02-14 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. I don't like this name; it sounds too much like you're asking whether a certain direct-initialization is possible, which is what `__is_constructible` does. I also don't like the idea of combining an "is this type direct-initializable from this list of arguments" check

r295122 - Stop asserting when a meaningless -std= flag is passed for a non-compilation

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 17:41:38 2017 New Revision: 295122 URL: http://llvm.org/viewvc/llvm-project?rev=295122=rev Log: Stop asserting when a meaningless -std= flag is passed for a non-compilation input kind; go back to silently ignoring the flag. Added:

r295125 - Remove unused variable. No functional change.

2017-02-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Feb 14 17:56:55 2017 New Revision: 295125 URL: http://llvm.org/viewvc/llvm-project?rev=295125=rev Log: Remove unused variable. No functional change. Modified: cfe/trunk/lib/Parse/ParseDecl.cpp Modified: cfe/trunk/lib/Parse/ParseDecl.cpp URL:

[PATCH] D13330: Implement __attribute__((unique_instantiation))

2017-02-14 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D13330#582607, @rsmith wrote: > I think this attribute is poorly named. Explicit instantiation definitions > are *already* required to be globally unique; see [temp.spec]/5.1: > > "For a given template and a given set of

r295114 - Improve diagnostic reporting when using __declspec without enabling __declspec as a keyword.

2017-02-14 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Feb 14 16:47:20 2017 New Revision: 295114 URL: http://llvm.org/viewvc/llvm-project?rev=295114=rev Log: Improve diagnostic reporting when using __declspec without enabling __declspec as a keyword. Fixes PR31936. Added: cfe/trunk/test/Parser/declspec-recovery.c

r295118 - Do not implicitly instantiate the definition of a class template specialization

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 17:27:44 2017 New Revision: 295118 URL: http://llvm.org/viewvc/llvm-project?rev=295118=rev Log: Do not implicitly instantiate the definition of a class template specialization that has been explicitly specialized! We assume in various places that we can tell the

[PATCH] D29972: Make Lit tests C++11 compatible - accessible destructors

2017-02-14 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge created this revision. Herald added a subscriber: mehdi_amini. I am continuing to make Lit tests C++11 compatible. This patch contains 2 tests previously in https://reviews.llvm.org/D20710. In both tests, I have made the base class destructors “protected” so they are accessible

[PATCH] D29930: Add `__is_direct_constructible` trait for checking safe reference initialization.

2017-02-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D29930#676858, @rsmith wrote: > I don't like this name; it sounds too much like you're asking whether a > certain direct-initialization is possible, which is what `__is_constructible` > does. I also don't like the idea of combining an "is

[PATCH] D29967: Get class property setter selector from property decl if exists

2017-02-14 Thread David Herzka via Phabricator via cfe-commits
herzka created this revision. Before this fix, trying to set a class property using dot syntax would always use the constructed name (setX:), which might not match the real selector if the setter is specified via the `setter` property attribute. Now, the setter selector in the declaration has

[PATCH] D29967: Get class property selectors from property decl if it exists

2017-02-14 Thread David Herzka via Phabricator via cfe-commits
herzka updated this revision to Diff 88448. herzka retitled this revision from "Get class property setter selector from property decl if exists" to "Get class property selectors from property decl if it exists". herzka edited the summary of this revision. https://reviews.llvm.org/D29967 Files:

r295123 - [VLA] Handle VLA size expression in a full-expression context.

2017-02-14 Thread Tim Shen via cfe-commits
Author: timshen Date: Tue Feb 14 17:46:37 2017 New Revision: 295123 URL: http://llvm.org/viewvc/llvm-project?rev=295123=rev Log: [VLA] Handle VLA size expression in a full-expression context. Summary: Previously the cleanups (e.g. dtor calls) are inserted into the outer scope (e.g. function body

[PATCH] D24333: [VLA] Handle VLA size expression in a full-expression context.

2017-02-14 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295123: [VLA] Handle VLA size expression in a full-expression context. (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D24333?vs=86377=88464#toc Repository: rL LLVM

[PATCH] D29692: [clang-tidy] add check modernize-use-const-instead-of-define

2017-02-14 Thread Alexander Lanin via Phabricator via cfe-commits
AlexanderLanin marked 5 inline comments as done. AlexanderLanin added inline comments. Comment at: clang-tidy/modernize/UseConstInsteadOfDefineCheck.cpp:86 +else if (isAnyParenthesis(Tok) || isAnyNumericLiteral(Tok) || + (!hasPrefix && isAnyCharLiteral(Tok))) { +

[PATCH] D29868: Recover more gracefully when __declspec is not supported as a keyword

2017-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Commit in r295114. https://reviews.llvm.org/D29868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29692: [clang-tidy] add check modernize-use-const-instead-of-define

2017-02-14 Thread Alexander Lanin via Phabricator via cfe-commits
AlexanderLanin updated this revision to Diff 88447. AlexanderLanin marked an inline comment as done. AlexanderLanin added a comment. Applied review comments and added test cases regarding parenthesis, floats, doubles, wide chars etc https://reviews.llvm.org/D29692 Files:

[PATCH] D29967: Get class property setter selector from property decl if exists

2017-02-14 Thread David Herzka via Phabricator via cfe-commits
herzka planned changes to this revision. herzka added a comment. This issue applies to getters too. I'll make this fix broader. I think the real fix for both is to construct the ObjCPropertyRefExpr using the ObjCPropertyDecl so that it's considered an explicit property. Currently, it still

[PATCH] D29724: [Driver] Report available language standards on user error

2017-02-14 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. Committed as r295113. https://reviews.llvm.org/D29724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r295127 - [VLA] Fix the test failure on msvc by specifying the triple.

2017-02-14 Thread Tim Shen via cfe-commits
Author: timshen Date: Tue Feb 14 18:01:12 2017 New Revision: 295127 URL: http://llvm.org/viewvc/llvm-project?rev=295127=rev Log: [VLA] Fix the test failure on msvc by specifying the triple. Differential Revision: https://reviews.llvm.org/D24333 Modified: cfe/trunk/test/Sema/pr30306.cpp

r295140 - Don't look for GCC versions in /usr/lib/ except when is a

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 19:16:48 2017 New Revision: 295140 URL: http://llvm.org/viewvc/llvm-project?rev=295140=rev Log: Don't look for GCC versions in /usr/lib/ except when is a freescale triple. On multiarch systems, this previously caused us to stat every file in /usr/lib/ (typically

[PATCH] D29599: Clang Changes for alloc_align

2017-02-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. My question probably wasn't clear, but I wasn't sure how template functions in general (not just member functions) should be handled. I see a warning when the following function is compiled: template T __attribute__((alloc_align(1))) foo0(int a) { typedef

Re: r291955 - PR31606: Generalize our tentative DR resolution for inheriting copy/move

2017-02-14 Thread Richard Smith via cfe-commits
On 14 February 2017 at 19:48, Richard Smith wrote: > On 14 February 2017 at 18:14, Akira Hatanaka wrote: > >> Hi Richard, >> >> It looks like this commit causes an assertion failure when the following >> code is compiled: >> >> $ cat test1.cpp >>

r295139 - Refactor GCC lib directory detection to make it easier to add lib directories

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 19:13:54 2017 New Revision: 295139 URL: http://llvm.org/viewvc/llvm-project?rev=295139=rev Log: Refactor GCC lib directory detection to make it easier to add lib directories that are only checked for some targets. Modified: cfe/trunk/lib/Driver/ToolChains.cpp

Re: [cfe-commits] r164177 - in /cfe/trunk: lib/Driver/ test/Driver/ test/Driver/Inputs/freescale_ppc_tree/ test/Driver/Inputs/freescale_ppc_tree/lib/ test/Driver/Inputs/freescale_ppc_tree/usr/ test/Dr

2017-02-14 Thread Richard Smith via cfe-commits
On 9 February 2017 at 16:15, Hal Finkel via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On 02/09/2017 04:58 PM, Chandler Carruth wrote: > > On Thu, Feb 9, 2017 at 2:46 PM Tobias von Koch > wrote: > >> On Wed, Feb 8, 2017 at 7:21 PM, Chandler Carruth

Re: r291955 - PR31606: Generalize our tentative DR resolution for inheriting copy/move

2017-02-14 Thread Akira Hatanaka via cfe-commits
Hi Richard, It looks like this commit causes an assertion failure when the following code is compiled: $ cat test1.cpp template struct S3 { }; template struct S2 { S2(S3 &&); }; template struct S1 : S2 { using S2::S2; S1(); }; template struct S0 { S0(); S0(S0&&) = default; S1 m1;

r295146 - Speculatively revert r295118 to see if it's what's causing the modules selfhost buildbots to fail.

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 21:29:24 2017 New Revision: 295146 URL: http://llvm.org/viewvc/llvm-project?rev=295146=rev Log: Speculatively revert r295118 to see if it's what's causing the modules selfhost buildbots to fail. Modified: cfe/trunk/lib/AST/Type.cpp

Re: r291955 - PR31606: Generalize our tentative DR resolution for inheriting copy/move

2017-02-14 Thread Richard Smith via cfe-commits
On 14 February 2017 at 18:14, Akira Hatanaka wrote: > Hi Richard, > > It looks like this commit causes an assertion failure when the following > code is compiled: > > $ cat test1.cpp > template > struct S3 { > }; > > template > struct S2 { > S2(S3 &&); > }; > > template >

Re: r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-02-14 Thread Akira Hatanaka via cfe-commits
Yes, you are correct: clang implicitly marks indirect parameters with __autoreleasing. The whole purpose of Wblock-capture-autoreleasing (which was committed in r285031) is to inform the users that clang has implicitly marked an out-parameter as __autoreleasing. clang doesn’t warn if the user

r295149 - Fix assertion failure due to implicit special member lookup lacking a source location.

2017-02-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 14 22:18:23 2017 New Revision: 295149 URL: http://llvm.org/viewvc/llvm-project?rev=295149=rev Log: Fix assertion failure due to implicit special member lookup lacking a source location. Modified: cfe/trunk/lib/Sema/SemaLookup.cpp

  1   2   >