Commit Graph

959 Commits

Author SHA1 Message Date
Daniel Jasper ab8128b01d Fix test error caused by r183008.
llvm-svn: 183010
2013-05-31 15:15:41 +00:00
Argyrios Kyrtzidis 55fb21efbb [libclang] When indexing a @synthesize, don't consider that it defines a getter/setter if one is already defined by the user.
Fixes rdar://13925258

llvm-svn: 182895
2013-05-29 23:58:31 +00:00
Argyrios Kyrtzidis 345d05fbbe [libclang] For "@import .." code-completion results, associate a CXCursor_ModuleImportDecl cursor instead of CXCursor_NotImplemented.
llvm-svn: 182871
2013-05-29 18:50:15 +00:00
Dmitri Gribenko 62770bea4b libclang: add a function to check whether a member function is pure virtual
Patch by Seth Fowler.

llvm-svn: 182139
2013-05-17 18:38:35 +00:00
Daniel Jasper 9dc096c8e6 Fix test breakage caused by change in clang-format.
llvm-svn: 181888
2013-05-15 14:27:33 +00:00
Argyrios Kyrtzidis 1c7455f42f [libclang] When parsing with CXTranslationUnit_ForSerialization, make sure to install the ASTWriter that we create as an ASTMutationListener.
Fixes rdar://13833268

llvm-svn: 181575
2013-05-10 01:28:51 +00:00
Argyrios Kyrtzidis d391046930 Have SourceManager::getLocForEndOfFile() point at the "EOF" location of the FileID.
This fixes a crash due to SourceManager::getLocForEndOfFile() returning an off-by-one location
when the the FileID is for an empty file.

rdar://13803893

llvm-svn: 181285
2013-05-07 04:29:22 +00:00
Argyrios Kyrtzidis fe6a01253e Have the RecursiveASTVisitor traverse the type source info of an objc class message.
llvm-svn: 181237
2013-05-06 19:08:57 +00:00
Fariborz Jahanian 6384fbb28f [document parsing]: support c++11 type aliases
with no comment of their own to inherit the
comment of their aliased type. // rdar://13752382

llvm-svn: 180924
2013-05-02 15:44:16 +00:00
Fariborz Jahanian b5f34681a6 [documenting declaration]: Remove arc liftime qualifiers
when doccumenting declrations in comments.
// rdar://13757500

llvm-svn: 180880
2013-05-01 20:53:21 +00:00
Fariborz Jahanian 1a658edfef Fix buildbot yet again. // rdar://13757500.
llvm-svn: 180863
2013-05-01 17:58:21 +00:00
Fariborz Jahanian 0a50662f8b attempt to fix the buildbot failure.
llvm-svn: 180861
2013-05-01 17:47:05 +00:00
Fariborz Jahanian 9e0758442e [ObjC declaration documentation] declaration of
types involving Objective-C pointers must have
their arc qualifiers elided as they don't 
add any additional info. // rdar://13757500.

llvm-svn: 180860
2013-05-01 17:28:37 +00:00
Fariborz Jahanian 5a2e4a2dc1 documenttion parsing. Provide a c-index test
and limit comment extraction to public c++
bases. // rdar://13647476

llvm-svn: 180646
2013-04-26 23:34:36 +00:00
Argyrios Kyrtzidis 12fdb9e34b [libclang] Introduce clang_Module_getASTFile function that returns the module file where a module object came from.
rdar://13743084

llvm-svn: 180643
2013-04-26 22:47:49 +00:00
Argyrios Kyrtzidis d3afa0c7fb [PCH/modules] Require the preprocessing record option to match the used PCH, if modules are enabled.
The preprocessing record becomes important when modules are enabled, since it is used to calculate the
module cache hash.

llvm-svn: 180635
2013-04-26 21:33:40 +00:00
Dmitri Gribenko e9585628ae Comment parsing: -fparse-all-comments: recognize empty line comments
In -fparse-all-comments mode empty '//' comments were recognized as
RCK_Invalid, and were not merged with next and previous lines.

Patch by Amin Shali.

llvm-svn: 180625
2013-04-26 20:12:49 +00:00
Argyrios Kyrtzidis c2233beba4 [libclang] Introduce a CXCursor_ObjCSelfExpr cursor, which is the equivalent of CXCursor_CXXThisExpr for C++ code.
rdar://13717006

llvm-svn: 180127
2013-04-23 17:57:17 +00:00
Argyrios Kyrtzidis 40bcfd71b6 When modifying an implicit instantiation with information from an explicit one, make sure to reset the "right brace" location.
Otherwise the source range of the explicit instantiation may become invalid (begin location will be after the end location).

rdar://13706991

llvm-svn: 180070
2013-04-22 23:23:42 +00:00
Argyrios Kyrtzidis 0903f8dac5 [libclang] Make sure the preable does not truncate comments.
rdar://13647445

llvm-svn: 179907
2013-04-19 23:24:25 +00:00
Argyrios Kyrtzidis 23814e4f49 [libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the given cursor is a variadic function or method.
rdar://13667150

llvm-svn: 179819
2013-04-18 23:53:05 +00:00
Argyrios Kyrtzidis 9d9bc01e42 [libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC Qualifiers' written next to the return and
parameter types in an ObjC method declarations.

rdar://13676977

llvm-svn: 179816
2013-04-18 23:29:12 +00:00
Argyrios Kyrtzidis 9adfd8aabb [libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the written attributes in a property declaration.
rdar://13684512

llvm-svn: 179803
2013-04-18 22:15:49 +00:00
Fariborz Jahanian 65ff01bccb Adds a new doxygen tag needed. // rdar://12379053
llvm-svn: 179770
2013-04-18 16:45:57 +00:00
Argyrios Kyrtzidis 5af4f2b7ea [libclang] Report parameter array types as written in source, not decayed to pointer types.
Patch by Doug.
rdar://13684618

llvm-svn: 179769
2013-04-18 16:41:15 +00:00
Argyrios Kyrtzidis a077279184 Correct the range returned by ParmVarDecl::getSourceRange(), for parameters in ObjC methods with postfix types.
For a parameter in a method like this:

-(int)methodWithFn:(void (*)(int *p))fn;

we would return the source range of the type and not include the parameter name.

Fixes rdar://13668626.

llvm-svn: 179660
2013-04-17 01:56:48 +00:00
Argyrios Kyrtzidis 1ab09cc883 [libclang] Have clang_getCXXAccessSpecifier() also return the access control of a C++ declaration within its parent scope.
Suggested by Stefan Seefeld.

llvm-svn: 179297
2013-04-11 17:02:10 +00:00
Argyrios Kyrtzidis e822f58db4 [libclang] Expose record layout info via new libclang functions:
clang_Type_getAlignOf
clang_Type_getSizeOf
clang_Type_getOffsetOf
clang_Cursor_isBitField

Patch by Loïc Jaquemet!

llvm-svn: 179251
2013-04-11 01:20:11 +00:00
Fariborz Jahanian ccd66d259a comment parsing. Add couple more needed doxygen tags.
// rdar://12379053

llvm-svn: 179238
2013-04-10 23:10:42 +00:00
Dmitri Gribenko c922b71d60 -fparse-all-comments: remove redundant check, as suggested by Fariborz Jahanian
llvm-svn: 179204
2013-04-10 18:43:09 +00:00
Dmitri Gribenko 061f32847f Add testcases for -fparse-all-comments
llvm-svn: 179181
2013-04-10 16:31:58 +00:00
NAKAMURA Takumi 2eea0bfdb6 clang/test/Index/annotate-tokens.cpp: Appease msvc-targets with -fno-delayed-template-parsing.
llvm-svn: 179065
2013-04-08 23:05:10 +00:00
Fariborz Jahanian 8a58e4a649 doce parsing: adding few more headerdoc tags.
// rdar://12379114

llvm-svn: 179039
2013-04-08 18:53:25 +00:00
Argyrios Kyrtzidis 2ec76747f4 [libclang] Fix cursor visitation to not ignore template arguments in out-of-line member functions.
rdar://13535645

llvm-svn: 178911
2013-04-05 21:04:10 +00:00
Fariborz Jahanian 745bf62d21 doce parsing: adding few more headerdoc tags.
// rdar://12379114

llvm-svn: 178903
2013-04-05 19:40:53 +00:00
Argyrios Kyrtzidis b2792972a2 [libclang] Make clang_Cursor_getArgument work with call-exprs.
Patch by Matthias Kleine!

llvm-svn: 178475
2013-04-01 17:38:59 +00:00
Argyrios Kyrtzidis 1a0ffd523a [libclang] Add test case for r178374.
llvm-svn: 178378
2013-03-29 22:16:32 +00:00
Argyrios Kyrtzidis c36633c47a [Parser] Don't code-complete twice.
When we are consuming the current token just to enter a new token stream, we push
the current token in the back of the stream so that we get it again.

Unfortunately this had the effect where if the current token is a code-completion one,
we would code-complete once during consuming it and another time after the stream ended.

Fix this by making sure that, in this case, ConsumeAnyToken() will consume a code-completion
token without invoking code-completion.

rdar://12842503

llvm-svn: 178199
2013-03-27 23:58:17 +00:00
Evgeniy Stepanov dff0255270 Mark comment-to-html-xml-conversion test as XFAIL:msan, in addition to valgrind.
llvm-svn: 178138
2013-03-27 13:05:40 +00:00
Alexey Samsonov 9d8043b4cc Actually mark ASan-unfriendly test as XFAIL
llvm-svn: 177997
2013-03-26 08:45:29 +00:00
NAKAMURA Takumi f759061908 clang/test/Index/crash-recovery-code-complete.c: Mark it as XFAIL:win32 for now.
I know MemoryBuffer might affect this. Still investigating.

llvm-svn: 177946
2013-03-25 23:49:11 +00:00
Fariborz Jahanian be8bc67b66 documentation parsing: when providing code completion comment
for a getter used in property-dot syntax, if geter has its own
comment use it. // rdar://12791315

llvm-svn: 177797
2013-03-23 01:10:45 +00:00
Fariborz Jahanian 1fcf4921af documentation parsing. Provide code completion comment
for self.GetterName where GetterName is the getter method 
for a property with name different from the property name 
(declared via a property getter attribute) // rdar://12791315

llvm-svn: 177744
2013-03-22 17:55:27 +00:00
Argyrios Kyrtzidis 014349cc8c [libclang] Modify clang_getCursorType to be able to handle a function template decl.
llvm-svn: 177359
2013-03-18 23:54:50 +00:00
Argyrios Kyrtzidis 1b5b1ce4f8 [libclang] Fix a test and a warning on windows.
Patch by Guy Benyei!

llvm-svn: 176806
2013-03-11 16:03:17 +00:00
Argyrios Kyrtzidis 503c83ad81 [libclang] Introduce clang_findIncludesInFile, that can be used to retrieve all #import/#include directives in a specific file.
It passes to the visitor, that the caller provides, CXCursor_InclusionDirective cursors for
all the include directives in a particular file.

llvm-svn: 176682
2013-03-08 02:32:34 +00:00
Douglas Gregor 61e368182d Add code completion for @import <rdar://problem/13344306>.
llvm-svn: 176666
2013-03-07 23:26:24 +00:00
Fariborz Jahanian 07cde21584 Add comment to my last test.
llvm-svn: 176272
2013-02-28 18:03:28 +00:00
Fariborz Jahanian 15a0b55c97 objective-C code completion. Property accessors may not
have their own code completion comments. Use those in 
their properties in this case. 
// rdar://12791315

llvm-svn: 176271
2013-02-28 17:47:14 +00:00
Argyrios Kyrtzidis ddee8c9e2b [PCH] When deserializing an IdentifierInfo, call IdentifierInfo::RevertTokenIDToIdentifier() only when it's not already an identifier.
Fixes an assertion hit.
rdar://13288735

llvm-svn: 176148
2013-02-27 01:13:51 +00:00