[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-12 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. One important thing is missing. Please run this check on a large enough codebase (LLVM + Clang is a good choice for testing most of kinds of checks usually) and include a summary of

[PATCH] D27655: Fix modernize-deprecated-headers clang-tidy warnings

2016-12-12 Thread Michael Sharpe via Phabricator via cfe-commits
michael.sharpe added a comment. In https://reviews.llvm.org/D27655#619307, @Eugene.Zelenko wrote: > Did you enable analysis of headers in Clang-tidy? I had not, thanks for the tip. Comment at: lib/Lex/ModuleMap.cpp:35 #if defined(LLVM_ON_UNIX) -#include +#include #endif

[PATCH] D27655: Fix modernize-deprecated-headers clang-tidy warnings

2016-12-12 Thread Michael Sharpe via Phabricator via cfe-commits
michael.sharpe updated this revision to Diff 81179. michael.sharpe added a comment. - Address review comments, check headers for C style headers https://reviews.llvm.org/D27655 Files: include/clang/Analysis/Analyses/ThreadSafetyTIL.h include/clang/Basic/Linkage.h include/clang/Basic/Targe

r289514 - CodeGen: clean up -Wpedantic warning (NFC)

2016-12-12 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Dec 12 21:27:35 2016 New Revision: 289514 URL: http://llvm.org/viewvc/llvm-project?rev=289514&view=rev Log: CodeGen: clean up -Wpedantic warning (NFC) lib/CodeGen/CGExpr.cpp:2511:2: warning: extra ';' [-Wpedantic] }; ^ Clean up warning from gcc 6. Modified:

[PATCH] D27434: [libc++abi] Disable failing test on Darwin

2016-12-12 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289513: [libc++abi] Mark failing test on Darwin as XFAIL (authored by smeenai). Changed prior to commit: https://reviews.llvm.org/D27434?vs=80344&id=81174#toc Repository: rL LLVM https://reviews.llv

[libcxxabi] r289513 - [libc++abi] Mark failing test on Darwin as XFAIL

2016-12-12 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Mon Dec 12 20:43:04 2016 New Revision: 289513 URL: http://llvm.org/viewvc/llvm-project?rev=289513&view=rev Log: [libc++abi] Mark failing test on Darwin as XFAIL The macOS thread-local variable finalizer routines do not handle the case where a termination function registers a

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-12-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 81172. ahatanak added a comment. Rebase and ping. https://reviews.llvm.org/D24969 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp lib/Sema/TreeTransform.h test/SemaCXX/destructor.cpp Index: test/SemaCXX/destructor.cpp ==

[PATCH] D23096: [Sema] Pass CombineWithOuterScope = true to constructor of LocalInstantiationScope

2016-12-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 81171. ahatanak added a comment. Rebase and ping. https://reviews.llvm.org/D23096 Files: lib/Sema/SemaTemplate.cpp lib/Sema/SemaTemplateInstantiate.cpp lib/Sema/TreeTransform.h test/SemaCXX/vartemplate-lambda.cpp test/SemaTemplate/default-expr-ar

[libcxx] r289512 - [libcxx] [test] Fix size_t-to-int truncation warnings in syserr.hash.

2016-12-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Mon Dec 12 19:54:58 2016 New Revision: 289512 URL: http://llvm.org/viewvc/llvm-project?rev=289512&view=rev Log: [libcxx] [test] Fix size_t-to-int truncation warnings in syserr.hash. After r289363, these tests were triggering MSVC x64 warning C4267 "conversion from 'size_t'

[PATCH] D25208: [libc++] Make _LIBCPP_TYPE_VIS export members

2016-12-12 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai planned changes to this revision. smeenai added a comment. Hidden visibility also requires extern template declarations to expand to default visibility (as opposed to just default type visibility) to be feasible. Will fix annotations there and then roll that macro change into this diff.

[PATCH] D27430: [libc++] Annotate template methods with visibility

2016-12-12 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai planned changes to this revision. smeenai added a comment. Hidden visibility also requires extern template declarations to expand to default visibility (as opposed to just default type visibility) to be feasible. Will fix annotations there and add those to this diff. https://reviews.ll

[PATCH] D26949: [libc++abi] Clean up visibility

2016-12-12 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Ping. https://reviews.llvm.org/D26949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26061: [analyzer] Refactor and simplify SimpleConstraintManager

2016-12-12 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. How does this look now? https://reviews.llvm.org/D26061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26691: [analyzer] Run clang-format and fix style

2016-12-12 Thread Dominic Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289511: [analyzer] Run clang-format and fix style (authored by ddcc). Changed prior to commit: https://reviews.llvm.org/D26691?vs=80128&id=81170#toc Repository: rL LLVM https://reviews.llvm.org/D266

r289511 - [analyzer] Run clang-format and fix style

2016-12-12 Thread Dominic Chen via cfe-commits
Author: ddcc Date: Mon Dec 12 19:40:41 2016 New Revision: 289511 URL: http://llvm.org/viewvc/llvm-project?rev=289511&view=rev Log: [analyzer] Run clang-format and fix style Summary: Split out formatting and style changes from D26061 Reviewers: zaks.anna, dcoughlin Subscribers: cfe-commits Diff

[PATCH] D27689: Module: hash the pcm content and use it as SIGNATURE for implicit modules.

2016-12-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: include/clang/Serialization/ASTBitCodes.h:256 EXTENSION_BLOCK_ID, + DIAGNOSTIC_OPTIONS_BLOCK_ID }; rsmith wrote: > Add a comment describing this block. > > Please also give this a name that describes

[PATCH] D27153: [libc++] Make __num_get_float hidden

2016-12-12 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Pinging above question. https://reviews.llvm.org/D27153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27478: Make ASTContext::getDeclAlign return the correct alignment for FunctionDecls

2016-12-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. This doesn't happen for objective-c block pointers. Sema::CheckCastAlign returns early when the type isn't a PointerType (BlockPointerType isn't a subclass of PointerType). https://reviews.llvm.org/D27478 ___ cfe-commits

[PATCH] D27691: [libcxx] [test] Fix size_t-to-int truncation warnings in syserr.hash.

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT retitled this revision from "[libcxx] [test] Fix a size_t-to-int truncation warning in error_code.pass.cpp." to "[libcxx] [test] Fix size_t-to-int truncation warnings in syserr.hash.". STL_MSFT updated the summary for this revision. STL_MSFT updated this revision to Diff 81160. STL_MSFT

[PATCH] D27689: Module: hash the pcm content and use it as SIGNATURE for implicit modules.

2016-12-12 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. Generally this seems reasonable to me. I don't see any particular need to split this patch up into smaller pieces. Comment at: include/clang/Serialization/ASTBitCodes.h:256 EXTENSION_BLOCK_ID, + DIAGNOSTIC_OPTIONS_BLOCK_ID }; --

[PATCH] D27691: [libcxx] [test] Fix a size_t-to-int truncation warning in error_code.pass.cpp.

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. STL_MSFT added reviewers: EricWF, mclow.lists. STL_MSFT added a subscriber: cfe-commits. [libcxx] [test] Fix a size_t-to-int truncation warning in error_code.pass.cpp. This test was triggering MSVC x64 warning C4267 "conversion from 'size_t' to 'int', possible loss

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. Please add a test to make sure this does not fire on C++17 decomposition declarations: void f() { struct X { int a, b, c; }; auto [a, b, c] = X(); } https://reviews.llvm.org/D27621 ___ cfe-commits mailing list c

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino updated this revision to Diff 81154. firolino marked an inline comment as done. firolino added a comment. Small improvments: - SourceRange -> SourceLocation (malcolms last comment) - added a few consts https://reviews.llvm.org/D27621 Files: clang-tidy/readability/CMakeLists.txt cl

r289494 - Revert "[Modules] Make header inclusion order from umbrella dirs deterministic"

2016-12-12 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Dec 12 17:22:30 2016 New Revision: 289494 URL: http://llvm.org/viewvc/llvm-project?rev=289494&view=rev Log: Revert "[Modules] Make header inclusion order from umbrella dirs deterministic" Reverts commit r289478. This broke http://lab.llvm.org:8011/builders/clang-ppc64be-l

[PATCH] D27689: Module: hash the pcm content and use it as SIGNATURE for implicit modules.

2016-12-12 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: include/clang/Serialization/ASTBitCodes.h:322 + + /// \brief Record code for the signature that identifiers this AST file. + SIGNATURE, FYI, could be fixed in a separate commit for the entire file: These uses o

[PATCH] D27603: Propagate -fdiagnostics-color to LLD.

2016-12-12 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added a comment. Nico suggested I make change to CMake instead of Clang so that CMake adds -Wl,-color-diagnostics if it detects the linker can accept that option. I think that makes sense, so I'll look into it. https://reviews.llvm.org/D27603 ___

r289487 - Revert "[Headers] Add #include_next for tgmath.h on Darwin"

2016-12-12 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Dec 12 17:06:58 2016 New Revision: 289487 URL: http://llvm.org/viewvc/llvm-project?rev=289487&view=rev Log: Revert "[Headers] Add #include_next for tgmath.h on Darwin" Reverts r289181: it's currently breaking modules using simd.h in 10.12 SDK. This reverts commit 6e73e346

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino marked 2 inline comments as done. firolino added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:86 + + Diag << FixItHint::CreateReplacement(CommaRange, ";") + << FixItHint::CreateReplacement(AfterCommaToVarNameRange, ---

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino marked an inline comment as done. firolino added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:87 + Diag << FixItHint::CreateReplacement(CommaRange, ";") + << FixItHint::CreateReplacement(AfterCommaToVarNameRange, +

[PATCH] D27689: Module: hash the pcm content and use it as SIGNATURE for implicit modules.

2016-12-12 Thread Manman Ren via Phabricator via cfe-commits
manmanren created this revision. manmanren added reviewers: rsmith, benlangmuir, aprantl. manmanren added subscribers: bruno, cfe-commits, dexonsmith. We change ASTFileSignature from a random 32-bit number to the actual SHA hash of the pcm content. 1> Definition of ASTFileSignature is moved to B

r289478 - [Modules] Make header inclusion order from umbrella dirs deterministic

2016-12-12 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Dec 12 16:41:20 2016 New Revision: 289478 URL: http://llvm.org/viewvc/llvm-project?rev=289478&view=rev Log: [Modules] Make header inclusion order from umbrella dirs deterministic Sort the headers by name before adding the includes in collectModuleHeaderIncludes. This makes

[PATCH] D27068: Improve string::find

2016-12-12 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. Ping https://reviews.llvm.org/D27068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D27597: [DebugInfo] Restore test case for long double constants.

2016-12-12 Thread David Blaikie via cfe-commits
On Mon, Dec 12, 2016 at 1:11 PM David Gross wrote: > I looked at what's supported by "requires", and couldn't find anything > appropriate. > > The problem is that I want the test to be sensitive to the size of long > double -- either no greater than 64 bits, or greater than 64 bits. It does > no

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 81142. yaxunl marked 9 inline comments as done. yaxunl added a comment. Revised by Anastasia's comments. https://reviews.llvm.org/D21698 Files: include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/O

[PATCH] D27383: Add a new clang-format style option ObjCBlockResetsIndent.

2016-12-12 Thread Sean Lu via Phabricator via cfe-commits
yixiang added a comment. Ping. For the additional requirements of adding a style options: - be used in a project of significant size (have dozens of contributors) - Yes, it's been used by almost all the iOS projects inside Google, including Google Maps. - have a publicly accessible style guid

[PATCH] D27680: [CodeGen] Move lifetime.start of a variable when goto jumps back past its declaration

2016-12-12 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: lib/CodeGen/CodeGenFunction.h:619 +bool hasLabel(const LabelDecl *LD) const { + return std::find(Labels.begin(), Labels.end(), LD) != Labels.end(); +} This can be written as `llvm::is_contained(Labels, LD);

[PATCH] D27546: [ASTReader] Sort RawComments before merging

2016-12-12 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping! https://reviews.llvm.org/D27546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D27597: [DebugInfo] Restore test case for long double constants.

2016-12-12 Thread David Gross via cfe-commits
I looked at what's supported by "requires", and couldn't find anything appropriate. The problem is that I want the test to be sensitive to the size of long double -- either no greater than 64 bits, or greater than 64 bits. It does not seem practical to list all platforms (so I suspect your "xfail

[PATCH] D22057: Prevent devirtualization of calls to un-instantiated functions.

2016-12-12 Thread Sunil Srivastava via Phabricator via cfe-commits
Sunil_Srivastava added a comment. A friendly ping. https://reviews.llvm.org/D22057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26623: [libcxx] [test] Swapping non-equal non-POCS allocators is UB.

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT abandoned this revision. STL_MSFT added a comment. r289358 fixes everything for me, thanks! Abandoning this revision. https://reviews.llvm.org/D26623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D27555: [libcxx] [test] Fix MSVC warning C6001 "Using uninitialized memory".

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT abandoned this revision. STL_MSFT added a comment. Verified compiler fix. Abandoning this patch - nothing has been committed. https://reviews.llvm.org/D27555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[clang-tools-extra] r289465 - [clang-move] Fix buildbot failures

2016-12-12 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Dec 12 14:24:44 2016 New Revision: 289465 URL: http://llvm.org/viewvc/llvm-project?rev=289465&view=rev Log: [clang-move] Fix buildbot failures Fix the buildbot failures introduced by D27669 Modified: clang-tools-extra/trunk/clang-move/tool/ClangMoveMain.cpp Modifi

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-12 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Glad you like it! > The second thing that would be amazing if this attribute was late parsed so > it the ability to reference this when applied to member functions That seems like a good idea; I'll look into what that would take. (In the meantime, reviews wou

[PATCH] D27669: [clang-move] Use appendArgumentsAdjuster for adding extra arguments

2016-12-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289464: [clang-move] Use appendArgumentsAdjuster for adding extra arguments (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D27669?vs=81052&id=81124#toc Repository: rL LLVM

[clang-tools-extra] r289464 - [clang-move] Use appendArgumentsAdjuster for adding extra arguments

2016-12-12 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Dec 12 13:56:37 2016 New Revision: 289464 URL: http://llvm.org/viewvc/llvm-project?rev=289464&view=rev Log: [clang-move] Use appendArgumentsAdjuster for adding extra arguments 1. Remove some boilerplate code for appending -fparse-all-comments to the list of arguments.

[libcxx] r289462 - [libcxx] [test] Fix an improper assumption about Null Forward Iterators.

2016-12-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Mon Dec 12 13:50:14 2016 New Revision: 289462 URL: http://llvm.org/viewvc/llvm-project?rev=289462&view=rev Log: [libcxx] [test] Fix an improper assumption about Null Forward Iterators. Value-initialized iterators still can't be compared to those with parents. Fixes D26626.

[libcxx] r289463 - [libcxx] [test] Change ifstream constructor tests to handle read-only files.

2016-12-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Mon Dec 12 13:50:22 2016 New Revision: 289463 URL: http://llvm.org/viewvc/llvm-project?rev=289463&view=rev Log: [libcxx] [test] Change ifstream constructor tests to handle read-only files. Certain source control systems like to set the read-only bit on their files, which in

Re: r289308 - [clang-format] Another attempt at python 3 compatibility

2016-12-12 Thread Vedant Kumar via cfe-commits
Thanks for double-checking this. I realized that there's a problem with my patch: skipping the encoding step when using Python 3 could cause problems when we use difflib.SequenceMatcher. I don't know how to fix this, since the strings in vim.current.buffer appear to be 'raw'. They are not encoded

[PATCH] D27520: [clang-tidy] Add check for redundant function pointer dereferences

2016-12-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Nice, the patch looks good to me. Comment at: docs/clang-tidy/checks/readability-redundant-function-ptr-dereference.rst:25 + int i = (*p)(10, 50); + Nit: a

r289460 - [CrashReproducer] Collect PCH included via -include-pch

2016-12-12 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Dec 12 13:28:25 2016 New Revision: 289460 URL: http://llvm.org/viewvc/llvm-project?rev=289460&view=rev Log: [CrashReproducer] Collect PCH included via -include-pch Collect the necessary input PCH files. Do not try to validate the AST before copying it out because if the c

r289459 - [Frontend] Use vfs for directory iteration while searching PCHs. NFCI

2016-12-12 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Dec 12 13:28:21 2016 New Revision: 289459 URL: http://llvm.org/viewvc/llvm-project?rev=289459&view=rev Log: [Frontend] Use vfs for directory iteration while searching PCHs. NFCI Use the vfs lookup instead of real filesytem and handle the case where -include-pch is a direct

r289458 - Fix typo and remove unnecessary statement.

2016-12-12 Thread Samuel Antao via cfe-commits
Author: sfantao Date: Mon Dec 12 13:26:31 2016 New Revision: 289458 URL: http://llvm.org/viewvc/llvm-project?rev=289458&view=rev Log: Fix typo and remove unnecessary statement. Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp URL: http:

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-12 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. @alexfh , friendly ping. I'm not in a huge rush on this or anything, but I don't want one or both of us to lose all context here... https://reviews.llvm.org/D27284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

Re: [PATCH] D27597: [DebugInfo] Restore test case for long double constants.

2016-12-12 Thread David Blaikie via cfe-commits
While it's possible to do arbitrary script things - we prefer nto to to ensure the tests are portable. (we have some custom implementations of common unix utilities for portability of those). In this case, can you xfail this on platforms that don't have the feature you want? rather than trying to

r289455 - Bring back note about not supporting global register variables.

2016-12-12 Thread Michael Kuperstein via cfe-commits
Author: mkuper Date: Mon Dec 12 13:11:39 2016 New Revision: 289455 URL: http://llvm.org/viewvc/llvm-project?rev=289455&view=rev Log: Bring back note about not supporting global register variables. This was accidentally removed in r260506, even though we only support non-allocatable global registe

[PATCH] D27473: Bring back note about not supporting global register variables

2016-12-12 Thread Michael Kuperstein via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289455: Bring back note about not supporting global register variables. (authored by mkuper). Changed prior to commit: https://reviews.llvm.org/D27473?vs=80450&id=81113#toc Repository: rL LLVM https

[PATCH] D24933: Enable configuration files in clang

2016-12-12 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: include/clang/Driver/Driver.h:287 + const std::string &getConfigFile() const { return ConfigFile; } + void setConfigFile(StringRef x, unsigned N) { +ConfigFile = x; x -> FileName Comment at: lib/Dr

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Filipe Cabecinhas via cfe-commits
Thanks Vedant! Andrew: does Android not support C++11? I don't understand why it wouldn't have these funcions. Thank you, Filipe On Mon, 12 Dec 2016 at 18:58, Vedant Kumar wrote: > > > > On Dec 12, 2016, at 10:17 AM, Andrew Ford via Phabricator < > revi...@reviews.llvm.org> wrote: > > > > > >

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Vedant Kumar via cfe-commits
> On Dec 12, 2016, at 10:17 AM, Andrew Ford via Phabricator > wrote: > > andrewford added a comment. > > This broke the build on android due to use of std::to_string. Would someone > mind changing it to llvm::to_string, I don't have commit access to change it > myself. Thanks! Should be don

r289452 - Avoid use of std::to_string. NFC.

2016-12-12 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Dec 12 12:47:33 2016 New Revision: 289452 URL: http://llvm.org/viewvc/llvm-project?rev=289452&view=rev Log: Avoid use of std::to_string. NFC. Apparently this routine isn't available on some Android platforms. See the mailing list thread re: D21695. Modified: cfe/tru

[PATCH] D27669: [clang-move] Use appendArgumentsAdjuster for adding extra arguments

2016-12-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: clang-move/tool/ClangMoveMain.cpp:109 OptionsParser.getSourcePathList()); + // Add "-fparse-all-comments" compile option to make clang parse all comments + Tool.appendArgumentsAdjuster(tooling::getInse

Re: r289285 - Fix unused variable warnings. NFCI.

2016-12-12 Thread David Blaikie via cfe-commits
On Fri, Dec 9, 2016 at 2:55 PM Simon Pilgrim via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rksimon > Date: Fri Dec 9 16:45:21 2016 > New Revision: 289285 > > URL: http://llvm.org/viewvc/llvm-project?rev=289285&view=rev > Log: > Fix unused variable warnings. NFCI. > > Modified: >

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Andrew Ford via Phabricator via cfe-commits
andrewford added a comment. This broke the build on android due to use of std::to_string. Would someone mind changing it to llvm::to_string, I don't have commit access to change it myself. Thanks! Repository: rL LLVM https://reviews.llvm.org/D21695 ___

[PATCH] D27555: [libcxx] [test] Fix MSVC warning C6001 "Using uninitialized memory".

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. Actually, the compiler bug was resolved as fixed earlier today. Verifying... https://reviews.llvm.org/D27555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

r289450 - Fix format and a few typos in comments.

2016-12-12 Thread Samuel Antao via cfe-commits
Author: sfantao Date: Mon Dec 12 12:00:20 2016 New Revision: 289450 URL: http://llvm.org/viewvc/llvm-project?rev=289450&view=rev Log: Fix format and a few typos in comments. Modified: cfe/trunk/include/clang-c/Index.h cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp cfe/trunk/lib/Sema/SemaOp

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 81103. JonasToth added a comment. fixes last review comments from alex Repository: rL LLVM https://reviews.llvm.org/D26167 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 3 inline comments as done. JonasToth added a comment. removed the function calls, a little doc tidy as well Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D27270: [libcxx] [test] Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 4/4.

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. Yeah, users are free to do this, which also triggers conversion warnings for us. I think I'll need to investigate actually fixing/suppressing them in our sources and abandoning this patch; leaving it open for now as a todo. https://reviews.llvm.org/D27270 _

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:86 + + Diag << FixItHint::CreateReplacement(CommaRange, ";") + << FixItHint::CreateReplacement(AfterCommaToVarNameRange, A `SourceLocation` can

[PATCH] D27555: [libcxx] [test] Fix MSVC warning C6001 "Using uninitialized memory".

2016-12-12 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added a comment. Hmm, would a pragma guarded by _MSC_VER be better? I can easily do that. I've tried to avoid cluttering the test with VC-specific pragmas, but I understand your concern about initializing too much memory. https://reviews.llvm.org/D27555

[PATCH] D27680: [CodeGen] Move lifetime.start of a variable when goto jumps back past its declaration

2016-12-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a subscriber: cfe-commits. ahatanak added a comment. Add cfe-commits. https://reviews.llvm.org/D27680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino updated this revision to Diff 81101. firolino marked an inline comment as done. firolino added a comment. Simplified fix-it hint generation. https://reviews.llvm.org/D27621 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/OneNamePerDeclarationCheck.cpp clang-ti

[PATCH] D26846: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types

2016-12-12 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. This looks good to me, I'll merge this today unless I hear otherwise. Repository: rL LLVM https://reviews.llvm.org/D26846 ___ cfe-commits mailing li

[PATCH] D26768: [analyzer] Improve VirtualCallChecker diagnostics and move to optin package.

2016-12-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D26768#619222, @malcolm.parsons wrote: > In https://reviews.llvm.org/D26768#618651, @dcoughlin wrote: > > > The definite false positives were cases where the programmer seemed aware > > of the semantics of virtual calls during construction/d

[PATCH] D27641: DebugInfo: Added support for Checksum debug info feature (Clang part)

2016-12-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Basic/SourceManager.cpp:1447 +void SourceManager::getChecksumMD5(FileID FID, std::string &Checksum) const { + bool Invalid; Let's move this whole thing to CGDebugInfo::getOrCreateFile. SourceManager isn't caching or

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-12 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/cppcoreguidelines/NoMallocCheck.cpp:54 + +void NoMallocCheck::handleAquisition(const CallExpr *AquisitionCall) { + diag(AquisitionCall->

r289446 - [Fix] Add missing include from r289444.

2016-12-12 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Mon Dec 12 10:43:40 2016 New Revision: 289446 URL: http://llvm.org/viewvc/llvm-project?rev=289446&view=rev Log: [Fix] Add missing include from r289444. Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp URL: http://llvm.org/viewvc/llvm

[PATCH] D21453: Add support for attribute "overallocated"

2016-12-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 81090. ahatanak added a comment. Address review comments. - Arrays marked "flexible_array" are now treated as flexible arrays. - __builtin_object_size returns a more accurate numbers for normal C99 flexible arrays (see test/CodeGen/object-size.c). Note tha

[PATCH] D27627: Allow target to specify default address space for codegen

2016-12-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. > Because, notably, if you do that, then an attempt to pass &x as an int* will > fail, which means this isn't really C++ anymore... and yet that appears to be > exactly what you want. How about when generating alloca instruction, I insert addrspacecast to the default ad

[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:9624 + if (getLangOpts().OpenCL && getLangOpts().OpenCLVersion >= 200) { +if (LHSIsNull && RHSType->isQueueT()) { getLangOpts().OpenCL is redundant because getLangOpts().OpenCLVersion is on

[PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Filipe Cabecinhas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289444: [clang] Version support for UBSan handlers (authored by filcab). Changed prior to commit: https://reviews.llvm.org/D21695?vs=61817&id=81089#toc Repository: rL LLVM https://reviews.llvm.org/D

r289444 - [clang] Version support for UBSan handlers

2016-12-12 Thread Filipe Cabecinhas via cfe-commits
Author: filcab Date: Mon Dec 12 10:18:40 2016 New Revision: 289444 URL: http://llvm.org/viewvc/llvm-project?rev=289444&view=rev Log: [clang] Version support for UBSan handlers This adds a way for us to version any UBSan handler by itself. The patch overrides D21289 for a better implementation (we

[PATCH] D27671: [OpenCL] Improve address space diagnostics.

2016-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D27671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

r289440 - [Driver] Attempt to fix new linux-ld tests on Windows

2016-12-12 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Mon Dec 12 10:04:37 2016 New Revision: 289440 URL: http://llvm.org/viewvc/llvm-project?rev=289440&view=rev Log: [Driver] Attempt to fix new linux-ld tests on Windows (broken by r289436) Modified: cfe/trunk/test/Driver/linux-ld.c Modified: cfe/trunk/test/Driver/linux-ld.

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8127 "invalid prototype, variadic arguments are not allowed in OpenCL">; +def err_requires_extension : Error< + "use of %select{declaration|type }0%1 requires %2 extension to be enabled">;

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino marked 2 inline comments as done. firolino added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:133 +VariableLocation.setBegin(tidy::utils::lexer::findLocationAfterToken( +VariableLocation.getEnd(), Tokens, *Result.Context)

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:133 +VariableLocation.setBegin(tidy::utils::lexer::findLocationAfterToken( +VariableLocation.getEnd(), Tokens, *Result.Context)); + } If you use `ArrayR

[PATCH] D25686: [Driver] Improve support for Gentoo arm*-hardfloat-*-*eabi triples

2016-12-12 Thread Michał Górny via Phabricator via cfe-commits
mgorny abandoned this revision. mgorny added a comment. I give up. I'm just going to complain to Gentoo ARM people a lot and maybe they'll fix their triples. https://reviews.llvm.org/D25686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D27501: clang-format-vsix: add command to format document

2016-12-12 Thread Antonio Maiorano via Phabricator via cfe-commits
amaiorano added inline comments. Comment at: tools/clang-format-vs/ClangFormat/ClangFormat.vsct:76 + + Clang Format Document + klimek wrote: > amaiorano wrote: > > klimek wrote: > > > hans wrote: > > > > amaiorano wrote: > > > > > hans wr

[PATCH] D26887: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)

2016-12-12 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289436: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config) (authored by mgorny). Changed prior to commit: https://reviews.llvm.org/D26887?vs=78623&id=81086#toc Repository: rL LLVM

[PATCH] D26887: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)

2016-12-12 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Thanks for the review. Committed now. https://reviews.llvm.org/D26887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Firat Kasmis via Phabricator via cfe-commits
firolino added a comment. In https://reviews.llvm.org/D27621#619649, @malcolm.parsons wrote: > The fixit construction looks overly complicated. Yes, you were right. I have changed a couple of things. It looks better now. Still working on a better getUserWrittenType. https://reviews.llvm.org/

r289436 - [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)

2016-12-12 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Mon Dec 12 09:07:43 2016 New Revision: 289436 URL: http://llvm.org/viewvc/llvm-project?rev=289436&view=rev Log: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config) Fix the gcc-config code to support multilib gcc installs properly. This solves two problems: -

[PATCH] D27535: [analyzer] Add ObjCPropertyChecker - check for autosynthesized copy-properties of mutable types.

2016-12-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 81083. NoQ added a comment. - Fix crashes on checking properties in categories. - Address both comments. https://reviews.llvm.org/D27535 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer

[PATCH] D26887: [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)

2016-12-12 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. I believe this is fine. https://reviews.llvm.org/D26887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D27501: clang-format-vsix: add command to format document

2016-12-12 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. I also think it makes the code nicer by breaking out the right functions. Thanks! Comment at: tools/clang-format-vs/ClangFormat/ClangFormat.vsct:76 + +

r289433 - Use function_ref to avoid allocation in std::function. NFC.

2016-12-12 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Dec 12 08:41:19 2016 New Revision: 289433 URL: http://llvm.org/viewvc/llvm-project?rev=289433&view=rev Log: Use function_ref to avoid allocation in std::function. NFC. Modified: cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/lib/Sema/SemaChecking.cpp Modified: cfe/tr

[PATCH] D27674: [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee.

2016-12-12 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289431: [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D27674?vs=81078&id=81081#toc Repository: rL

r289431 - [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee.

2016-12-12 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Dec 12 08:12:10 2016 New Revision: 289431 URL: http://llvm.org/viewvc/llvm-project?rev=289431&view=rev Log: [StaticAnalysis] Remove unnecessary parameter in CallGraphNode::addCallee. Summary: Remove the CallGraph in addCallee as it is not used in addCallee. It decouples a

[PATCH] D27673: [clang-move] Only move used helper declarations.

2016-12-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 81079. hokein added a comment. Fix code style. https://reviews.llvm.org/D27673 Files: clang-move/CMakeLists.txt clang-move/ClangMove.cpp clang-move/ClangMove.h clang-move/UsedHelperDeclFinder.cpp clang-move/UsedHelperDeclFinder.h test/clang-move/

  1   2   >