#
5c8b1cd2 |
| 27-Sep-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Always report a CXCursor_MacroDefinition for code-completion results for a macro name, not CXCursor_NotImplemented.
llvm-svn: 164740
|
#
9ae3956f |
| 26-Sep-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[libclang] Remove the ParentKind cursor kind from code-completion results.
This is to reduce dependency to cursors for the code-completion results.
llvm-svn: 164705
|
#
6d6c3110 |
| 06-Sep-2012 |
Roman Divacky <rdivacky@freebsd.org> |
Remove unused typedefs. Found by gcc48.
llvm-svn: 163327
|
#
dc86f94f |
| 31-Aug-2012 |
Joao Matos <ripzonetriton@gmail.com> |
Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.
llvm-svn: 163013
|
#
8b3f6235 |
| 29-Aug-2012 |
Alexander Kornienko <alexfh@google.com> |
Keep history of macro definitions and #undefs
Summary: Summary: Keep history of macro definitions and #undefs with corresponding source locations, so that we can later find out all macros active in
Keep history of macro definitions and #undefs
Summary: Summary: Keep history of macro definitions and #undefs with corresponding source locations, so that we can later find out all macros active in a specified source location. We don't save the history in PCH (no need currently). Memory overhead is about sizeof(void*)*3*<number of macro definitions and #undefs>+<in-memory size of all #undef'd macros>
I've run a test on a file composed of 109 .h files from boost 1.49 on x86-64 linux. Stats before this patch: *** Preprocessor Stats: 73222 directives found: 19171 #define. 4345 #undef. #include/#include_next/#import: 5233 source files entered. 27 max include stack depth 19210 #if/#ifndef/#ifdef. 2384 #else/#elif. 6891 #endif. 408 #pragma. 14466 #if/#ifndef#ifdef regions skipped 80023/451669/1270 obj/fn/builtin macros expanded, 85724 on the fast path. 127145 token paste (##) operations performed, 11008 on the fast path.
Preprocessor Memory: 5874615B total BumpPtr: 4399104 Macro Expanded Tokens: 417768 Predefines Buffer: 8135 Macros: 1048576 #pragma push_macro Info: 0 Poison Reasons: 1024 Comment Handlers: 8
Stats with this patch: ... Preprocessor Memory: 7541687B total BumpPtr: 6066176 Macro Expanded Tokens: 417768 Predefines Buffer: 8135 Macros: 1048576 #pragma push_macro Info: 0 Poison Reasons: 1024 Comment Handlers: 8
In my test increase in memory usage is about 1.7Mb, which is ~28% of initial preprocessor's memory usage and about 0.8% of clang's total VMM allocation.
As for CPU overhead, it should only be noticeable when iterating over all macros, and should mostly consist of couple extra dereferences and one comparison per macro + skipping of #undef'd macros. It's less trivial to measure, though, as the preprocessor consumes a very small fraction of compilation time.
Reviewers: doug.gregor, klimek, rsmith, djasper
Reviewed By: doug.gregor
CC: cfe-commits, chandlerc
Differential Revision: http://llvm-reviews.chandlerc.com/D28
llvm-svn: 162810
show more ...
|
#
adba9be7 |
| 23-Aug-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Fix a bunch of -Wdocumentation warnings.
llvm-svn: 162452
|
#
3deb1ad4 |
| 21-Aug-2012 |
John McCall <rjmccall@apple.com> |
Screw around with ObjCRuntime some more, changing the diagnostics for bad deployment targets and adding a few more predicates. Includes a patch by Jonathan Schleifer to enable ARC for ObjFW.
llvm-s
Screw around with ObjCRuntime some more, changing the diagnostics for bad deployment targets and adding a few more predicates. Includes a patch by Jonathan Schleifer to enable ARC for ObjFW.
llvm-svn: 162252
show more ...
|
#
53cb2f32 |
| 20-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
Code-complete 'weak' for properties under ARC-with-weak-references (or GC)
Also, suggest 'readonly' even if the property has been given an ownership attribute ('strong', 'weak', etc). This is used w
Code-complete 'weak' for properties under ARC-with-weak-references (or GC)
Also, suggest 'readonly' even if the property has been given an ownership attribute ('strong', 'weak', etc). This is used when properties are declared readonly in the public interface but readwrite in a class extension.
<rdar://problem/11500004&11932285>
llvm-svn: 162220
show more ...
|
#
e3eb7774 |
| 17-Aug-2012 |
Douglas Gregor <dgregor@apple.com> |
Make the spacing of the code completion result for NSDictionary literals match the spacing introduced by the ObjC modernizer. Fixes the rest of <rdar://problem/11889572>.
llvm-svn: 162084
|
#
a43ec186 |
| 11-Aug-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Attaching comments to declarations: find comment attached to any redeclaration
Not only look for the comment near the declaration itself, but also walk the redeclaration chain: the previous declarat
Attaching comments to declarations: find comment attached to any redeclaration
Not only look for the comment near the declaration itself, but also walk the redeclaration chain: the previous declaration might have had a documentation comment.
llvm-svn: 161722
show more ...
|
#
f5697e52 |
| 10-Aug-2012 |
David Blaikie <dblaikie@gmail.com> |
Provide isConst/Volatile on CXXMethodDecl.
This also provides isConst/Volatile/Restrict on FunctionTypes to coalesce the implementation with other callers (& update those other callers).
Patch cont
Provide isConst/Volatile on CXXMethodDecl.
This also provides isConst/Volatile/Restrict on FunctionTypes to coalesce the implementation with other callers (& update those other callers).
Patch contributed by Sam Panzer (panzer@google.com).
llvm-svn: 161647
show more ...
|
#
951de307 |
| 17-Jul-2012 |
Douglas Gregor <dgregor@apple.com> |
Remove unnecessary spacing around Objective-C object literal code completions. Fixes <rdar://problem/11889572>.
llvm-svn: 160407
|
#
3292d06a |
| 02-Jul-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Add a new libclang completion API to get brief documentation comment that is attached to a declaration in the completion string.
Since extracting comments isn't free, a new code completion option is
Add a new libclang completion API to get brief documentation comment that is attached to a declaration in the completion string.
Since extracting comments isn't free, a new code completion option is introduced.
A new code completion option that enables including brief comments into CodeCompletionString should be a, err, code completion option. But because ASTUnit caches global declarations during parsing before even completion consumer is created, the option is duplicated as a translation unit option (in both libclang and ASTUnit, like the option to cache code completion results).
llvm-svn: 159539
show more ...
|
#
58d54720 |
| 30-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Add support for the C11 _Alignof keyword.
This behaves like the existing GNU __alignof and C++11 alignof keywords; most of the patch is simply adding the third token spelling to various places.
llv
Add support for the C11 _Alignof keyword.
This behaves like the existing GNU __alignof and C++11 alignof keywords; most of the patch is simply adding the third token spelling to various places.
llvm-svn: 159494
show more ...
|
#
f1243871 |
| 17-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: fix two typos, rief -> brief and Descripts -> Describes
llvm-svn: 158630
|
#
9da05858 |
| 15-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
[completion] Add completions for @"..." and @(...), and tidy up @[] and @{}.
Specifically, @[] and @{} didn't have a type associated with them; we now use "NSArray *" and "NSDictionary *", respectiv
[completion] Add completions for @"..." and @(...), and tidy up @[] and @{}.
Specifically, @[] and @{} didn't have a type associated with them; we now use "NSArray *" and "NSDictionary *", respectively. @"" has the type "NSString *". @(), unfortunately, has type "id", since it (currently) may be either an NSNumber or an NSString.
Add a test for all the Objective-C at-expression completions.
<rdar://problem/11507708&11507668&11507711>
llvm-svn: 158533
show more ...
|
#
634962f3 |
| 14-Jun-2012 |
James Dennett <jdennett@google.com> |
Still more Doxygen documentation fixes: * Escape #, < and @ symbols where Doxygen would try to interpret them; * Fix several function param documentation where names had got out of sync; * Delete par
Still more Doxygen documentation fixes: * Escape #, < and @ symbols where Doxygen would try to interpret them; * Fix several function param documentation where names had got out of sync; * Delete param documentation referring to parameters that no longer exist.
llvm-svn: 158472
show more ...
|
#
596e4757 |
| 14-Jun-2012 |
James Dennett <jdennett@google.com> |
This makes SemaCodeComplete.cpp more Doxygen-friendly by changing the OBJC_AT_KEYWORD_NAME take a string literal argument where previously its second argument was an unquoted token; macro invocations
This makes SemaCodeComplete.cpp more Doxygen-friendly by changing the OBJC_AT_KEYWORD_NAME take a string literal argument where previously its second argument was an unquoted token; macro invocations such as OBJC_AT_KEYWORD_NAME(NeedAt,{) confuse Doxygen's parser.
While I'm wary of changing code (rather than just comments) to work around Doxygen's limitations, in this case the change makes the code more readable for human beings as well, and the macro derived no benefit from using the preprocessor's stringification operator, as it never has need of the unquoted token.
I've also included a couple of trivial drive-by fixes to doc comments.
llvm-svn: 158440
show more ...
|
#
9b4f3700 |
| 12-Jun-2012 |
Douglas Gregor <dgregor@apple.com> |
When code completion walks the members of a protocol or interface, make sure that we walk the definition. Fixes <rdar://problem/11427742>.
llvm-svn: 158357
|
#
4280e5cf |
| 08-Jun-2012 |
Dmitri Gribenko <gribozavr@gmail.com> |
Convert comments to proper Doxygen comments.
llvm-svn: 158241
|
#
40ed2973 |
| 06-Jun-2012 |
David Blaikie <dblaikie@gmail.com> |
Revert Decl's iterators back to pointer value_type rather than reference value_type
In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I w
Revert Decl's iterators back to pointer value_type rather than reference value_type
In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them.
This rolls back r155808 and r155869.
Review by Doug Gregor incorporating feedback from Chandler Carruth.
llvm-svn: 158104
show more ...
|
Revision tags: llvmorg-3.1.0, llvmorg-3.1.0-rc3 |
|
#
bbff3da6 |
| 05-May-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make BuiltinType::getName return a StringRef and introduce BuiltinType::getNameAsCString to get a const char* if necessary.
This avoids unnecessary conversions when we want to use the result of getN
Make BuiltinType::getName return a StringRef and introduce BuiltinType::getNameAsCString to get a const char* if necessary.
This avoids unnecessary conversions when we want to use the result of getName as a StringRef.
Part of rdar://10796159
llvm-svn: 156227
show more ...
|
Revision tags: llvmorg-3.1.0-rc2 |
|
#
3e653b36 |
| 30-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
clang_getCursorLexicalParent should return a translation unit cursor for declarations at the global scope, from Evan P. Fixes PR9083.
llvm-svn: 155858
|
#
2d7c57ec |
| 30-Apr-2012 |
David Blaikie <dblaikie@gmail.com> |
Remove the ref/value inconsistency in filter_decl_iterator.
filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior in
Remove the ref/value inconsistency in filter_decl_iterator.
filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind.
This change errs on the side of value, making op-> return T* and op* return T&.
(reviewed by Richard Smith)
llvm-svn: 155808
show more ...
|
Revision tags: llvmorg-3.1.0-rc1 |
|
#
2997914e |
| 10-Apr-2012 |
Douglas Gregor <dgregor@apple.com> |
Include the Objective-C parameter- and return-passing qualifiers when providing code completions for Objective-C method declarations. Fixes <rdar://problem/11164498>.
llvm-svn: 154421
|