Re: [PATCH] D21075: Correct invalid end location in diagnostics for some identifiers.

2016-06-28 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: lib/Sema/SemaType.cpp:1339 @@ +1338,3 @@ +auto R = DS.getSourceRange(); +if (R.getEnd().isInvalid()) + R.setEnd(R.getBegin()); Do you know in which cases we get source ranges that are half valid?

Re: [PATCH] D21810: Don't instantiate a full host toolchain in ASTMatchersTest.

2016-06-28 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: unittests/ASTMatchers/ASTMatchersTest.h:77 @@ +76,3 @@ + // Some tests need rtti/exceptions on. Use an unknown-unknown triple so we + // don't instantiate the full system toolchain. On Linux, instantiting the + // toolchain involves s

Re: [PATCH] D21895: CFGBuilder: Fix crash when visiting a range-based for over a dependent type

2016-06-30 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: unittests/Analysis/CFGTest.cpp:49 @@ +48,3 @@ + std::vector Args = {"-std=c++11"}; + ASSERT_TRUE(tooling::runToolOnCodeWithArgs(Factory->create(), Code, Args)); +} I think we want to assert that we at least found func on

Re: [PATCH] D21601: Make tooling::applyAllReplacements return llvm::Expected instead of empty string to indicate potential error.

2016-07-04 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D21601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D21602: Changes related to tooling::applyAllReplacements interface change in D21601.

2016-07-04 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG. Nice! Comment at: include-fixer/IncludeFixer.cpp:323-324 @@ -322,1 +322,4 @@ +return CleanReplaces; + auto FormattedReplaces = formatReplacements(Code, *CleanReplaces

Re: [PATCH] D21895: CFGBuilder: Fix crash when visiting a range-based for over a dependent type

2016-07-06 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D21895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D21799: [ASTMatchers] Add missing forEachArgumentWithParam() to code sample

2016-07-06 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D21799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D21075: Correct invalid end location in diagnostics for some identifiers.

2016-07-06 Thread Manuel Klimek via cfe-commits
klimek added a reviewer: rsmith. Comment at: lib/Sema/SemaType.cpp:1339 @@ +1338,3 @@ +auto R = DS.getSourceRange(); +if (R.getEnd().isInvalid()) + R.setEnd(R.getBegin()); erikjv wrote: > klimek wrote: > > Do you know in which cases we get

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-06 Thread Manuel Klimek via cfe-commits
klimek added a reviewer: bkramer. klimek added a comment. I think we really want 2 tools: a) one that is optimized for oldname->newname renames, and supports the multi-TU case really well b) one that is meant to be integrated with editors and works mainly off of a location in a file I'm a bit t

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-07 Thread Manuel Klimek via cfe-commits
klimek added a comment. In http://reviews.llvm.org/D21814#476572, @bkramer wrote: > In http://reviews.llvm.org/D21814#475322, @klimek wrote: > > > I think we really want 2 tools: > > a) one that is optimized for oldname->newname renames, and supports the > > multi-TU case really well > > b) on

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-07 Thread Manuel Klimek via cfe-commits
klimek added a comment. Kirill, I think it's important to note that Miklos is probably a user, otherwise I'd guess he wouldn't add those features. Generally, we also internally have a (large scale) simplified rename tool that allows renaming multiple things in a code base at once; it is definite

Re: [PATCH] D22129: [clang-rename] add documentation

2016-07-08 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: docs/clang-rename.rst:13 @@ +12,3 @@ + +:program:`clang-rename` is a clang-based C++ "linter" tool. Its purpose is to +perform efficient renaming actions in large-scale projects such as renaming s/"linter"// http://revie

Re: [PATCH] D22102: [clang-rename] extend testset

2016-07-11 Thread Manuel Klimek via cfe-commits
klimek added a comment. Add // FIXME: to tests that do not work yet. I'd personally not check in the XFAIL tests for now, and just add them when you implement the missing functionality; the problem with XFAIL here is that (due to the offsets involved) they can easily switch into a mode where t

Re: [PATCH] D22102: [clang-rename] extend testset

2016-07-14 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: test/clang-rename/TemplateTypename.cpp:4 @@ +3,3 @@ +// RUN: sed 's,//.*,,' %t.cpp | FileCheck %s +// XFAIL: * + Here, too? http://reviews.llvm.org/D22102 ___ cfe-commits ma

Re: [PATCH] D22102: [clang-rename] extend testset

2016-07-14 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D22102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D21748: Implement tooling::Replacements as a class.

2016-07-14 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include/clang/Tooling/Core/Replacement.h:160 @@ +159,3 @@ + /// This returns true if the replacement is successfully inserted; otherwise, + /// it returns an llvm::Error, i.e. there is conflict between R and the + /// existing replaceme

Re: [PATCH] D22351: [include-fixer] Move cursor to #include line in vim after inserting a missing header.

2016-07-14 Thread Manuel Klimek via cfe-commits
klimek added a subscriber: klimek. klimek added a comment. +1 to not throwing users around by default. Can we make it configurable if folks want it? https://reviews.llvm.org/D22351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-15 Thread Manuel Klimek via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D21814#478879, @vmiklos wrote: > As far as I see `tooling::CommonOptionsParser` (in its current form) does not > handle cl::SubCommand instances. Should I fix that or would it be OK to > switch to using `cl::ParseCommandLineOptions` directly i

Re: [PATCH] D21814: clang-rename: support multiple renames with one invocation

2016-07-15 Thread Manuel Klimek via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D21814#485410, @vmiklos wrote: > The alternative is to change the `CommonOptionsParser` ctor to take a vector > of `OptionCategory&`, and in that case we can add the -extra-arg-before and > other options to all subcommands, but that means he'l

Re: [PATCH] D22408: [clang-rename] add support for overridden functions

2016-07-18 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: clang-rename/USRFindingAction.cpp:12 @@ -12,1 +11,3 @@ +/// \brief Provides an action to find USR for the symbol at and all +/// relevant USRs aswell. /// ... at , as well as all relevant USRs. Comment

Re: [PATCH] D22408: [clang-rename] add support for overridden functions

2016-07-18 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: clang-rename/USRFindingAction.cpp:45 @@ +44,3 @@ +namespace { +// \brief NamedDeclFindingConsumer should delegate finding USRs relevant to +// given Decl to RelevantUSRFinder. Still pondering whether 'relevant' is a good n

Re: [PATCH] D17704: Added interfaces for code-formatting while applying replacements.

2016-02-29 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include/clang/Tooling/Core/Replacement.h:227-232 @@ -222,1 +226,8 @@ +/// \brief Applies all replacements in \p Replaces to \p Code. +/// +/// This completely ignores the path stored in each replacement. If one or more +/// replacements

Re: [PATCH] D17704: Added interfaces for code-formatting while applying replacements.

2016-02-29 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG Comment at: lib/Tooling/Core/Replacement.cpp:290 @@ +289,3 @@ + const format::FormatStyle &Style) { + if (Replaces.empty()) return

r262232 - Implement new interfaces for code-formatting when applying replacements.

2016-02-29 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Mon Feb 29 10:27:41 2016 New Revision: 262232 URL: http://llvm.org/viewvc/llvm-project?rev=262232&view=rev Log: Implement new interfaces for code-formatting when applying replacements. Patch by Eric Liu. Modified: cfe/trunk/include/clang/Tooling/Core/Replacement.h cf

Re: [PATCH] D17704: Added interfaces for code-formatting while applying replacements.

2016-02-29 Thread Manuel Klimek via cfe-commits
klimek closed this revision. klimek added a comment. Submitted as r262232 http://reviews.llvm.org/D17704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r262234 - Revert "Implement new interfaces for code-formatting when applying replacements."

2016-02-29 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Mon Feb 29 10:44:16 2016 New Revision: 262234 URL: http://llvm.org/viewvc/llvm-project?rev=262234&view=rev Log: Revert "Implement new interfaces for code-formatting when applying replacements." This reverts commit r262232. Modified: cfe/trunk/include/clang/Tooling/Core/

Re: r262232 - Implement new interfaces for code-formatting when applying replacements.

2016-02-29 Thread Manuel Klimek via cfe-commits
On Mon, Feb 29, 2016 at 5:39 PM Chandler Carruth wrote: > On Mon, Feb 29, 2016 at 11:32 AM Manuel Klimek via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: klimek >> Date: Mon Feb 29 10:27:41 2016 >> New Revision: 262232 >> >> URL: h

Re: [PATCH] D17727: Moved applyAllReplacementsAndFormat to clangFormat to avoid cyclic dependency.

2016-03-01 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include/clang/Format/Format.h:734-736 @@ -733,1 +733,5 @@ +/// \brief Return replacements that are merged from orginal replacements +/// and the replacements for formatting the code after applying the orginal +/// replacements. +tooling:

r262318 - Optionally demote fatal errors to non-fatal errors.

2016-03-01 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Tue Mar 1 04:56:19 2016 New Revision: 262318 URL: http://llvm.org/viewvc/llvm-project?rev=262318&view=rev Log: Optionally demote fatal errors to non-fatal errors. This behavior is enabled when the new CXTranslationUnit_KeepGoing option is passed to clang_parseTranslationUnit

Re: [PATCH] D17727: Moved applyAllReplacementsAndFormat to clangFormat to avoid cyclic dependency.

2016-03-01 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D17727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

r262323 - Add functions to apply replacements and reformat them.

2016-03-01 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Tue Mar 1 06:37:30 2016 New Revision: 262323 URL: http://llvm.org/viewvc/llvm-project?rev=262323&view=rev Log: Add functions to apply replacements and reformat them. This is a commonly useful feature to have, and we have implemented it multiple times with different kinds of

r262324 - Fix DLL build by adding required dependency.

2016-03-01 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Tue Mar 1 06:47:30 2016 New Revision: 262324 URL: http://llvm.org/viewvc/llvm-project?rev=262324&view=rev Log: Fix DLL build by adding required dependency. Modified: cfe/trunk/unittests/Format/CMakeLists.txt Modified: cfe/trunk/unittests/Format/CMakeLists.txt URL: http

r262325 - Fix test breakage on windows where the default std is c++11 by forcing c++03 in the test.

2016-03-01 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Tue Mar 1 06:53:18 2016 New Revision: 262325 URL: http://llvm.org/viewvc/llvm-project?rev=262325&view=rev Log: Fix test breakage on windows where the default std is c++11 by forcing c++03 in the test. Modified: cfe/trunk/test/Index/keep-going.cpp Modified: cfe/trunk/te

Re: r262232 - Implement new interfaces for code-formatting when applying replacements.

2016-03-01 Thread Manuel Klimek via cfe-commits
On Wed, Mar 2, 2016 at 6:20 AM Daniel Jasper wrote: > On Tue, Mar 1, 2016 at 9:12 PM, Daniel Jasper wrote: > >> >> >> On Mon, Feb 29, 2016 at 8:49 AM, Manuel Klimek via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> On Mon,

Re: r262232 - Implement new interfaces for code-formatting when applying replacements.

2016-03-01 Thread Manuel Klimek via cfe-commits
t; >>>> >>>> >>>> On Mon, Feb 29, 2016 at 8:49 AM, Manuel Klimek via cfe-commits < >>>> cfe-commits@lists.llvm.org> wrote: >>>> >>>>> On Mon, Feb 29, 2016 at 5:39 PM Chandler Carruth >>>>> wro

Re: [PATCH] D17761: Added applyAllReplacementsAndFormat that works for multiple files.

2016-03-02 Thread Manuel Klimek via cfe-commits
klimek added a comment. Ok, after thinking about it a bit, here is a new plan: - get rid of applyAllReplacementsAndFormat (in all its forms) - implement a formatRewrittenCode(Rewriter&, ...); as Daniel wants libFormat to stay file focused, we can put that into non-core libTooling; it'll figure o

Re: [PATCH] D17807: [clang-tidy] Add "clang-tidy as a clang plugin" skeleton.

2016-03-02 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG. For now I don't see a better path forward. http://reviews.llvm.org/D17807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

Re: [PATCH] D17808: [libclang] Link clang-tidy plugin into libclang if present.

2016-03-02 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D17808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D17959: Make it possible for AST plugins to enable themselves by default

2016-03-08 Thread Manuel Klimek via cfe-commits
klimek added a reviewer: bkramer. klimek added a comment. +benjamin, who has done work in the area Repository: rL LLVM http://reviews.llvm.org/D17959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

r263004 - Pacify gcc's parenthesis warning, which doesn't realize that parens don't matter here.

2016-03-09 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Wed Mar 9 04:06:45 2016 New Revision: 263004 URL: http://llvm.org/viewvc/llvm-project?rev=263004&view=rev Log: Pacify gcc's parenthesis warning, which doesn't realize that parens don't matter here. Modified: cfe/trunk/lib/Index/IndexingContext.cpp Modified: cfe/trunk/l

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-14 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include/clang/Tooling/Core/Replacement.h:237 @@ +236,3 @@ +/// related to the same file entry are put into the same vector. +FileToReplacementsMap groupReplacementsByFile(const Replacements &Replaces, +

Re: [PATCH] D18313: clang-format: Make include sorting's main include detection configurable.

2016-03-21 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg Comment at: include/clang/Format/Format.h:415 @@ +414,3 @@ + /// as the "main" include in both a.cc and a_test.cc. + std::string IncludeMainRegex; + I'd

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-21 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include/clang/Tooling/Core/Replacement.h:231 @@ +230,3 @@ +typedef std::map +FileToReplacementsMap; + Honestly, I'd get rid of the typedef. Daniel, what do you think? Comment at: lib/Tooling/Refactori

Re: [PATCH] D18313: clang-format: Make include sorting's main include detection configurable.

2016-03-21 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include/clang/Format/Format.h:415 @@ +414,3 @@ + /// as the "main" include in both a.cc and a_test.cc. + std::string IncludeMainRegex; + djasper wrote: > I chose this name for better alphabetical ordering. I don't strong

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-21 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: lib/Tooling/Refactoring.cpp:90 @@ +89,3 @@ + +// FIXME: duplicated code here. Any better way to overload? +bool formatAndApplyAllReplacements(const Replacements &Replaces, ioeric wrote: > klimek wrote: > > Just call the ab

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-21 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: unittests/Tooling/RefactoringTest.cpp:206 @@ +205,3 @@ +TEST_F(ReplacementTest, ReplaceAndFormatNoStyle) { + std::string Code = "MyType012345678901234567890123456789 *a =\n" + "new MyType012345678901234567890123456

Re: [PATCH] D17852: Added formatAndApplyAllReplacements that works on multiple files in libTooling.

2016-03-21 Thread Manuel Klimek via cfe-commits
On Mon, Mar 21, 2016 at 6:36 PM Eric Liu wrote: > ioeric added inline comments. > > > Comment at: unittests/Tooling/RefactoringTest.cpp:206 > @@ +205,3 @@ > +TEST_F(ReplacementTest, ReplaceAndFormatNoStyle) { > + std::string Code = "MyType012345678901234567890123456789 *a =\n" >

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: lib/Format/Format.cpp:2103 @@ +2102,3 @@ + if (!FS) { +// If FS is not specified, the default file system is the real file system. +FS = vfs::getRealFileSystem().get(); I think this comment is redundant. I'd remov

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: lib/Format/Format.cpp:2148 @@ -2140,3 +2147,3 @@ // the file or not. -llvm::sys::fs::is_regular_file(Twine(ConfigFile), IsFile); - +Status = FS->status(ConfigFile.c_str()); +bool IsFile = Prefer .str to .c

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D18399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D15743: Fix assert hit when tree-transforming template template parameter packs.

2016-01-11 Thread Manuel Klimek via cfe-commits
klimek updated this revision to Diff 44451. klimek added a comment. Expand test. http://reviews.llvm.org/D15743 Files: lib/Sema/TreeTransform.h test/SemaTemplate/temp_arg_template.cpp Index: test/SemaTemplate/temp_arg_template.cpp ===

Re: [PATCH] D15743: Fix assert hit when tree-transforming template template parameter packs.

2016-01-11 Thread Manuel Klimek via cfe-commits
klimek added a reviewer: bkramer. Comment at: test/SemaTemplate/temp_arg_template.cpp:80 @@ +79,3 @@ +#if __cplusplus >= 201103L + static constexpr int N = sizeof...(Templates); +#endif dblaikie wrote: > It would be good if we tested for some specific behavior he

Re: [PATCH] D15743: Fix assert hit when tree-transforming template template parameter packs.

2016-01-11 Thread Manuel Klimek via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257326: Fix assert hit when tree-transforming template template parameter packs. (authored by klimek). Changed prior to commit: http://reviews.llvm.org/D15743?vs=44451&id=44460#toc Repository: rL LLV

r257326 - Fix assert hit when tree-transforming template template parameter packs.

2016-01-11 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Mon Jan 11 05:39:00 2016 New Revision: 257326 URL: http://llvm.org/viewvc/llvm-project?rev=257326&view=rev Log: Fix assert hit when tree-transforming template template parameter packs. Covers significantly more code in the template template pack argument test and fixes the re

Re: [PATCH] D16058: [clang-format] Fix comment aligning when there are changes within the comment

2016-01-11 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: lib/Format/WhitespaceManager.h:145 @@ +144,3 @@ +// comment. +bool IsTrailingCommentContinuation; + djasper wrote: > I find the term "continuation" a bit confusing here. How about something like > "IsInsideToken"?

Re: [PATCH] D16058: [clang-format] Fix comment aligning when there are changes within the comment

2016-01-11 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a reviewer: klimek. klimek added a comment. lg Comment at: lib/Format/WhitespaceManager.h:113 @@ -113,1 +112,3 @@ + bool ContinuesPPDirective, bool IsStartOfDeclName, + bool IsInsideTrailingCommentToken);

Re: [PATCH] D15506: [ASTMatchers] Allow hasName() to look through inline namespaces

2016-01-15 Thread Manuel Klimek via cfe-commits
klimek added a reviewer: bkramer. klimek added a comment. Adding Benjamin for an additional pair of eyes. Generally looks good. Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:351 @@ +350,3 @@ + + // First, match the name. + if (!MatchNodeName(Pattern, Node)) -

r258042 - Add forEachArgumentWithParam AST matcher.

2016-01-18 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Mon Jan 18 05:20:09 2016 New Revision: 258042 URL: http://llvm.org/viewvc/llvm-project?rev=258042&view=rev Log: Add forEachArgumentWithParam AST matcher. The new matcher allows users to provide a matcher for both the argument of a CallExpr/CxxConstructExpr a well as the ParmV

r258123 - Fix formatting of fully qualified names in array subscripts.

2016-01-19 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Tue Jan 19 08:05:32 2016 New Revision: 258123 URL: http://llvm.org/viewvc/llvm-project?rev=258123&view=rev Log: Fix formatting of fully qualified names in array subscripts. Before: a[ ::b::c]; After: a[::b::c]; Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp c

Re: [PATCH] D16394: Add an isVirtualAsWritten AST matcher.

2016-01-20 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a reviewer: klimek. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D16394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

Re: [PATCH] D16413: Let RecursiveASTVisitor visit array index VarDecls

2016-01-22 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG. I'd probably add a test to unittests/Tooling/RecursiveASTVisitorTest.cpp. http://reviews.llvm.org/D16413 ___ cfe-commits mailing list cfe-com

Re: [PATCH] D16718: Add an optional ToolName argument to runToolOnCodeWithArgs/buildASTFromCodeWithArgs.

2016-01-29 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D16718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D14695: [libclang] Add entry points that take a full command line including argv[0].

2015-11-16 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: include/clang-c/Index.h:5694-5695 @@ -5683,1 +5693,4 @@ /** + * \brief Same as clang_indexSourceFile but requires a full command line + * for \c command_line_args including argv[0]. + */ We should probably expand on why u

Re: [PATCH] D14506: Porting shouldVisitImplicitCode to DataRecursiveASTVisitor.

2015-11-17 Thread Manuel Klimek via cfe-commits
Richard, this is still optional, right? (the AST matchers need to control visitation) On Tue, Nov 17, 2015 at 2:26 AM Argyrios Kyrtzidis via cfe-commits < cfe-commits@lists.llvm.org> wrote: > W00t! That’s awesome Richard! > > On Nov 16, 2015, at 5:10 PM, Richard Smith wrote: > > Attached patch m

Re: [PATCH] D14506: Porting shouldVisitImplicitCode to DataRecursiveASTVisitor.

2015-11-17 Thread Manuel Klimek via cfe-commits
On Tue, Nov 17, 2015 at 10:14 AM Richard Smith wrote: > LOn Nov 17, 2015 12:49 AM, "Manuel Klimek" wrote: > > Richard, this is still optional, right? (the AST matchers need to > control visitation) > > This doesn't change RAV semantics at all (or if it does, it's a bug). If > any of the extensio

Re: r253269 - Make FP_CONTRACT ON the default.

2015-11-17 Thread Manuel Klimek via cfe-commits
Note that due to this change we're hitting an assert at lib/CodeGen/CGExprScalar.cpp:2570 in llvm::Value *tryEmitFMulAdd(const (anonymous namespace)::BinOpInfo &, const clang::CodeGen::CodeGenFunction &, clang::CodeGen::CGBuilderTy &, bool): LHSBinOp->getNumUses( ) == 0 && "Operations with multiple

r253337 - Revert "Make FP_CONTRACT ON the default."

2015-11-17 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Tue Nov 17 09:40:10 2015 New Revision: 253337 URL: http://llvm.org/viewvc/llvm-project?rev=253337&view=rev Log: Revert "Make FP_CONTRACT ON the default." This reverts commit r253269. This leads to assert / segfault triggering on the following reduced example: float foo(float

Re: r253269 - Make FP_CONTRACT ON the default.

2015-11-17 Thread Manuel Klimek via cfe-commits
Repro: float foo(float U, float base, float cell) { return (U = 2 * base) - cell; } Preparing rollback of the CL. On Tue, Nov 17, 2015 at 2:46 PM Manuel Klimek wrote: > Note that due to this change we're hitting an assert at > lib/CodeGen/CGExprScalar.cpp:2570 in llvm::Value *tryEmitFMulAdd(cons

Re: r253269 - Make FP_CONTRACT ON the default.

2015-11-17 Thread Manuel Klimek via cfe-commits
Reverted in r253337. Failing test case in commit message. On Tue, Nov 17, 2015 at 4:39 PM Manuel Klimek wrote: > Repro: > float foo(float U, float base, float cell) { return (U = 2 * base) - cell; > } > Preparing rollback of the CL. > > On Tue, Nov 17, 2015 at 2:46 PM Manuel Klimek wrote: > >>

Re: [PATCH] D14695: [libclang] Add entry points that take a full command line including argv[0].

2015-11-18 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG http://reviews.llvm.org/D14695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [cfe-commits] r119285 - in /cfe/trunk: lib/Frontend/ASTUnit.cpp tools/c-index-test/c-index-test.c

2015-11-18 Thread Manuel Klimek via cfe-commits
(now with the right list) On Tue, Nov 16, 2010 at 12:03 AM Douglas Gregor wrote: > Author: dgregor > Date: Mon Nov 15 17:00:34 2010 > New Revision: 119285 > > URL: http://llvm.org/viewvc/llvm-project?rev=119285&view=rev > Log: > Tweak libclang's heuristics for building precompiled preambles and

Re: [cfe-commits] r119285 - in /cfe/trunk: lib/Frontend/ASTUnit.cpp tools/c-index-test/c-index-test.c

2015-11-18 Thread Manuel Klimek via cfe-commits
On Wed, Nov 18, 2015 at 6:19 PM Douglas Gregor wrote: > > > Sent from my iPhone > > On Nov 18, 2015, at 8:19 AM, Manuel Klimek wrote: > > (now with the right list) > > On Tue, Nov 16, 2010 at 12:03 AM Douglas Gregor wrote: > >> Author: dgregor >> Date: Mon Nov 15 17:00:34 2010 >> New Revision:

Re: [cfe-commits] r119285 - in /cfe/trunk: lib/Frontend/ASTUnit.cpp tools/c-index-test/c-index-test.c

2015-11-18 Thread Manuel Klimek via cfe-commits
+Val FYI On Wed, Nov 18, 2015 at 6:59 PM Douglas Gregor wrote: > On Nov 18, 2015, at 9:36 AM, Manuel Klimek wrote: > > > > On Wed, Nov 18, 2015 at 6:19 PM Douglas Gregor wrote: > >> >> >> Sent from my iPhone >> >> On Nov 18, 2015, at 8:19 AM, Manuel Klimek wrote: >> >> (now with the right lis

Re: [PATCH] D15147: [clang-format] Reflow block comments when they're over the column limit

2015-12-02 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: lib/Format/BreakableToken.cpp:443 @@ -439,2 +442,3 @@ } + const StringRef Line = Lines[LineIndex]; For posterity, from in-person chat: Currently, this does the same as before when we're in DryRun mode, and only wrap

Re: [PATCH] D15149: Traverse the nested name specifier (loc) of namespace alias declarations.

2015-12-02 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D15149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D15121: A new clang-tidy module to find calls to `std::swap`, and change them to use ADL

2015-12-02 Thread Manuel Klimek via cfe-commits
klimek added a reviewer: bkramer. Comment at: clang-tidy/misc/StdSwapCheck.cpp:25 @@ +24,3 @@ +static SourceLocation findSemiAfterLocation(SourceLocation loc, +ASTContext &Ctx, +bool IsDecl) {

Re: Allow tools to work without compilation database

2015-12-03 Thread Manuel Klimek via cfe-commits
-if (!Compilations) - llvm::report_fatal_error(ErrorMessage); +if (!Compilations) { + errs() << "Compilation database not found - using default options\n"; + int argc = 1; + const char *argv[] = {"--"}; + Compilations.reset( + FixedCompilationDatabase::load

r254599 - Add fall-back mode for clang tools.

2015-12-03 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Thu Dec 3 04:38:53 2015 New Revision: 254599 URL: http://llvm.org/viewvc/llvm-project?rev=254599&view=rev Log: Add fall-back mode for clang tools. Run without flags if we cannot load a compilation database. This matches the behavior of clang itself when simply called with a

Re: Allow tools to work without compilation database

2015-12-03 Thread Manuel Klimek via cfe-commits
Applied your patch, modified it a bit, and submitted r254599. Thanks! On Thu, Dec 3, 2015 at 11:15 AM Russell Wallace wrote: > Okay - I don't understand how the class works well enough to be certain > that will do the same thing, but if you do, I've no problem taking your > word for it. Should I

Re: r254599 - Add fall-back mode for clang tools.

2015-12-03 Thread Manuel Klimek via cfe-commits
On Thu, Dec 3, 2015 at 1:15 PM Vladimir Voskresensky - Oracle via cfe-commits wrote: > Manuel > > On 12/ 3/15 01:38 PM, Manuel Klimek via cfe-commits wrote: > > +if (!Compilations) { > > + llvm::errs() << "Error while trying to

Re: [PATCH]: git-clang-format

2015-12-11 Thread Manuel Klimek via cfe-commits
+djasper On Fri, Dec 11, 2015 at 3:40 PM Alexander Shukaev via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hello everyone, > > Please, consider applying the attached patch or (at your option) a > refined version of it upstream. I'd be very excited to see it make into > the upcoming 3.8 re

Re: [PATCH] D13001: [libclang] Handle AutoType in clang_getTypeDeclaration

2015-12-14 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D13001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D15490: [libclang] Add a flag to create the precompiled preamble on the first parse.

2015-12-14 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D15490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

r255773 - Make matchers thread compatible, so we can pass them to different threads and run them on multiple translation units in parallel.

2015-12-16 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Wed Dec 16 09:48:58 2015 New Revision: 255773 URL: http://llvm.org/viewvc/llvm-project?rev=255773&view=rev Log: Make matchers thread compatible, so we can pass them to different threads and run them on multiple translation units in parallel. Modified: cfe/trunk/include/c

Re: [PATCH] D15606: Remove clang-modernize.

2015-12-17 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D15606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-12-21 Thread Manuel Klimek via cfe-commits
I think we'll want somebody to find out whether there are simpler ways to implement this. On Mon, Dec 21, 2015, 9:16 AM Daniel Jasper wrote: > djasper added a comment. > > Ping. What's the state of this? > > > http://reviews.llvm.org/D12407 > > > > ___

Re: [PATCH] D12407: [clang-format-vs] Add an option to reformat source code when file is saved to disk

2015-12-21 Thread Manuel Klimek via cfe-commits
klimek added a comment. I think we'll want somebody to find out whether there are simpler ways to implement this. http://reviews.llvm.org/D12407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D15743: Fix assert hit when tree-transforming template template parameter packs.

2015-12-23 Thread Manuel Klimek via cfe-commits
klimek created this revision. klimek added a reviewer: rsmith. klimek added a subscriber: cfe-commits. Covers significantly more code in the template template pack argument test and fixes the resulting assert problem. http://reviews.llvm.org/D15743 Files: lib/Sema/TreeTransform.h test/SemaTe

<    1   2   3   4   5   6