| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That commit added a new library just to hold the RawCommentList. I've
started a discussion on the commit thread about whether that is really
meritted -- it certainly doesn't seem necessary at this stage.
However, the immediate problem is that the AST library has a hard
dependency on the Comment library, but the dependencies were set up
completely backward. In addition to the layering violation, this had an
unfortunate effect if scattering the Comments library dependency
throughout the build system, but inconsistently so -- several parts of
the CMake dependencies were missing and only showed up due to transitive
deps or the fact that the target wasn't being built by tho bots.
It turns out that the Comments library can't (currently) be a well
formed layer *below* the AST library either, as it has an API that
accepts an ASTContext. That parameter is currently unused, so maybe that
was a mistake?
Anyways, it really seems like this is logically part of the AST --
that's the whole point of the ASTContext providing access to it as far
as I can tell -- so I've merged it into the AST library to solve the
immediate layering violation problems and remove some of the churn from
our library dependencies.
llvm-svn: 158807
|
|
|
|
|
|
|
|
|
| |
* Retain comments in the AST
* Serialize/deserialize comments
* Find comments attached to a certain Decl
* Expose raw comment text and SourceRange via libclang
llvm-svn: 158771
|
|
|
|
| |
llvm-svn: 158325
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the same line do not override getting a cursor for the previous declaration.
e.g:
int x, y;
@synthesize prop1, prop2;
pointing at 'x'/'prop1' would give 'y'/'prop2' because their source ranges overlap.
rdar://11361113
llvm-svn: 158258
|
|
|
|
|
|
|
|
| |
that does not exist.
rdar://11607033
llvm-svn: 158193
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AST: For auto-synthesized ivars give them the location of the related
property (previously they had no source location). This allows them
to be indexed by libclang.
libclang: Make sure synthesized ivars are indexed before the methods that
may reference them.
Fixes rdar://11607001.
llvm-svn: 158189
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The integral APSInt value is now stored in a decomposed form and the backing
store for large values is allocated via the ASTContext. This way its not
leaked as TemplateArguments are never destructed when they are allocated in
the ASTContext. Since the integral data is immutable it is now shared between
instances, making copying TemplateArguments a trivial operation.
Currently getting the integral data out of a TemplateArgument requires creating
a new APSInt object. This is cheap when the value is small but can be expensive
if it's not. If this turns out to be an issue a more efficient accessor could
be added.
llvm-svn: 158150
|
|
|
|
|
|
|
|
| |
harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed.
Only 1 minor code change was necessary: can't use cdecl as variable name anymore.
llvm-svn: 158063
|
|
|
|
| |
llvm-svn: 157531
|
|
|
|
|
|
| |
rdar://11357807
llvm-svn: 157356
|
|
|
|
|
|
| |
its type source info. Fixes indexing references inside @encode().
llvm-svn: 156936
|
|
|
|
|
|
|
|
|
| |
To do that, keep track of the location of the protocol id in the ObjCProtocolExpr
AST node.
rdar://11190837
llvm-svn: 156890
|
|
|
|
|
|
|
|
| |
instead of liblibclang.so/liblibclang.a.
Patch by Arnaud de Grandmaison.
llvm-svn: 156809
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from the frontend when the location is invalid and the SourceManager null.
Instead of keeping the SourceManager object in DiagnosticRenderer, propagate it
to the calls accordingly (as reference when it is expected to not be null, or pointer
when it may be null).
This effectively makes DiagnosticRenderer not tied to a specific SourceManager,
removing a hack from TextDiagnosticPrinter.
rdar://11386874
llvm-svn: 156536
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reserving a bit
in ObjCMethodDecl to indicate whether the method does not override any other method,
which is the majority of cases.
That way we can avoid unnecessary work doing lookups, especially when PCH is involved.
rdar://11360082
llvm-svn: 156476
|
|
|
|
|
|
| |
rdar://11357807
llvm-svn: 156352
|
|
|
|
|
|
|
|
| |
a given entity, so that we can tell when the entity was
introduced/deprecated/obsoleted on each platform for which we have an
annotation. Addresses <rdar://problem/11365715>.
llvm-svn: 156347
|
|
|
|
|
|
| |
data-recursive for statements.
llvm-svn: 156339
|
|
|
|
| |
llvm-svn: 156331
|
|
|
|
|
|
|
|
| |
BodyIndexer::TraverseCXXOperatorCallExpr".
It was reverted on r156253.
llvm-svn: 156330
|
|
|
|
|
|
|
|
|
|
| |
This is temporary until we settle on how to make the main RecursiveASTVisitor safe.
There are some modifications on the original version, to avoid extreme memory usage
when compiling for release.
rdar://11179167
llvm-svn: 156329
|
|
|
|
|
|
|
|
| |
BodyIndexer::TraverseCXXOperatorCallExpr which"
It caused test/Index/index-many-call-ops.cpp to fail in stage2 c-index-test on selfhosting i686-cygwin and x86_64-linux since r156229 (Reverting making RecursiveASTVisitor data recursive).
llvm-svn: 156253
|
|
|
|
|
|
|
| |
was removed in r155969 to address a deficiency of RecursiveASTVisitor
prior to recent changes on it.
llvm-svn: 156142
|
|
|
|
|
|
|
|
|
| |
* Work around build failures due to gcc 4.2 bugs.
* Remove BodyIndexer::TraverseCXXOperatorCallExpr, which was not being called
prior to this change, and whose presence disables a RecursiveASTVisitor
stack space optimization after this change.
llvm-svn: 155969
|
|
|
|
|
|
| |
declarations at the global scope, from Evan P. Fixes PR9083.
llvm-svn: 155858
|
|
|
|
| |
llvm-svn: 155842
|
|
|
|
|
|
|
|
|
|
| |
SmallVector<CXCursor> objects
under the covers.
Fixes <rdar://problem/11289160>.
llvm-svn: 155841
|
|
|
|
|
|
| |
Brad Smith!
llvm-svn: 155534
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per Greg Clayton:
libclang.dylib is trying to be smart and load itself at a valid address
to be able to load faster which would work for 32 bit systems,
bit won't make any difference on 64 bit systems.
It should either pick a better 64 bit address, or just let itself be loaded at zero.
rdar://11159142
llvm-svn: 155246
|
|
|
|
| |
llvm-svn: 155082
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
same line,
that later ones do not override the previous ones.
If we have:
@class Foo, Bar;
source ranges for both start at '@', so 'Bar' will end up overriding
'Foo' even though the cursor location was at 'Foo'.
rdar://11257578
llvm-svn: 154873
|
|
|
|
|
|
|
|
| |
range, not the class one.
rdar://11249386
llvm-svn: 154853
|
|
|
|
| |
llvm-svn: 154779
|
|
|
|
|
|
|
|
|
| |
attached. Since we do not support any attributes which appertain to a statement
(yet), testing of this is necessarily quite minimal.
Patch by Alexander Kornienko!
llvm-svn: 154723
|
|
|
|
| |
llvm-svn: 154675
|
|
|
|
| |
llvm-svn: 154584
|
|
|
|
|
|
|
|
|
| |
libclang to accurately
get the diagnostic category name from a serialized diagnostic when the version of libclang used
to read the diagnostic file is newer than the clang that emitted the diagnostic file.
llvm-svn: 154567
|
|
|
|
|
|
|
|
|
|
|
| |
to get at the parameters (and their types) of a function or objc method cursor.
int clang_Cursor_getNumArguments(CXCursor C);
CXCursor clang_Cursor_getArgument(CXCursor C, unsigned i);
rdar://11201527
llvm-svn: 154523
|
|
|
|
|
|
|
|
|
|
| |
macro arguments
correctly. clang diagnostics can provide fixits inside a macro argument now.
rdar://11014346
llvm-svn: 154517
|
|
|
|
|
|
|
|
| |
that gcc
emits but not clang.
llvm-svn: 154475
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
make sure to
output the errors that occurred even if we did not get an AST (e.g. because the
PCH failed to load).
Also honor displayDiagnostics in clang_indexSourceFile().
rdar://11203489
llvm-svn: 154472
|
|
|
|
|
|
|
|
| |
objc methods
for methods in categories of super classes. rdar://11220358
llvm-svn: 154436
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
code-completion related strings specific to a translation unit (ASTContext and related data)
CodeCompletionAllocator does such limited caching, by caching the name assigned
to a DeclContext*, but that is not the appropriate place since that object has
a lifetime that can extend beyond that of an ASTContext.
Introduce CodeCompletionTUInfo which will be always tied to a translation unit
to do this kind of caching and move the caching of CodeCompletionAllocator into this
object, and propagate it to all the places where it will be needed.
The plan is to extend the caching where appropriate, using CodeCompletionTUInfo,
to avoid re-calculating code-completion strings.
Part of rdar://10796159.
llvm-svn: 154408
|
|
|
|
| |
llvm-svn: 153988
|
|
|
|
|
|
|
|
|
| |
When indexing a property with a getter/setter with attributes, the allocated memory
for AttrListInfo could get released before its destructor is run.
Fixes rdar://11113442.
llvm-svn: 153792
|
|
|
|
|
|
|
|
|
|
| |
After getting a cursor with clang_getCursor for a particular source location,
allows querying the cursor in order to find out if the location points to a
selector identifier in an objc method or message expression, and which selector index it is.
rdar://11158946
llvm-svn: 153781
|
|
|
|
|
|
|
|
|
|
|
| |
It retrieves a source range for a piece that forms the cursors spelling name.
Most of the times there is only one range for the complete spelling but for
objc methods and objc message expressions, there are multiple pieces for each
selector identifier.
Part of rdar://11113120
llvm-svn: 153775
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reference is going to message the setter, the getter, or both.
Having this info on the ObjCPropertyRefExpr node makes it easier for AST
clients (like libclang) to reason about the meaning of the property reference.
[AST/Sema]
-Use 2 bits (with a PointerIntPair) in ObjCPropertyRefExpr to record the above info
-Have ObjCPropertyOpBuilder set the info appropriately.
[libclang]
-When there is an implicit property reference (property syntax using methods)
have clang_getCursorReferenced return a cursor for the method. If the property
reference is going to result in messaging both the getter and the setter choose
to return a cursor for the setter because it is less obvious from source inspection
that the setter is getting called.
The general idea has the seal of approval by John.
rdar://11151621
llvm-svn: 153709
|
|
|
|
|
|
|
|
| |
its location the location of the property.
Part of rdar://11113120
llvm-svn: 153708
|
|
|
|
| |
llvm-svn: 153594
|