[PATCH] D26452: Make output of -ast-print a valid C++ code.

2016-11-10 Thread Serge Pavlov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286439: Make output of -ast-print a valid C++ code. (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D26452?vs=77354&id=77452#toc Repository: rL LLVM https://reviews.llvm.o

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

2016-11-10 Thread Serge Pavlov via cfe-commits
I don't see any reason why we should adhere particular solution. If you can solve the problem with another approach, please go forward. Thanks, --Serge 2016-11-10 10:12 GMT+07:00 Akira Hatanaka : > ahatanak added a comment. > > Do you think we can transform the Exprs for the uninstantiated defau

[PATCH] D26453: [clang-tidy] Remove duplicated check from move-constructor-init

2016-11-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 77456. malcolm.parsons added a comment. Store new option. https://reviews.llvm.org/D26453 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/misc/MoveConstructorInitCheck.cpp clang-tidy/misc/MoveConstructorInitCheck.h clang-tidy/modernize/

Re: [clang-tools-extra] r286222 - [clang-tidy] clang-analyzer-alpha* checks are not registered, so there's no need to disable them

2016-11-10 Thread Malcolm Parsons via cfe-commits
On 9 November 2016 at 18:50, Devin Coughlin wrote: > We agree that this is a valuable checker and are committed to getting it out > of alpha. This check is in alpha because: > > a) The diagnostic experience is not very good. It reports a call path > directly in the diagnostic message (for examp

[PATCH] D23130: [Clang-tidy] Add a check for definitions in the global namespace.

2016-11-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/google/GlobalNamesCheck.cpp:96 +// main() should be in the global namespace. +if (FDecl->isMain()) + return; Should `isMSVCRTEntryPoint()` be checked too? https://reviews.llvm.org/D23130

[PATCH] D26406: Add -Wduplicate-protocol for existing diagnostic

2016-11-10 Thread Alex Lorenz via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D26406#590741, @kastiglione wrote: > Thanks @arphaman, are you able to commit this? Yes, I can commit this for you. Let me know what commit message I should use. https://reviews.llvm.org/D26406 __

[PATCH] D24235: [OpenCL] Improve double literal handling

2016-11-10 Thread Sven van Haastregt via cfe-commits
svenvh added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3431 +.getSupportedOpenCLOpts() +.cl_khr_fp64) || getOpenCLOptions().cl_khr_fp64)) { yaxunl wrote: > neil.hickey wrote: > > yaxunl

[PATCH] D26415: [XRay] Support AArch64 in Clang

2016-11-10 Thread Serge Rogatch via cfe-commits
rSerge added inline comments. Comment at: lib/Driver/Tools.cpp:4903-4906 if (Triple.getOS() == llvm::Triple::Linux && (Triple.getArch() == llvm::Triple::arm || - Triple.getArch() == llvm::Triple::x86_64)) { + Triple.getArch() == llvm::Triple::x86_64

[PATCH] D25985: [analyzer] Export coverage information from the analyzer.

2016-11-10 Thread Gábor Horváth via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:262 + +static void dumpCoverageInfo(llvm::SmallVectorImpl &Path, + SourceManager &SM) { zaks.anna wrote: > xazax.hun wrote: > > zaks.anna wrote: > > >

[PATCH] D26415: [XRay] Support AArch64 in Clang

2016-11-10 Thread Dean Michael Berris via cfe-commits
dberris added inline comments. Comment at: lib/Driver/Tools.cpp:4903-4906 if (Triple.getOS() == llvm::Triple::Linux && (Triple.getArch() == llvm::Triple::arm || - Triple.getArch() == llvm::Triple::x86_64)) { + Triple.getArch() == llvm::Triple::x86_64

[clang-tools-extra] r286449 - Fix -Wdocumentation warning

2016-11-10 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu Nov 10 07:54:39 2016 New Revision: 286449 URL: http://llvm.org/viewvc/llvm-project?rev=286449&view=rev Log: Fix -Wdocumentation warning Modified: clang-tools-extra/trunk/clang-move/ClangMove.h Modified: clang-tools-extra/trunk/clang-move/ClangMove.h URL: http://llv

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-10 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:423 + +void IteratorPastEndChecker::handleComparison(CheckerContext &C, + const SVal &LVal, baloghadamsoftwar

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-10 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:204 + CheckerContext &C) const { + const auto *ThisExpr = COCE->getArg(0); + NoQ wrote: > This code definitely d

[PATCH] D23130: [Clang-tidy] Add a check for definitions in the global namespace.

2016-11-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/google-global-names.cpp:13-14 +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: 'i' declared in the global namespace +extern int ii = 0; +// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: 'ii' declared in the global namespa

r286455 - [PowerPC] Implement plain VSX load/store builtins.

2016-11-10 Thread Tony Jiang via cfe-commits
Author: jtony Date: Thu Nov 10 08:39:56 2016 New Revision: 286455 URL: http://llvm.org/viewvc/llvm-project?rev=286455&view=rev Log: [PowerPC] Implement plain VSX load/store builtins. Implement all the different 24 overloads for vec_xl and vec_xst. Modified: cfe/trunk/lib/Headers/altivec.h

[PATCH] D26459: Fix mismatched enum value name and diagnostic text.

2016-11-10 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for this! https://reviews.llvm.org/D26459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D25764: Add end location of loop to loop metadata.

2016-11-10 Thread Amara Emerson via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286456: Add the loop end location to the loop metadata. This additional information (authored by aemerson). Changed prior to commit: https://reviews.llvm.org/D25764?vs=77317&id=77478#toc Repository:

r286456 - Add the loop end location to the loop metadata. This additional information

2016-11-10 Thread Amara Emerson via cfe-commits
Author: aemerson Date: Thu Nov 10 08:44:30 2016 New Revision: 286456 URL: http://llvm.org/viewvc/llvm-project?rev=286456&view=rev Log: Add the loop end location to the loop metadata. This additional information can be used to improve the locations when generating remarks for loops. Depends on the

[PATCH] D26454: Implement no_sanitize_address for global vars

2016-11-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: lib/CodeGen/SanitizerMetadata.cpp:68 + bool IsBlacklisted = false; + for (auto Attr : D.specific_attrs()) +if (Attr->getMask() & SanitizerKind::Address) Should use `const auto *` (feel free to change the othe

[PATCH] D26503: [Parser][ObjC] Improve diagnostics and recovery when C++ keywords are used as identifiers in Objective-C++

2016-11-10 Thread Alex Lorenz via cfe-commits
arphaman created this revision. arphaman added reviewers: manmanren, bruno. arphaman added a subscriber: cfe-commits. arphaman set the repository for this revision to rL LLVM. This patch improves the 'expected identifier' errors that are presented when a C++ keyword is used as an identifier in Ob

[PATCH] D26479: [PowerPC] Implement remaining permute builtins in altivec.h - Clang portion

2016-11-10 Thread Ehsan Amiri via cfe-commits
amehsan added a comment. I actually wanted to check some surrounding guards. Repository: rL LLVM https://reviews.llvm.org/D26479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26479: [PowerPC] Implement remaining permute builtins in altivec.h - Clang portion

2016-11-10 Thread Ehsan Amiri via cfe-commits
amehsan added a comment. more context? Repository: rL LLVM https://reviews.llvm.org/D26479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26163: [clang-format] Fix PR30527: Regression when clang-format insert spaces in [] when in template

2016-11-10 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Thank you! https://reviews.llvm.org/D26163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D25659: [clang-tidy] Avoid running aliased checks twice

2016-11-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D25659#589386, @malcolm.parsons wrote: > In https://reviews.llvm.org/D25659#588658, @alexfh wrote: > > > I think, silently choosing one of the checks may be confusing and > > counter-intuitive. Should we just warn in case we see the same

[PATCH] D26507: [OpenCL] Change to clk_event parameter in enqueue_kernel

2016-11-10 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: yaxunl. Anastasia added a subscriber: cfe-commits. - Accept NULL pointer as a valid parameter value for clk_event - Generate clk_events_t arguments of internal __enqueue_kernel_XXX function to be pointers in generic address space htt

[PATCH] D26274: clang-format: [JS] do not break after declare namespace.

2016-11-10 Thread Daniel Jasper 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/D26274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D21298: [Clang-tidy] delete null check

2016-11-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/DeleteNullPointerCheck.cpp:54 + diag(IfWithDelete->getLocStart(), + "if statement is unnecessary (deleting null pointer has no effect)"); + std::string ReplacementText = Lexer::getSourceText( --

[clang-tools-extra] r286466 - [clang-tidy] Add missing meta refresh for cert-msc30-c doc. NFC

2016-11-10 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 10 10:19:17 2016 New Revision: 286466 URL: http://llvm.org/viewvc/llvm-project?rev=286466&view=rev Log: [clang-tidy] Add missing meta refresh for cert-msc30-c doc. NFC Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/cert-msc30-c.rst Modified: cl

[PATCH] D26448: Avoid -Wshadow warnings for shadowed variables that aren't captured by lambdas with a default capture specifier

2016-11-10 Thread Alex Lorenz via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286465: [Sema] Avoid -Wshadow warnings for shadowed variables that (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D26448?vs=77335&id=77492#toc Repository: rL LLVM https://

r286465 - [Sema] Avoid -Wshadow warnings for shadowed variables that

2016-11-10 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu Nov 10 10:19:11 2016 New Revision: 286465 URL: http://llvm.org/viewvc/llvm-project?rev=286465&view=rev Log: [Sema] Avoid -Wshadow warnings for shadowed variables that aren't captured by lambdas with a default capture specifier This commit is a follow-up to r286354. It a

r286468 - clang-format: [JS] do not break after declare namespace.

2016-11-10 Thread Martin Probst via cfe-commits
Author: mprobst Date: Thu Nov 10 10:21:02 2016 New Revision: 286468 URL: http://llvm.org/viewvc/llvm-project?rev=286468&view=rev Log: clang-format: [JS] do not break after declare namespace. Summary: See TypeScript grammar for tokens following 'declare': https://github.com/Microsoft/TypeScript/bl

r286467 - clang-format: [JS] do not break after declare namespace.

2016-11-10 Thread Martin Probst via cfe-commits
Author: mprobst Date: Thu Nov 10 10:20:58 2016 New Revision: 286467 URL: http://llvm.org/viewvc/llvm-project?rev=286467&view=rev Log: clang-format: [JS] do not break after declare namespace. See TypeScript grammar for tokens following 'declare': https://github.com/Microsoft/TypeScript/blob/master

r286469 - drop kw_module from ASI protection block

2016-11-10 Thread Martin Probst via cfe-commits
Author: mprobst Date: Thu Nov 10 10:21:04 2016 New Revision: 286469 URL: http://llvm.org/viewvc/llvm-project?rev=286469&view=rev Log: drop kw_module from ASI protection block Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp URL: http://llvm

[PATCH] D26479: [PowerPC] Implement remaining permute builtins in altivec.h - Clang portion

2016-11-10 Thread Nemanja Ivanovic via cfe-commits
nemanjai added a comment. In https://reviews.llvm.org/D26479#591723, @amehsan wrote: > more context? Really sorry. It appears that I uploaded the wrong patch file. Updating now. Repository: rL LLVM https://reviews.llvm.org/D26479 ___ cfe-commi

[PATCH] D26274: clang-format: [JS] do not break after declare namespace.

2016-11-10 Thread Martin Probst via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286468: clang-format: [JS] do not break after declare namespace. (authored by mprobst). Changed prior to commit: https://reviews.llvm.org/D26274?vs=76831&id=77493#toc Repository: rL LLVM https://rev

[PATCH] D26479: [PowerPC] Implement remaining permute builtins in altivec.h - Clang portion

2016-11-10 Thread Nemanja Ivanovic via cfe-commits
nemanjai updated this revision to Diff 77494. nemanjai added a comment. Accidentally uploaded the wrong patch so it was missing full context. Repository: rL LLVM https://reviews.llvm.org/D26479 Files: include/clang/Basic/BuiltinsPPC.def lib/Headers/altivec.h test/CodeGen/builtins-ppc-c

[PATCH] D24894: [clang-tidy] Prefer transparent functors to non-transparent one.

2016-11-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseTransparentFunctorsCheck.cpp:71 + +static const StringRef Message = "prefer transparent functors (%0)"; + You should quote the %0 to clarify that you're referring to syntax. ==

Re: [clang-tools-extra] r286466 - [clang-tidy] Add missing meta refresh for cert-msc30-c doc. NFC

2016-11-10 Thread Aaron Ballman via cfe-commits
On Thu, Nov 10, 2016 at 11:19 AM, Malcolm Parsons via cfe-commits wrote: > Author: malcolm.parsons > Date: Thu Nov 10 10:19:17 2016 > New Revision: 286466 > > URL: http://llvm.org/viewvc/llvm-project?rev=286466&view=rev > Log: > [clang-tidy] Add missing meta refresh for cert-msc30-c doc. NFC Than

[PATCH] D26138: [clang-tidy] Add modernize-use-equals-delete check

2016-11-10 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you! Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.cpp:58 + << FixItHint::CreateInsertion(StartLoc, "public: ") + << FixItHint::Cr

[PATCH] D26509: [OpenCL] Fix integer parameters of enqueue_kernel

2016-11-10 Thread Anastasia Stulova via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: yaxunl. Anastasia added a subscriber: cfe-commits. Parameters representing number of events as well as sizes of enqueued block arguments in enqueue_kernel function are specified as uint type. This prevents passing sizeof(int) type expr

[PATCH] D23657: Remove some false positives when taking the address of packed members

2016-11-10 Thread Roger Ferrer Ibanez via cfe-commits
rogfer01 updated this revision to Diff 77498. rogfer01 added a comment. - Address comments. - Rebase test with current trunk - Make the check resilient under errors If no comments arise from this change I will be commiting it Monday next week. https://reviews.llvm.org/D23657 Files: include/c

[clang-tools-extra] r286472 - [clang-tidy] Add modernize-use-equals-delete check

2016-11-10 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 10 10:46:59 2016 New Revision: 286472 URL: http://llvm.org/viewvc/llvm-project?rev=286472&view=rev Log: [clang-tidy] Add modernize-use-equals-delete check Summary: Fixes PR27872 Reviewers: klimek, hokein, alexfh, aaron.ballman Subscribers: Prazek, Eugene.Ze

[PATCH] D26138: [clang-tidy] Add modernize-use-equals-delete check

2016-11-10 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286472: [clang-tidy] Add modernize-use-equals-delete check (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26138?vs=76971&id=77500#toc Repository: rL LLVM https://r

[libcxx] r286474 - Protect bitset tests under libcpp-no-exceptions

2016-11-10 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Thu Nov 10 10:54:55 2016 New Revision: 286474 URL: http://llvm.org/viewvc/llvm-project?rev=286474&view=rev Log: Protect bitset tests under libcpp-no-exceptions Bitset tests feature a sequence of tests of increasing bitset sizes, but these tests rely on exceptions when the b

[PATCH] D26458: Protect nested-exceptions tests under no-exceptions

2016-11-10 Thread Roger Ferrer Ibanez via cfe-commits
rogfer01 added a comment. @rmaprath well each case is testing a different special member: the assignment operator, the copy constructor and the default constructor. My feeling is that at least the non-throwing part must be tested under no-exceptions. But I understand, that this class is probabl

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-11-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, alexfh, angelgarcia. malcolm.parsons added a subscriber: cfe-commits. Herald added a subscriber: mgorny. https://reviews.llvm.org/D26511 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/Moder

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-11-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:58 "modernize-use-bool-literals"); -CheckFactories.registerCheck("modernize-use-default"); + CheckFactories.registerCheck("modernize-use-equals-default"); CheckFact

[PATCH] D26512: Protect std::ios tests under libcpp-no-exceptions

2016-11-10 Thread Roger Ferrer Ibanez via cfe-commits
rogfer01 created this revision. rogfer01 added reviewers: EricWF, mclow.lists, rmaprath. rogfer01 added a subscriber: cfe-commits. Skip tests that expect an exception be thrown. https://reviews.llvm.org/D26512 Files: test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp

[PATCH] D26512: Protect std::ios tests under libcpp-no-exceptions

2016-11-10 Thread Roger Ferrer Ibanez via cfe-commits
rogfer01 added inline comments. Comment at: test/std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp:171-173 +#else +ios1.copyfmt(ios2); +#endif This is a bit unexpected. It looks like if the copyfmt, even if it throws, were able to copy

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-11-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:58 "modernize-use-bool-literals"); -CheckFactories.registerCheck("modernize-use-default"); + CheckFactories.registerCheck("modernize-use-equals-default"); CheckFa

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-11-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:58 "modernize-use-bool-literals"); -CheckFactories.registerCheck("modernize-use-default"); + CheckFactories.registerCheck("modernize-use-equals-default"); CheckFact

[PATCH] D25985: [analyzer] Export coverage information from the analyzer.

2016-11-10 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:262 + +static void dumpCoverageInfo(llvm::SmallVectorImpl &Path, + SourceManager &SM) { xazax.hun wrote: > zaks.anna wrote: > > xazax.hun wrote: > > >

[PATCH] D26406: Add -Wduplicate-protocol for existing diagnostic

2016-11-10 Thread Dave Lee via cfe-commits
kastiglione added a comment. @arphaman Is the summary here sufficient, or should I elaborate in some way? I'm fine with this summary if you are. https://reviews.llvm.org/D26406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-11-10 Thread Mehdi AMINI via cfe-commits
mehdi_amini added inline comments. Comment at: clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp:396 + // Calculate the name of the `NsDecl` after it is moved to new namespace. + std::string OldNs = NsDecl->getQualifiedNameAsString(); + llvm::StringRef Postfix = Old

[PATCH] D26406: Add -Wduplicate-protocol for existing diagnostic

2016-11-10 Thread Alex Lorenz via cfe-commits
arphaman added a comment. It seems sufficient enough, I will commit it with the summary. Thanks! https://reviews.llvm.org/D26406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r286485 - [change-namespace] dyn_cast -> cast.

2016-11-10 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Nov 10 12:15:34 2016 New Revision: 286485 URL: http://llvm.org/viewvc/llvm-project?rev=286485&view=rev Log: [change-namespace] dyn_cast -> cast. Modified: clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp Modified: clang-tools-extra/trunk/change-namespace/

[PATCH] D26456: Handle adding new nested namespace in old namespace.

2016-11-10 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM with two nits. Comment at: change-namespace/ChangeNamespace.cpp:475 + // If there is no outer namespace (i.e. DiffOldNamespace is empty), the new + // namespace will b

[PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-11-10 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp:396 + // Calculate the name of the `NsDecl` after it is moved to new namespace. + std::string OldNs = NsDecl->getQualifiedNameAsString(); + llvm::StringRef Postfix = OldNs; -

[PATCH] D24933: Enable configuration files in clang

2016-11-10 Thread Serge Pavlov via cfe-commits
sepavloff added a comment. >> Default config file is searched for only in the directory where clang >> executable resides. It allows SDK suppliers to customize compiler, for >> instance by turning off unneeded warnings, by providing their own clang.cfg. >> On the other hand developers cannot by

[PATCH] D26456: Handle adding new nested namespace in old namespace.

2016-11-10 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 77509. ioeric added a comment. - Address comments. https://reviews.llvm.org/D26456 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespace/ChangeNamespaceTests.cpp ===

[PATCH] D26456: Handle adding new nested namespace in old namespace.

2016-11-10 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 77511. ioeric added a comment. - Merged origin/master https://reviews.llvm.org/D26456 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespace/ChangeNamespaceTests.cpp

[clang-tools-extra] r286486 - Handle adding new nested namespace in old namespace.

2016-11-10 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Nov 10 12:29:01 2016 New Revision: 286486 URL: http://llvm.org/viewvc/llvm-project?rev=286486&view=rev Log: Handle adding new nested namespace in old namespace. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26456 Modified:

r286487 - Add -Wduplicate-protocol for existing diagnostic

2016-11-10 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu Nov 10 12:30:26 2016 New Revision: 286487 URL: http://llvm.org/viewvc/llvm-project?rev=286487&view=rev Log: Add -Wduplicate-protocol for existing diagnostic Expose a warning flag for warn_duplicate_protocol_def. This allows control over the severity of duplicate protoco

[PATCH] D26406: Add -Wduplicate-protocol for existing diagnostic

2016-11-10 Thread Alex Lorenz via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286487: Add -Wduplicate-protocol for existing diagnostic (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D26406?vs=77232&id=77514#toc Repository: rL LLVM https://reviews.ll

[PATCH] D26456: Handle adding new nested namespace in old namespace.

2016-11-10 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286486: Handle adding new nested namespace in old namespace. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D26456?vs=77511&id=77513#toc Repository: rL LLVM https://reviews.

[PATCH] D26493: [clang-move] Make the output code look more pretty.

2016-11-10 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: clang-move/ClangMove.cpp:273 } +bool IsNamespaceStart = false; while (DeclIt != DeclNamespaces.end()) { It's been a while since the last time I reviewed this, and I need to struggle to understand what Curre

[PATCH] D25985: [analyzer] Export coverage information from the analyzer.

2016-11-10 Thread Artem Dergachev via cfe-commits
NoQ added a comment. Maybe you could instead make a checker that subscribes for `checkEndAnalysis` and scans the provided `ExplodedGraph`'s `nodes_begin()..nodes_end()` for visited statement-based program points (as in `PathDiagnosticLocation::getStmt(N)`)? This should give you per-statement p

[PATCH] D26491: Define __ANDROID_API__ when specified as part of an Android target.

2016-11-10 Thread Pirama Arumuga Nainar via cfe-commits
pirama accepted this revision. pirama added a reviewer: pirama. pirama added a comment. This revision is now accepted and ready to land. The bug points back to this Phab page instead of a bug. LGTM otherwise. https://reviews.llvm.org/D26491 ___ cfe

[PATCH] D26479: [PowerPC] Implement remaining permute builtins in altivec.h - Clang portion

2016-11-10 Thread Kit Barton via cfe-commits
kbarton accepted this revision. kbarton added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D26479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D26515: [clang-move] Abstract a ClassMather for matching class declarations.

2016-11-10 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. hokein added a subscriber: cfe-commits. No functionality change. This is a refactoring patch, which makes the code more readable and easy to extend it to support more types. https://reviews.llvm.org/D26515 Files: clang-move/Clang

[PATCH] D26515: [clang-move] Abstract a ClassMather for matching class declarations.

2016-11-10 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: clang-move/ClangMove.cpp:144 + void run(const ast_matchers::MatchFinder::MatchResult &Result) override { +if (const auto *CMD = +Result.Nodes.getNodeAs("class_method")) { It'd be more readable if you pull

[PATCH] D26196: Add support for non-zero null pointers

2016-11-10 Thread Yaxun Liu via cfe-commits
yaxunl marked 12 inline comments as done. yaxunl added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7040 + auto AS = PT->getAddressSpace(); + return AS != Ctx.getTargetAddressSpace(LangAS::opencl_local) && AS != 0; +} rjmccall wrote: > This check is de

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-11-10 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:219 + + assert(LCtx->getKind() == LocationContext::StackFrame && + "Function does not begin with stack frame context"); a.sidorin wrote: > `isa(LCtx)`? >

[PATCH] D26515: [clang-move] Abstract a ClassMather for matching class declarations.

2016-11-10 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 77521. hokein marked 3 inline comments as done. hokein added a comment. Address comments. https://reviews.llvm.org/D26515 Files: clang-move/ClangMove.cpp clang-move/ClangMove.h Index: clang-move/ClangMove.h ==

[PATCH] D26515: [clang-move] Abstract a ClassMather for matching class declarations.

2016-11-10 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-move/ClangMove.cpp:144 + void run(const ast_matchers::MatchFinder::MatchResult &Result) override { +if (const auto *CMD = +Result.Nodes.getNodeAs("class_method")) { ioeric wrote: > It'd be more read

[PATCH] D26442: [analyzer] Fix crash on getSVal: handle case of CompoundVal

2016-11-10 Thread Artem Dergachev via cfe-commits
NoQ added a comment. Wow, this crash must have been hard to notice! I think we shouldn't be default-binding non-lazy compound values. Normally we unpack them into field bindings right away, but it seems that nobody cared to implement this for unions. The current crash goes through `RegionStore

[PATCH] D26491: Define __ANDROID_API__ when specified as part of an Android target.

2016-11-10 Thread Evgeniy Stepanov via cfe-commits
eugenis accepted this revision. eugenis added a reviewer: eugenis. eugenis added a comment. Looks great! https://reviews.llvm.org/D26491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D26515: [clang-move] Abstract a ClassMather for matching class declarations.

2016-11-10 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: clang-move/ClangMove.cpp:144 + void run(const ast_matchers::MatchFinder::MatchResult &Result) override { +if (const auto *CMD = +Result.Nodes.getNodeAs("class_method")) { hokein wrote: > ioeric wrote: > >

r286494 - Correcting a documentation formatting bug; NFC.

2016-11-10 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu Nov 10 13:45:49 2016 New Revision: 286494 URL: http://llvm.org/viewvc/llvm-project?rev=286494&view=rev Log: Correcting a documentation formatting bug; NFC. Modified: cfe/trunk/include/clang/Basic/AttrDocs.td Modified: cfe/trunk/include/clang/Basic/AttrDocs.td U

[PATCH] D26196: Add support for non-zero null pointers

2016-11-10 Thread Yaxun Liu via cfe-commits
yaxunl updated this revision to Diff 77525. yaxunl marked an inline comment as done. yaxunl added a comment. Changed APValue to differentiate with null pointer and pointers casted from integer. Fixed casting integer to pointer. Refactored isNullPtrZero to use just QualType as parameter. Added t

[PATCH] D26415: [XRay] Support AArch64 in Clang

2016-11-10 Thread Serge Rogatch via cfe-commits
rSerge updated this revision to Diff 77537. https://reviews.llvm.org/D26415 Files: lib/Driver/Tools.cpp test/Driver/XRay/xray-instrument-cpu.c test/Driver/XRay/xray-instrument-os.c Index: test/Driver/XRay/xray-instrument-os.c ===

[PATCH] D26415: [XRay] Support AArch64 in Clang

2016-11-10 Thread Serge Rogatch via cfe-commits
rSerge marked 5 inline comments as done. rSerge added inline comments. Comment at: lib/Driver/Tools.cpp:4903-4906 if (Triple.getOS() == llvm::Triple::Linux && (Triple.getArch() == llvm::Triple::arm || - Triple.getArch() == llvm::Triple::x86_64)) { +

[PATCH] D26519: [PowerPC] Implement BE VSX load/store builtins - clang portion.

2016-11-10 Thread Tony Jiang via cfe-commits
jtony created this revision. jtony added reviewers: nemanjai, amehsan, kbarton, sfertile, syzaara, lei. jtony added subscribers: cfe-commits, echristo, llvm-commits. This patch implements all the overloads for vec_xl_be and vec_xst_be. On BE, they behaves exactly the same with vec_xl and vec_xst,

r286500 - Clean up uses of unique_ptr for RAII objects. NFC.

2016-11-10 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Nov 10 14:43:52 2016 New Revision: 286500 URL: http://llvm.org/viewvc/llvm-project?rev=286500&view=rev Log: Clean up uses of unique_ptr for RAII objects. NFC. - EnterExpressionEvaluationContext allows you to specify whether you *actually* want to enter an evaluation conte

[PATCH] D26163: [clang-format] Fix PR30527: Regression when clang-format insert spaces in [] when in template

2016-11-10 Thread Branko Kokanovic via cfe-commits
branko added a comment. Thanks. @djasper - can you commit this for me, please? https://reviews.llvm.org/D26163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26520: [PowerPC] Implement BE VSX load/store builtins - llvm portion.

2016-11-10 Thread Tony Jiang via cfe-commits
jtony created this revision. jtony added reviewers: nemanjai, sfertile, syzaara, lei, kbarton, amehsan. jtony added subscribers: llvm-commits, cfe-commits, echristo. This patch implements all the overloads for vec_xl_be and vec_xst_be. On BE, they behaves exactly the same with vec_xl and vec_xst,

[PATCH] D24933: Enable configuration files in clang

2016-11-10 Thread Hans Wennborg via cfe-commits
hans added a comment. In https://reviews.llvm.org/D24933#591943, @sepavloff wrote: > >> Default config file is searched for only in the directory where clang > >> executable resides. It allows SDK suppliers to customize compiler, for > >> instance by turning off unneeded warnings, by providing

[PATCH] D26431: [WebAssembly] Define __unix__ as part of the wasm target

2016-11-10 Thread Jacob Gravelle via cfe-commits
jgravelle-google abandoned this revision. jgravelle-google added a comment. Abandoning in favor of https://github.com/kripken/emscripten/pull/4718 https://reviews.llvm.org/D26431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D26522: Improve handling of __FUNCTION__ and other predefined expression for Objective-C Blocks

2016-11-10 Thread Mehdi AMINI via cfe-commits
mehdi_amini created this revision. mehdi_amini added a reviewer: arphaman. mehdi_amini added a subscriber: cfe-commits. Instead of always displaying the mangled name, try to do better and get something closer to regular functions. https://reviews.llvm.org/D26522 Files: clang/lib/AST/Expr.cpp

[PATCH] D26196: Add support for non-zero null pointers

2016-11-10 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7040 + auto AS = PT->getAddressSpace(); + return AS != Ctx.getTargetAddressSpace(LangAS::opencl_local) && AS != 0; +} yaxunl wrote: > rjmccall wrote: > > This check is definitely not correct;

r286506 - [Sema] Range-ify for loop, add period to comment. NFC.

2016-11-10 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Nov 10 15:47:12 2016 New Revision: 286506 URL: http://llvm.org/viewvc/llvm-project?rev=286506&view=rev Log: [Sema] Range-ify for loop, add period to comment. NFC. Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/

[PATCH] D26163: [clang-format] Fix PR30527: Regression when clang-format insert spaces in [] when in template

2016-11-10 Thread Nico Weber via cfe-commits
thakis closed this revision. thakis added a comment. Landed in r286507. Thanks! https://reviews.llvm.org/D26163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r286507 - [clang-format] Fix PR30527: Regression when clang-format insert spaces in [] when in template

2016-11-10 Thread Nico Weber via cfe-commits
Author: nico Date: Thu Nov 10 15:49:25 2016 New Revision: 286507 URL: http://llvm.org/viewvc/llvm-project?rev=286507&view=rev Log: [clang-format] Fix PR30527: Regression when clang-format insert spaces in [] when in template Actual regression was introduced in r272668. This revision fixes JS scr

r286512 - [test] Remove implicit deps on libLTO.dylib on Darwin (NFC)

2016-11-10 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Nov 10 16:31:06 2016 New Revision: 286512 URL: http://llvm.org/viewvc/llvm-project?rev=286512&view=rev Log: [test] Remove implicit deps on libLTO.dylib on Darwin (NFC) This un-breaks the `check-clang` target. Modified: cfe/trunk/test/Driver/nostdlib.c cfe/trunk/

r286518 - [index] Add SymbolSubKind for the GKInspectable annotation.

2016-11-10 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Thu Nov 10 17:27:11 2016 New Revision: 286518 URL: http://llvm.org/viewvc/llvm-project?rev=286518&view=rev Log: [index] Add SymbolSubKind for the GKInspectable annotation. Modified: cfe/trunk/include/clang/Index/IndexSymbol.h cfe/trunk/lib/Index/IndexSymbol.cpp

r286522 - Don't require nullability on 'va_list'.

2016-11-10 Thread Jordan Rose via cfe-commits
Author: jrose Date: Thu Nov 10 17:28:34 2016 New Revision: 286522 URL: http://llvm.org/viewvc/llvm-project?rev=286522&view=rev Log: Don't require nullability on 'va_list'. There are many non-portable typedefs, but va_list is one that nobody ever thinks of as a pointer or an array. (When's the las

r286521 - Warn when 'assume_nonnull' infers nullability within an array.

2016-11-10 Thread Jordan Rose via cfe-commits
Author: jrose Date: Thu Nov 10 17:28:30 2016 New Revision: 286521 URL: http://llvm.org/viewvc/llvm-project?rev=286521&view=rev Log: Warn when 'assume_nonnull' infers nullability within an array. ...or within a reference. Both of these add an extra level of indirection that make us less certain th

r286520 - Add -Wnullability-completeness-on-arrays.

2016-11-10 Thread Jordan Rose via cfe-commits
Author: jrose Date: Thu Nov 10 17:28:26 2016 New Revision: 286520 URL: http://llvm.org/viewvc/llvm-project?rev=286520&view=rev Log: Add -Wnullability-completeness-on-arrays. This is an addition to (and sub-warning of) -Wnullability-completeness that warns when an array parameter is missing nullab

r286519 - Accept nullability qualifiers on array parameters.

2016-11-10 Thread Jordan Rose via cfe-commits
Author: jrose Date: Thu Nov 10 17:28:17 2016 New Revision: 286519 URL: http://llvm.org/viewvc/llvm-project?rev=286519&view=rev Log: Accept nullability qualifiers on array parameters. Since array parameters decay to pointers, '_Nullable' and friends should be available for use there as well. This

[PATCH] D26415: [XRay] Support AArch64 in Clang

2016-11-10 Thread Dean Michael Berris via cfe-commits
dberris added inline comments. Comment at: lib/Driver/Tools.cpp:4903-4906 +if (Triple.getOS() != llvm::Triple::Linux) + D.Diag(diag::err_drv_clang_unsupported) + << (std::string(XRayInstrumentOption) + " on non-Linux target OS."); +switch (Triple.getArch())

  1   2   >