Re: [PATCH] D22712: Remove FileEntry copy-constructor

2016-07-24 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. As far as I know we still support GCC 4.7, which doesn't have emplace in std::map. I don't think this patch will work with 4.7. Should we drop support for 4.7? https://reviews.llvm.org/D22712 ___ cfe-commits mailing list c

Re: [PATCH] D22805: [clang-include-fixer] Added Emacs integration for clang-include-fixer.

2016-07-26 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/tool/clang-include-fixer.el:8 @@ +7,3 @@ + +;; This package allows to invoke the 'clnag-include-fixer' within Emacs. +;; 'clang-include-fixer' provides an automated way of adding #include clnag is another ty

Re: [PATCH] D22805: [clang-include-fixer] Added Emacs integration for clang-include-fixer.

2016-07-27 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. Looks good from my side. https://reviews.llvm.org/D22805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r276853 - [clang-include-fixer] Added Emacs integration for clang-include-fixer.

2016-07-27 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Jul 27 05:11:06 2016 New Revision: 276853 URL: http://llvm.org/viewvc/llvm-project?rev=276853&view=rev Log: [clang-include-fixer] Added Emacs integration for clang-include-fixer. Patch by Jens Massberg! Thanks a lot. Differential Revision: https://reviews.llvm.org/D22805 A

r277138 - Make test not fail on hosts where the default omp library is gomp.

2016-07-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Jul 29 08:07:09 2016 New Revision: 277138 URL: http://llvm.org/viewvc/llvm-project?rev=277138&view=rev Log: Make test not fail on hosts where the default omp library is gomp. This is the case on some linuxes, just force libomp so we get the desired results. Modified: cf

Re: r277142 - [ASTMatcher] Add hasTemplateArgument/hasAnyTemplateArgument support in functionDecl.

2016-07-29 Thread Benjamin Kramer via cfe-commits
On Fri, Jul 29, 2016 at 3:57 PM, Haojian Wu via cfe-commits wrote: > Author: hokein > Date: Fri Jul 29 08:57:27 2016 > New Revision: 277142 > > URL: http://llvm.org/viewvc/llvm-project?rev=277142&view=rev > Log: > [ASTMatcher] Add hasTemplateArgument/hasAnyTemplateArgument support in > functionDe

Re: r277142 - [ASTMatcher] Add hasTemplateArgument/hasAnyTemplateArgument support in functionDecl.

2016-07-29 Thread Benjamin Kramer via cfe-commits
Sorry for being overly dense, you misspelled 'typename' in the docs. On Fri, Jul 29, 2016 at 5:59 PM, Haojian Wu wrote: > No, this is not templateName patch. The templateName one is in r277155. > > On Fri, Jul 29, 2016 at 4:45 PM, Benjamin Kramer > wrote: >> >> On Fri, Jul 29, 2016 at 3:57 PM, H

Re: [PATCH] D23023: [include-fixer] Correct nested class search for identifiers with scoped information

2016-08-02 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. This revision is now accepted and ready to land. Comment at: include-fixer/SymbolIndexManager.h:32 @@ +31,3 @@ + /// \param IsNestedSearch Whether searching nested classes. If true, the + ///method tries to stripping identifier name parts

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

2016-08-03 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: alexfh. bkramer added a subscriber: cfe-commits. This is prone to ODR violations and generally frowned upon in many codebases (e.g. LLVM). The checker flags definitions, variables and classes in the global namespace. Common false positives l

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

2016-08-03 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 66716. bkramer added a comment. Add relnote. https://reviews.llvm.org/D23130 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/GlobalNamespaceCheck.cpp clang-tidy/misc/GlobalNamespaceCheck.h clang-tidy/misc/MiscTidyModule.cpp docs/ReleaseNotes

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

2016-08-03 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. DefinitionsInHeaders is tackling a different problem. IMO DefinitionsInHeaders is something that should be on by default everywhere, while this check for definitions in the global namespace is more of a coding style issue. GlobalNamesInHeaders is a bit of a misnomer, it

r277712 - Make isExternC work on VarDecls too.

2016-08-04 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Aug 4 05:02:03 2016 New Revision: 277712 URL: http://llvm.org/viewvc/llvm-project?rev=277712&view=rev Log: Make isExternC work on VarDecls too. Modified: cfe/trunk/docs/LibASTMatchersReference.html cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h cfe/trunk/unit

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

2016-08-04 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. In https://reviews.llvm.org/D23130#505290, @alexfh wrote: > And the second difference is that it is limited to definitions, but I don't > yet understand, why it is important, since declarations in the global > namespace (except for using declarations, typedefs, etc.) wi

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

2016-08-04 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 66792. bkramer added a comment. - Merge google-global-names-in-headers and misc-global-namespace into a new check google-global-names. https://reviews.llvm.org/D23130 Files: clang-tidy/google/CMakeLists.txt clang-tidy/google/GlobalNamesCheck.cpp clan

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

2016-08-04 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 66800. bkramer added a comment. Address review comments. https://reviews.llvm.org/D23130 Files: clang-tidy/google/CMakeLists.txt clang-tidy/google/GlobalNamesCheck.cpp clang-tidy/google/GlobalNamesCheck.h clang-tidy/google/GlobalNamesInHeadersCheck.

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

2016-08-04 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. In https://reviews.llvm.org/D23130#505769, @alexfh wrote: > Could you run the check on LLVM and post a summary of results? I have a full list at https://reviews.llvm.org/P7085. It's huge. https://reviews.llvm.org/D23130 _

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

2016-08-04 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: test/clang-tidy/google-global-names.cpp:13-14 @@ +12,4 @@ +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: 'i' declared in the global namespace +extern int ii = 0; +// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: 'ii' declared in the global na

Re: [PATCH] D23199: [include-fixer] Correct some header mappings.

2016-08-05 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D23199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

r277918 - Move helpers into anonymous namespaces. NFC.

2016-08-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Aug 6 06:21:04 2016 New Revision: 277918 URL: http://llvm.org/viewvc/llvm-project?rev=277918&view=rev Log: Move helpers into anonymous namespaces. NFC. Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp cfe/trunk/lib/Sema/SemaTemplate.cpp cfe/trunk/lib/Seri

r277917 - [StaticAnalyzer] Remove dead code.

2016-08-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Aug 6 06:20:59 2016 New Revision: 277917 URL: http://llvm.org/viewvc/llvm-project?rev=277917&view=rev Log: [StaticAnalyzer] Remove dead code. Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.

r277920 - [Sema] Make switch fully covered again.

2016-08-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Aug 6 06:28:20 2016 New Revision: 277920 URL: http://llvm.org/viewvc/llvm-project?rev=277920&view=rev Log: [Sema] Make switch fully covered again. Modified: cfe/trunk/lib/Sema/SemaExpr.cpp Modified: cfe/trunk/lib/Sema/SemaExpr.cpp URL: http://llvm.org/viewvc/llvm-proj

r277923 - [ASTReader] Use real move semantics instead of emulating them in the copy ctor.

2016-08-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Aug 6 07:45:16 2016 New Revision: 277923 URL: http://llvm.org/viewvc/llvm-project?rev=277923&view=rev Log: [ASTReader] Use real move semantics instead of emulating them in the copy ctor. No functionality change intended. Modified: cfe/trunk/lib/Serialization/ASTReaderD

Re: r277923 - [ASTReader] Use real move semantics instead of emulating them in the copy ctor.

2016-08-08 Thread Benjamin Kramer via cfe-commits
The members are references, pointers and a bool. None of them requires moving as they're trivially copyable. We actually have a clang-tidy check to remove std::move in those cases. On Mon, Aug 8, 2016 at 3:18 AM, Piotr Padlewski wrote: > > > 2016-08-06 5:45 GMT-07:00 Benjamin

Re: [PATCH] D23266: [include-fixer] Support processing multiple files in one run.

2016-08-08 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. Can you add a lit test for this? We should've added that earlier :| Comment at: include-fixer/IncludeFixer.h:53 @@ -51,2 +52,3 @@ /// The context that contains all information about the symbol being queried. + std::vector &Contexts; ---

Re: [PATCH] D23130: Add a check for definitions in the global namespace.

2016-08-08 Thread Benjamin Kramer via cfe-commits
-Wmissing-prototype only warns for functions, I want to catch classes too. Also functions in the global namespace with a prototype are still badness in some coding styles. The limitation on definitions was to cut down on false positives, the current version of the patch doesn't have that limitation

Re: [PATCH] D23266: [include-fixer] Support processing multiple files in one run.

2016-08-08 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lgtm Comment at: include-fixer/IncludeFixerContext.h:78 @@ -72,1 +77,3 @@ + /// \brief The absolute path to the file being processed. + std::string FilePath; ---

r278148 - Add a missing -no-canonical-prefixes.

2016-08-09 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Aug 9 14:20:25 2016 New Revision: 278148 URL: http://llvm.org/viewvc/llvm-project?rev=278148&view=rev Log: Add a missing -no-canonical-prefixes. Modified: cfe/trunk/test/Driver/cuda-detect.cu Modified: cfe/trunk/test/Driver/cuda-detect.cu URL: http://llvm.org/viewvc/l

r278487 - [C++1z] Fix crash when decomposing structs with anonymous members.

2016-08-12 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Aug 12 04:19:34 2016 New Revision: 278487 URL: http://llvm.org/viewvc/llvm-project?rev=278487&view=rev Log: [C++1z] Fix crash when decomposing structs with anonymous members. The diagnostic format was invalid. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.

r278488 - Prune unused diagnostics. NFC.

2016-08-12 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Aug 12 04:23:14 2016 New Revision: 278488 URL: http://llvm.org/viewvc/llvm-project?rev=278488&view=rev Log: Prune unused diagnostics. NFC. Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified:

r259355 - Remove the egregious PCHContainer layering hack that doesn't seem to be necessary anymore.

2016-02-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Feb 1 07:22:39 2016 New Revision: 259355 URL: http://llvm.org/viewvc/llvm-project?rev=259355&view=rev Log: Remove the egregious PCHContainer layering hack that doesn't seem to be necessary anymore. Modified: cfe/trunk/lib/Basic/FileManager.cpp cfe/trunk/lib/Fronten

r259376 - Move LocInfoType from Sema to AST.

2016-02-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Feb 1 11:42:01 2016 New Revision: 259376 URL: http://llvm.org/viewvc/llvm-project?rev=259376&view=rev Log: Move LocInfoType from Sema to AST. While transient and only used during parsing, LocInfoTypes are still used from ASTDumper and are part of the AST. Added: cfe/tr

r259489 - Move DebugInfoKind into its own header to cut the cyclic dependency edge from Driver to Frontend.

2016-02-02 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 2 05:06:51 2016 New Revision: 259489 URL: http://llvm.org/viewvc/llvm-project?rev=259489&view=rev Log: Move DebugInfoKind into its own header to cut the cyclic dependency edge from Driver to Frontend. Added: cfe/trunk/include/clang/Driver/DebugInfoKind.h Modified:

r259490 - Make headers self-contained.

2016-02-02 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 2 05:06:57 2016 New Revision: 259490 URL: http://llvm.org/viewvc/llvm-project?rev=259490&view=rev Log: Make headers self-contained. Modified: cfe/trunk/include/clang/Lex/HeaderMap.h cfe/trunk/include/clang/Lex/MacroArgs.h cfe/trunk/lib/Analysis/BodyFarm.h M

r259506 - [StaticAnalyzer] Pull SymExpr and SymbolData into its own header to avoid cyclic includes.

2016-02-02 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 2 08:24:11 2016 New Revision: 259506 URL: http://llvm.org/viewvc/llvm-project?rev=259506&view=rev Log: [StaticAnalyzer] Pull SymExpr and SymbolData into its own header to avoid cyclic includes. Added: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/SymExp

r259507 - Make the remaining headers self-contained.

2016-02-02 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 2 08:24:21 2016 New Revision: 259507 URL: http://llvm.org/viewvc/llvm-project?rev=259507&view=rev Log: Make the remaining headers self-contained. Modified: cfe/trunk/include/clang/AST/BaseSubobject.h cfe/trunk/include/clang/AST/DeclOpenMP.h cfe/trunk/include

r259518 - Make CodeGen headers self-contained.

2016-02-02 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 2 10:05:18 2016 New Revision: 259518 URL: http://llvm.org/viewvc/llvm-project?rev=259518&view=rev Log: Make CodeGen headers self-contained. Modified: cfe/trunk/lib/CodeGen/CGRecordLayout.h Modified: cfe/trunk/lib/CodeGen/CGRecordLayout.h URL: http://llvm.org/viewv

[clang-tools-extra] r259880 - Unbreak the cmake shared build.

2016-02-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Feb 5 05:38:50 2016 New Revision: 259880 URL: http://llvm.org/viewvc/llvm-project?rev=259880&view=rev Log: Unbreak the cmake shared build. Modified: clang-tools-extra/trunk/clang-tidy/google/CMakeLists.txt Modified: clang-tools-extra/trunk/clang-tidy/google/CMakeLists.

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

2016-02-05 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D15506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D17163: [ASTMatchers] Add matcher hasAnyName.

2016-02-12 Thread Benjamin Kramer via cfe-commits
bkramer added a subscriber: bkramer. Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:644 @@ -643,2 +643,3 @@ explicit HasNameMatcher(StringRef Name); + explicit HasNameMatcher(ArrayRef Names); alexfh wrote: > Why not `ArrayRef`? That's an artifac

r260815 - Reduce the number of implicit StringRef->std::string conversions by threading StringRef through more APIs.

2016-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Feb 13 07:42:54 2016 New Revision: 260815 URL: http://llvm.org/viewvc/llvm-project?rev=260815&view=rev Log: Reduce the number of implicit StringRef->std::string conversions by threading StringRef through more APIs. No functionality change intended. Modified: cfe/trunk/

r260814 - Fix use after free.

2016-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Feb 13 07:42:41 2016 New Revision: 260814 URL: http://llvm.org/viewvc/llvm-project?rev=260814&view=rev Log: Fix use after free. Found by asan. Modified: cfe/trunk/lib/Lex/Pragma.cpp Modified: cfe/trunk/lib/Lex/Pragma.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/tr

r260822 - Don't copy a DenseMap just to do lookup in it.

2016-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Feb 13 09:49:17 2016 New Revision: 260822 URL: http://llvm.org/viewvc/llvm-project?rev=260822&view=rev Log: Don't copy a DenseMap just to do lookup in it. Also remove the now unused isPodLike specialization. DenseMap only uses it for copies. Modified: cfe/trunk/lib/Sema

r260823 - RValue refs do not work that way.

2016-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Feb 13 10:00:13 2016 New Revision: 260823 URL: http://llvm.org/viewvc/llvm-project?rev=260823&view=rev Log: RValue refs do not work that way. Modified: cfe/trunk/lib/CodeGen/CGCall.cpp Modified: cfe/trunk/lib/CodeGen/CGCall.cpp URL: http://llvm.org/viewvc/llvm-project/

r260831 - Fix a leak in the generated code for attributes with strings.

2016-02-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Feb 13 12:11:49 2016 New Revision: 260831 URL: http://llvm.org/viewvc/llvm-project?rev=260831&view=rev Log: Fix a leak in the generated code for attributes with strings. Storing std::strings in attributes simply doesn't work, we never call the destructor. Use an array of Str

r260850 - Don't leak the ASTUnit when done with testing.

2016-02-14 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sun Feb 14 07:18:06 2016 New Revision: 260850 URL: http://llvm.org/viewvc/llvm-project?rev=260850&view=rev Log: Don't leak the ASTUnit when done with testing. Found by lsan. Modified: cfe/trunk/tools/c-index-test/core_main.cpp Modified: cfe/trunk/tools/c-index-test/core_ma

Re: [PATCH] D17375: Add parentheses around arithmetic in operand of '|' in llvm-dwp.cpp.

2016-02-18 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. I think this is the wrong solution. Per http://www.dwarfstd.org/ShowIssue.php?issue=140421.1 2. Calculate a secondary hash H' = (((S >> 32) & MASK(k)) | 1). [...] 4. Let H = (H + H') modulo M. Repeat at Step 3. So the OR has to happen before the ADD. http://re

Re: [PATCH] D17375: Add parentheses around arithmetic in operand of '|' in llvm-dwp.cpp.

2016-02-18 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. LGTM, will commit it for you. http://reviews.llvm.org/D17375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

r261217 - [Parse] Code complete expressions in bracket declarators.

2016-02-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Feb 18 09:30:24 2016 New Revision: 261217 URL: http://llvm.org/viewvc/llvm-project?rev=261217&view=rev Log: [Parse] Code complete expressions in bracket declarators. Currently we return no results when completing inside of the brackets in a 'char foo[]' declaration. Let the

Re: [PATCH] D17375: Add parentheses around arithmetic in operand of '|' in llvm-dwp.cpp.

2016-02-18 Thread Benjamin Kramer via cfe-commits
On Thu, Feb 18, 2016 at 5:39 PM, David Blaikie wrote: > Thanks all! Which compiler flagged this? Wonder if/why Clang didn't flag it > for me? It was coming from GCC 4.9. Haven't checked if Clang also has this somewhere. > On Thu, Feb 18, 2016 at 5:27 AM, Phabricator via cfe-commits > wrote: >>

Re: r261780 - Don't convert a char to a const char *

2016-02-24 Thread Benjamin Kramer via cfe-commits
Were you able to reproduce this build failure? ltrim has overloads for "char" and "StringRef", the former being very new. From the error message I suspect out of sync LLVM and Clang checkouts. On Wed, Feb 24, 2016 at 10:55 PM, David Majnemer via cfe-commits wrote: > Author: majnemer > Date: Wed F

Re: [PATCH] D19482: [include-fixer] Add a find-all-symbols tool for include-fixer.

2016-04-27 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/find-all-symbols/FindAllSymbols.h:39 @@ +38,3 @@ + ResultReporter *const Reporter; +}; + Ah, sorry, my bad. http://reviews.llvm.org/D19482 ___ cfe-commits ma

[clang-tools-extra] r267718 - Clean up the include fixer 'driver' a bit and make the database configurable.

2016-04-27 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Apr 27 09:24:32 2016 New Revision: 267718 URL: http://llvm.org/viewvc/llvm-project?rev=267718&view=rev Log: Clean up the include fixer 'driver' a bit and make the database configurable. Also add a test for it. The library is covered by unit tests, the driver was not. Added:

[clang-tools-extra] r267721 - Add missing dependency.

2016-04-27 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Apr 27 09:32:36 2016 New Revision: 267721 URL: http://llvm.org/viewvc/llvm-project?rev=267721&view=rev Log: Add missing dependency. Modified: clang-tools-extra/trunk/test/CMakeLists.txt Modified: clang-tools-extra/trunk/test/CMakeLists.txt URL: http://llvm.org/viewvc/l

[clang-tools-extra] r267738 - [find-all-symbols] Clean up dependencies, fixing cmake shared build.

2016-04-27 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Apr 27 11:50:17 2016 New Revision: 267738 URL: http://llvm.org/viewvc/llvm-project?rev=267738&view=rev Log: [find-all-symbols] Clean up dependencies, fixing cmake shared build. Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/tool/CMakeLists.txt Modified

[clang-tools-extra] r267739 - [find-all-symbols] Also update unittest dependencies.

2016-04-27 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Apr 27 11:56:29 2016 New Revision: 267739 URL: http://llvm.org/viewvc/llvm-project?rev=267739&view=rev Log: [find-all-symbols] Also update unittest dependencies. Modified: clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/CMakeLists.txt Modified: clang-

Re: [PATCH] D19647: [find-all-symbols] Save absolute file path instead of relative file path in SymbolInfo.

2016-04-28 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg. Repository: rL LLVM http://reviews.llvm.org/D19647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

Re: [PATCH] D19648: [include-fixer] Add Yaml database integration.

2016-04-28 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. Nice. Ship it! Comment at: include-fixer/YamlXrefsDB.h:25 @@ +24,3 @@ +public: + YamlXrefsDB(const std::string &FilePath); + StringRef instead of std::stri

[clang-tools-extra] r267868 - [include-fixer] Add an option to minimize include paths.

2016-04-28 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Apr 28 06:21:29 2016 New Revision: 267868 URL: http://llvm.org/viewvc/llvm-project?rev=267868&view=rev Log: [include-fixer] Add an option to minimize include paths. This will always pick the shortest possible path based on -I options. Based on the #include suggestion code fo

r267871 - Revert r267784, r267824 and r267830.

2016-04-28 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Apr 28 07:14:47 2016 New Revision: 267871 URL: http://llvm.org/viewvc/llvm-project?rev=267871&view=rev Log: Revert r267784, r267824 and r267830. It makes compiler-rt tests fail if the gold plugin is enabled. Revert "Rework interface for bitset-using features to use a notion

[PATCH] D19717: [find-all-symbols] Fix racy yaml file writing.

2016-04-29 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: hokein. bkramer added a subscriber: cfe-commits. If multiple find-all-symbols processes access the temporary directory simultaneously with two files with the same name they would collide and create a broken yaml file. Fix this by using the s

[clang-tools-extra] r268021 - [find-all-symbols] Fix racy yaml file writing.

2016-04-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Apr 29 05:16:28 2016 New Revision: 268021 URL: http://llvm.org/viewvc/llvm-project?rev=268021&view=rev Log: [find-all-symbols] Fix racy yaml file writing. If multiple find-all-symbols processes access the temporary directory simultaneously with two files with the same name t

[clang-tools-extra] r268022 - Make run-find-all-symbols executable.

2016-04-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Apr 29 05:33:11 2016 New Revision: 268022 URL: http://llvm.org/viewvc/llvm-project?rev=268022&view=rev Log: Make run-find-all-symbols executable. Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/tool/run-find-all-symbols.py (contents, props changed)

[PATCH] D19720: [find-all-symbols] Parallelize the merge step.

2016-04-29 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added reviewers: hokein, djasper. bkramer added a subscriber: cfe-commits. There is still more parallelism to get here because we synchonize on the actual uniquing but just doing YAML parsing in parallel already gives a significant speedup. Merging all symbo

Re: [PATCH] D19720: [find-all-symbols] Parallelize the merge step.

2016-04-29 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 55577. bkramer added a comment. Drain the pool, fix typo. http://reviews.llvm.org/D19720 Files: include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp Index: include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp =

[clang-tools-extra] r268037 - [find-all-symbols] Parallelize the merge step.

2016-04-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Apr 29 07:46:27 2016 New Revision: 268037 URL: http://llvm.org/viewvc/llvm-project?rev=268037&view=rev Log: [find-all-symbols] Parallelize the merge step. There is still more parallelism to get here because we synchonize on the actual uniquing but just doing YAML parsing in

Re: [PATCH] D19816: [find-all-symbols] Add IWYU private pragma support.

2016-05-06 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/find-all-symbols/FindAllSymbols.h:16 @@ +15,3 @@ +#include "llvm/ADT/StringRef.h" + +#include No space between #includes in LLVM. Comment at: include-fixer/find-all-symbols/PragmaCommentHa

[PATCH] D20066: [include-fixer] Autodetect yaml databases in parent directories.

2016-05-09 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: hokein. bkramer added a subscriber: cfe-commits. This looks for find_all_symbols_db.yaml in all parent directories of the source file (like we do for compile_commands.json) so we don't have to pass the path manually. http://reviews.llvm.org

[clang-tools-extra] r268920 - [include-fixer] Autodetect yaml databases in parent directories.

2016-05-09 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon May 9 09:14:55 2016 New Revision: 268920 URL: http://llvm.org/viewvc/llvm-project?rev=268920&view=rev Log: [include-fixer] Autodetect yaml databases in parent directories. This looks for find_all_symbols_db.yaml in all parent directories of the source file (like we do for c

[clang-tools-extra] r269028 - [include-fixer] For now, only add the first suggested include.

2016-05-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue May 10 03:25:28 2016 New Revision: 269028 URL: http://llvm.org/viewvc/llvm-project?rev=269028&view=rev Log: [include-fixer] For now, only add the first suggested include. We used a std::set which made the picked include somewhat random (well, lexicographically sorted). Make

[clang-tools-extra] r269029 - [include-fixer] Work around partial names in both directions.

2016-05-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue May 10 03:25:31 2016 New Revision: 269029 URL: http://llvm.org/viewvc/llvm-project?rev=269029&view=rev Log: [include-fixer] Work around partial names in both directions. We already handled the case where we had a nested name specifier where parts from the beginning don't get

[clang-tools-extra] r269030 - [include-fixer] Emit some terminal output so users can see that the tool is working.

2016-05-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue May 10 03:36:56 2016 New Revision: 269030 URL: http://llvm.org/viewvc/llvm-project?rev=269030&view=rev Log: [include-fixer] Emit some terminal output so users can see that the tool is working. Modified: clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp M

[clang-tools-extra] r269036 - [include-fixer] Remove unused includes and accessor.

2016-05-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue May 10 05:12:00 2016 New Revision: 269036 URL: http://llvm.org/viewvc/llvm-project?rev=269036&view=rev Log: [include-fixer] Remove unused includes and accessor. Modified: clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp Modified: clang-tools-extra/trunk/include-fi

[PATCH] D20094: [include-fixer] Add basic documentation.

2016-05-10 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added reviewers: hokein, djasper, klimek. bkramer added a subscriber: cfe-commits. http://reviews.llvm.org/D20094 Files: docs/include-fixer.rst docs/index.rst Index: docs/index.rst === ---

Re: [PATCH] D20094: [include-fixer] Add basic documentation.

2016-05-10 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 56687. bkramer added a comment. de-freud http://reviews.llvm.org/D20094 Files: docs/include-fixer.rst docs/index.rst Index: docs/index.rst === --- docs/index.rst +++ docs/index.rst @@ -21,

[clang-tools-extra] r269043 - [include-fixer] Default to YAML db, it's much more useful than the fixed dummy db.

2016-05-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue May 10 06:35:47 2016 New Revision: 269043 URL: http://llvm.org/viewvc/llvm-project?rev=269043&view=rev Log: [include-fixer] Default to YAML db, it's much more useful than the fixed dummy db. Modified: clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp

Re: [PATCH] D20100: [NFC] Header cleanup

2016-05-10 Thread Benjamin Kramer via cfe-commits
bkramer added a subscriber: bkramer. bkramer added a comment. Was this change created by a tool? http://reviews.llvm.org/D20100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20095: [find-all-symbols] Slim SymbolInfo.

2016-05-10 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/find-all-symbols/SymbolInfo.cpp:95 @@ -98,1 +94,3 @@ + auto RHS = std::tie(Symbol.Name, Symbol.FilePath, Symbol.LineNumber); + return LHS != RHS ? LHS < RHS : Contexts < Symbol.Contexts; } Does folding Co

r269063 - Remove unused diagnostic. NFC.

2016-05-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue May 10 09:04:34 2016 New Revision: 269063 URL: http://llvm.org/viewvc/llvm-project?rev=269063&view=rev Log: Remove unused diagnostic. NFC. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td URL:

Re: [PATCH] D20094: [include-fixer] Add basic documentation.

2016-05-11 Thread Benjamin Kramer via cfe-commits
bkramer marked 2 inline comments as done. Comment at: docs/include-fixer.rst:48 @@ +47,3 @@ +... wait as clang indexes the code base ... + $ ln -s $PWD/find_all_symbols_db.yaml path/to/llvm/source/ # Link database into the source tree. + $ cd path/to/llvm/source ---

Re: [PATCH] D20094: [include-fixer] Add basic documentation.

2016-05-11 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 56856. bkramer added a comment. Address review comments. http://reviews.llvm.org/D20094 Files: docs/include-fixer.rst docs/index.rst Index: docs/index.rst === --- docs/index.rst +++ docs/i

Re: [PATCH] D20110: [include-fixer] Improve include paths' minimization.

2016-05-11 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. Making one path relative to another part is a hard problem. We'd need to make this work on windows and possibly also have it working in presence of symlinks. I'd much prefer to make paths in the YAML file relative to the "directory" in the compilation database, which is

[clang-tools-extra] r269167 - [include-fixer] Add basic documentation.

2016-05-11 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed May 11 04:44:10 2016 New Revision: 269167 URL: http://llvm.org/viewvc/llvm-project?rev=269167&view=rev Log: [include-fixer] Add basic documentation. Differential Revision: http://reviews.llvm.org/D20094 Added: clang-tools-extra/trunk/docs/include-fixer.rst Modified:

Re: [PATCH] D20158: [find-all-symbols] Save relative file path for each symbol.

2016-05-11 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. LG! Repository: rL LLVM http://reviews.llvm.org/D20158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

Re: [PATCH] D20158: [find-all-symbols] Save relative file path for each symbol.

2016-05-11 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/find-all-symbols/SymbolInfo.h:81 @@ -81,1 +80,3 @@ + /// \brief The file path where the symbol comes from. It's a relative file + /// path based on the build directory. std::string FilePath; hokein wrot

Re: [PATCH] D20159: [include-fixer] Add lit-test for relative include path.

2016-05-11 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. Make sure to watch the buildbots when this goes in, there's a lot of potentially system-dependent shell complexity in the test. Repository: rL LLVM http://reviews.llvm.org/D20159

[clang-tools-extra] r269195 - [include-fixer] Always ignore SFINAE contexts.

2016-05-11 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed May 11 10:33:30 2016 New Revision: 269195 URL: http://llvm.org/viewvc/llvm-project?rev=269195&view=rev Log: [include-fixer] Always ignore SFINAE contexts. This could lead to spurious includes being added for identifiers that are supposed to be not available. Modified: c

[clang-tools-extra] r269194 - [include-fixer] Also output the location where we found an unknown identifier.

2016-05-11 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed May 11 10:33:28 2016 New Revision: 269194 URL: http://llvm.org/viewvc/llvm-project?rev=269194&view=rev Log: [include-fixer] Also output the location where we found an unknown identifier. For debugging only, makes it a bit easier when there are queries coming out of headers.

Re: [PATCH] D20205: [include-fixer] Use scope contexts information to improve query.

2016-05-12 Thread Benjamin Kramer via cfe-commits
bkramer requested changes to this revision. bkramer added a comment. This revision now requires changes to proceed. This needs more tests (check that using stuff from a different namespace in namespace scope still works). It's also better written as a unit test against the in-memory database, th

Re: [PATCH] D20203: [find-all-symbols] Add enum type support.

2016-05-12 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg Repository: rL LLVM http://reviews.llvm.org/D20203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[clang-tools-extra] r269403 - [include-fixer] Rename XrefsDB to SymbolIndex.

2016-05-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri May 13 04:27:54 2016 New Revision: 269403 URL: http://llvm.org/viewvc/llvm-project?rev=269403&view=rev Log: [include-fixer] Rename XrefsDB to SymbolIndex. It's not really containing xrefs so the name didn't fit. No functional change. Added: clang-tools-extra/trunk/inclu

Re: [PATCH] D20232: [include-fixer] Simplify unittest code.

2016-05-13 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. What's a flexable (in the description)? Code LG. Repository: rL LLVM http://reviews.llvm.org/D20232 ___ cfe-commits mailing list cfe-commits

Re: [PATCH] D20205: [include-fixer] Use scope contexts information to improve query.

2016-05-13 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. Tests look much better now, thanks! http://reviews.llvm.org/D20205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

Re: [PATCH] D20232: [include-fixer] Simplify unittest code.

2016-05-13 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. So s/flexable/flexible/ and commit :) Repository: rL LLVM http://reviews.llvm.org/D20232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r269758 - [include-fixer] Make the "extend to the right" hack support typos without nested names in the front.

2016-05-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue May 17 07:35:18 2016 New Revision: 269758 URL: http://llvm.org/viewvc/llvm-project?rev=269758&view=rev Log: [include-fixer] Make the "extend to the right" hack support typos without nested names in the front. This handles cases where the initial namespace is unknown. Modif

Re: [PATCH] D20329: [clang-include-fixer] Added Vim integration for clang-include-fixer.

2016-05-17 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/tool/ClangIncludeFixer.cpp:51 @@ +50,3 @@ +cl::opt +VimMode("vim", +cl::desc("Run the tool on a potentially unsaved buffer from Vim"), This isn't really specific to vim, we should name it dif

Re: [PATCH] D20354: [include-fixer] Ignore non-scoped enum declaration during search.

2016-05-18 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg Comment at: include-fixer/SymbolIndexManager.cpp:45 @@ +44,3 @@ + while (IdentiferContext != Names.rend() && + SymbolContext != Symbol.getContexts().end(

Re: [PATCH] D20329: [clang-include-fixer] Added Vim integration for clang-include-fixer.

2016-05-18 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. I expect the insertion code in the python part to cause trouble in the future again but I guess this is fine for now. Can you add a section to include-fixer.rst on how to set this up? http://reviews.llvm.org/D20329 ___ cfe

[clang-tools-extra] r269894 - [include-fixer] Run tests with -fno-ms-compatibility.

2016-05-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed May 18 04:28:45 2016 New Revision: 269894 URL: http://llvm.org/viewvc/llvm-project?rev=269894&view=rev Log: [include-fixer] Run tests with -fno-ms-compatibility. Something behind that flag makes us get fewer typo correction callbacks, unbreak the tests on windows for now. M

[clang-tools-extra] r269896 - [clang-tidy] Fix a functional change from r269656.

2016-05-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed May 18 04:48:46 2016 New Revision: 269896 URL: http://llvm.org/viewvc/llvm-project?rev=269896&view=rev Log: [clang-tidy] Fix a functional change from r269656. Instead of forming char ranges that patch made us form token ranges, which behave subtly different. Sadly I'm only s

[clang-tools-extra] r269923 - [include-fixer] Don't insert #includes if a fatal error occurred.

2016-05-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed May 18 08:32:38 2016 New Revision: 269923 URL: http://llvm.org/viewvc/llvm-project?rev=269923&view=rev Log: [include-fixer] Don't insert #includes if a fatal error occurred. This typically happens when the user didn't setup include paths correctly and the fixer starts adding

<    2   3   4   5   6   7   8   9   10   >