Argyrios Kyrtzidis
f0168de936
[libclang] Allow building a precompiled preamble with compiler errors
...
A while ago we allowed libclang to build a PCH that had compiler errors; this was to retain the performance
afforded by a PCH even if the user's code is in an intermediate state.
Extend this for the precompiled preamble as well.
rdar://14109828
llvm-svn: 183717
2013-06-11 00:36:55 +00:00
Reid Kleckner
17aeeeb311
Revert "[Sema] Make FunctionType's TSI use unadjusted argument types"
...
This reverts commit r183614.
It broke test/Sema/block-printf-attribute-1.c on non-Windows platforms,
and the fix is not trivial.
llvm-svn: 183616
2013-06-08 18:19:52 +00:00
Reid Kleckner
4c124ffd5b
[Sema] Make FunctionType's TSI use unadjusted argument types
...
This helps preserve the type-as-written in the AST, which we need for
MSVC mangling. In particular, we need to preserve the types of array
parameters in function pointer types.
The essence of this change is:
- QualType ArgTy = Param->getType();
+ QualType ArgTy = Param->getTypeSourceInfo()->getType();
... followed by the adjustment in ActOnFunctionDeclarator().
Differential Revision: http://llvm-reviews.chandlerc.com/D883
llvm-svn: 183614
2013-06-08 17:28:56 +00:00
Argyrios Kyrtzidis
6af41328be
When the template specialization header is missing, set a valid source location for the template keyword when recovering.
...
Otherwise ClassTemplateSpecializationDecl::getSourceRange() will mistakenly consider itself as an implicit partial specialization
and lead to a crash.
Fixes rdar://14063074
llvm-svn: 183325
2013-06-05 17:52:24 +00:00
Argyrios Kyrtzidis
990b386117
[libclang] When annotating tokens, don't override a property annotation with a getter/setter method annotation.
...
rdar://13764549
llvm-svn: 183242
2013-06-04 18:24:30 +00:00
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