History log of /external/clang/test/Index/complete-macros.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3644d970095d9c638c658cfd17f8e19fc333aadc 09-Oct-2012 Douglas Gregor <dgregor@apple.com> If a macro has been #undef'd in a precompiled header, we still need to
write out the macro history for that macro. Similarly, we need to cope
with reading a macro definition that has been #undef'd.

Take advantage of this new ability so that global code-completion
results can refer to #undef'd macros, rather than losing them
entirely. For multiply defined/#undef'd macros, we will still get the
wrong result, but it's better than getting no result.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-macros.c
c8dc1352071575c36401158094a865ad682fb886 21-Jan-2012 Douglas Gregor <dgregor@apple.com> Fix the code completion string for variadic macros with more than one
argument, which was broken and very ugly (and even had a test case to
make *sure* it was broken and ugly). Fixes <rdar://problem/10609117>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-macros.c
e42447021239015db97202fb04c304d82e84135f 30-Jul-2011 Douglas Gregor <dgregor@apple.com> When producing code completion results for variadic macros, fold the
variadic bit (", ..." or ", args...") into the prior placeholder, like
we do with functions and methods. Fixes <rdar://problem/9740808>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-macros.c
d754d5546ef1faa4216298fd95bc6a7f15808fd2 16-Sep-2010 Douglas Gregor <dgregor@apple.com> Swap the priorities of constants and types, so that we prefer types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-macros.c
1827e10051638770ad9ccf3e285caf95f995afd1 16-Aug-2010 Douglas Gregor <dgregor@apple.com> When caching global completion results, keep track of the simplified
type class, so that we can adjust priorities appropriately when the
preferred type for the context and the actual type of the completion
are similar.

This gets us one step closer to parity of the cached completion
results with the non-cached completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-macros.c
87c08a5d6b9e1e44ae6f554df40139d3a6f60b33 14-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement caching of code-completion results for macro definitions
when the CXTranslationUnit_CacheCompletionResults option is given to
clang_parseTranslationUnit(). Essentially, we compute code-completion
results for macro definitions after we have parsed the file, then
store an ASTContext-agnostic version of those results (completion
string, cursor kind, priority, and active contexts) in the
ASTUnit. When performing code completion in that ASTUnit, we splice
the macro definition results into the results provided by the actual
code-completion (which has had macros turned off) before libclang gets
those results. We use completion context information to only splice in
those results that make sense for that context.

With a completion involving all of the macros from Cocoa.h and a few other
system libraries (totally ~8500 macro definitions) living in a
precompiled header, we get about a 9% performance improvement from
code completion, since we no longer have to deserialize all of the
macro definitions from the precompiled header.

Note that macro definitions are merely the canary; the cache is
designed to also support other top-level declarations, which should be
a bigger performance win. That optimization will be next.

Note also that there is no mechanism for determining when to throw
away the cache and recompute its contents.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-macros.c
590c7d5e79d350162d485f039018cbeb47f3b547 08-Jul-2010 Douglas Gregor <dgregor@apple.com> During code completion, give the "nil" and "NULL" macros the same
priority as other constants. And, if we're in a place where we prefer
a pointer type, consider "nil" and "NULL" to be close matches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-macros.c
09d9fa1933499cb2808cd97b2db16ee11a990ef9 05-Apr-2010 Douglas Gregor <dgregor@apple.com> Code completion results that refer to macros now get the cursor kind
of macro definitions when passed to CIndex. Add test for code
completion of macros via CIndex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-macros.c