Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-05 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1654 @@ +1653,3 @@ +UnwrappedLines.push_back(SmallVector()); + } + That I don't understand. Almost all fixers (cleaning up commas, constructor initializers, etc.) will only ever look at a singl

Re: [PATCH] D18808: Use the NoDebug emission kind to identify compile units that no debug info should be created from.

2016-04-05 Thread Eric Christopher via cfe-commits
echristo added inline comments. Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:477-479 @@ -476,2 +476,5 @@ + unsigned DebugCUs = 0; for (MDNode *N : CU_Nodes->operands()) { auto *CUNode = cast(N); +if (CUNode->getEmissionKind() == DICompileUnit::NoDebug) + con

[PATCH] D18815: [ObjC] Enter a new evaluation context before calling BuildBlockForLambdaConversion.

2016-04-05 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a subscriber: cfe-commits. Currently, when clang compiles the following code, id test() { return @{@"a": [](){}, @"b": [](){}}; } it builds an AST that is incorrect: ReturnStmt 0x10d080448 `-ExprWithCleanups 0x10d080428 |-cleanup Block 0x10d0

Re: [PATCH] D18808: Use the NoDebug emission kind to identify compile units that no debug info should be created from.

2016-04-05 Thread Duncan P. N. Exon Smith via cfe-commits
IR changes LGTM, if you add the missing verifier check (I'm surprised this *ever* passed the verifier...) Someone else will have to look at DwarfDebug.cpp. > On 2016-Apr-05, at 16:55, Adrian Prantl wrote: > > aprantl created this revision. > aprantl added reviewers: dblaikie, echristo, dexonsm

Re: [PATCH] D18073: Add memory allocating functions

2016-04-05 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. > So for _wcsdup_dbg, I should leave only testWinWcsdupDbg? Yes. Also, since there will be many of these "alternate" functions, could you create a separate test file for them? http://reviews.llvm.org/D18073 ___ cfe-com

Re: [PATCH] D17412: PR19957: [OpenCL] incorrectly accepts implicit address space conversion with ternary operator

2016-04-05 Thread Xiuli PAN via cfe-commits
pxli168 accepted this revision. pxli168 added a comment. LGTM! Thanks! http://reviews.llvm.org/D17412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18635: Rework interface for bitset-using features to use a notion of class scope.

2016-04-05 Thread Peter Collingbourne via cfe-commits
pcc updated this revision to Diff 52759. pcc added a comment. - New implementation http://reviews.llvm.org/D18635 Files: docs/ControlFlowIntegrity.rst docs/LTOVisibility.rst docs/UsersManual.rst docs/index.rst include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/cla

Re: [PATCH] D18073: Add memory allocating functions

2016-04-05 Thread Alexander Riccio via cfe-commits
ariccio added a comment. Maybe I'm being thick headed and I can't see it - sorry if I am - but I'm still a bit confused. Can you tell me what I should do in the `_wcsdup_dbg` example? http://reviews.llvm.org/D18073 ___ cfe-commits mailing list cfe-

Re: [PATCH] D18745: [clang-tidy] Adds modernize-use-bool-literals check.

2016-04-05 Thread Jakub Staroń via cfe-commits
staronj retitled this revision from "[clang-tidy] Adds misc-use-bool-literals check." to "[clang-tidy] Adds modernize-use-bool-literals check.". staronj updated this revision to Diff 52739. staronj added a comment. 1. Name changed from misc-use-bool-literals to modernize-use-bool-literals. 2. Cod

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-05 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 52752. michael_miller added a comment. Addressed comments. Moved isTriviallyDefaultConstructible into utils/TypeTraits. Moved AST matchers into utils/Matchers.h. Enclosed all source-local functions in an anonymous namespace and removed static. Replaced

[PATCH] D18810: [Clang-tidy] Fix readability-static-definition-in-anonymous-namespace warnings; other minor fixes.

2016-04-05 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: alexfh, aaron.ballman. Eugene.Zelenko added a subscriber: cfe-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. Some Include What You Use suggestions were used too. I checked this patch on my own build on

[PATCH] D18808: Use the NoDebug emission kind to identify compile units that no debug info should be created from.

2016-04-05 Thread Adrian Prantl via cfe-commits
aprantl created this revision. aprantl added reviewers: dblaikie, echristo, dexonsmith. aprantl added subscribers: davide, llvm-commits, cfe-commits. aprantl set the repository for this revision to rL LLVM. As indicated in D18612, sample-based profiling and optimization remarks currently remove D

r265488 - Update testing cases after backend changes.

2016-04-05 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Apr 5 18:27:51 2016 New Revision: 265488 URL: http://llvm.org/viewvc/llvm-project?rev=265488&view=rev Log: Update testing cases after backend changes. Modified: cfe/trunk/test/CodeGen/arm-swiftcall.c cfe/trunk/test/CodeGenCXX/arm-swiftcall.cpp Modified: cfe/trunk/

Re: [PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-05 Thread Paul Robinson via cfe-commits
probinson added a subscriber: probinson. probinson added a comment. In http://reviews.llvm.org/D18708#390166, @rsmith wrote: > we'll likely be changing the default C++ language mode soon.) Privately, PS4 defaults to C++11; we haven't sent that patch upstream because it would make tests fail

Re: [PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-05 Thread Warren Ristow via cfe-commits
wristow added a subscriber: wristow. wristow added a comment. In http://reviews.llvm.org/D18708#390183, @dyung wrote: > In http://reviews.llvm.org/D18708#390166, @rsmith wrote: > > > In http://reviews.llvm.org/D18708#390150, @dyung wrote: > > > > > From my understanding, there are 2 issues that b

Re: [PATCH] D18565: Implement an "I'm dtrace, please retain all debug types" option.

2016-04-05 Thread Adrian Prantl via cfe-commits
aprantl abandoned this revision. aprantl added a comment. Meanwhile I made an experiment and compiled XNU with http://reviews.llvm.org/D18477 and compared the debug info from before and after and found no missing types at all. It is plausible that r107027 was added to work around the fact that

[PATCH] D18806: [clang-tidy] filter plugins and plugin arguments of the command-line

2016-04-05 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added a reviewer: alexfh. etienneb added a subscriber: cfe-commits. This patch remove the plugin argument from the command-line. Loading plugins was making clang-tidy to fail when running over chromium (linux). Example of a command-line executed when run

r265467 - Fix a crash on invalid with template handling

2016-04-05 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Apr 5 16:13:54 2016 New Revision: 265467 URL: http://llvm.org/viewvc/llvm-project?rev=265467&view=rev Log: Fix a crash on invalid with template handling This is a fix for https://llvm.org/bugs/show_bug.cgi?id=25561 which was a crash on invalid. Change the handling of in

Re: r265195 - [modules] Start moving the code for encoding AST records out of ASTWriter into

2016-04-05 Thread Adrian Prantl via cfe-commits
Hi Richard, it looks like this commit has caused a 6% size regression when building a PCH from OS X’s Cocoa.h. When comparing the llvm-bcanalyzer output for r265187 and r265195 the most noticeable diff is in the DECLTYPES_BLOCK: Block ID #11 (DECLTYPES_BLOCK): Num Instances: 1 -

Re: [PATCH] D18424: [Clang] Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes

2016-04-05 Thread Aaron Ballman via cfe-commits
On Tue, Apr 5, 2016 at 4:32 PM, Eugene Zelenko wrote: > Eugene.Zelenko added inline comments. > > > Comment at: include/clang-c/Index.h:19 > @@ -18,1 +18,3 @@ > > +#ifdef __cplusplus > +#include > > aaron.ballman wrote: >> Is this produced by the deprecated heade

Re: [PATCH] D18424: [Clang] Fix Clang-tidy modernize-deprecated-headers warnings; other minor fixes

2016-04-05 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added inline comments. Comment at: include/clang-c/Index.h:19 @@ -18,1 +18,3 @@ +#ifdef __cplusplus +#include aaron.ballman wrote: > Is this produced by the deprecated headers check? If not, what value does > ctime add over time.h? Yes, since fi

Re: [PATCH] D18635: Rework interface for bitset-using features to use a notion of class scope.

2016-04-05 Thread Peter Collingbourne via cfe-commits
pcc updated this revision to Diff 52732. pcc added a comment. - Update command line flag docs http://reviews.llvm.org/D18635 Files: docs/ControlFlowIntegrity.rst docs/LTOVisibility.rst docs/UsersManual.rst docs/index.rst include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

Re: [PATCH] D18635: Rework interface for bitset-using features to use a notion of class scope.

2016-04-05 Thread Peter Collingbourne via cfe-commits
pcc added a comment. I have updated the documentation for the new design; PTAL before I proceed with implementation. http://reviews.llvm.org/D18635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

Re: [PATCH] D18635: Rework interface for bitset-using features to use a notion of class scope.

2016-04-05 Thread Peter Collingbourne via cfe-commits
pcc updated this revision to Diff 52730. pcc added a comment. - Rewrite docs http://reviews.llvm.org/D18635 Files: docs/ControlFlowIntegrity.rst docs/LTOVisibility.rst docs/UsersManual.rst docs/index.rst include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Bas

[PATCH] D18803: [clang-tidy] fix building clang-tidy documentation.

2016-04-05 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added a reviewer: alexfh. etienneb added a subscriber: cfe-commits. The clang-tidy documentation can't be generated because of broken links. ``` Warning, treated as error: /home/etienneb/llvm/llvm/tools/clang/tools/extra/docs/clang-tidy/checks/google-reada

Re: [PATCH] D17043: Check that the result of a library call w/o side effects is used

2016-04-05 Thread Aaron Ballman via cfe-commits
On Tue, Apr 5, 2016 at 3:13 PM, Richard Smith via cfe-commits wrote: > rsmith added a comment. > > The version of this attribute that was voted into the C++ standard > (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0189r1.pdf) does > not support a message, and I expect that is the ver

Re: [PATCH] D17043: Check that the result of a library call w/o side effects is used

2016-04-05 Thread Richard Smith via cfe-commits
rsmith added a comment. The version of this attribute that was voted into the C++ standard (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0189r1.pdf) does not support a message, and I expect that is the version that libc++ will want to use. I think we should at least improve Clang's

r265439 - Fix broken tests from no-jump-table commit

2016-04-05 Thread Nirav Dave via cfe-commits
Author: niravd Date: Tue Apr 5 13:59:37 2016 New Revision: 265439 URL: http://llvm.org/viewvc/llvm-project?rev=265439&view=rev Log: Fix broken tests from no-jump-table commit Summary: Fix failing tests from no-jump-table flag addition Reviewers: jyknight Subscribers: llvm-commits Differential

r265436 - [CUDA] Show --cuda-gpu-arch option in clang --help.

2016-04-05 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Apr 5 13:26:25 2016 New Revision: 265436 URL: http://llvm.org/viewvc/llvm-project?rev=265436&view=rev Log: [CUDA] Show --cuda-gpu-arch option in clang --help. For some reason it was hidden. Modified: cfe/trunk/include/clang/Driver/Options.td Modified: cfe/trunk/inc

Re: [PATCH] D18671: [CUDA] Add --cuda-flush-denormals-to-zero.

2016-04-05 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL265435: [CUDA] Add -fcuda-flush-denormals-to-zero. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D18671?vs=52310&id=52718#toc Repository: rL LLVM http://reviews.llvm.org/D18

r265435 - [CUDA] Add -fcuda-flush-denormals-to-zero.

2016-04-05 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Apr 5 13:26:20 2016 New Revision: 265435 URL: http://llvm.org/viewvc/llvm-project?rev=265435&view=rev Log: [CUDA] Add -fcuda-flush-denormals-to-zero. Summary: Setting this flag causes all functions are annotated with the "nvvm-f32ftz" = "true" attribute. In addition, we

Re: [PATCH] D18575: [clang-tidy] New checker to replace deprecated throw() specifications

2016-04-05 Thread don hinton via cfe-commits
hintonda added a comment. I moved over the weekend, but will try to take a look at this tonight and address all your comments. Thanks again... http://reviews.llvm.org/D18575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

r265432 - Fix missing period in no-jump-table flag comment. NFC.

2016-04-05 Thread Nirav Dave via cfe-commits
Author: niravd Date: Tue Apr 5 13:11:01 2016 New Revision: 265432 URL: http://llvm.org/viewvc/llvm-project?rev=265432&view=rev Log: Fix missing period in no-jump-table flag comment. NFC. Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.def Modified: cfe/trunk/include/clang/Frontend

Re: [PATCH] D18671: [CUDA] Add --cuda-flush-denormals-to-zero.

2016-04-05 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Yep, lgtm http://reviews.llvm.org/D18671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-05 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. > If I check online I can still see it on line 1414: > http://clang.llvm.org/doxygen/CGExprScalar_8cpp_source.html This is the only place CreateAddrSpaceCast showing up and being fixed by this patch. http://reviews.llvm.org/D18713 __

Re: r265425 - Add -fno-jump-tables and-fjump-tables flags

2016-04-05 Thread Hans Wennborg via cfe-commits
On Tue, Apr 5, 2016 at 10:50 AM, Nirav Dave via cfe-commits wrote: > Author: niravd > Date: Tue Apr 5 12:50:43 2016 > New Revision: 265425 > > URL: http://llvm.org/viewvc/llvm-project?rev=265425&view=rev > Log: > Add -fno-jump-tables and-fjump-tables flags > > Add no-jump-tables flag to disable u

Re: [PATCH] D18671: [CUDA] Add --cuda-flush-denormals-to-zero.

2016-04-05 Thread Justin Lebar via cfe-commits
jlebar added a comment. Reid, are we good here? http://reviews.llvm.org/D18671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r265425 - Add -fno-jump-tables and-fjump-tables flags

2016-04-05 Thread Nirav Dave via cfe-commits
Author: niravd Date: Tue Apr 5 12:50:43 2016 New Revision: 265425 URL: http://llvm.org/viewvc/llvm-project?rev=265425&view=rev Log: Add -fno-jump-tables and-fjump-tables flags Add no-jump-tables flag to disable use of jump tables when lowering switch statements Reviewers: echristo, hans Subscr

Re: [PATCH] D18783: [clang-tidy] add new checker for string literal with NUL character.

2016-04-05 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. In http://reviews.llvm.org/D18783#392486, @bcraig wrote: > Is this checker able to connect a std::string with a pre-declared string > literal (i.e. constant propagation)? For example... > > const char *bad_chars = "\0\1\2\3"; > std::string bad_str = bad_chars; >

[PATCH] D18797: [Clang-tidy] Mention readability-static-definition-in-anonymous-namespace in release notes

2016-04-05 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: alexfh, hokein. Eugene.Zelenko added a subscriber: cfe-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. Repository: rL LLVM http://reviews.llvm.org/D18797 Files: docs/ReleaseNotes.rst Index: docs/R

Re: [PATCH] D18783: [clang-tidy] add new checker for string literal with NUL character.

2016-04-05 Thread Ben Craig via cfe-commits
bcraig added a subscriber: bcraig. bcraig added a comment. Is this checker able to connect a std::string with a pre-declared string literal (i.e. constant propagation)? For example... const char *bad_chars = "\0\1\2\3"; std::string bad_str = bad_chars; I've had real code make that mistake

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-05 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In http://reviews.llvm.org/D18713#391406, @yaxunl wrote: > > Btw, there is another place in lib/CodeGen/CGExprScalar.cpp with > > CreateAddrSpaceCast call too. I am wondering if that could have the same > > issue... if yes, may be we should fix it already now. > > > I

Re: [PATCH] D18783: [clang-tidy] add new checker for string literal with NUL character.

2016-04-05 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 52710. etienneb added a comment. alpha ordering http://reviews.llvm.org/D18783 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp clang-tidy/misc/StringLiteralWithEmbeddedN

Re: [PATCH] D17043: Check that the result of a library call w/o side effects is used

2016-04-05 Thread Sidney San Martín via cfe-commits
sidney added a comment. In http://reviews.llvm.org/D17043#390188, @alexfh wrote: > What's the status of this patch? Do you still want to continue working on it > or are you fine with the warn_unused_result/nodiscard-based solution? I'm still interested in working on this, but I was waiting for

Re: [PATCH] D18783: [clang-tidy] add new checker for string literal with NUL character.

2016-04-05 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:161 @@ -156,1 +160,3 @@ + truncation or invalid character escaping. + Fixed bugs: I think will be good idea to sort check alphabetically. At least I did so :-) http://reviews.llvm.org/D187

Re: [PATCH] D18783: [clang-tidy] add new checker for string literal with NUL character.

2016-04-05 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 52708. etienneb added a comment. add missing reference in release-notes. http://reviews.llvm.org/D18783 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp clang-tidy/misc/S

Re: [PATCH] D18793: fix for 19986, extra spacing around c++14 lambda capture with initializer

2016-04-05 Thread Daniel Jasper via cfe-commits
djasper added a comment. Please add tests in unittests/Format/FormatTest.cpp. Comment at: lib/Format/UnwrappedLineParser.cpp:1086 @@ +1085,3 @@ + int parens = 0; + while (!eof()) { +if (FormatTok->isOneOf(tok::l_paren, tok::l_square)) { We need

Re: [PATCH] D18783: [clang-tidy] add new checker for string literal with NUL character.

2016-04-05 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst. http://reviews.llvm.org/D18783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

Re: [PATCH] D18765: [clang-tidy] Don't complain about const pass_object_size params in declarations

2016-04-05 Thread George Burgess IV via cfe-commits
george.burgess.iv abandoned this revision. george.burgess.iv added a comment. > There's a principal difference between top-level const on parameters in > definitions and in declarations: in definitions const has an effect, as it > makes the variable constant, but in declarations it has absolutel

Re: [PATCH] D18783: [clang-tidy] add new checker for string literal with NUL character.

2016-04-05 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 52707. etienneb marked an inline comment as done. etienneb added a comment. fix comments. http://reviews.llvm.org/D18783 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp

Re: [PATCH] D18575: [clang-tidy] New checker to replace deprecated throw() specifications

2016-04-05 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseNoexceptCheck.cpp:16 @@ +15,3 @@ + +// FIXME: Should this be moved to ASTMatchers.h? +namespace ast_matchers { alexfh wrote: > Yes, it might make sense to move it to ASTMatchers.h. Yes, pleas

Re: [clang-tools-extra] r264563 - clang-tidy: Fix broken buildbot

2016-04-05 Thread Richard via cfe-commits
In article , Alexander Kornienko writes: > > On Mon, Mar 28, 2016 at 6:15 AM, Richard Thomson via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > Author: legalize > > Date: Sun Mar 27 23:15:41 2016 > > New Revision: 264563 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=264563

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-05 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman requested changes to this revision. aaron.ballman added a reviewer: aaron.ballman. This revision now requires changes to proceed. Comment at: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp:25 @@ -24,3 +24,3 @@

Re: [PATCH] D17821: [OpenCL] Complete image types support

2016-04-05 Thread Alexey Bader via cfe-commits
bader added inline comments. Comment at: include/clang/AST/ASTContext.h:903 @@ +902,3 @@ +#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ + CanQualType SingletonId; +#include "clang/AST/OpenCLImageTypes.def" mgrang wrote: > remov

Re: [PATCH] D18766: [clang-tidy] Add check misc-multiple-statement-macro

2016-04-05 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: docs/clang-tidy/checks/misc-multiple-statement-macro.rst:15 @@ +14,3 @@ + if (do_increment) +INCREMENT_TWO(a, b); + hokein wrote: > Would be better to add a comment to explain the sample. The sentence just before the

Re: [PATCH] D18766: [clang-tidy] Add check misc-multiple-statement-macro

2016-04-05 Thread Samuel Benzaquen via cfe-commits
sbenza updated this revision to Diff 52702. sbenza marked 2 inline comments as done and an inline comment as not done. sbenza added a comment. Minor fixes http://reviews.llvm.org/D18766 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MultipleStatem

Re: [PATCH] Windows support for ObjC DLLIMPORT

2016-04-05 Thread Aaron Ballman via cfe-commits
On Mon, Apr 4, 2016 at 3:34 PM, Wes Witt via cfe-commits wrote: > Please accept this diff as a change to support dllimport of objective c > interfaces on windows. I’ve included a new test and changes to an existing > test as well. All clang tests pass on Linux & Windows. This change is > required

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-05 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52696. courbet marked an inline comment as done. courbet added a comment. cosmetics http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidel

Re: [PATCH] D18793: fix for 19986, extra spacing around c++14 lambda capture with initializer

2016-04-05 Thread Meador Inge via cfe-commits
meadori added a subscriber: meadori. meadori added a comment. This needs a test case. http://reviews.llvm.org/D18793 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18442: A clang-tidy check for std:accumulate.

2016-04-05 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. Comment at: clang-tidy/misc/FoldInitTypeCheck.cpp:21 @@ +20,3 @@ +/// Returns the value_type for an InputIterator type. +static QualType getInputIteratorValueType(const Type &IteratorType, +

Re: [PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

2016-04-05 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D18596#392098, @andreybokhanko wrote: > In http://reviews.llvm.org/D18596#388295, @aaron.ballman wrote: > > > Regression is a bit of a question mark, to me depending on the diagnostic. > > I think warning the user "this has absolutely no effec

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-04-05 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:63 @@ +62,3 @@ + + Finder->addMatcher(returnStmt(IsBadReturnStatement, hasAncestor(IsGoodAssign)) + .bind("returnStmt"), baloghadamsoftware wrote: > sbenza

r265405 - [X86] Introduction of -march=lakemont.

2016-04-05 Thread Andrey Turetskiy via cfe-commits
Author: aturetsk Date: Tue Apr 5 10:04:26 2016 New Revision: 265405 URL: http://llvm.org/viewvc/llvm-project?rev=265405&view=rev Log: [X86] Introduction of -march=lakemont. Differential Revision: http://reviews.llvm.org/D18651 Modified: cfe/trunk/lib/Basic/Targets.cpp cfe/trunk/test/Cod

Re: [PATCH] D18651: [X86] Introduction of -march=lakemont

2016-04-05 Thread Andrey Turetskiy via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL265405: [X86] Introduction of -march=lakemont. (authored by aturetsk). Changed prior to commit: http://reviews.llvm.org/D18651?vs=52220&id=52692#toc Repository: rL LLVM http://reviews.llvm.org/D1865

[PATCH] D18793: fix for 19986, extra spacing around c++14 lambda capture with initializer

2016-04-05 Thread Jacek Sieka via cfe-commits
arnetheduck created this revision. arnetheduck added a reviewer: djasper. arnetheduck added a subscriber: cfe-commits. Herald added a subscriber: klimek. Here's a little one-off patch that fixes https://llvm.org/bugs/show_bug.cgi?id=19986 for me, by allowing a few more things inside [] when trying

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-05 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a reviewer: aaron.ballman. Comment at: clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.cpp:27 @@ +26,3 @@ +unless(isConstexpr())); + const auto IsNotDefined = unless(isDefinition()); + ---

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-05 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52688. courbet added a comment. Update naming to be constistent with the standard: use "non-local" instead of "global" (or "static" in my case, as I started from classes and the name stuck). http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguideli

Re: [PATCH] D18542: [OPENMP] Parsing and Sema support for 'omp declare target' directive

2016-04-05 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 52690. DmitryPolukhin marked 8 inline comments as done. DmitryPolukhin added a comment. - fixed all comments - rebase Aaron and Alexey, thank you for the review! http://reviews.llvm.org/D18542 Files: include/clang/AST/ASTMutationListener.h inclu

Re: [PATCH] D18542: [OPENMP] Parsing and Sema support for 'omp declare target' directive

2016-04-05 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. Just some very minor nits, otherwise LGTM! Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7931 @@ +7930,3 @@ +def err_omp_enclosed_declare_target : Error< + "declare target region may not be enclosed i

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-05 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52684. courbet added a comment. Fix 5 of the 8 false positives. Add tests. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/Inte

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-04-05 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added a comment. And what about the final name? http://reviews.llvm.org/D18265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-04-05 Thread Balogh , Ádám via cfe-commits
baloghadamsoftware added inline comments. Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:63 @@ +62,3 @@ + + Finder->addMatcher(returnStmt(IsBadReturnStatement, hasAncestor(IsGoodAssign)) + .bind("returnStmt"), sbenza wrote: > I disli

Re: [PATCH] D17586: Add a new check, readability-redundant-string-init, that checks unnecessary string initializations.

2016-04-05 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Shuai, if you have time, could you take a look at http://llvm.org/PR27087? Thanks! Repository: rL LLVM http://reviews.llvm.org/D17586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

Re: [clang-tools-extra] r264563 - clang-tidy: Fix broken buildbot

2016-04-05 Thread Alexander Kornienko via cfe-commits
I'm not sure I understand what this test has to do with VS2013. Clang-tidy should be able to parse this code, and if it doesn't (e.g. due to -fms-compatibility being turned on by default on windows), we should put unsupported constructs under an appropriate #ifdef, not comment them out completely.

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-05 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1596 @@ +1595,3 @@ + +class Fixer : public UnwrappedLineConsumer { +public: djasper wrote: > I am not sure, this is the right class to pull out. It still has a lot of > overlap with formatter. Maybe

Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-05 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 52676. ioeric marked 14 inline comments as done. ioeric added a comment. - Refactored the code to reduce code duplication. Code styling. Moved test cases for Fixer into a new file FixTest.cpp. - Added RangeManager to manage affected ranges. make empty namespac

r265385 - clang-format: Fix cast detection on "this".

2016-04-05 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Apr 5 06:46:06 2016 New Revision: 265385 URL: http://llvm.org/viewvc/llvm-project?rev=265385&view=rev Log: clang-format: Fix cast detection on "this". Before: auto x = (X) this; After: auto x = (X)this; This fixes llvm.org/PR27198. Modified: cfe/trunk/lib/For

[clang-tools-extra] r265384 - [clang-tidy] Add a check to detect static definitions in anonymous namespace.

2016-04-05 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Apr 5 06:42:08 2016 New Revision: 265384 URL: http://llvm.org/viewvc/llvm-project?rev=265384&view=rev Log: [clang-tidy] Add a check to detect static definitions in anonymous namespace. Summary: Fixes PR26595 Reviewers: alexfh Subscribers: cfe-commits Differential Revi

Re: [PATCH] D18180: [clang-tidy] Add a check to detect static definitions in anonymous namespace.

2016-04-05 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rL265384: [clang-tidy] Add a check to detect static definitions in anonymous namespace. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D181

Re: [PATCH] D18542: [OPENMP] Parsing and Sema support for 'omp declare target' directive

2016-04-05 Thread Alexey Bataev via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D18542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D18542: [OPENMP] Parsing and Sema support for 'omp declare target' directive

2016-04-05 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin added a comment. Alexey, please review OpenMP specific things. Aaron, are you OK with the attribute implementation and printing approach? http://reviews.llvm.org/D18542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

Re: [PATCH] D18766: [clang-tidy] Add check misc-multiple-statement-macro

2016-04-05 Thread Haojian Wu via cfe-commits
hokein added a comment. Nice check! I like the check, it would be very helpful. (I have struggled with this kind of bug before) Comment at: clang-tidy/misc/MultipleStatementMacroCheck.cpp:33 @@ +32,3 @@ + +namespace { + I think you can put this anonymous namesp

Re: [PATCH] D18765: [clang-tidy] Don't complain about const pass_object_size params in declarations

2016-04-05 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. To clarify: the `pass_object_size` attribute is not the only reason to mark parameter `const` in the definition. However, there's no reason to also mark them `const` in declarations, since that `const` is not a part of the function's interface. http://reviews.llvm.org/

Re: [PATCH] D18765: [clang-tidy] Don't complain about const pass_object_size params in declarations

2016-04-05 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. There's a principal difference between top-level `const` on parameters in definitions and in declarations: in definitions `const` has an effect, as it makes the variable constant, bu

Re: [PATCH] D18110: [OpenMP] Fix SEMA bug in the capture of global variables in template functions.

2016-04-05 Thread Alexey Bataev via cfe-commits
I think this code must be removed and we need to start with the basic general solution. I missed this part of the code accidentally, but it does not mean that I agree with it. Best regards, Alexey Bataev = Software Engineer Intel Compiler Team 05.04.2016 0:39, Samuel Antao пишет: >

Re: [PATCH] D18110: [OpenMP] Fix SEMA bug in the capture of global variables in template functions.

2016-04-05 Thread Alexey Bataev via cfe-commits
Carlo, I don't agree with your analysis. 1. This is how it works now. It does not say that the argument must be passed by value. Later we may add some generic optimization to optimize not only target specific code, but also non-target specific code. 2. In this case such constructs must be gathere

Re: [PATCH] D18783: [clang-tidy] add new checker for string literal with NUL character.

2016-04-05 Thread Benjamin Kramer via cfe-commits
bkramer added a subscriber: bkramer. Comment at: clang-tidy/misc/StringLiteralWithEmbeddedNulCheck.cpp:21 @@ +20,3 @@ +// Retrieve the character at offset |offset| of the string literal |SL|. +static unsigned int GetCharAt(const StringLiteral *SL, size_t offset) { + if (offset >=

r265381 - Consolidate and improve the handling of built-in feature-like macros

2016-04-05 Thread Andy Gibbs via cfe-commits
Author: andyg Date: Tue Apr 5 03:36:47 2016 New Revision: 265381 URL: http://llvm.org/viewvc/llvm-project?rev=265381&view=rev Log: Consolidate and improve the handling of built-in feature-like macros Summary: The parsing logic has been separated out from the macro implementation logic, leading

Re: [PATCH] D17149: Consolidate and improve the handling of built-in feature-like macros

2016-04-05 Thread Andy Gibbs via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL265381: Consolidate and improve the handling of built-in feature-like macros (authored by AndyG). Changed prior to commit: http://reviews.llvm.org/D17149?vs=52535&id=52664#toc Repository: rL LLVM ht

Re: clang-format: fix for 19986, extra spacing around c++14 lambda capture with initializer

2016-04-05 Thread Daniel Jasper via cfe-commits
Please use reviews.llvm.org to send out clang-format patches. On Mon, Apr 4, 2016 at 10:03 AM, Jacek Sieka via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hello, > > Here's a little one-off patch that fixes > https://llvm.org/bugs/show_bug.cgi?id=19986 for me, by allowing a few > more thin

Re: [PATCH] D18180: [clang-tidy] Add a check to detect static definitions in anonymous namespace.

2016-04-05 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Awesome. Thank you! LG http://reviews.llvm.org/D18180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

Re: [PATCH] D18180: [clang-tidy] Add a check to detect static definitions in anonymous namespace.

2016-04-05 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 52663. hokein marked 2 inline comments as done. hokein added a comment. - fix inline code snippet in rst. - Add check-message for macro in test code. http://reviews.llvm.org/D18180 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/Reada

Re: [PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

2016-04-05 Thread Andrey Bokhanko via cfe-commits
andreybokhanko added a comment. In http://reviews.llvm.org/D18596#388295, @aaron.ballman wrote: > Regression is a bit of a question mark, to me depending on the diagnostic. I > think warning the user "this has absolutely no effect" is a reasonable > diagnostic for that situation -- the user wro

Re: [PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

2016-04-05 Thread Andrey Bokhanko via cfe-commits
andreybokhanko updated this revision to Diff 52662. andreybokhanko added a comment. Added Sema test, as per Aaron's and Reid's request. http://reviews.llvm.org/D18596 Files: include/clang/AST/Type.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/AST/MicrosoftMangle.cpp

Re: [PATCH] D18180: [clang-tidy] Add a check to detect static definitions in anonymous namespace.

2016-04-05 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/readability-static-definition-in-anonymous-namespace.rst:9 @@ +8,3 @@ +In this case, `static` is redundant, because anonymous namespace limits the +visibility of definitions to a single translation unit. + -

Re: [PATCH] D18180: [clang-tidy] Add a check to detect static definitions in anonymous namespace.

2016-04-05 Thread Haojian Wu via cfe-commits
hokein marked 2 inline comments as done. Comment at: test/clang-tidy/readability-static-definition-in-anonymous-namespace.cpp:34 @@ +33,3 @@ +#define DEFINE_STATIC_VAR(x) static int x = 2 +DEFINE_STATIC_VAR(i); +// CHECK-FIXES: {{^}}DEFINE_STATIC_VAR(i); Oops. I

Re: [PATCH] D18180: [clang-tidy] Add a check to detect static definitions in anonymous namespace.

2016-04-05 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 52661. hokein added a comment. Update http://reviews.llvm.org/D18180 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp clang-tidy/readabi