This revision was automatically updated to reflect the committed changes.
Closed by commit rL286973: [clang-format] Fixed line merging of more than two
lines (authored by cameron314).
Changed prior to commit:
https://reviews.llvm.org/D19063?vs=53572&id=77996#toc
Repository:
rL LLVM
https://
cameron314 added a comment.
I'll commit this in a few days, when I have some time to reintegrate it to the
trunk. Thanks!
https://reviews.llvm.org/D19063
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/
Ah, is that why! My fault, sorry. I couldn't figure out why it wouldn't
link on the build machines when it worked fine for me locally (on
Windows)...
Thank you, I will fix this shortly.
On Thu, Aug 18, 2016 at 12:52 PM, Will Dietz via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
> (Sending ag
This revision was automatically updated to reflect the committed changes.
Closed by commit rL279076: [libclang] Add clang_getAllSkippedRanges function
(authored by cameron314).
Changed prior to commit:
https://reviews.llvm.org/D20132?vs=56964&id=68548#toc
Repository:
rL LLVM
https://reviews
cameron314 added inline comments.
Comment at: unittests/libclang/LibclangTest.cpp:16-20
@@ -15,4 +15,7 @@
#include "gtest/gtest.h"
#include
#include
+#include
+#include
+#include
#define DEBUG_TYPE "libclang-test"
rsmith wrote:
> Please put these in alpha
cameron314 added a comment.
Anyone have time to check this out this week?
It's a one-line fix, includes a test, and is for a fairly important bug :-)
https://reviews.llvm.org/D20338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://list
cameron314 added a comment.
Anyone have a few minutes to look at this?
http://reviews.llvm.org/D20338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cameron314 added a comment.
Ping? :-)
http://reviews.llvm.org/D20338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cameron314 updated this revision to Diff 60250.
cameron314 added a comment.
Here's the final fix (it's the line in FileManager.cpp, plus a test).
http://reviews.llvm.org/D20338
Files:
include/clang/Frontend/ASTUnit.h
lib/Basic/FileManager.cpp
lib/Frontend/ASTUnit.cpp
unittests/Frontend/
cameron314 added inline comments.
Comment at: lib/Basic/FileManager.cpp:389
@@ -383,2 +388,3 @@
UFE->File.reset();
+ UFE->IsVirtual = true;
return UFE;
rsmith wrote:
> Yes. The `IsValid` flag is just supposed to mean that this file has actually
> been adde
cameron314 added a comment.
This is a fairly important bug for anyone hosting clang as a library (e.g.
IDEs).
Can someone have a look at this patch when they have a free moment?
http://reviews.llvm.org/D20338
___
cfe-commits mailing list
cfe-commit
cameron314 added a comment.
Can someone have a look at this now that there's a test?
http://reviews.llvm.org/D20132
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cameron314 updated the summary for this revision.
cameron314 removed rL LLVM as the repository for this revision.
cameron314 updated this revision to Diff 59577.
cameron314 added a comment.
It took some modifications to the ASTUnit to support a virtual file system with
a PCH parse/reparse (prelim
cameron314 added a subscriber: cfe-commits.
http://reviews.llvm.org/rL249410
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cameron314 added a comment.
Thanks @bruno, I'll have a look at using a VFS for the test.
Comment at: lib/Basic/FileManager.cpp:389
@@ -383,2 +388,3 @@
UFE->File.reset();
+ UFE->IsVirtual = true;
return UFE;
rsmith wrote:
> Rather than adding this `IsVirtu
cameron314 added a comment.
I'm not sure how to test this (originally I found this bug by stepping through
with a debugger) -- is there a way to determine if an ASTUnit used a PCH for
the preamble or not? I'd call the `getMainBufferWithPrecompiledPreamble` method
manually but it's private.
Re
cameron314 added a subscriber: cameron314.
cameron314 added a comment.
I've seen rare cases where parses using the PCH files were yielding completely
invalid data, almost as if they were corrupted. I wonder now if this could be
the cause. (We're on Windows too.)
http://reviews.llvm.org/D20243
cameron314 created this revision.
cameron314 added a reviewer: rsmith.
cameron314 added a subscriber: cfe-commits.
cameron314 set the repository for this revision to rL LLVM.
Remapped files would always cause the preamble's PCH to be invalidated (even if
they hadn't changed) because the file mana
This revision was automatically updated to reflect the committed changes.
Closed by commit rL269769: [PCH] Fixed bug with preamble invalidation when
overridden files change (authored by cameron314).
Changed prior to commit:
http://reviews.llvm.org/D20137?vs=57367&id=57477#toc
Repository:
rL
cameron314 updated the summary for this revision.
cameron314 updated this revision to Diff 57367.
cameron314 added a comment.
This version of the patch takes into account potential changes between
filenames and their unique IDs between parses.
http://reviews.llvm.org/D20137
Files:
lib/Fronte
cameron314 added inline comments.
Comment at: lib/Frontend/ASTUnit.cpp:1402-1406
@@ +1401,7 @@
+
+vfs::Status Status;
+if (FileMgr->getNoncachedStatValue(RB.first, Status)) {
+ AnyFileChanged = true;
+ break;
+}
+
rsmith w
cameron314 updated this revision to Diff 57253.
cameron314 added a comment.
Removed workaround for case that can no longer happen.
http://reviews.llvm.org/D20137
Files:
include/clang/Frontend/ASTUnit.h
lib/Frontend/ASTUnit.cpp
Index: lib/Frontend/ASTUnit.cpp
===
cameron314 added inline comments.
Comment at: lib/Basic/FileManager.cpp:304-307
@@ -303,1 +303,6 @@
+ if (UFE.isVirtual()) {
+UFE.Name = InterndFileName;
+return &UFE;
+ }
+
rsmith wrote:
> It looks like this is unreachable: `IsVirtual` is only ever `t
cameron314 updated this revision to Diff 57222.
cameron314 added a comment.
Updated patch to include later fixes I had made after the initial change.
http://reviews.llvm.org/D20137
Files:
include/clang/Basic/FileManager.h
include/clang/Frontend/ASTUnit.h
lib/Basic/FileManager.cpp
lib/Fr
cameron314 added a comment.
You're right, this breaks that test. The corner case that it exercises is
arguably less important than breaking all spelling ranges, though. But I'm
going to see if I can fix both with a little wizardry (ideally there wouldn't
be open ranges in the first place, since
cameron314 updated this revision to Diff 56964.
cameron314 added a comment.
Here's a test!
http://reviews.llvm.org/D20132
Files:
include/clang-c/Index.h
tools/libclang/CIndex.cpp
unittests/libclang/LibclangTest.cpp
Index: unittests/libclang/LibclangTest.cpp
==
cameron314 added inline comments.
Comment at: lib/Lex/PPLexerChange.cpp:380-383
@@ -379,4 +379,6 @@
CurLexer->FormTokenWithChars(Result, CurLexer->BufferEnd, tok::eof);
CurLexer.reset();
+if (CurLexerKind == CLK_Lexer)
+ CurLexerKind = CLK_Cachin
cameron314 updated this revision to Diff 56961.
cameron314 added a comment.
Ah, perfect, thanks.
Behold, a test that fails without the patch and passes with it :-)
http://reviews.llvm.org/D20131
Files:
lib/Lex/PPLexerChange.cpp
test/CodeCompletion/include-within-declaration.c
Index: test/C
cameron314 added a comment.
I fixed this last July so the details are a little hazy, but fortunately it
turns out I documented what I had found:
> It seems when clang parses an enum declaration, it first parses the
> declaration specifiers, then stops if a semicolon is present.
> The trouble
cameron314 updated this revision to Diff 56917.
http://reviews.llvm.org/D20125
Files:
include/clang-c/Index.h
tools/libclang/CXSourceLocation.cpp
unittests/libclang/LibclangTest.cpp
Index: unittests/libclang/LibclangTest.cpp
=
cameron314 updated this revision to Diff 56916.
cameron314 added a comment.
I've added a unit test.
http://reviews.llvm.org/D20125
Files:
include/clang-c/Index.h
tools/libclang/CXSourceLocation.cpp
unittests/libclang/LibclangTest.cpp
Index: unittests/libclang/LibclangTest.cpp
===
cameron314 added a comment.
Ah, I was wondering where the tests were. I found this in the CMake file:
# FIXME: libclang unit tests are disabled on Windows due
# to failures, mostly in libclang.VirtualFileOverlay_*.
if(NOT WIN32 AND CLANG_TOOL_LIBCLANG_BUILD)
add_subdirectory(libclang)
cameron314 created this revision.
cameron314 added a reviewer: rsmith.
cameron314 added a subscriber: cfe-commits.
There were two bugs relating to remapped files, that are not specific to
Windows but happen more often there:
- When remapped files were changed, they would never cause the preamble'
cameron314 created this revision.
cameron314 added a reviewer: rsmith.
cameron314 added a subscriber: cfe-commits.
The end location of the range would be changed into its expansion location, but
the beginning of the range would stay as a spelling location. This would lead
to very weird ranges sp
cameron314 created this revision.
cameron314 added a reviewer: rsmith.
cameron314 added a subscriber: cfe-commits.
This complements the `clang_getSkippedRanges` function which returns skipped
ranges filtered by a specific file.
This function is useful when all the ranges are desired (and a lot m
cameron314 created this revision.
cameron314 added a reviewer: rsmith.
cameron314 added a subscriber: cfe-commits.
When triggering code completion within a file that is included in the middle of
a declaration in another file, clang would crash while parsing the code.
This occurred with real-worl
cameron314 created this revision.
cameron314 added a reviewer: rsmith.
cameron314 added a subscriber: cfe-commits.
All the groundwork for `CXCursor_LinkageSpec` already existed, but because of a
missing case in a switch, cursors of that type were never actually created for
linkage specifications
cameron314 created this revision.
cameron314 added a reviewer: rsmith.
cameron314 added a subscriber: cfe-commits.
This patch introduces `CXCursor_AliasAttr`/`CXCursor_WeakAttr` and
`clang_getAliasTargetSpelling()` for inspecting alias attributes via libclang.
http://reviews.llvm.org/D20127
Fil
cameron314 created this revision.
cameron314 added a reviewer: rsmith.
cameron314 added a subscriber: cfe-commits.
All the libclang functions for expanding a location, namely
`clang_getExpansionLocation`, `clang_getPresumedLocation`,
`clang_getInstantiationLocation`, and most surprisingly
`clan
cameron314 created this revision.
cameron314 added a reviewer: rsmith.
cameron314 added a subscriber: cfe-commits.
cameron314 set the repository for this revision to rL LLVM.
This fixes, for example, libclang's `clang_getAllSkippedRanges` returning zero
ranges after reparsing a translation unit.
cameron314 added a comment.
Ooh, and I should also add, there's a non-trivial cost to grabbing the entire
file contents as a string and then converting it to UTF-8. If ClangFormat was
faster, this would certainly become a significant bottleneck that can't really
be worked around.
http://revie
cameron314 added a comment.
We did profile at one point, to see if it was something we could trivially
speed up (it wasn't). Most of it was on the parsing/annotation side, yes (which
makes sense, since that's the majority of the work when the format region
itself is limited). I'm afraid I don't
cameron314 added a comment.
Too late ;-) We've successfully integrated it as the engine behind our
auto-formatting feature, passing only the minimal context necessary.
We tried at first to supply the full file context, but that turned out to be
much too slow in larger files. (We did a fair bit o
cameron314 added a comment.
Sure :-)
The motivation behind this patch (and a few more upcoming ones) is to make
ClangFormat (the library) more friendly for IDE integration (which is our
primary use case), in particular for on-the-fly auto-formatting.
In an IDE auto-format setting, it's often t
cameron314 added a comment.
ClangFormat still needs to know what kind of newline to insert when
reformatting code.
It already had the "auto-detect newline" behaviour; this patch simply allows
the auto-detection to be overridden with an explicit setting. This is important
for short files that ha
45 matches
Mail list logo