r245271 - [TreeTransform] Simplify code. No functionality change.

2015-08-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Aug 18 03:10:39 2015 New Revision: 245271 URL: http://llvm.org/viewvc/llvm-project?rev=245271view=rev Log: [TreeTransform] Simplify code. No functionality change. Modified: cfe/trunk/lib/Sema/TreeTransform.h Modified: cfe/trunk/lib/Sema/TreeTransform.h URL:

Re: [PATCH] D12186: Fix bug in modernize-loop-convert check.

2015-08-20 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. In http://reviews.llvm.org/D12186#228702, @angelgarcia wrote: It is allowed as long as you specify that the length is 0. I meant the code before your change, which calls `StringRef(const char *Str)` and completely disallows nullptr. In other words: this change is

Re: [PATCH] D12186: Fix bug in modernize-loop-convert check.

2015-08-20 Thread Benjamin Kramer via cfe-commits
bkramer added a subscriber: bkramer. bkramer added a comment. Is this tested? I'd expect a crash when constructing a StringRef implicitly from nullptr. Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:341 @@ -340,3 +340,3 @@ SourceMgr.getFileID(Range.getEnd())) -

Re: [PATCH] D12186: Fix bug in modernize-loop-convert check.

2015-08-20 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a reviewer: bkramer. bkramer added a comment. This revision is now accepted and ready to land. LGTM, thanks! http://reviews.llvm.org/D12186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D13946: Shrink DynTypedNode by one pointer from 40 to 32 bytes (on x86_64).

2015-10-21 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: sbenza. bkramer added a subscriber: cfe-commits. Herald added a subscriber: klimek. The MemoizationData cache was introduced to avoid a series of enum compares at the cost of making DynTypedNode bigger. This change reverts to using an enum

r251101 - [AST] Re-add TypeLocs and NestedNameSpecifierLocs to the ParentMap.

2015-10-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 23 04:04:55 2015 New Revision: 251101 URL: http://llvm.org/viewvc/llvm-project?rev=251101=rev Log: [AST] Re-add TypeLocs and NestedNameSpecifierLocs to the ParentMap. This relands r250831 after some fixes to shrink the ParentMap overall with one addtional tweak: nodes

r251110 - [AST] Plug a memory leak when promoting a single ParentMap entry to a vector.

2015-10-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 23 08:24:18 2015 New Revision: 251110 URL: http://llvm.org/viewvc/llvm-project?rev=251110=rev Log: [AST] Plug a memory leak when promoting a single ParentMap entry to a vector. Found by asan! Modified: cfe/trunk/lib/AST/ASTContext.cpp Modified:

r250905 - Shrink DynTypedNode by one pointer from 40 to 32 bytes (on x86_64).

2015-10-21 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 21 11:33:15 2015 New Revision: 250905 URL: http://llvm.org/viewvc/llvm-project?rev=250905=rev Log: Shrink DynTypedNode by one pointer from 40 to 32 bytes (on x86_64). The MemoizationData cache was introduced to avoid a series of enum compares at the cost of making

Re: [PATCH] D13946: Shrink DynTypedNode by one pointer from 40 to 32 bytes (on x86_64).

2015-10-21 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 38023. bkramer added a comment. Update casts to avoid potential undefined behavior. Now every pointer goes through const void*. http://reviews.llvm.org/D13946 Files: include/clang/AST/ASTTypeTraits.h unittests/ASTMatchers/Dynamic/RegistryTest.cpp

r251009 - [AST] Remove redundant template keywords.

2015-10-22 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 22 06:26:35 2015 New Revision: 251009 URL: http://llvm.org/viewvc/llvm-project?rev=251009=rev Log: [AST] Remove redundant template keywords. GCC complains about them, clang does not. Modified: cfe/trunk/lib/AST/ASTContext.cpp Modified:

r251008 - [AST] Store Decl* and Stmt* directly into the ParentMap.

2015-10-22 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 22 06:21:40 2015 New Revision: 251008 URL: http://llvm.org/viewvc/llvm-project?rev=251008=rev Log: [AST] Store Decl* and Stmt* directly into the ParentMap. These are by far the most common types to be parents in the AST so it makes sense to optimize for them. Put them

[PATCH] D13976: [AST] Store Decl* and Stmt* directly into the ParentMap.

2015-10-22 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added reviewers: klimek, djasper. bkramer added a subscriber: cfe-commits. These are by far the most common types to be parents in the AST so it makes sense to optimize for them. Put them directly into the value of the map. This currently saves 32 bytes per

Re: [PATCH] D13931: [Tooling] Add a utility function to replace one nested name with another.

2015-10-22 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 38130. bkramer added a comment. Enforce :: at the beginning of the new name. http://reviews.llvm.org/D13931 Files: include/clang/Tooling/Core/Lookup.h lib/Tooling/Core/CMakeLists.txt lib/Tooling/Core/Lookup.cpp unittests/Tooling/CMakeLists.txt

[clang-tools-extra] r251265 - assert(false) -> llvm_unreachable.

2015-10-25 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sun Oct 25 17:03:00 2015 New Revision: 251265 URL: http://llvm.org/viewvc/llvm-project?rev=251265=rev Log: assert(false) -> llvm_unreachable. Modified: clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.cpp Modified:

[clang-tools-extra] r251279 - Drop dead return after llvm_unreachable. NFC.

2015-10-26 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 26 04:57:00 2015 New Revision: 251279 URL: http://llvm.org/viewvc/llvm-project?rev=251279=rev Log: Drop dead return after llvm_unreachable. NFC. Modified: clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.cpp Modified:

r251514 - Put global classes into the appropriate namespace.

2015-10-28 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 28 08:54:16 2015 New Revision: 251514 URL: http://llvm.org/viewvc/llvm-project?rev=251514=rev Log: Put global classes into the appropriate namespace. Most of the cases belong into an anonymous namespace. No functionality change intended. Modified:

Re: [PATCH] D13891: Apply modernize-use-default to llvm.

2015-10-27 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. Two minor comments, otherwise looks good: 1. beware of the GCC 4.7 issues and trivial class initializer issues we hit with this kind of changes earlier. 2. I prefer to leave

Re: [PATCH] D13920: Minor fix in ToolChainTest.cpp to allow user defined GCC toolchain.

2015-10-27 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. This should be fine. Sorry for the breakage. http://reviews.llvm.org/D13920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r251432 - Remove unused diagnostic. NFC.

2015-10-27 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 27 13:34:47 2015 New Revision: 251432 URL: http://llvm.org/viewvc/llvm-project?rev=251432=rev Log: Remove unused diagnostic. NFC. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td URL:

[clang-tools-extra] r251499 - [tidy] Remove stray iostream include from test.

2015-10-27 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 28 00:16:37 2015 New Revision: 251499 URL: http://llvm.org/viewvc/llvm-project?rev=251499=rev Log: [tidy] Remove stray iostream include from test. It is unused and we cannot rely on standard headers being present while executing tests. Modified:

r251528 - Move global classes into anonymous namespaces. NFC.

2015-10-28 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 28 12:16:26 2015 New Revision: 251528 URL: http://llvm.org/viewvc/llvm-project?rev=251528=rev Log: Move global classes into anonymous namespaces. NFC. Modified: cfe/trunk/lib/AST/ExprConstant.cpp cfe/trunk/lib/CodeGen/CGCall.cpp Modified:

Re: Getting fully qualified names of random qualtypes

2015-10-26 Thread Benjamin Kramer via cfe-commits
Some high level style comments: 1. Please convert the file to LLVM style for the things that clang-format doesn't change. In particular PascalCase for all variables and cameCase for all function names. 2. We don't do author attribution in file comments, sorry. 3. Try to avoid commented out/#if

Re: [PATCH] D13931: [Tooling] Add a utility function to replace one nested name with another.

2015-10-22 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 38117. bkramer added a comment. - Removed "fully qualified" in favor of just "qualified" to clarify that the name should be qualified but the leading "::" is not necessary. - Renamed isNameSpecifierGlobal - Removed always true conditional from test

Re: [PATCH] D13931: [Tooling] Add a utility function to replace one nested name with another.

2015-10-22 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 38122. bkramer added a comment. Add more comments and polish test cases. http://reviews.llvm.org/D13931 Files: include/clang/Tooling/Core/Lookup.h lib/Tooling/Core/CMakeLists.txt lib/Tooling/Core/Lookup.cpp unittests/Tooling/CMakeLists.txt

[PATCH] D14011: [AST] Re-add TypeLocs and NestedNameSpecifierLocs to the ParentMap.

2015-10-23 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added reviewers: klimek, djasper. bkramer added a subscriber: cfe-commits. Herald added a subscriber: klimek. This relands r250831 after some fixes to shrink the ParentMap overall with one addtional tweak: nodes with pointer identity (e.g. Decl* and friends)

r251026 - Unbreak the shared cmake build. libToolingCore now depends on libAST.

2015-10-22 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 22 10:45:54 2015 New Revision: 251026 URL: http://llvm.org/viewvc/llvm-project?rev=251026=rev Log: Unbreak the shared cmake build. libToolingCore now depends on libAST. Modified: cfe/trunk/lib/Tooling/Core/CMakeLists.txt Modified:

r251022 - [Tooling] Add a utility function to replace one nested name with another.

2015-10-22 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 22 10:04:10 2015 New Revision: 251022 URL: http://llvm.org/viewvc/llvm-project?rev=251022=rev Log: [Tooling] Add a utility function to replace one nested name with another. One problem in clang-tidy and other clang tools face is that there is no way to lookup an

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

2015-11-16 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: klimek. bkramer added a subscriber: cfe-commits. This provides both a more uniform interface and makes libclang behave like clang tooling wrt relative paths against argv[0]. This is necessary for finding paths to a c++ standard library

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

2015-11-16 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 40269. bkramer added a comment. - Add a test case to make sure argv[0] handling actually works. - Clarify comments a bit. http://reviews.llvm.org/D14695 Files: include/clang-c/Index.h lib/Frontend/CreateInvocationFromCommandLine.cpp

Re: [PATCH] D13844: [libclang] Visit TypeAliasTemplateDecl

2015-11-01 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. Looks good to me too, do you have commit access? http://reviews.llvm.org/D13844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D11944: Nativize filename in FileManager::getFile().

2015-11-02 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. Can you try setting up the virtual files with the vfs::InMemoryFileSystem stuff? There are some examples how to set up with OverlayFileSystem in tree. InMemoryFileSystem was written with windows path separators in mind, I just never tried to run it on windows :)

r250418 - [CodeGen] Remove dead code. NFC.

2015-10-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 15 10:29:40 2015 New Revision: 250418 URL: http://llvm.org/viewvc/llvm-project?rev=250418=rev Log: [CodeGen] Remove dead code. NFC. Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp cfe/trunk/lib/CodeGen/CGCall.cpp cfe/trunk/lib/CodeGen/CGCleanup.cpp

Re: r249556 - [VFS] Port driver tool chains to VFS.

2015-10-07 Thread Benjamin Kramer via cfe-commits
agnosticConsumer::HandleDiagnostic(clang::DiagnosticsEngine::Level, > clang::Diagnostic const&)' > collect2: error: ld returned 1 exit status > > using Diagnostics requires linking to libclangBasic. Please consider the > attached patch. r249608. Thanks! - Ben > > On Wed

[clang-tools-extra] r249526 - [VFS] Switch clang-tidy tests to use an in-memory fs.

2015-10-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 7 03:35:23 2015 New Revision: 249526 URL: http://llvm.org/viewvc/llvm-project?rev=249526=rev Log: [VFS] Switch clang-tidy tests to use an in-memory fs. Again, this is both cleaner and completely removes any depedency on the host file system. Modified:

r249525 - [VFS] Also drop '.' when adding files to an in-memory FS.

2015-10-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 7 03:32:50 2015 New Revision: 249525 URL: http://llvm.org/viewvc/llvm-project?rev=249525=rev Log: [VFS] Also drop '.' when adding files to an in-memory FS. Otherwise we won't be able to find them later. Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp

r249693 - [VFS] Use VFS instead of virtual files in PPCallbacks test.

2015-10-08 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 8 09:20:14 2015 New Revision: 249693 URL: http://llvm.org/viewvc/llvm-project?rev=249693=rev Log: [VFS] Use VFS instead of virtual files in PPCallbacks test. Modified: cfe/trunk/unittests/Lex/PPCallbacksTest.cpp Modified:

[libcxx] r250508 - Fix an unfortunate yet old typo that never got attention before r250507.

2015-10-16 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 16 06:26:26 2015 New Revision: 250508 URL: http://llvm.org/viewvc/llvm-project?rev=250508=rev Log: Fix an unfortunate yet old typo that never got attention before r250507. Should fix the xcode libc++ build. Modified: libcxx/trunk/src/stdexcept.cpp Modified:

[clang-tools-extra] r250510 - Empty undefined static variable -> local variable.

2015-10-16 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 16 07:11:15 2015 New Revision: 250510 URL: http://llvm.org/viewvc/llvm-project?rev=250510=rev Log: Empty undefined static variable -> local variable. Resolves a -Wundefined-internal warning from clang. Modified:

r250428 - Put back doxygen comment accidentally dropped in r250418.

2015-10-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 15 11:46:25 2015 New Revision: 250428 URL: http://llvm.org/viewvc/llvm-project?rev=250428=rev Log: Put back doxygen comment accidentally dropped in r250418. Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h URL:

Re: r250418 - [CodeGen] Remove dead code. NFC.

2015-10-15 Thread Benjamin Kramer via cfe-commits
On Thu, Oct 15, 2015 at 6:12 PM, Adrian Prantl <apra...@apple.com> wrote: > >> On Oct 15, 2015, at 8:29 AM, Benjamin Kramer via cfe-commits >> <cfe-commits@lists.llvm.org> wrote: >> >> Author: d0k >> Date: Thu Oct 15 10:29:40 2015 >> New Revi

Re: [PATCH] D13810: Replacements in different files do not overlap.

2015-10-16 Thread Benjamin Kramer via cfe-commits
bkramer added a subscriber: bkramer. bkramer added a comment. Is there a way to unittest this? http://reviews.llvm.org/D13810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D13810: Replacements in different files do not overlap.

2015-10-16 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a reviewer: bkramer. bkramer added a comment. test looks good too, thanks! http://reviews.llvm.org/D13810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r250803 - Put back dead code that's used out-of-tree.

2015-10-20 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 20 02:50:21 2015 New Revision: 250803 URL: http://llvm.org/viewvc/llvm-project?rev=250803=rev Log: Put back dead code that's used out-of-tree. Partially reverts r250418. Modified: cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp

Re: [PATCH] D13890: Apply modernize-use-default to clang.

2015-10-20 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. feel free to submit http://reviews.llvm.org/D13890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D13890: Apply modernize-use-default to clang.

2015-10-20 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. Looks good with one comment. Comment at: lib/StaticAnalyzer/Core/MemRegion.cpp:141-143 @@ -140,5 +141,1 @@ -MemRegionManager::~MemRegionManager() { - // All regions and

Re: [PATCH] D13892: Apply modernize-use-default to compiler-rt.

2015-10-20 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg with comments. Comment at: lib/tsan/rtl/tsan_mutex.cc:130 @@ -129,3 @@ -InternalDeadlockDetector::InternalDeadlockDetector() { - // Rely on zero initialization because

Re: r250418 - [CodeGen] Remove dead code. NFC.

2015-10-20 Thread Benjamin Kramer via cfe-commits
-commits > <cfe-commits@lists.llvm.org> wrote: >> >> On Oct 19, 2015, at 4:40 PM, Michael Gottesman via cfe-commits >> <cfe-commits@lists.llvm.org> wrote: >> >> >> On Oct 15, 2015, at 8:29 AM, Benjamin Kramer via cfe-commits >> <cfe-c

r250804 - Revert accidental commit. This isn't ready yet.

2015-10-20 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 20 02:53:14 2015 New Revision: 250804 URL: http://llvm.org/viewvc/llvm-project?rev=250804=rev Log: Revert accidental commit. This isn't ready yet. Modified: cfe/trunk/lib/Tooling/Core/CMakeLists.txt cfe/trunk/unittests/Tooling/CMakeLists.txt Modified:

[PATCH] D13897: [AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap.

2015-10-20 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added reviewers: klimek, sbenza. bkramer added a subscriber: cfe-commits. Herald added a subscriber: klimek. Firstly this changes the type of parent map to be keyed on DynTypedNode to simplify the following changes. This comes with a DenseMapInfo for

r250831 - [AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap.

2015-10-20 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 20 10:08:46 2015 New Revision: 250831 URL: http://llvm.org/viewvc/llvm-project?rev=250831=rev Log: [AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap. Firstly this changes the type of parent map to be keyed on DynTypedNode to simplify the following

[PATCH] D13931: [Tooling] Add a utility function to replace one nested name with another.

2015-10-21 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: klimek. bkramer added a subscriber: cfe-commits. Herald added a subscriber: klimek. One problem in clang-tidy and other clang tools face is that there is no way to lookup an arbitrary name in the AST, that's buried deep inside Sema and

Re: r250831 - [AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap.

2015-10-21 Thread Benjamin Kramer via cfe-commits
n the ParentMap. This means, this change is effectively > increasing the parent map by 10x and it was already large to begin with. > > Please revert and lets come up with a different solution. > > On Tue, Oct 20, 2015 at 5:08 PM, Benjamin Kramer via cfe-commits > <cfe-commits@list

r250889 - Revert "[AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap."

2015-10-21 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 21 05:07:26 2015 New Revision: 250889 URL: http://llvm.org/viewvc/llvm-project?rev=250889=rev Log: Revert "[AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap." Putting DynTypedNode in the ParentMap bloats its memory foot print. Before the void* key had 8

[PATCH] D13658: [VFS] Let the user decide if they want path normalization.

2015-10-12 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: klimek. bkramer added a subscriber: cfe-commits. This is a more principled version of what I did earlier. Path normalization is generally a good thing, but may break users in strange environments, e. g. using lots of symlinks. Let the user

r250060 - [VFS] Let the user decide if they want path normalization.

2015-10-12 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 12 11:16:39 2015 New Revision: 250060 URL: http://llvm.org/viewvc/llvm-project?rev=250060=rev Log: [VFS] Let the user decide if they want path normalization. This is a more principled version of what I did earlier. Path normalization is generally a good thing, but may

Re: [PATCH] D13658: [VFS] Let the user decide if they want path normalization.

2015-10-12 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 37124. bkramer added a comment. Addressed review comments. http://reviews.llvm.org/D13658 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp Index:

r250037 - [VFS] Unbreak test.

2015-10-12 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 12 08:39:33 2015 New Revision: 250037 URL: http://llvm.org/viewvc/llvm-project?rev=250037=rev Log: [VFS] Unbreak test. Modified: cfe/trunk/unittests/Basic/VirtualFileSystemTest.cpp Modified: cfe/trunk/unittests/Basic/VirtualFileSystemTest.cpp URL:

r249532 - [VFS] Refactor VFSFromYAML a bit.

2015-10-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 7 05:05:44 2015 New Revision: 249532 URL: http://llvm.org/viewvc/llvm-project?rev=249532=rev Log: [VFS] Refactor VFSFromYAML a bit. - Rename it to RedirectingFileSystem. This is what it does, YAML is just a serialization format for it. - Consistently use unique_ptr

r249409 - [VFS] Put the incoming name in the file status to make InMemoryFS behave more like a real FS.

2015-10-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 6 09:45:16 2015 New Revision: 249409 URL: http://llvm.org/viewvc/llvm-project?rev=249409=rev Log: [VFS] Put the incoming name in the file status to make InMemoryFS behave more like a real FS. Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp

r249408 - [Tooling] Remove dead code.

2015-10-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 6 09:45:13 2015 New Revision: 249408 URL: http://llvm.org/viewvc/llvm-project?rev=249408=rev Log: [Tooling] Remove dead code. It took me some time to figure out why this is not working as expected: std:error_code converts to true if there is an error. This means we

r249410 - [Tooling] Reuse FileManager in ASTUnit.

2015-10-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 6 09:45:20 2015 New Revision: 249410 URL: http://llvm.org/viewvc/llvm-project?rev=249410=rev Log: [Tooling] Reuse FileManager in ASTUnit. ASTUnit was creating multiple FileManagers and throwing them away. Reuse the one from Tooling. No functionality change now but

[PATCH] D13474: [VFS] Port tooling to use the in-memory file system.

2015-10-06 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: klimek. bkramer added a subscriber: cfe-commits. Herald added a subscriber: klimek. This means file remappings can now be managed by ClangTool (or a ToolInvocation user) instead of by ToolInvocation itself. The ToolInvocation remapping is

r249556 - [VFS] Port driver tool chains to VFS.

2015-10-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 7 10:48:01 2015 New Revision: 249556 URL: http://llvm.org/viewvc/llvm-project?rev=249556=rev Log: [VFS] Port driver tool chains to VFS. There are still some loose ends here but it's sufficient so we can detect GCC headers that are inside of a VFS. Added:

r250164 - [Driver] Use the parent_path of the clang executable as the default InstalledDir

2015-10-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 13 10:19:32 2015 New Revision: 250164 URL: http://llvm.org/viewvc/llvm-project?rev=250164=rev Log: [Driver] Use the parent_path of the clang executable as the default InstalledDir This is what most people want anyways. Clang -cc1's main() will override this but for

r249830 - [VFS] Just normalize away .. and . in paths for in-memory file systems.

2015-10-09 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 9 08:03:22 2015 New Revision: 249830 URL: http://llvm.org/viewvc/llvm-project?rev=249830=rev Log: [VFS] Just normalize away .. and . in paths for in-memory file systems. This simplifies the code and gets us support for .. for free. Modified:

r249831 - [VFS] Wire up driver VFS through tooling.

2015-10-09 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 9 08:03:25 2015 New Revision: 249831 URL: http://llvm.org/viewvc/llvm-project?rev=249831=rev Log: [VFS] Wire up driver VFS through tooling. Sadly I don't currently have a way to tests this as the driver is always initialized with the default triple and finding system

r249388 - [VFS] Port applyAllReplacements to InMemoryFileSystem.

2015-10-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 6 05:23:17 2015 New Revision: 249388 URL: http://llvm.org/viewvc/llvm-project?rev=249388=rev Log: [VFS] Port applyAllReplacements to InMemoryFileSystem. Modified: cfe/trunk/lib/Tooling/Core/Replacement.cpp Modified: cfe/trunk/lib/Tooling/Core/Replacement.cpp URL:

r249389 - [VFS] Port SimpleFormatContext to InMemoryFileSystem.

2015-10-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 6 05:23:34 2015 New Revision: 249389 URL: http://llvm.org/viewvc/llvm-project?rev=249389=rev Log: [VFS] Port SimpleFormatContext to InMemoryFileSystem. Modified: cfe/trunk/lib/Index/SimpleFormatContext.h Modified: cfe/trunk/lib/Index/SimpleFormatContext.h URL:

r253466 - [libclang] Add entry points that take a full command line including argv[0].

2015-11-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Nov 18 10:14:27 2015 New Revision: 253466 URL: http://llvm.org/viewvc/llvm-project?rev=253466=rev Log: [libclang] Add entry points that take a full command line including argv[0]. This provides both a more uniform interface and makes libclang behave like clang tooling wrt

Re: [PATCH] D12355: [libcxx] Optimize away unneeded length calculation in basic_string::compare(const char*)

2015-08-26 Thread Benjamin Kramer via cfe-commits
bkramer added a subscriber: bkramer. bkramer added a comment. Won't this do the wrong thing for embedded '\0' in a std::string? std::string(hello\0world, 11).compare(hello) should not return 0. http://reviews.llvm.org/D12355 ___ cfe-commits

r246384 - [OpenMP] Make the filetered clause iterator a real iterator and type safe.

2015-08-30 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sun Aug 30 10:12:28 2015 New Revision: 246384 URL: http://llvm.org/viewvc/llvm-project?rev=246384view=rev Log: [OpenMP] Make the filetered clause iterator a real iterator and type safe. This replaces the filtered generic iterator with a type-specfic one based on dyn_cast

r246452 - [OpenMP] base specific_clause_iterator on iterator_adaptor_base.

2015-08-31 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Aug 31 11:45:35 2015 New Revision: 246452 URL: http://llvm.org/viewvc/llvm-project?rev=246452=rev Log: [OpenMP] base specific_clause_iterator on iterator_adaptor_base. Removes some boilerplate code. No functionality change intended. Modified:

Re: r246384 - [OpenMP] Make the filetered clause iterator a real iterator and type safe.

2015-08-31 Thread Benjamin Kramer via cfe-commits
rrides operator++ but iterator_adaptor_base seems to be doing the right thing even when ++ is overridden. - Ben > On Sun, Aug 30, 2015 at 8:12 AM, Benjamin Kramer via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: d0k >> Date: Sun Aug 30 10:12:28 2015 >>

Re: r246610 - Migrate the target attribute parsing code into an extension off of

2015-09-02 Thread Benjamin Kramer via cfe-commits
> On 02.09.2015, at 02:12, Eric Christopher via cfe-commits > wrote: > > Author: echristo > Date: Tue Sep 1 19:12:02 2015 > New Revision: 246610 > > URL: http://llvm.org/viewvc/llvm-project?rev=246610=rev > Log: > Migrate the target attribute parsing code into an

Re: r249314 - [VFS] Move class out of method so it looks less like Java.

2015-10-05 Thread Benjamin Kramer via cfe-commits
On Mon, Oct 5, 2015 at 11:13 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > On Mon, Oct 5, 2015 at 6:55 AM, Benjamin Kramer via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: d0k >> Date: Mon Oct 5 08:55:09 2015 >> New Revision: 249314

r249355 - Remove duplicated default arguments. NFC.

2015-10-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 5 16:20:19 2015 New Revision: 249355 URL: http://llvm.org/viewvc/llvm-project?rev=249355=rev Log: Remove duplicated default arguments. NFC. Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp URL:

r248376 - [DeclPrinter] Don't crash when printing a using decl with a special name

2015-09-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Sep 23 08:43:16 2015 New Revision: 248376 URL: http://llvm.org/viewvc/llvm-project?rev=248376=rev Log: [DeclPrinter] Don't crash when printing a using decl with a special name Fixes PR24872. Modified: cfe/trunk/lib/AST/DeclPrinter.cpp

r248391 - [Sema] Don't create an invalid source range for overlong initializer lists.

2015-09-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Sep 23 11:03:53 2015 New Revision: 248391 URL: http://llvm.org/viewvc/llvm-project?rev=248391=rev Log: [Sema] Don't create an invalid source range for overlong initializer lists. We took both source locations from the end of the initializer list what the code below doesn't

r248496 - Drop useless const in for-range loops.

2015-09-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Sep 24 09:48:49 2015 New Revision: 248496 URL: http://llvm.org/viewvc/llvm-project?rev=248496=rev Log: Drop useless const in for-range loops. StringRefs always point to immutable memory so the const doesn't add value here. Also quiets clang's -Wrange-loop-analysis which

r248495 - [Driver] Don't implicitly copy std::strings in for-range loop.

2015-09-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Sep 24 09:48:37 2015 New Revision: 248495 URL: http://llvm.org/viewvc/llvm-project?rev=248495=rev Log: [Driver] Don't implicitly copy std::strings in for-range loop. Found by -Wrange-loop-analysis. Modified: cfe/trunk/lib/Driver/ToolChains.cpp Modified:

r248279 - Remove unused diagnostic. NFC.

2015-09-22 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Sep 22 09:34:59 2015 New Revision: 248279 URL: http://llvm.org/viewvc/llvm-project?rev=248279=rev Log: Remove unused diagnostic. NFC. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td URL:

[PATCH] D13430: [VFS] Add an in-memory file system implementation.

2015-10-05 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: klimek. bkramer added a subscriber: cfe-commits. Herald added a subscriber: klimek. This is a simple file system tree of memory buffers that can be filled by a client. In conjunction with an OverlayFS it can be used to make virtual files

Re: [PATCH] D13430: [VFS] Add an in-memory file system implementation.

2015-10-05 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 36509. bkramer added a comment. Rebased and addressed review comments. http://reviews.llvm.org/D13430 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp

r249310 - [VFS] Remove setName from the file interface.

2015-10-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 5 08:15:33 2015 New Revision: 249310 URL: http://llvm.org/viewvc/llvm-project?rev=249310=rev Log: [VFS] Remove setName from the file interface. This streamlines the interface a bit and makes Status more immutable. No functional change intended. Modified:

Re: [PATCH] D13430: [VFS] Add an in-memory file system implementation.

2015-10-05 Thread Benjamin Kramer via cfe-commits
bkramer marked 10 inline comments as done. Comment at: include/clang/Basic/VirtualFileSystem.h:286-288 @@ +285,5 @@ + } + std::error_code setCurrentWorkingDirectory(const Twine ) override { +WorkingDirectory = Path.str(); +return std::error_code(); + }

r249314 - [VFS] Move class out of method so it looks less like Java.

2015-10-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 5 08:55:09 2015 New Revision: 249314 URL: http://llvm.org/viewvc/llvm-project?rev=249314=rev Log: [VFS] Move class out of method so it looks less like Java. No functionality change. Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp Modified:

r249316 - [VFS] Add working directories to every virtual file system.

2015-10-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 5 08:55:20 2015 New Revision: 249316 URL: http://llvm.org/viewvc/llvm-project?rev=249316=rev Log: [VFS] Add working directories to every virtual file system. For RealFileSystem this is getcwd()/chdir(), the synthetic file systems can make up one for themselves.

r249315 - [VFS] Add an in-memory file system implementation.

2015-10-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 5 08:55:14 2015 New Revision: 249315 URL: http://llvm.org/viewvc/llvm-project?rev=249315=rev Log: [VFS] Add an in-memory file system implementation. This is a simple file system tree of memory buffers that can be filled by a client. In conjunction with an OverlayFS it

r249319 - [VFS] Fix the windows build by including the right headers.

2015-10-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 5 09:06:36 2015 New Revision: 249319 URL: http://llvm.org/viewvc/llvm-project?rev=249319=rev Log: [VFS] Fix the windows build by including the right headers. Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp

r249318 - [VFS] Fix compilation on systems where time_t is not int64_t.

2015-10-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 5 09:02:15 2015 New Revision: 249318 URL: http://llvm.org/viewvc/llvm-project?rev=249318=rev Log: [VFS] Fix compilation on systems where time_t is not int64_t. No functional change intended. Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp Modified:

Re: [PATCH] D13474: [VFS] Port tooling to use the in-memory file system.

2015-10-06 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 36632. bkramer added a comment. - Don't rebuild VFS for every compile command - Still have to guard against multiple runs of one Tool, ClangToolTest.ArgumentAdjusters does that. http://reviews.llvm.org/D13474 Files: include/clang/Tooling/Tooling.h

r249413 - [Tooling] Don't run a tool invocation without a FileManager.

2015-10-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 6 10:04:13 2015 New Revision: 249413 URL: http://llvm.org/viewvc/llvm-project?rev=249413=rev Log: [Tooling] Don't run a tool invocation without a FileManager. Fixes a crash regression from r249410. Modified: cfe/trunk/lib/Tooling/Tooling.cpp Modified:

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

2015-12-02 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added reviewers: djasper, klimek. bkramer added a subscriber: cfe-commits. Herald added a subscriber: klimek. /* a * a*/ Now becomes /* * a a*/ instead of /* * a * a*/ This is implemented by glueing the next line on while

r254446 - Avoid picking up system headers in unittest by providing a fake libstdc++ with a ridiculously high version number.

2015-12-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Dec 1 13:42:07 2015 New Revision: 254446 URL: http://llvm.org/viewvc/llvm-project?rev=254446=rev Log: Avoid picking up system headers in unittest by providing a fake libstdc++ with a ridiculously high version number. The host libstdc++ may be horribly broken and we want

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

2015-12-14 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added reviewers: doug.gregor, klimek. bkramer added a subscriber: cfe-commits. The current default is to create the preamble on the first reparse, aka second parse. This is useful for clients that do not want to block when opening a file because serializing

r255635 - [libclang] Add a flag to create the precompiled preamble on the first parse.

2015-12-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Dec 15 03:30:31 2015 New Revision: 255635 URL: http://llvm.org/viewvc/llvm-project?rev=255635=rev Log: [libclang] Add a flag to create the precompiled preamble on the first parse. Summary: The current default is to create the preamble on the first reparse, aka second parse.

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

2015-12-14 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 42749. bkramer added a comment. Add test case. http://reviews.llvm.org/D15490 Files: include/clang-c/Index.h include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp test/Index/complete-preamble.cpp tools/c-index-test/c-index-test.c

Re: [clang-tools-extra] r256562 - [clang-tidy] Fix a use-after-free bug found by asan

2015-12-29 Thread Benjamin Kramer via cfe-commits
On Tue, Dec 29, 2015 at 5:14 PM, Alexander Kornienko via cfe-commits wrote: > Author: alexfh > Date: Tue Dec 29 10:14:38 2015 > New Revision: 256562 > > URL: http://llvm.org/viewvc/llvm-project?rev=256562=rev > Log: > [clang-tidy] Fix a use-after-free bug found by asan

Re: [PATCH] D14329: Show inclusions from a preamble in clang_getInclusions.

2016-01-06 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. LGTM, thanks for the fix! Comment at: tools/libclang/CIndexInclusionStack.cpp:32 @@ -36,13 +31,3 @@ SmallVector InclusionStack; - unsigned n =

r257260 - [vfs] Normalize working directory if requested.

2016-01-09 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sat Jan 9 10:33:16 2016 New Revision: 257260 URL: http://llvm.org/viewvc/llvm-project?rev=257260=rev Log: [vfs] Normalize working directory if requested. FixedCompilationDatabase sets the working dir to "." by default. For chdir(".") this is a noop but this lead to

  1   2   3   4   5   6   7   8   9   >