r337148 - [Sema] Add fixit for unused lambda captures

2018-07-16 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Jul 16 00:23:47 2018 New Revision: 337148 URL: http://llvm.org/viewvc/llvm-project?rev=337148&view=rev Log: [Sema] Add fixit for unused lambda captures This diff adds a fixit to suggest removing unused lambda captures in the appropriate diagnostic. Patch by Andrew Com

r323146 - [analyzer] Protect against dereferencing a null pointer

2018-01-22 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Jan 22 12:18:42 2018 New Revision: 323146 URL: http://llvm.org/viewvc/llvm-project?rev=323146&view=rev Log: [analyzer] Protect against dereferencing a null pointer The check (inside StackHintGeneratorForSymbol::getMessage) if (!N) return getMessageForSymbolNotFound(

r323382 - [analyzer] Do not attempt to get the pointee of void*

2018-01-24 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Wed Jan 24 14:17:30 2018 New Revision: 323382 URL: http://llvm.org/viewvc/llvm-project?rev=323382&view=rev Log: [analyzer] Do not attempt to get the pointee of void* Do not attempt to get the pointee of void* while generating a bug report (otherwise it will trigger an asse

r314011 - [clang] Fix printf fixit for objc specific types

2017-09-22 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Sep 22 11:36:06 2017 New Revision: 314011 URL: http://llvm.org/viewvc/llvm-project?rev=314011&view=rev Log: [clang] Fix printf fixit for objc specific types For the triple thumbv7-apple-ios8.0.0 ssize_t is long and size_t is unsigned long, while NSInteger is int and NS

r314022 - [clang] Fix isExternC matcher docs

2017-09-22 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Sep 22 12:29:38 2017 New Revision: 314022 URL: http://llvm.org/viewvc/llvm-project?rev=314022&view=rev Log: [clang] Fix isExternC matcher docs The wording in the documentation for the matcher isExternC appears to be misleading since this matcher is applicable to funct

r314141 - [analyzer] Fix crash on modeling of pointer arithmetic

2017-09-25 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Sep 25 12:32:33 2017 New Revision: 314141 URL: http://llvm.org/viewvc/llvm-project?rev=314141&view=rev Log: [analyzer] Fix crash on modeling of pointer arithmetic This patch fixes analyzer's crash on the newly added test case (see also https://bugs.llvm.org/show_bug.cg

r314470 - [clang] Add getUnsignedPointerDiffType method

2017-09-28 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Thu Sep 28 16:11:31 2017 New Revision: 314470 URL: http://llvm.org/viewvc/llvm-project?rev=314470&view=rev Log: [clang] Add getUnsignedPointerDiffType method C11 standard refers to the unsigned counterpart of the type ptrdiff_t in the paragraph 7.21.6.1p7 where it defines

r315665 - [clang] Enable clang build with LLVM_BUILD_INSTRUMENTED without setting LLVM_PROFTDATA

2017-10-12 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Thu Oct 12 20:21:39 2017 New Revision: 315665 URL: http://llvm.org/viewvc/llvm-project?rev=315665&view=rev Log: [clang] Enable clang build with LLVM_BUILD_INSTRUMENTED without setting LLVM_PROFTDATA At the moment if LLVM_BUILD_INSTRUMENTED is set to True one has to set LL

r305018 - [clang] Fix format specifiers fixits

2017-06-08 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Thu Jun 8 16:44:45 2017 New Revision: 305018 URL: http://llvm.org/viewvc/llvm-project?rev=305018&view=rev Log: [clang] Fix format specifiers fixits This diff fixes printf "fixits" in the case when there is a wrapping macro and the format string needs multiple replacements

r305124 - [clang] Cleanup fixit.c

2017-06-09 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Jun 9 17:20:52 2017 New Revision: 305124 URL: http://llvm.org/viewvc/llvm-project?rev=305124&view=rev Log: [clang] Cleanup fixit.c This diff removes temporary file t2 in fixit.c and updates the test command accordingly. NFC. Test plan: make check-all Differential re

r305845 - [clang] Fix format specifiers fixits for nested macros

2017-06-20 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Tue Jun 20 15:46:58 2017 New Revision: 305845 URL: http://llvm.org/viewvc/llvm-project?rev=305845&view=rev Log: [clang] Fix format specifiers fixits for nested macros ExpansionLoc was previously calculated incorrectly in the case of nested macros expansions. In this diff w

r306343 - [clang] Enable printf check for CFIndex

2017-06-26 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Jun 26 16:02:27 2017 New Revision: 306343 URL: http://llvm.org/viewvc/llvm-project?rev=306343&view=rev Log: [clang] Enable printf check for CFIndex According to https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers

r307604 - [analyzer] Start fixing modeling of bool based types

2017-07-10 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Jul 10 17:30:14 2017 New Revision: 307604 URL: http://llvm.org/viewvc/llvm-project?rev=307604&view=rev Log: [analyzer] Start fixing modeling of bool based types This is a follow up for one of the previous diffs https://reviews.llvm.org/D32328. getTypeSize and with getI

r310948 - [clang] Code cleanup in clang/tooling

2017-08-15 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Tue Aug 15 12:23:54 2017 New Revision: 310948 URL: http://llvm.org/viewvc/llvm-project?rev=310948&view=rev Log: [clang] Code cleanup in clang/tooling 1. Add missing explicit for SymbolName constructor. 2. Add missing std::move in createRenameReplacements. Differential revi

r311182 - [analyzer] Fix modeling of constructors

2017-08-18 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Aug 18 11:20:43 2017 New Revision: 311182 URL: http://llvm.org/viewvc/llvm-project?rev=311182&view=rev Log: [analyzer] Fix modeling of constructors This diff fixes analyzer's crash (triggered assert) on the newly added test case. The assert being discussed is assert(!B

Re: r311182 - [analyzer] Fix modeling of constructors

2017-08-21 Thread Alexander Shaposhnikov via cfe-commits
nge into release 5.0.0? It's an > assertion > >>> failure fix, which shows up on C++ code involving double-inheritance > with > >>> empty base classes. > >>> > >>> Artem. > >>> > >>> > >>> On 8/18/17 9:20

r311935 - [analyzer] Fix crash in modeling arithmetic

2017-08-28 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Aug 28 14:15:21 2017 New Revision: 311935 URL: http://llvm.org/viewvc/llvm-project?rev=311935&view=rev Log: [analyzer] Fix crash in modeling arithmetic This diff fixes modeling of arithmetic expressions where pointers are treated as integers (i.e. via C-style / reinte

r311947 - [analyzer] Adjust ptr arithmetic test

2017-08-28 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Aug 28 15:58:54 2017 New Revision: 311947 URL: http://llvm.org/viewvc/llvm-project?rev=311947&view=rev Log: [analyzer] Adjust ptr arithmetic test Replace "long" with __UINTPTR_TYPE__ to make the test added in rL311935 Windows-friendly. Caught by the buildbot llvm-clang-

r302855 - [tooling] RefactoringCallbacks code cleanup

2017-05-11 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Thu May 11 19:16:56 2017 New Revision: 302855 URL: http://llvm.org/viewvc/llvm-project?rev=302855&view=rev Log: [tooling] RefactoringCallbacks code cleanup This diff 1. adds missing "explicit" for single argument constructors 2. adds missing std::move in ReplaceNodeWithTe

r316399 - [analyzer] Fix handling of labels in getLValueElement

2017-10-23 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Mon Oct 23 16:46:06 2017 New Revision: 316399 URL: http://llvm.org/viewvc/llvm-project?rev=316399&view=rev Log: [analyzer] Fix handling of labels in getLValueElement In getLValueElement Base may represent the address of a label (as in the newly-added test case), in this ca

r300114 - [analyzer] Add a check for IvarRegion in getExtraInvalidatedValues

2017-04-12 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Wed Apr 12 17:00:13 2017 New Revision: 300114 URL: http://llvm.org/viewvc/llvm-project?rev=300114&view=rev Log: [analyzer] Add a check for IvarRegion in getExtraInvalidatedValues This diff adds a defensive check in getExtraInvalidatedValues for the case when there are no re

[clang-tools-extra] r300356 - [clang-move] Create ClangMoveActionFactory on stack

2017-04-14 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Fri Apr 14 13:12:11 2017 New Revision: 300356 URL: http://llvm.org/viewvc/llvm-project?rev=300356&view=rev Log: [clang-move] Create ClangMoveActionFactory on stack This diff removes unnecessary using of unique_ptr with ClangMoveActionFactory (pico cleanup). NFC Test plan:

r300427 - [clang] Register isConstexpr matcher

2017-04-16 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Sun Apr 16 14:05:17 2017 New Revision: 300427 URL: http://llvm.org/viewvc/llvm-project?rev=300427&view=rev Log: [clang] Register isConstexpr matcher This diff registers isConstexpr matcher. Test plan: make check-all check that "match varDecl(isConstexpr())" works in clang

r300936 - [analyzer] Fix assert in ExprEngine::processSwitch

2017-04-20 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Thu Apr 20 20:05:26 2017 New Revision: 300936 URL: http://llvm.org/viewvc/llvm-project?rev=300936&view=rev Log: [analyzer] Fix assert in ExprEngine::processSwitch This diff replaces getTypeSize(CondE->getType())) with getIntWidth(CondE->getType())) in ExprEngine::processSw

[PATCH] D22712: Remove FileEntry copy-constructor

2016-10-20 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. @bkramer ? https://reviews.llvm.org/D22712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D22712: Remove FileEntry copy-constructor

2016-10-20 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. i see, thanks. So do i understand correctly that we can proceed with this patch ? https://reviews.llvm.org/D22712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D25731: [analyzer] NumberObjectConversion: Support OSNumber and CFNumberRef.

2016-10-20 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp:149 BugReporter &BR) const { MatchFinder F; Callback CB(this, BR, AM.getAnalysisDeclContext(D));

r284782 - [clang] Remove FileEntry copy-constructor

2016-10-20 Thread Alexander Shaposhnikov via cfe-commits
Author: alexshap Date: Thu Oct 20 16:20:35 2016 New Revision: 284782 URL: http://llvm.org/viewvc/llvm-project?rev=284782&view=rev Log: [clang] Remove FileEntry copy-constructor Code cleanup: address FIXME in the file include/clang/Basic/FileManager.h and remove copy-constructor of the class File

[PATCH] D22712: Remove FileEntry copy-constructor

2016-10-20 Thread Alexander Shaposhnikov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284782: [clang] Remove FileEntry copy-constructor (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D22712?vs=65187&id=75356#toc Repository: rL LLVM https://reviews.llvm.org/

[PATCH] D26288: Deduplicate replacements by FileEntry instead of file names.

2016-11-03 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: lib/Tooling/Core/Replacement.cpp:578 + continue; +ProcessedFileEntries.insert(FE); +Result[Entry.first] = std::move(Entry.second); (saves 2 lines of code) (although not particularly important) if (Proces

[PATCH] D23298: [clang-rename] nit: use isWritten

2016-08-09 Thread Alexander Shaposhnikov via cfe-commits
alexshap created this revision. alexshap added reviewers: omtcyfz, alexfh. alexshap added a subscriber: cfe-commits. alexshap changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users". nit: use isWritten and const auto *Initializer in NamedDeclFindingA

Re: [PATCH] D23298: [clang-rename] nit: use isWritten

2016-08-09 Thread Alexander Shaposhnikov via cfe-commits
alexshap updated this revision to Diff 67301. alexshap added a comment. Fix clang-rename/USRLocFinder.cpp:47 as well https://reviews.llvm.org/D23298 Files: clang-rename/USRFinder.cpp clang-rename/USRLocFinder.cpp Index: clang-rename/USRLocFinder.cpp

Re: [PATCH] D23298: [clang-rename] nit: use isWritten

2016-08-09 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. > Do you have a commit access or do you need me to land the patch? No, I don't. I will be grateful to you if you land the patch. Thanks. https://reviews.llvm.org/D23298 ___ cfe-commits mailing list cfe-commits@lists.llvm.

Re: [PATCH] D23279: clang-reorder-fields

2016-08-09 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. First of all, many thanks for the comments & proposal of clang-refactor. 1. Regarding high-level project organization: clang-refactor - that can be a good place for various refactoring techniques like the existing clang-rename, my simple tool, etc - essentially what Kir

Re: [PATCH] D23279: clang-reorder-fields

2016-08-09 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. > The excess padding checker doesn't provide a fix-it. yup, although i think it would be useful to add one of the optimal layouts to the report (i have a diff for that (still in the oven), i have not sent it for code review yet). But as i mentioned above - it seems to

Re: [PATCH] D23279: clang-reorder-fields

2016-08-09 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. Regarding TUs - i am aware of that - would be useful if you could provide a test which doesn't work - that would help us avoid miscommunication. Thanks. Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commit

Re: [PATCH] D23279: clang-reorder-fields

2016-08-09 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. Suppose you have a struct Foo defined in LibA and you have used clang-rename to rename Foo into Bar (or just a field of Foo say - you have renamed Foo::x into Foo::y); LibA is linked to LibB and you have Foo foo = { &x, 17, 1.29, 0 }; in LibB. Therefore LibA knows noth

Re: [PATCH] D23279: clang-reorder-fields

2016-08-09 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. The difference is that if we reorder fields the new struct is not binary-compatible with the old one. Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

Re: [PATCH] D23279: clang-reorder-fields

2016-08-09 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. my point is the following: this tool helps perform some operation (changing the order of fields), if smb decides to do it manually - the result will have exactly the same issue. Repository: rL LLVM https://reviews.llvm.org/D23279

Re: [PATCH] D23279: clang-reorder-fields

2016-08-09 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. > I do think that an automated tool will do a better job of changing field > orderings in a non-breaking way than most people would, mostly due to > initializer lists. yeah, that was the original motivation Repository: rL LLVM https://reviews.llvm.org/D23279 _

Re: [PATCH] D23279: clang-reorder-fields

2016-08-10 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. 0. the tool relies on the compilation database from day one (like the other clang tools using tooling::RefactoringTool) 1. regarding TUs:. A. just in case how it works: it uses the full name of record to find the definition, then it changes the definition, then it fin

Re: [PATCH] D23279: clang-reorder-fields

2016-08-10 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. > Well, multi-TU support is needed for many tools and it is far beyond one tool > implementation details if we want it to be nice. I want to >have multi-TU > support in the clang-refactor, but it is still in designing stage at the > moment. At first, one translation un

Re: [PATCH] D23387: [Analyzer] Report found fields order in PaddingChecker.

2016-08-11 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. Thanks, your points regarding better formatting of the diagnostics / moving it into a note or fixit and using more stable sort are valid, i will update this diff today or tomorrow. Regarding the type name - i am not sure - for example for template specializations (for

Re: [PATCH] D23387: [Analyzer] Report found fields order in PaddingChecker.

2016-08-11 Thread Alexander Shaposhnikov via cfe-commits
alexshap updated this revision to Diff 67773. alexshap added a comment. Use more stable sort (preserving the original order if possible). Change the format of the report. Update the tests. I have not turned it to "note:" or "remark:" because in this case it's not included into the description and

Re: [PATCH] D23387: [Analyzer] Report found fields order in PaddingChecker.

2016-08-11 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. toy example: F2262237: toy_example.png https://reviews.llvm.org/D23387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23387: [Analyzer] Report found fields order in PaddingChecker.

2016-08-11 Thread Alexander Shaposhnikov via cfe-commits
alexshap updated this revision to Diff 67797. alexshap added a comment. Update the tests. Update the format again (do not include the type name because the diagnostics becomes too verbose and unreadable (i ran it against LLVM and clang - with type names the diagnostic messages are getting very l

Re: [PATCH] D23387: [Analyzer] Report found fields order in PaddingChecker.

2016-08-12 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Checkers/PaddingChecker.cpp:217 @@ +216,3 @@ +// then large field indices to small field indices +return std::make_tuple(Align, -Size, + Field ? -static_cast(Field->getFie

Re: [PATCH] D23387: [Analyzer] Report found fields order in PaddingChecker.

2016-08-15 Thread Alexander Shaposhnikov via cfe-commits
alexshap marked 2 inline comments as done. alexshap added a comment. ping https://reviews.llvm.org/D23387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23387: [Analyzer] Report found fields order in PaddingChecker.

2016-08-15 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. i don't have commit access, if you could land this patch i would be grateful https://reviews.llvm.org/D23387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D23536: Remove excessive padding from ImmOp and RegOp.

2016-08-15 Thread Alexander Shaposhnikov via cfe-commits
alexshap created this revision. alexshap added a reviewer: tstellarAMD. alexshap added a subscriber: cfe-commits. alexshap changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users". Herald added subscribers: arsenm, aemerson. The structs ImmOp and RegOp

Re: [PATCH] D23536: Remove excessive padding from ImmOp and RegOp.

2016-08-15 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. Test plan: make -j8 check-llvm-unit F2273124: Screen Shot 2016-08-15 at 5.14.59 PM.png F2273127: Screen Shot 2016-08-15 at 5.14.29 PM.png https://reviews.llvm.org/D23536 _

Re: [PATCH] D23536: Remove excessive padding from ImmOp and RegOp.

2016-08-15 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. Thx, I don't have commit access, need smb to land this patch https://reviews.llvm.org/D23536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23530: Remove excessive padding from BarrierOp, PrefetchOp, PSBHintOp.

2016-08-15 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. Yes: "Data, Length, Val" would work as well, i will update this diff https://reviews.llvm.org/D23530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23530: Remove excessive padding from BarrierOp, PrefetchOp, PSBHintOp.

2016-08-15 Thread Alexander Shaposhnikov via cfe-commits
alexshap updated this revision to Diff 68128. alexshap added a comment. Address code review comment https://reviews.llvm.org/D23530 Files: lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp Index: lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp ==

[PATCH] D23546: Remove excessive padding from LineNoCacheTy

2016-08-16 Thread Alexander Shaposhnikov via cfe-commits
alexshap created this revision. alexshap added a reviewer: lattner. alexshap added a subscriber: cfe-commits. alexshap changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users". The struct LineNoCacheTy is in SourceMgr.cpp inside anonymous namespace. Th

Re: [PATCH] D23546: Remove excessive padding from LineNoCacheTy

2016-08-16 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. F2274214: Screen Shot 2016-08-16 at 3.34.00 AM.png https://reviews.llvm.org/D23546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

Re: [PATCH] D23546: Remove excessive padding from LineNoCacheTy

2016-08-16 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. Thanks, no, i don't. I will be grateful to you if you land this patch. https://reviews.llvm.org/D23546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23651: [clang-rename] improve performance for rename-all

2016-08-18 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a subscriber: alexshap. Comment at: clang-rename/USRFindingAction.h:38 @@ -37,5 +37,3 @@ private: - unsigned SymbolOffset; - std::string OldName; - std::string SpellingName; - std::vector USRs; + std::vector SymbolOffsets; + std::vector OldNames;

[PATCH] D23653: Minor cleanup of SimpleTypoCorrector

2016-08-18 Thread Alexander Shaposhnikov via cfe-commits
alexshap created this revision. alexshap added reviewers: gribozavr, bkramer. alexshap added a subscriber: cfe-commits. alexshap changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users". Add the "explicit" specifier to the single-argument constructor o

Re: [PATCH] D23653: Minor cleanup of SimpleTypoCorrector

2016-08-18 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. F2283280: Screen Shot 2016-08-18 at 4.29.34 AM.png https://reviews.llvm.org/D23653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

Re: [PATCH] D23651: [clang-rename] improve performance for rename-all

2016-08-19 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: clang-rename/USRFindingAction.cpp:205 @@ -196,2 +204,3 @@ + USRList)); return std::move(Consumer); } not particularly important, probably it can be simply return llvm::make_uniq

Re: [PATCH] D23651: [clang-rename] improve performance for rename-all

2016-08-19 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: clang-rename/USRFindingAction.cpp:190 @@ -175,1 +189,3 @@ + std::vector NextUSRBunch = Finder.Find(); + USRList.push_back(NextUSRBunch); } USRList.push_back(std::move(NextUSRBunch)) or (IMO even better)

Re: [PATCH] D23653: Minor cleanup of SimpleTypoCorrector

2016-08-19 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. ping https://reviews.llvm.org/D23653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23279: clang-reorder-fields

2016-08-19 Thread Alexander Shaposhnikov via cfe-commits
alexshap removed rL LLVM as the repository for this revision. alexshap updated this revision to Diff 68738. alexshap added a comment. 1. Handle C++ ctors. 2. Add tests. 3. I have a diff for proper moving the attached comments based on http://llvm.org/devmtg/2012-11/Gribenko_CommentParsing.pdf . I

Re: [PATCH] D23653: Minor cleanup of SimpleTypoCorrector

2016-08-19 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. i can do that, although there will be a lot of changes (mostly because of clang-format). Another concern is that the style of the other files located inside the same folder also might be not clang-format compliant. Do you want me to do that ? (i mean to run clang-tidy

Re: [PATCH] D23653: Minor cleanup of SimpleTypoCorrector

2016-08-19 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. i see, it makes sense, thanks. Repository: rL LLVM https://reviews.llvm.org/D23653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23653: Minor cleanup of SimpleTypoCorrector

2016-08-19 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a reviewer: Eugene.Zelenko. alexshap removed rL LLVM as the repository for this revision. alexshap updated this revision to Diff 68746. alexshap added a comment. 1. clang-tidy -checks=google-explicit-constructor tools/clang/lib/AST/CommentSema.cpp - no other issues found 2. clang-f

Re: [PATCH] D23279: clang-reorder-fields

2016-08-20 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. Thanks for the comments. @bcraig, multi-TU support is in - in the sense that it's in at the same level, as it's in for clang-rename and the other tools (take a look my comments above, please). Also: @omtcyf0: > Well, multi-TU support is needed for many tools and it is

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. > My only high-level comment so far (will try to review in more detail later) > is: I find it strange to mix ASTMatchers and a >RecursiveASTVisitor in the > same tool. It seem that if you are using ASTMatchers internally for other > things, you should also >use ASTMatc

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: test/clang-reorder-fields/CStructAmbiguousName.cpp:6 @@ +5,3 @@ +struct Foo { + int x;// CHECK: int x; + double y; // CHECK: double y; djasper wrote: > Have you thought about how to handle comments that surround th

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. @djasper - regarding the visitor - thank you, i understand ur concerns - i will add a version which uses a matcher (will update this diff). Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commits mailing lis

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap updated this revision to Diff 68939. alexshap added a comment. 1. Get rid of the visitor. 2. Get rid of the dependency on libc++ in tests (ran and checked the tests under the minimal checkout: llvm + clang + extra tools) Repository: rL LLVM https://reviews.llvm.org/D23279 Files:

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap removed rL LLVM as the repository for this revision. alexshap changed the visibility of this Differential Revision from "All Users" to "Public (No Login Required)". alexshap updated this revision to Diff 68943. alexshap added a comment. Fix typo https://reviews.llvm.org/D23279 Files:

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. @aaron.ballman Thanks, yeah, there is an issue. Also there are inline-comments by @bcraig and @compnerd about the tests. I used clang-rename, include-fixer, clang-tidy as examples. alexshap-mbp:extra alexshap$ grep -r -n "sed -e " ./* | head -n 5 ./test/clang-tidy/mode

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap updated this revision to Diff 68953. alexshap added a comment. Drop support of -field-pos for now Repository: rL LLVM https://reviews.llvm.org/D23279 Files: CMakeLists.txt clang-reorder-fields/CMakeLists.txt clang-reorder-fields/ReorderFieldsAction.cpp clang-reorder-fields/R

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. @aaron.ballman thanks, yeah, i understand ur concerns that now we have zero tests that can run on windows. To be honest i would prefer not to depend on sed, cat etc at all and have most of the tests (i would prefer all of them) running on windows - but by this moment i

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. > but by this moment i have not figured out yet how to make it happen. oh, i see, let me check - i will update this diff Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commits mailing list cfe-commits@list

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap removed rL LLVM as the repository for this revision. alexshap updated this revision to Diff 68955. alexshap added a comment. Get rid of sed in tests https://reviews.llvm.org/D23279 Files: CMakeLists.txt clang-reorder-fields/CMakeLists.txt clang-reorder-fields/ReorderFieldsAction.

Re: [PATCH] D23279: clang-reorder-fields

2016-08-22 Thread Alexander Shaposhnikov via cfe-commits
alexshap marked 4 inline comments as done. alexshap added a comment. https://reviews.llvm.org/D23279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. @djasper, @bcraig, @aaron.ballman - many thanks for the comments and suggestions, please, let me know if you are waiting for any other changes on my side (for v0) or if there is anything else i can do to make reviewing easier. Repository: rL LLVM https://reviews.ll

[PATCH] D23821: Minor cleanup of the class Pattern

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap created this revision. alexshap added reviewers: dsanders, probinson. alexshap added a subscriber: cfe-commits. alexshap set the repository for this revision to rL LLVM. alexshap changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users". Herald

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap updated this revision to Diff 69056. alexshap added a comment. Drop the callbacks (the worst-case complexity might be worse, but this approach requires less code). Repository: rL LLVM https://reviews.llvm.org/D23279 Files: CMakeLists.txt clang-reorder-fields/CMakeLists.txt cl

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap marked 2 inline comments as done. alexshap added a comment. Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: clang-reorder-fields/ReorderFieldsAction.h:30 @@ +29,3 @@ + std::map &Replacements; + +public: the thing is that a few weeks ago there was a diff https://reviews.llvm.org/D21748?id=64016. That diff contains a lot of cha

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap updated this revision to Diff 69065. alexshap added a comment. minor cleanup Repository: rL LLVM https://reviews.llvm.org/D23279 Files: CMakeLists.txt clang-reorder-fields/CMakeLists.txt clang-reorder-fields/ReorderFieldsAction.cpp clang-reorder-fields/ReorderFieldsAction.h

[PATCH] D23826: Remove excessive padding from PTHStatData

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap created this revision. alexshap added reviewers: mehdi_amini, bkramer. alexshap added a subscriber: cfe-commits. alexshap set the repository for this revision to rL LLVM. alexshap changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users". The c

Re: [PATCH] D23826: Remove excessive padding from PTHStatData

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. Ok, thanks. Could you land this diff ? (i don't have commit access) Repository: rL LLVM https://reviews.llvm.org/D23826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: clang-reorder-fields/tool/ClangReorderFields.cpp:44 @@ +43,3 @@ + bool parse(cl::Option &O, StringRef ArgName, const std::string &ArgValue, + SmallVector &Val) { +Val.clear(); djasper wrote: > Don't use

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: clang-reorder-fields/ReorderFieldsAction.h:31 @@ +30,3 @@ + +public: + ReorderFieldsAction( djasper wrote: > I don't why clang-rename does what it does at the moment. My main point is > that we have already implemented

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. regarding writing the comments - yeah, i will add them - just have not updated the diff yet (writing comments doesn't come to me easily) Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commits mailing list c

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap marked 2 inline comments as done. alexshap added a comment. Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D23828: Make InitListExpr::isExplicit const

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap created this revision. alexshap added reviewers: djasper, bkramer. alexshap added a subscriber: cfe-commits. alexshap set the repository for this revision to rL LLVM. alexshap changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users". Mark the

Re: [PATCH] D23279: clang-reorder-fields

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap added inline comments. Comment at: clang-reorder-fields/ReorderFieldsAction.cpp:152 @@ +151,3 @@ + // SourceLocation::isValid is const. + if (!const_cast(InitListEx)->isExplicit() || + !InitListEx->getNumInits()) djasper wrote: > I think it is an o

Re: [PATCH] D23828: Make InitListExpr::isExplicit const

2016-08-23 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a comment. Thx, i don't have commit access, if u could land this diff i would be grateful Repository: rL LLVM https://reviews.llvm.org/D23828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

Re: [PATCH] D23279: clang-reorder-fields

2016-08-24 Thread Alexander Shaposhnikov via cfe-commits
alexshap added a subscriber: ioeric. Comment at: clang-reorder-fields/ReorderFieldsAction.h:31 @@ +30,3 @@ + +public: + ReorderFieldsAction( alexshap wrote: > djasper wrote: > > I don't why clang-rename does what it does at the moment. My main point is > > that

Re: [PATCH] D23279: clang-reorder-fields

2016-08-24 Thread Alexander Shaposhnikov via cfe-commits
alexshap updated this revision to Diff 69174. alexshap added a comment. Address @djasper 's comments 1. Add brief comments to the helper functions. 2. Get rid of the workaround. (https://reviews.llvm.org/D23828 has been merged in and i have rebased on the latest revision) 3. Made stylistic / n

Re: [PATCH] D23279: clang-reorder-fields

2016-08-24 Thread Alexander Shaposhnikov via cfe-commits
alexshap marked 17 inline comments as done. alexshap added a comment. Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23279: clang-reorder-fields

2016-08-24 Thread Alexander Shaposhnikov via cfe-commits
alexshap updated this revision to Diff 69186. alexshap added a comment. Use a more elaborate approach for command line options. alexshap-mbp:srcs alexshap$ clang-reorder-fields -record-name Foo -fields-order s1,x,z,s2 main.cpp >/dev/null && echo ok ok alexshap-mbp:srcs alexshap$ clang-reorder-fi

Re: [PATCH] D23279: clang-reorder-fields

2016-08-24 Thread Alexander Shaposhnikov via cfe-commits
alexshap marked an inline comment as done. alexshap added a comment. Repository: rL LLVM https://reviews.llvm.org/D23279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   >