• Home
  • History
  • Annotate
  • only in /external/clang/tools/libclang/
History log of /external/clang/tools/libclang/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
RCMigrate.cpp
Index.cpp
IndexCXX.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexHigh.cpp
Log.h
XComment.cpp
XComment.h
XCompilationDatabase.cpp
XCursor.cpp
XCursor.h
XLoadedDiagnostic.cpp
XSourceLocation.cpp
XString.cpp
XString.h
XTranslationUnit.h
XType.cpp
ursorVisitor.h
ndexBody.cpp
ndexDecl.cpp
ndexTypeSourceInfo.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
uildSystem.cpp
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
XComment.cpp
XComment.h
XCursor.cpp
XLoadedDiagnostic.cpp
XStoredDiagnostic.cpp
ndexBody.cpp
ndexing.cpp
ibclang.exports
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
RCMigrate.cpp
uildSystem.cpp
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexDiagnostic.h
IndexHigh.cpp
IndexInclusionStack.cpp
IndexUSRs.cpp
Log.h
MakeLists.txt
XCompilationDatabase.cpp
XCursor.cpp
XLoadedDiagnostic.cpp
XLoadedDiagnostic.h
XSourceLocation.cpp
XStoredDiagnostic.cpp
XString.h
XTranslationUnit.h
XType.cpp
ndexBody.cpp
ndexDecl.cpp
ndexTypeSourceInfo.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
akefile
ecursiveASTVisitor.h
ibclang.exports
4d0ddecbe7dbbfeb89e428ed6e19c3cf12325087 14-Nov-2013 Dmitri Gribenko <gribozavr@gmail.com> Work around a bug in old gcc on the FreeBSD bot, which complains about
ambiguity between index() function and clang::index namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194638 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
d4315fe3c4c9684068564cb68f262d1a805329a4 13-Nov-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang does not depend directly on clangFormat; but clangIndex does


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194611 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
86cfda2fcccc84e92fb7f27e85b58312440ca8de 13-Nov-2013 Dmitri Gribenko <gribozavr@gmail.com> Documentation parsing: move comment-to-XML conversion routines to libIndex


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194610 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
MakeLists.txt
XComment.cpp
XTranslationUnit.h
impleFormatContext.h
2fe4f17d8eb90fb6a743e0d72641652f20fd73c7 13-Nov-2013 Dmitri Gribenko <gribozavr@gmail.com> Make inline functions in a header file static.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194603 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.h
f88536af2cbbea3444c6488a1889520538250efb 13-Nov-2013 Manuel Klimek <klimek@google.com> Add an optional mapping from source paths to source contents.

This allows compilation database implementations for distributed build
systems to hand all data to the client to make parsing independent of
the file system.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194571 91177308-0d34-0410-b5e6-96231b3b80d8
XCompilationDatabase.cpp
f6785e3117c0ce447e4d70065e069a9dc031f14c 12-Nov-2013 Dmitri Gribenko <gribozavr@gmail.com> Documentation parsing: add support for \throws \throw \exception commands


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194521 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
695f3e339f39999122340685d1555205be2511c2 06-Nov-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Some changes on the linker options for libclang on a CMake build.

- Use the 'libclang.exports' file.
- Pass -Wl,-current_version
- Set install name to "@rpath"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194134 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
1b416051a376f74af67cd2a2b8e45ea31fac0a90 04-Nov-2013 Filip Pizlo <fpizlo@apple.com> It is no longer necessary to opt out of pretty stack traces.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193973 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ddc2a53584f91b1fdcc466f1ea1345d97c428802 31-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Store a TypeArgument on an attribute as a TypeSourceInfo*, rather than as a
QualType with a SourceLocation stashed alongside.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193803 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexingContext.cpp
d386fef64f1fd00fc9a97efb963d8ec393fd1ace 31-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Factor out custom parsing for iboutletcollection and vec_type_hint attributes
into a separate "parse an attribute that takes a type argument" codepath. This
results in both codepaths being a lot cleaner and simpler, and fixes some bugs
where the type argument handling bled into the expression argument handling and
caused us to both accept invalid and reject valid attribute arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193731 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexingContext.cpp
fa3d81ca3cfe064bbbcae9be93a215bc8f5ba906 29-Oct-2013 Sylvestre Ledru <sylvestre@debian.org> Use LLVMLibsOptions intead of LDFLAGS when setting the libclang soname. This allows 'make LDFLAGS=foo' to be set correctly (and matches the way it is done with libllvm and liblldb)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193607 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
bc6509175e1ce5cc1b48d1b97ac8d23d8b74167c 17-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Rename some functions for consistency.

Every other function in Redeclarable.h was using Decl instead of Declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192900 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
f0598303822047e6b9ad327ffce929c1e61fc065 15-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Add llvm_unreachable to pacify GCC's dropping off non-void function warning.

+ 80 cols fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192728 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
2bf1c0127382709a935ce87646c0662def3a0707 15-Oct-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When querying for the availability of an enumerator, pick up the availability from the enum declaration.

rdar://14789001.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192718 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
659837e0ce0f73c7fdd5941854be3500db2f4013 11-Oct-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ref-qualifier information of function type.

Patch by Che-Liang Chiou!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192493 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
ibclang.exports
367e8fe3ef5bcf5e3c9855364560b89f7a1e9145 03-Oct-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Type_getClassType which returns the class type of a member pointer type.

Patch by Che-Liang Chiou!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191906 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
ibclang.exports
d195bc38fd424b0c928e3c354038a8ca6e2ccac3 01-Oct-2013 Alexey Bataev <a.bataev@hotmail.com> [OpenMP] Added parsing and semantic analysis for firstprivate clause


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191730 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecursiveASTVisitor.h
513371129c834c143a50c3ca09bb581b7f0f6344 25-Sep-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Provide location for attributes and expose 'packed' attribute.

Patch by Loïc Jaquemet!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191345 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
543c4ae954f2bce5ac58ed22080f23cbd94794d2 24-Sep-2013 Alexey Bataev <a.bataev@hotmail.com> [OPENMP] Bug fixes and improvements.
1. Fixed constructor of shared clause.
2. Some macros for clauses processing are replaced by private template methods.
3. Additional checks in sema analysis of OpenMP clauses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191265 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecursiveASTVisitor.h
767b3d2000a00c56e1a3c19372810e2b7d66b76c 22-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> Fix array_pod_sort predicates after LLVM change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191176 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
414a1bdbdaf250e0488589f12865c8961831b65d 18-Sep-2013 Hal Finkel <hfinkel@anl.gov> Add the intrinsic __builtin_convertvector

LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.

C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190915 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ecursiveASTVisitor.h
7a97f7bc619752d09998a9c31c7574b51f04ba1e 16-Sep-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Don't report a DecayedType as "unexposed", report it as the original (as written) type.

Patch by Anders Waldenborg!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190796 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
0b5ca510fb00eeb19ab82ebfd3c2585404bc9aa8 13-Sep-2013 David Blaikie <dblaikie@gmail.com> Remove unnecessary inclusion of Sema.h

Let me tell you a tale...

Within some twisted maze of debug info I've ended up implementing an
insane man's Include What You Use device. When the debugger emits debug
info it really shouldn't, I find out why & then realize the code could
be improved too.

In this instance CIndexDiagnostics.cpp had a lot more debug info with
Clang than GCC. Upon inspection a major culprit was all the debug info
describing clang::Sema. This was emitted because clang::Sema is
befriended by DiagnosticEngine which was rightly required, but GCC
doesn't emit debug info for friends so it never emitted anything for
Clang. Clang does emit debug info for friends (will be fixed/changed to
reduce debug info size).

But why didn't Clang just emit a declaration of Sema if this entire TU
didn't require a definition?

1) Diagnostic.h did the right thing, only using a declaration of Sema
and not including Sema.h at all.
2) Some other dependency of CIndexDiagnostics.cpp didn't do the right
thing. ASTUnit.h, only needing a declaration, still included Sema.h
(hence this commit which removes that include and adds the necessary
includes to the cpp files that were relying on this)
3) -flimit-debug-info didn't save us because of
EnterExpressionEvaluationContext, defined inline in Sema.h which fires
the "requiresCompleteType" check/flag (since it uses nested types from
Sema and calls Sema member functions) and thus, if debug info is ever
emitted for the type, the whole type is emitted and not just a
declaration.

Improving -flimit-debug-info to account for this would be... hard.
Modifying the code so that's not 'required to be complete' might be
possible, but probably only by moving EnterExpressionEvaluationContext
either into Sema, or out of Sema.h. That might be a bit too much of a
contortion to be bothered with.

Also, this is only one of the cases where emitting debug info for
friends caused us to emit a lot more debug info (this change reduces
Clang's DWO size by 0.93%, dropping friends entirely reduces debug info
by 3.2%) - I haven't hunted down the other cases, but I assume they
might be similar (Sema or something like it). IWYU or a similar tool
might help us reduce build times a bit, but analyzing debug info to find
these differences isn't worthwhile. I'll take the 3.2% win, provide this
small improvement to the code itself, and move on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190715 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
XComment.cpp
XCursor.cpp
ndexingContext.cpp
8644aa9149f40fb00bfd20f0a22a873428f520d3 12-Sep-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] In clang_getLocation, check that the provided line/column is valid.

rdar://14971432

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190568 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
2bb6dad4a44569dd2f86e7500a5ba21680718736 11-Sep-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Fix 2 cases of uninitialized reads of an invalid PresumedLoc.

The code in CGExpr was added back in 2012 (r165536) but not exercised in tests
until recently.

Detected on the MemorySanitizer bootstrap bot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190521 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
0c018357b8bbb1f96bbf622a5807421e626b4228 06-Sep-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP: Data-sharing attributes analysis and clause 'shared' (fixed test threadprivate_messages.cpp)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190183 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecursiveASTVisitor.h
13d53b9c8a0f4c02fd920f386d3da8ee06060671 03-Sep-2013 Eric Christopher <echristo@gmail.com> Remove unused typedef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189844 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4367829b41e89d2f3dfae94a97af40ffa01c56c9 03-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "OpenMP: Data-sharing attributes analysis and clause 'shared'"

This reverts commit r189795.

threadprivate_messages.cpp is faling on windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189811 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecursiveASTVisitor.h
8f1a2db8649eb151ee620273dcf34b700176430f 03-Sep-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP: Data-sharing attributes analysis and clause 'shared'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189795 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecursiveASTVisitor.h
e8519c31a6ef853b627d557702ac1890f18ce2c9 30-Aug-2013 Charles Davis <cdavis5x@gmail.com> Add ms_abi and sysv_abi attribute handling.

Based on a patch by Benno Rice!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189644 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
ef072033876e295ec5d3402f8730a3ae358ad815 28-Aug-2013 Reid Kleckner <reid@kleckner.net> Delete CC_Default and use the target default CC everywhere

Summary:
Makes functions with implicit calling convention compatible with
function types with a matching explicit calling convention. This fixes
things like calls to qsort(), which has an explicit __cdecl attribute on
the comparator in Windows headers.

Clang will now infer the calling convention from the declarator. There
are two cases when the CC must be adjusted during redeclaration:
1. When defining a non-inline static method.
2. When redeclaring a function with an implicit or mismatched
convention.

Fixes PR13457, and allows clang to compile CommandLine.cpp for the
Microsoft C++ ABI.

Excellent test cases provided by Alexander Zinenko!

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D1231

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189412 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
344472ebeded2fca2ed5013b9e87f81d09bfa908 23-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> Use pop_back_val() instead of both back() and pop_back().
No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189112 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
24146975f1af8c1b4b14e8545f218129d0e7dfeb 22-Aug-2013 Eli Friedman <eli.friedman@gmail.com> Split isFromMainFile into two functions.

Basically, isInMainFile considers line markers, and isWrittenInMainFile
doesn't. Distinguishing between the two is useful when dealing with
files which are preprocessed files or rewritten with -frewrite-includes
(so we don't, for example, print useless warnings).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188968 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
3f4ec31b58536d69c8da924e90548af70fa037d0 21-Aug-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove more uses of 'index' as namespace scope.

Follow up to r188850.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188854 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
e8458342d936c55b69806ea58d4a28bcb7c53d1a 21-Aug-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Avoid using the 'index' namespace as scope.

This should fix the bogus ambiguous reference errors reported by gcc 4.2.1 that the FreeBSD bot is using.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188850 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
9af20d8187384b841a6244ab81c8a57b010d72d0 19-Aug-2013 Dmitri Gribenko <gribozavr@gmail.com> Use cstdio instead of stdio.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188678 91177308-0d34-0410-b5e6-96231b3b80d8
XCompilationDatabase.cpp
ndexing.cpp
21c45a5fedcbbf5533ce65c275d5c2b82c7915e1 18-Aug-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: cleanup unused includes in public header


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188625 91177308-0d34-0410-b5e6-96231b3b80d8
XCompilationDatabase.cpp
ndexing.cpp
2845a6746f6320994675a9a413ecbe5252d4dc02 17-Aug-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename libIDE to libIndex.

Per feedback from Chandler, it's better to have libraries with more specific functionality.
LibIndex will contain the indexing functionality of libclang, which includes USR generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188601 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
MakeLists.txt
akefile
e9a906b99286b44dcf5eb896f17df74d588e4ce9 16-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com> Replace some DenseMap keys with simpler structures that don't need another DenseMapInfo specialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188580 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.h
12161968f3bcb7bb1053d2da36ac066d795ba7dd 16-Aug-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the clangIDE library.

Libclang has a lot of functionality that is inaccessible.
The purpose of clangIDE is to move most of the functionality of libclang to it so we
can expose it and have libclang be more of a thin C wrapper over clangIDE.

Start by moving the USR generation functionality into clangIDE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188569 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
MakeLists.txt
akefile
c1cef0892e049fcd31084f02d1efdd9985d4dfa4 10-Aug-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Added source locs for angled parentheses in class/var template partial specs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188134 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecursiveASTVisitor.h
ad0d5707463cd7875e1ffd50dacd3f900d185aa1 08-Aug-2013 Stefanus Du Toit <stefanus.du.toit@intel.com> Add clang_Location_isFromMainFile() to libclang.

Also bump the minor version number and update libclang.exports.

Reviewed by: Dmitri Gribenko, Doug Gregor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187994 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
ibclang.exports
ef4579cda09b73e3d4d98af48201da25adc29326 06-Aug-2013 Larisse Voufo <lvoufo@google.com> Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecursiveASTVisitor.h
13a165e3a1499a942fc4435b5e574d17ea0f54f1 02-Aug-2013 Alexey Samsonov <samsonov@google.com> Assume UniqueID is zero for invalid PPRegion to fix uninitialized reads reported by MSan

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187647 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
0fda0f75f053ad9afdb2bb8d4ea72c5e6a49d657 01-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Use llvm::sys::fs::UniqueID for windows and unix.

This unifies the unix and windows versions of FileManager::UniqueDirContainer
and FileManager::UniqueFileContainer by using UniqueID.

We cannot just replace "struct stat" with llvm::sys::fs::file_status, since we
want to be able to construct fake ones, and file_status has different members
on unix and windows.

What the patch does is:

* Record only the information that clang is actually using.
* Use llvm::sys::fs::status instead of stat and fstat.
* Use llvm::sys::fs::UniqueID
* Delete the old windows versions of UniqueDirContainer and
UniqueFileContainer since the "unix" one now works on windows too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187619 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexing.cpp
4c4f6fe2a6d6b3ffd0ce114cb8099366662b67f7 23-Jul-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Expose the rest of the array types.

Patch by Che-Liang Chiou!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186967 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
4fa7eab771ab8212e1058bd1a91061ff120c8fbb 19-Jul-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP: basic support for #pragma omp parallel


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186647 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
ecursiveASTVisitor.h
163fbf810eaffc2c7b0170d91b6196b032911957 08-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl::reverse_iterator instead of SmallVector to avoid specifying the vector size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185784 91177308-0d34-0410-b5e6-96231b3b80d8
ecursiveASTVisitor.h
66e8c6786c4d29e76fcbc213731cf35833e230c0 05-Jul-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add the new function to libclang.exports

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185725 91177308-0d34-0410-b5e6-96231b3b80d8
ibclang.exports
514afc7255a2aaa88498b3374c944a2c497c1c55 05-Jul-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the declaration was affected by "@optional"

rdar://14348525.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185722 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
09d19efaa147762f84aed55efa7930bb3616a4e5 04-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185610 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexHigh.cpp
XCursor.cpp
fcd0aa1ae9068f6762661b7e954e7c558eafe613 01-Jul-2013 Sylvestre Ledru <sylvestre@debian.org> Following the modification introduced in llvm by commit 185311

The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD.
This kind of simplification is sometimes useful, but in general it's not correct.

As GNU/kFreeBSD is an hybrid system, for kernel-related issues we want to match the
build definitions used for FreeBSD, whereas for userland-related issues we want to
match the definitions used for other systems with Glibc.

The current modification adjusts the build system so that they can be distinguished,
and explicitly adds GNU/kFreeBSD to the build checks in which it belongs.

Fixes bug #16445.

Patch by Robert Millan in the context of Debian.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185312 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
89faf86c6e23ed62519dfe369f8ea408df1cb02e 30-Jun-2013 James Dennett <jdennett@google.com> Bug fix: Make RecursiveASTVisitor<T>::TraverseLambdaExpr call
WalkUpFromLambdaExpr, so that the Visit* functions are called
on that AST node.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185277 91177308-0d34-0410-b5e6-96231b3b80d8
ecursiveASTVisitor.h
dbb4a35d78942ae036b98833af20ac2a8fc96eef 26-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't use PathV1.h in CIndexCodeCompletion.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184940 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
12df246d6dea2ee1f92c186f922f1afcf499647a 24-Jun-2013 Reid Kleckner <reid@kleckner.net> [AST] Introduce a new DecayedType sugar node

The goal of this sugar node is to be able to look at an arbitrary
FunctionType and tell if any of the parameters were decayed from an
array or function type. Ultimately this is necessary to implement
Microsoft's C++ name mangling scheme, which mangles decayed arrays
differently from normal pointers.

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D1014

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184763 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecursiveASTVisitor.h
1a554f72f2cf3615e5625e0922afc6b2a02a8a94 24-Jun-2013 Matt Beaumont-Gay <matthewbg@google.com> Add some invalid-decl checks to clang_Type_getOffsetOf.

print-size-type.cpp was checking for specific record layout output for invalid
decls; I've removed the checks but left the records as tests for not crashing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184751 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
c5b0054693b3b3cafe6a13549358c22e07fcd4ff 24-Jun-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: allow "\param ..." to describe variadic arguments

Original patch by Fariborz Jahanian; extended by me.

Fixes rdar://14124644


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184688 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
97e5bc2643dd1478ca10d1b9a6581f332801c958 23-Jun-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: followup to r184610: allow multiple \returns

Remove unneeded member in CommentSema, add a test for the XML schema (the
schema already allowed multiple paragraphs in <ResultDiscussion>, but there
were no tests for that), fix HTML generation (it is not allowed to have <p>
inside <dl>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184652 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
d52b20c706326cc2c5c3707a902e7ca4474719b6 22-Jun-2013 Fariborz Jahanian <fjahanian@apple.com> [document parsing]: Allow multiple adjacent \return and the like
commands. Render them properly in XML output.
// rdar://14207725


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184610 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
5c1a9f3bc0f11905974450ee7729ae3d556d316f 18-Jun-2013 Dmitri Gribenko <gribozavr@gmail.com> Simplify a loop in ProcessCodeCompleteResults(). Pointed out by David Blaikie


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184169 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
68effa0d764cf6fc7b6f9729481ee2c6c5143f3b 18-Jun-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize CodeCompletionContext::getNumSelIdents()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184168 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
b1e25a1bc03292dc538d336573e0be1490223171 14-Jun-2013 Reid Kleckner <reid@kleckner.net> [Driver] Refactor clang driver to use LLVM's Option library

The big changes are:
- Deleting Driver/(Arg|Opt)*
- Rewriting includes to llvm/Option/ and re-sorting
- 'using namespace llvm::opt' in clang::driver
- Fixing the autoconf build by adding option everywhere

As discussed in the review, this change includes using directives in
header files. I'll make follow up changes to remove those in favor of
name specifiers.

Reviewers: espindola

Differential Revision: http://llvm-reviews.chandlerc.com/D975

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183989 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
57a3bbfa9a97f174b0c80b0309e32f4329c4ae1b 13-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the sys::ExecuteAndWait that takes StringRefs.

Also don't depend on Program.h including PathV1.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183935 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
009d7d54ed9d15ccb50a1ed5a83f3b2b2cc4da84 13-Jun-2013 Benjamin Kramer <benny.kra@googlemail.com> libclang: Remove clang::RemapFiles, it's dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183902 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.cpp
Indexer.h
082ad2bd3f6fb0aef727f6c9ab53d2c4aa75fd53 13-Jun-2013 Benjamin Kramer <benny.kra@googlemail.com> libclang: Port CIndexer::getClangResourcesPath to PathV2. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183901 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.cpp
Indexer.h
7c3e615f01e8f9f587315800fdaf2305ed824568 13-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR12086, PR15117

Introduce CXXStdInitializerListExpr node, representing the implicit
construction of a std::initializer_list<T> object from its underlying array.
The AST representation of such an expression goes from an InitListExpr with a
flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr
containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr).

This more detailed representation has several advantages, the most important of
which is that the new MaterializeTemporaryExpr allows us to directly model
lifetime extension of the underlying temporary array. Using that, this patch
*drastically* simplifies the IR generation of this construct, provides IR
generation support for nested global initializer_list objects, fixes several
bugs where the destructors for the underlying array would accidentally not get
invoked, and provides constant expression evaluation support for
std::initializer_list objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183872 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ecursiveASTVisitor.h
34392373fe25e943586de0fdbe37b806c3f7ff70 11-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Include PathV1.h in files that use it.

This is preparation for replacing Path.h with PathV2.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183781 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.h
c09f2a865c912ee5d81bee7586c77a73ad302fd7 06-Jun-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] CMake: add an option to control building libclang as a static library (off by default)

This avoids building libclang twice by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183437 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
25cd4a284307ea5431f646087dee2e93dd4b3d7a 04-Jun-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When annotating tokens, don't override a property annotation with a getter/setter method annotation.

rdar://13764549

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183242 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
1bc085aec3901e22b819bb6761d5ccc360194604 30-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182895 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
a99ecbcc4c431d52df0b01539035ab5281d54656 25-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix linkage computation for derived types in inline functions.

John noticed that the fix for pr15930 (r181981) didn't handle indirect
uses of local types. For example, a pointer to local struct, or a
function that returns it.

One way to implement this would be to recursively look for local
types. This would look a lot like the linkage computation itself for
types.

To avoid code duplication and utilize the existing linkage cache, this
patch just makes the computation of "type with no linkage but
externally visible because it is from an inline function" part of the
linkage computation itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182711 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexingContext.cpp
4c9f58f617faec246d3111868ae7aee5edb9f546 25-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add logging for clang_createTranslationUnit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182682 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c965f76e02d536d875b1e9e3ea96f39452c6bfa2 17-May-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: add a function to check whether a member function is pure virtual

Patch by Seth Fowler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182139 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
0d8e9646bc000bab521ce52ed294209a92298cef 16-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> First pass of semantic analysis for init-captures: check the initializer, build
a FieldDecl from it, and propagate both into the closure type and the
LambdaExpr.

You can't do much useful with them yet -- you can't use them within the body
of the lambda, because we don't have a representation for "the this of the
lambda, not the this of the enclosing context". We also don't have support or a
representation for a nested capture of an init-capture yet, which was intended
to work despite not being allowed by the current standard wording.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181985 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexBody.cpp
17828ca5857d5d9cadfffd339f888de58182c8f1 14-May-2013 David Blaikie <dblaikie@gmail.com> Provide operator<< for stream output of DeclarationNames

ASTDumper was already trying to do this & instead got an implicit bool
conversion by surprise (thus printing out 0 or 1 instead of the name of
the declaration). To avoid that issue & simplify call sites, simply make
it the normal/expected operator<<(raw_ostream&, ...) overload & simplify
all the existing call sites. (bonus: this function doesn't need to be a
member or friend, it's just using public API in DeclarationName)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181832 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
181e3ecc0907ae0103586a9f4db52241995a8267 13-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Cleanup handling of UniqueExternalLinkage.

This patch renames getLinkage to getLinkageInternal. Only code that
needs to handle UniqueExternalLinkage specially should call this.

Linkage, as defined in the c++ standard, is provided by
getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage.

Most places in the compiler actually want isExternallyVisible, which
handles UniqueExternalLinkage as internal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
ndexingContext.cpp
333e44c91000c4b7d6a3dc5f79e04358dc78ad3a 07-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add a null check in CursorVisitor::visitPreprocessedEntities.

rdar://13680583

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181352 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
1270673bf5208a140b397419c8c34e7bdcce2339 06-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Have the RecursiveASTVisitor traverse the type source info of an objc class message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181237 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
ecursiveASTVisitor.h
cc2b653c319599f502425d2c3de29865d47bb9e4 04-May-2013 Douglas Gregor <dgregor@apple.com> Remove DiagnosticConsumer::clone(), a bad idea that is now unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181070 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
dd08a0c178329ec16cb9e494e6880f3991708b93 04-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Preprocessor] For the MacroExpands preprocessor callback, also pass the MacroArgs object that provides information about
the argument tokens for a function macro.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181065 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
1880039e2b9faece69d64bab8b57dbeaf09cf643 03-May-2013 Bill Wendling <isanbard@gmail.com> Remove redundant flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180968 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
497a4ebe66280827a9d870c6fb9001d27aee165b 02-May-2013 Bill Wendling <isanbard@gmail.com> We don't want FP elimination when doing an Apple-style build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180950 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
e858e667c14ce4a9df5a4bbae770a0a3a3c8723e 27-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Module_getASTFile function that returns the module file where a module object came from.

rdar://13743084

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180643 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
96bbe19aaa39b49a9da60a5a25fad7fc3cd471a2 24-Apr-2013 Ted Kremenek <kremenek@apple.com> Fix typo in comparison in clang_CXCursorSet_contains().

Fixes PR 10124.

Patch by Jens Kilian.

Thanks to Nikola Smiljanic for following up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180177 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
017dd74979c74c8950f733938953b98cfa250478 24-Apr-2013 Ted Kremenek <kremenek@apple.com> Revert "Remove CXCursorSet and related APIs. There are no known clients."

Apparently there are...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180176 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ibclang.exports
3b6f56a51e50ec11cbd1f7e3aa4785fffa4e839d 24-Apr-2013 Ted Kremenek <kremenek@apple.com> Remove CXCursorSet and related APIs. There are no known clients.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180174 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ibclang.exports
edab047e10d745a65d12c8cb36be2ba9e96c9e0e 23-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce a CXCursor_ObjCSelfExpr cursor, which is the equivalent of CXCursor_CXXThisExpr for C++ code.

rdar://13717006

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180127 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
c3bf52ced9652f555aa0767bb822ec4c64546212 21-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++1y: Allow aggregates to have default initializers.

Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in
CXXCtorInitializers and in InitListExprs to represent a default initializer.

There's an additional complication here: because the default initializer can
refer to the initialized object via its 'this' pointer, we need to make sure
that 'this' points to the right thing within the evaluation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179958 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ecursiveASTVisitor.h
80e1acaeb7040548cb494e609b120b134e22a193 19-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the given cursor is a variadic function or method.

rdar://13667150

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179819 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
38dbad233bfc7906e38e028707ffe5925b9ca46c 19-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179816 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
9ee6a66d19aacc35397bbdc4fd535e3944301856 19-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the written attributes in a property declaration.

rdar://13684512

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179803 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
7717914639ed8a186fe8b781c9c220594e8dcf30 18-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Report parameter array types as written in source, not decayed to pointer types.

Patch by Doug.
rdar://13684618

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179769 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
6afcf8875d4e447645cd7bf3733dd8e2eb8455dc 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Sema for Captured Statements

Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic
analysis. Currently captures all variables by reference.

TODO: templates

Author: Ben Langmuir <ben.langmuir@intel.com>

Differential Revision: http://llvm-reviews.chandlerc.com/D433


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecursiveASTVisitor.h
051303ce09291dfbed537fa33b0d8a4d92c82b75 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Implement CapturedStmt AST

CapturedStmt can be used to implement generic function outlining as described in
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.

CapturedStmt is not exposed to the C api.

Serialization and template support are pending.

Author: Wei Pan <wei.pan@intel.com>

Differential Revision: http://llvm-reviews.chandlerc.com/D370


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179615 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ecursiveASTVisitor.h
76da55d3a49e1805f51b1ced7c5da5bcd7f759d8 16-Apr-2013 John McCall <rjmccall@apple.com> Basic support for Microsoft property declarations and
references thereto.

Patch by Tong Shen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
ndexBody.cpp
ndexDecl.cpp
ndexingContext.cpp
ndexingContext.h
ecursiveASTVisitor.h
4522f63e00fa6f1276b1d29763a9a4f46f46b6a1 12-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Location_isInSystemHeader to check if a location resides in a system header.

This is a modified patch provided from Mikołaj Siedlarek!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179384 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
ibclang.exports
04b6748ee90649069ee79464317ae6cd6aca317d 11-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Have clang_getCXXAccessSpecifier() also return the access control of a C++ declaration within its parent scope.

Suggested by Stefan Seefeld.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179297 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCXX.cpp
411d33aa0b0d3bc9b2faec40cd821bdd836094ab 11-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [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!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179251 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
ibclang.exports
84347225fcf5aae5ff982e94f4c95548ae26b846 09-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] In cxtu::getASTUnit(), check for a null CXTranslationUnit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179121 91177308-0d34-0410-b5e6-96231b3b80d8
XTranslationUnit.h
516143b619d1eccfef023ceaf91666803f04cc83 05-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix cursor visitation to not ignore template arguments in out-of-line member functions.

rdar://13535645

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178911 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
0b602836c63e702b2ba893e8439996b226fc248f 05-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add some checks to make sure the given CXTranslationUnit is not null, before using it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178800 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e9ebd852ec1effa393bcc4aad73d9c657a5279c1 01-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make clang_Cursor_getArgument work with call-exprs.

Patch by Matthias Kleine!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178475 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
c58b75628c3860775fc3914aa6d08e84de82233f 29-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] If libclang logging is enabled, print all compiler diagnostics to stderr instead of capturing them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178373 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
16e0f19415a37edf2aef8a3d99fd1b18be7762d9 29-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [cmake] Add clang-headers as a dependency of libclang and if we have to copy them
for the IDE case, also create a symlink inside the libclang.dylib directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178372 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
9083628fec737679eb95abe8e2e5e23717a96e18 27-Mar-2013 Chad Rosier <mcrosier@apple.com> Update the error handing static functions for r178161.
Part of rdar://13296693


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178162 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c56fff7fd231aebf4b152f60f8f11ef91835c48a 26-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Preprocessor/Modules] Separate the macro directives kinds into their own MacroDirective's subclasses.

For each macro directive (define, undefine, visibility) have a separate object that gets chained
to the macro directive history. This has several benefits:

-No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like
PPMutationListener become unnecessary.
-No need to keep extra source locations for the undef/visibility locations for the define directive object
(which is the majority of the directives)
-Much easier to hide/unhide a section in the macro directive history.
-Easier to track the effects of the directives across different submodules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178037 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c640058aa7f224a71ce3b1d2601d84e1b57f82d3 22-Mar-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP threadprivate directive parsing and semantic analysis

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecursiveASTVisitor.h
07c5908fa10c84144907bc699751dc16d4dcb1f8 19-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Modify clang_getCursorType to be able to handle a function template decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177359 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
c1d22393628a145e54396c0ac66e9625d13a7658 13-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Modules] Resolve top-headers of modules lazily.

This allows resolving top-header filenames of modules to FileEntries when
we need them, not eagerly.

Note that that this breaks ABI for libclang functions
clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders
but this is fine because they are experimental and not widely used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176975 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6f09c3d69f6272b101ff795562dffead1c0bd9de 08-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Change clang_findReferencesInFile and clang_findIncludesInFile to return an enum,
as suggested by Jordan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176732 91177308-0d34-0410-b5e6-96231b3b80d8
IndexHigh.cpp
389dc5603fa10b508a38f668a7830c6d877b6542 08-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Modify clang_findReferencesInFile and clang_findIncludesInFile to return a value.

Possible values are:
1 : if a parameter was invalid
-1 : if the callback returned CXVisit_Break,
otherwise returns 0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176716 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexHigh.cpp
ursorVisitor.h
ee2d5fd7a3bd42bce387db094d27a479617c3e67 08-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176682 91177308-0d34-0410-b5e6-96231b3b80d8
IndexHigh.cpp
ibclang.exports
029c8f37e32b08bad4c757848a695d199fe5c813 08-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When calling the function of CXCursorAndRangeVisitor, don't forget to
stop visitation if it returns CXVisit_Break.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176681 91177308-0d34-0410-b5e6-96231b3b80d8
IndexHigh.cpp
b70e7a83ee55e463d52d175bd68dece2bfd084f4 08-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add Logger::operator<< overloads for CXCursor and FileEntry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176680 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexHigh.cpp
Log.h
44f65a587ee39c20e715c9df411c864d328c71b5 05-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When logging a CXTranslationUnit that came from an AST file, print out the filename.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176511 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
fc09336a5965040736f9bc63a70416003972364e 01-Mar-2013 Stefanus Du Toit <stefanus.dutoit@rapidmind.com> Fix typos: [Dd]iagnosic -> [Dd]iagnostic

These all appear in comments or (ironically) diagnostics output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176383 91177308-0d34-0410-b5e6-96231b3b80d8
XLoadedDiagnostic.cpp
9db0fe97f533513f88e7141f0b2a405ebe86fa67 26-Feb-2013 Fariborz Jahanian <fjahanian@apple.com> doxygen command. Add 'attention' command to list of similar
doxygen commands. // rdar://12379053


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176127 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
c515978bd3a703aa733f846a0094ffa84d149074 24-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] Use MacroDirective in the preprocessor callbacks to make available the
full information about the macro (e.g if it was imported and where).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175978 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
7728cddd7866fadd07f1191eee40985e3cdbc6bf 23-Feb-2013 Peter Collingbourne <peter@pcc.me.uk> Revert r175912, "Add support for coldcc to clang" at John's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175936 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
4c67aa96401b67b5200e701cff87485067ab0792 22-Feb-2013 Peter Collingbourne <peter@pcc.me.uk> Add support for coldcc to clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175912 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
f23546a913825bdc1f972f21f638a6ee472aab20 22-Feb-2013 David Blaikie <dblaikie@gmail.com> Suppress -Wswitch to unbreak the build.

This may need to be fixed more intelligently - I don't have enough context to
be sure what the appropriate fix is right now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175902 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
684aa73192d92850a926870be62a1787eb5b7ed9 22-Feb-2013 Michael Han <fragmentshaders@gmail.com> [Sema] Semantic analysis for empty-declaration and attribute-declaration.

Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain
to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these
attributes can be sema checked just as attributes attached to "normal" declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175900 91177308-0d34-0410-b5e6-96231b3b80d8
ecursiveASTVisitor.h
5eada844fa70b6e2bc941dd7306f7a4fb1e8529d 22-Feb-2013 Benjamin Kramer <benny.kra@googlemail.com> Streamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumentList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175894 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4a3012d4dd9748b18b53b90e855989d98308f990 21-Feb-2013 NAKAMURA Takumi <geek4civic@gmail.com> CIndex.cpp: Appease g++-4.4. "if (Optional<unsigned> Minor = In.getMinor())" did not work as expected.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175711 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
66874fb18afbffb8b2ca05576851a64534be3352 21-Feb-2013 David Blaikie <dblaikie@gmail.com> Use None rather than Optional<T>() where possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175705 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
943f909ba72a1c9351dd421cac1413d303a719f1 21-Feb-2013 Ted Kremenek <kremenek@apple.com> Strip 'llvm' from 'llvm::Optional' uses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175701 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ursorVisitor.h
9818a1d443e97677dd3422305de9cc2b1fb2a8c1 20-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class
for the data specific to a macro definition (e.g. what the tokens are), and
MacroDirective class which encapsulates the changes to the "macro namespace"
(e.g. the location where the macro name became active, the location where it was undefined, etc.)

(A MacroDirective always points to a MacroInfo object.)

Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but
splitting the concepts allows us to better model the effect of modules to the macro namespace
(also as a bonus it allows better modeling of push_macro/pop_macro #pragmas).
Modules can have their own macro history, separate from the local (current translation unit)
macro history; MacroDirectives will be used to model the macro history (changes to macro namespace).

For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created
to indicate that "FOO" became active at the import location. Module "A" itself will contain another
MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives
will point to the same MacroInfo object.

Introducing the separation of macro concepts is the first part towards better modeling of module macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175585 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
39e6ab4be93d9c5e729a578ddd9d415cd2d49872 18-Feb-2013 David Blaikie <dblaikie@gmail.com> Replace TypeLoc llvm::cast support to be well-defined.

The TypeLoc hierarchy used the llvm::cast machinery to perform undefined
behavior by casting pointers/references to TypeLoc objects to derived types
and then using the derived copy constructors (or even returning pointers to
derived types that actually point to the original TypeLoc object).

Some context is in this thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html
Though it's spread over a few months which can be hard to read in the mail
archive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175462 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
ndexingContext.cpp
ecursiveASTVisitor.h
9ba7627d25a7555b1afff04f685d2f161974e682 18-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: don't store nul-terminated strings as StringRefs,
if the nul-terminatedness property is important for clients.

Also, don't return the same CXString multiple times. This did not create a
correctness issue in practice because the CXString was of an CXS_Unmanaged
kind, and destruction was a no-op.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175455 91177308-0d34-0410-b5e6-96231b3b80d8
XLoadedDiagnostic.cpp
XLoadedDiagnostic.h
cb6bcf1c6392398ce9fccb4a0881dd4149568dcf 16-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: remove reinterpret_casts by using SourceLocation::getPtrEncoding


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175333 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ae03d8e52d81adbb98b31dd5c179abe45c91fc25 15-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: add clang_getTypeSpelling(CXType CT)

Adds a function clang_getTypeSpelling(CXType CT) that returns
a CXString containing the underlying type.

Patch by Ben Gertzfield.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175299 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
ibclang.exports
62d0f569360a664018316e4a21a4e960560b271d 14-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: remove reinterpret_casts by using SourceLocation::getFromPtrEncoding
directly instead of casting a pointer to an integer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175206 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
778749aa7c2ed73ffeb60065dc015ed62127c8e1 13-Feb-2013 Bill Wendling <isanbard@gmail.com> Use 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in the Apple way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175070 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
82064213e9ef308e9a929ecfb31f4698a834ecdd 13-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix annotation of a range where the begin or end location
is inside a macro argument.

Previously we would give up and not annotate anything in the range.
rdar://11891550

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175062 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ae50a5bb0aaa9595f0969fc0cc4809ace9508d0c 09-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: use CXCursor getters to simplify code


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174809 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
a86b37e223a21647175619096e67d0f650add351 08-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Attribute visitation happens out-of-source-order, make sure
we annotate properly when there is an attribute and not skip type specs
if the attribute is after the declaration.

rdar://13129077

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174689 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
90b5ac660ef96b9d59dff837e96fd72d0673d7de 07-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: reduce CXString abuse

ContainerUSR is not really a CXString, but it should own the underlying memory
buffer. Thus, it is better to change the type to std::string. This will not
introduce extra copying overhead, since the workaround that is being removed
was already making a copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174647 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
775bb8a4aecdd1e0af2a7a6baba449f074afa2c1 07-Feb-2013 NAKAMURA Takumi <geek4civic@gmail.com> libclang: CursorVisitor::VisitBuiltinTypeLoc(): Add OCLSampler. [-Wswitch]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174606 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
21f18c4fda167dc5f72feddbd6a7ac1b63200a0d 07-Feb-2013 Guy Benyei <guy.benyei@intel.com> Add OpenCL samplers as Clang builtin types and check sampler related restrictions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
4c494f4af76017e2bb389a3a96cbcdbb8973cf97 03-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment to XML conversion: replace string comparison with command ID comparison


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174290 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
f06faad8c2983d428859e543ca1581a28b16515b 03-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: wrap CXString implementation into 'namespace cxstring'

This removes quite a few 'cxstring::' qualifications where they are obvious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174286 91177308-0d34-0410-b5e6-96231b3b80d8
XString.cpp
aca3e56144308f97f676fa30b07179e1203f7822 03-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: remove 'using namespace cxstring'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174285 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexUSRs.cpp
XComment.cpp
XCompilationDatabase.cpp
XLoadedDiagnostic.cpp
XSourceLocation.cpp
XStoredDiagnostic.cpp
ndexing.cpp
361d79ca6b9d185b5a71a46b01f1d6b25e3e7bb8 03-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: migrate IndexingDeclVisitor to ConstDeclVisitor


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174284 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
8d0eb2f71fb74bd7f5a145e811910273abc98a39 03-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: remove unneeded const_cast


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174283 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
e414cc167815e773e4fd27e44943734d54160cab 03-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: migrate USRGenerator to ConstDeclVisitor


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174281 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
a376f8774a73cfeb1c48bf2fe0baa8c2731cfacc 03-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: remove unneeded const_casts


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174280 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexingContext.h
5595ded882b22d77fdf535bd1a4c6c090110348a 02-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: introduce cxstring::{createRef,createDup} for StringRefs

Also migrate all clients from the old API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174263 91177308-0d34-0410-b5e6-96231b3b80d8
RCMigrate.cpp
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexUSRs.cpp
XComment.cpp
XLoadedDiagnostic.cpp
XStoredDiagnostic.cpp
XString.cpp
XString.h
XType.cpp
0c4394c7f63008fbf4d335710b34f71afab362a3 02-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: introduce cxstring::{createRef,createDup} for C strings

Also migrate all clients from the old API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174238 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
XCompilationDatabase.cpp
XSourceLocation.cpp
XStoredDiagnostic.cpp
XString.cpp
XString.h
XType.cpp
af01bed59b2fe18fa483f5dbb86584b31eda6f98 01-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: improve the fidelity of XML output for many block commands

This change introduces a 'kind' attribute for the <Para> tag, that captures the
kind of the parent block command.

For example:

\todo Meow.

used to be just <Para>Meow.</Para>, but now it is
<Para kind="todo">Meow.</Para>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174216 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
15a2aa0954bcf38411c14cf67c65e336022a7a1b 01-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: document the purpose of createNull()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174195 91177308-0d34-0410-b5e6-96231b3b80d8
XString.h
17c1a2476aa910760bdb91fe2990c9665eafac9a 01-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: add comments for CXStringFlag


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174194 91177308-0d34-0410-b5e6-96231b3b80d8
XString.cpp
dc66adb40ee871b4c578ba615f45d82476c7119e 01-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: itroduce cxstring::createEmpty()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174174 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexUSRs.cpp
XLoadedDiagnostic.cpp
XSourceLocation.cpp
XStoredDiagnostic.cpp
XString.cpp
XString.h
XType.cpp
dad4c1a9ac4ef1aa591ac2ef20dc4c30d96f9f2a 01-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: introduce cxstring::createNull()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174173 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
XComment.cpp
XCompilationDatabase.cpp
XString.cpp
XString.h
f843a580c4a54ca147f22422ee8ccfd2347784fc 01-Feb-2013 Fariborz Jahanian <fjahanian@apple.com> [Comment parsing] Add support for recognizing
\headerfile command and representing it in an xml
document. Patch reviewed by Dmitri Gribenko.
// rdar://12397511


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174109 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
335078b0ffa844a963fdebab58b80f645ba32088 31-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Attempt to fix Windows build breakage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174060 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
d1f09b482b3874be07dfe9dd24bfad98915989c3 31-Jan-2013 Douglas Gregor <dgregor@apple.com> Allow the computation of the base priority for a declaration code completion result to consider the completion context

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174037 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
9c48d16a11872624410ab3a5944edcba0f32818c 26-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: refactor CXStringPool: make it a class

We are not exposing the pool or string buffers to libclang users, so no need to
maintain a procedural interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173595 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
XString.cpp
XString.h
XTranslationUnit.h
8c718e7d87018919b5b84b0d545fe477b2d532d1 26-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: type safety for CXTranslationUnitImpl::CIdx


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173590 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
XTranslationUnit.h
ndexing.cpp
337ee24785a784ba5418c2e78716d15b94fd57f0 26-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: type safety for CXTranslationUnitImpl::FormatContext


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173589 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XComment.cpp
XTranslationUnit.h
e42e578ad8a36ad5bd06c8a3110cbd3119aaee36 26-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: some type safety for CXTranslationUnitImpl's internals

There is no reason to store pointers as 'void*' in CXTranslationUnitImpl, since
it does not affect libclang ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173588 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexDiagnostic.cpp
XTranslationUnit.h
5694feb5ccd6eb862cb600b55753cecc13794471 26-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)
into a getter cxtu::getASTUnit(TU)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173585 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexHigh.cpp
IndexInclusionStack.cpp
XComment.cpp
XComment.h
XCursor.cpp
XSourceLocation.cpp
XTranslationUnit.h
XType.cpp
ursorVisitor.h
ndexing.cpp
ndexingContext.cpp
404628caa53a3f898047d73b38647d6fbb827e00 26-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: make getCursorParentDecl() return 'const Decl *'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173584 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
7d91438047450869d7b881e1c63868c4b52a3cc2 26-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: change getCursorAttr() to return 'const Attr *'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173583 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
ff74f9683943c0db9cb075423596b00ea3b38c5d 26-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: make getCursorStmt() and getCursorExpr() return const pointers

Also change EnqueueVisitor to use ConstStmtVisitor as a consequence.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173577 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
ursorVisitor.h
db84e7a44dce24c3a8e4e0fc84434c00fc2da168 26-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_getFileUniqueID which returns a struct
for a CXFile containing device/inode/modification time.

Intended to be useful as a key associated with a unique file across
an indexing session.

rdar://13091837

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173559 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
e22339c44bb28d71a2cc97c840d3da0c4bdb4909 23-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: change return type of getCursorDecl() to 'const Decl *'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173278 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCXX.cpp
IndexHigh.cpp
IndexUSRs.cpp
XCursor.cpp
XCursor.h
XType.cpp
ursorVisitor.h
e4ea879fe73581bc70a9bfbfddc7ca06b5c0768b 23-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove uneeded casts


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173269 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XSourceLocation.cpp
69652660e765ec2bbcf1877ac05c66e91b8fa745 23-Jan-2013 Bill Wendling <isanbard@gmail.com> Explicitly cast away the const-ness instead of doing it implicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173241 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
XSourceLocation.cpp
ccdfdd7937d74396ca1b3bb69ed2642a8ff4c712 23-Jan-2013 Bill Wendling <isanbard@gmail.com> Explicitly cast away the const-ness instead of doing it implicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173232 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e6b9d802fb7b16d93474c4f1c179ab36202e8a8b 20-Jan-2013 Guy Benyei <guy.benyei@intel.com> Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
b3ce35764adcc5749e8729709b1f3737227d90ec 20-Jan-2013 Chris Lattner <sabre@nondot.org> update to use the new BitcodeCursor readRecord that takes a StringRef blob parameter,
and adopt "advance" in more places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172951 91177308-0d34-0410-b5e6-96231b3b80d8
XLoadedDiagnostic.cpp
d47afb96a3f988e6d21a92fe4dfe875ab227c7c0 20-Jan-2013 Sean Silva <silvas@purdue.edu> Nuke SetUpBuildDumpLog.

Also, it was the only reason that `argc` and `argv` were being passed
into createDiagnostics, so remove those parameters and clean up callers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172945 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexing.cpp
e485f0761abc7ead2d0481db37fd50f5ae2e835b 19-Jan-2013 Chris Lattner <sabre@nondot.org> random tidying


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172920 91177308-0d34-0410-b5e6-96231b3b80d8
XLoadedDiagnostic.cpp
2815bc91cf655e84a220e69cd07c5125c028df0c 19-Jan-2013 Chris Lattner <sabre@nondot.org> update header comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172909 91177308-0d34-0410-b5e6-96231b3b80d8
XLoadedDiagnostic.cpp
ac179ca12b38afae11f004f986981152d1fa18b1 19-Jan-2013 Chris Lattner <sabre@nondot.org> this depends on the bitcode reader, since it is using it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172905 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
b1ba0efc3d1dc1daa5d82c40bc504e1f368c4fa0 19-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Re-sort all the headers. Lots of regressions have crept in here.
Manually fix the order of UnwrappedLineParser.cpp as that one didn't
have its associated header as the first header.

This also uncovered a subtle inclusion order dependency as CLog.h didn't
include LLVM.h to pick up using declarations it relied upon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172892 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexHigh.cpp
Log.h
XSourceLocation.cpp
ndexing.cpp
d7bf4a4e9c100fb5fe098b0e1870d61891c09dd3 16-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] In clang_reparseTranslationUnit_Impl, move the check whether TU is
null before using it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172632 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
93cf969df9afb22028aa8b4d575fa55681d1ec56 16-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] In clang_getCursorType, don't crash if the translation unit is not
set on the cursor; return a null type in such a case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172625 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
041e6aab2f48574009aebfb41ffcb74d00758a1f 15-Jan-2013 David Greene <greened@obbligato.org> Fix Casting

Use const_cast<> to avoid a cast-away-const error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172565 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
3cfa5324ef1c5f75fe5e142bef8050aaf2f03704 15-Jan-2013 David Greene <greened@obbligato.org> Fix Casting

Use const_cast<> to avoid a cast-away-const error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172564 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
527ce9fb91cc462abfe88843d3b8addf6c0f7365 15-Jan-2013 David Greene <greened@obbligato.org> Fix Casting

Use const_cast<> to avoid a cast-away-const error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172563 91177308-0d34-0410-b5e6-96231b3b80d8
XLoadedDiagnostic.cpp
61eacf0f4f912ef4834ff4ed5d7072b655fe91bf 15-Jan-2013 David Greene <greened@obbligato.org> Fix Casting

Use const_cast<> to avoid a cast-away-const error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172562 91177308-0d34-0410-b5e6-96231b3b80d8
IndexInclusionStack.cpp
05756dc8d11cd2054e0cb94f0302e4eb39acc68e 14-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: remove a few const_casts


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172373 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
ndexingContext.cpp
b3958476b21702a15f64f09d2862506d03dffe7b 14-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Constify argument of Preprocessor::getMacroInfoHistory and propagate to
callers, removing unneeded const_cast


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172372 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexDiagnostic.cpp
Log.h
XComment.cpp
XCursor.cpp
impleFormatContext.h
e358fd50a9b56e36f3f0f1a8f85bbb6d869cd117 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: use C++ casts in CXString.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172272 91177308-0d34-0410-b5e6-96231b3b80d8
XString.cpp
689d747a498e7ead320af1fc84ed08050acbd527 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: constness for CXString


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172270 91177308-0d34-0410-b5e6-96231b3b80d8
XString.cpp
e2748288a04cda2e976a3fe859e4334afaf9274a 11-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add some constness in CXSourceLocation and CXSourceRange.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172261 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.h
3315618561d19c99a7a52c72a31fb182111da716 11-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: remove unneeded casts


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172253 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
67812b2f94f4b5e7d2596db1705ffa1149ddc45a 11-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: change CXCursor to store 'const void *' pointers for
const-correctness, and update all users


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172252 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCXX.cpp
Indexer.h
XCursor.cpp
XCursor.h
XType.cpp
46f92523918fd4ac4df5489265c7f85c1b28baea 11-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: use getCursorTU and getCursorASTUnit instead of explicit casts


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172241 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCXX.cpp
XCursor.cpp
XType.cpp
acbe4ba0bec71346e77a2f7360e8920212a07c81 11-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Replace more usages of __func__ with LLVM_FUNCTION_NAME


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172161 91177308-0d34-0410-b5e6-96231b3b80d8
IndexHigh.cpp
XSourceLocation.cpp
8153b5a6fed123b3a94302fcb951bbc03a93c2d3 11-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang logging: fixup for MSVC, which does not have __func__


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172158 91177308-0d34-0410-b5e6-96231b3b80d8
Log.h
fb8e82e9a2e6c89d1ec5f1d0112bfbdcff605954 10-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Address some coding style issues pointed out by Dmitri.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172096 91177308-0d34-0410-b5e6-96231b3b80d8
Log.h
d8d9b847bd7120ebd5be83a55d31d9c26142962e 10-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add missing header file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172090 91177308-0d34-0410-b5e6-96231b3b80d8
Log.h
c6f5c6a58d34833d1fe458a518d5f59462926c7b 10-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Enhance logging capabilities of libclang.

-provide a "raw_ostream'ish" class to make it convenient to output logging info.
-use macros to automate a bit the logging functionality inside libclang functions
-when logging, print a stack trace if "LIBCLANG_LOGGING=2" environment is set.
-add logging to more functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172089 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexHigh.cpp
XSourceLocation.cpp
ndexing.cpp
d1d9df688baf384f1ca1220e51104c3b30d6a81a 08-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] In clang_equalCursors, clear out the "FirstInDeclGroup" part in a declaration cursor
before doing the comparison.

This is because we can't set "FirstInDeclGroup" consistently; for example, when visiting a DeclStmt we will set
it but we don't set it on the result of clang_getCursorDefinition for a reference of the same declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171878 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
3453bf7da9ac88cd2421b7fdccebf5cd2b8a9d87 07-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When annotating preprocessor tokens, if we are in a macro definition,
check if the token was ever a macro name and annotate it if that's the case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171776 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c059f89d888cd214e18ed09a7b47339201526381 07-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Simplify annotation of preprocessing tokens and remove the AnnotateTokensData
DenseMap and the lookups associated with it.

Instead of lexing for preprocessor tokens, associating the annotation with the location in a map,
and later lookup in the map in order to adjust the cursor annotation, just annotate the cursor
while lexing for preprocessor tokens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171775 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e9de485169b76acba3a3cb16399fa3d63e43ec2c 07-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make token annotation of type/storage qualifiers accurate.

Previously type/storage qualifiers would not be annotated as the declaration they belonged to.
Just use the resulting source range of getRawCursorExtent() which is more correct
than what AnnotateTokensWorker::Visit() was adjusting it to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171774 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
664b06f9bd2ea83443ddc8553feba8ba48880752 07-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When getting the cursor for an identifier inside a macro definition, check if
this was ever a macro name and return a specific CXCursor_MacroExpansion cursor in such a case,
instead of the generic CXCursor_MacroDefinition.

Checking for macro name makes sure the identifier is not part of the identifier list in a
function macro.
While, in general, resolving identifiers in macro definitions to other macros may not be completely accurate,
it greatly improves functionality such as give-me-the-definition-of-this, which was not working at all
inside macro definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171773 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexHigh.cpp
Indexer.h
XCursor.cpp
XCursor.h
27c2cb24d5e2e9fda68b929c6d03c761196d8e2d 07-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment to XML conversion: no, we don't want to print instantiations for the
<Declaration> tag


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171763 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
6a0ff179799c0dcbbd76b311923162e3be343f4b 07-Jan-2013 NAKAMURA Takumi <geek4civic@gmail.com> libclang/Makefile: Reorder USEDLIBS along driver/clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171750 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
2d5c133d3dd95507db63147997109f06e8cfa833 04-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_getFileLocation.

Uses of clang_getSpellingLocation should eventually move to calling
clang_getFileLocation, and clang_getSpellingLocation should do what
its name represents and actually point at the 'spelling' location, e.g.
inside a macro definition if the spelling of a token came from that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171486 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
ibclang.exports
b99083e60325a28063fb588f458a871151971fdc 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Re-sort #include lines using the llvm/utils/sort_includes.py script.

Removes a duplicate #include as well as cleaning up some sort order
regressions since I last ran the script over Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171364 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
XComment.cpp
ndexing.cpp
38980086c0f791e8c23cc882574f18e5b4a87db6 25-Dec-2012 Guy Benyei <guy.benyei@intel.com> Add intel_ocl_bicc calling convention as a function attribute to clang. The calling convention is already implemented in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171056 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
772e71310bd06a30b81db981cb5d9cc20120ff83 22-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Check for the 'LIBCLANG_NOTHREADS' environment variable before creating
a separate thread for code-completion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170978 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
154120cde4f56ed04261bab302fdbbed1a7f080b 20-Dec-2012 Fariborz Jahanian <fjahanian@apple.com> Add objective-C style formatting to clang format and
use it to format xml declaration tags.
// rdar://12378714


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170727 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
ad017fa7a4df7389d245d02a49b3c79ed70bedb9 20-Dec-2012 Bill Wendling <isanbard@gmail.com> Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170721 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
40902d817e5a73850045d8a0c9795bc5047ee000 20-Dec-2012 Fariborz Jahanian <fjahanian@apple.com> Audit DeclPrinter with -ast-dump on Cocoa.h and
fix any bad objectiveC syntax coming out of
DeclPrinter. This is on going. Also, introduce a new
PrintPolicy and use it as needed when declaration tag
is to be produced via DeclPrinter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170606 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
d7ebf3eead93232af7c7f0d30385a1f4c890f904 19-Dec-2012 Dmitri Gribenko <gribozavr@gmail.com> Add a missing 'else'. Found by grep '} if'

No testcase because this did not affect correctness: a declaration can only be
ClassTemplateDecl or a FunctionTemplateDecl, not both.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170565 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
4547fb55370b80f468fec19903ecb4a5cfd6d734 19-Dec-2012 Fariborz Jahanian <fjahanian@apple.com> Improve on header comment suggested by James Dennet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170555 91177308-0d34-0410-b5e6-96231b3b80d8
impleFormatContext.h
094dbf917127a1228147587076d59ca45b7c258d 19-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170500 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6ee225c8d4381e728c73252ed589f13e9f546def 19-Dec-2012 Ted Kremenek <kremenek@apple.com> Simplify logic to use SourceManager::getFileLoc(), per Argyrios's feedback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170487 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
e3ec31a6c2ff37bbc1ebea523e9f1730e0b4b1c7 19-Dec-2012 Fariborz Jahanian <fjahanian@apple.com> fixes a doxygen comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170485 91177308-0d34-0410-b5e6-96231b3b80d8
impleFormatContext.h
8a68da12c71efeeaca0ed24c39288a2117d07f9d 19-Dec-2012 Fariborz Jahanian <fjahanian@apple.com> Increas number of iterations before a new libclang format object
is created to 1000.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170481 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
7c10683c834f051e018c89b090d64bf5e4ca3bcc 19-Dec-2012 Fariborz Jahanian <fjahanian@apple.com> Some code refactoring per Dimitri's comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170478 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
impleFormatContext.h
d9b877765cfbedc7cb1ee4b50aeb576a46d0df4e 19-Dec-2012 Ted Kremenek <kremenek@apple.com> Have clang_getSpellingLocation() use the same logic as DiagnosticRenderer for plowing through macros.

This fixes a subtle bug reported in <rdar://problem/12584554> where a double-nested
macro could lead to an incorrect fixit location with live issues.

This fix also uncovers a bunch of subtle bugs in our indexer test cases which
are now fixed (mostly around source ranges for attributes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170468 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
88b9521364735a6c9a7ccd23c5bd19d81a80cdd3 19-Dec-2012 Fariborz Jahanian <fjahanian@apple.com> This is the libclang patch providing minimal API to
use clang's formatter. Currently, formatter is used
to format declaration tags for xml comments. Since formatter
is in flux and its change will break several of the clang comment
tests, only a single tests is formatted using this facility.
Doug has reviewed and approved it for check-in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170467 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
MakeLists.txt
XComment.cpp
XTranslationUnit.h
akefile
impleFormatContext.h
b13621d08e20ac7aa550e05896de8a57ee99c1e8 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Re-commit r170428 changes with Linux style file endings.

Add OpenCL images as clang builtin types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170432 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
7f92f2d8d9b7a07900c030183bc13a9ff60057cc 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Revert changes from r170428, as I accidentally changed the line endings of these files to Windows style.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170431 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
736104a7619c53ef92553780273d7357a3cdde81 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Add OpenCL images as clang builtin types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170428 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
b94b62c3b15967d29f63165e834fa4f12944394c 12-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make sure tokens from preprocessor directives are annotated as such,
even if the directive is inside a declaration.

Fixes rdar://11548788 & http://llvm.org/PR12970

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169949 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e1c2c2023ee160bd3051682faff04c4f9c5e8ebd 07-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Declarations inside anonymous namespaces have internal linkage so
their USR should contain a location.

This uniques them from other declarations with the same name but in different translation units.
rdar://10546541

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169647 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
838eb7e8652e451d93494a4e583e4d11809bcb4a 06-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce a new indexing mode where we skip function bodies
that were already parsed in the same "indexing session".

An indexing session is defined as using the same CXIndexAction object
for multiple clang_indexSourceFile calls.
Passing CXIndexOpt_SkipParsedBodiesInSession as an indexing option will
enable the mode where we try to skip bodies that were already parsed in
another translation unit.

If a function's body was skipped, the "flags" field in the CXIdxDeclInfo
structure will have "CXIdxDeclFlag_Skipped" bit was set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169539 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
1eb60825f0b858a4568c1a9497cc61b0d90c9b3a 04-Dec-2012 Dmitri Gribenko <gribozavr@gmail.com> libclang: Add a function to libclang for retrieving the bit width value

Patch by Jyun-Yan You.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169276 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
ibclang.exports
f59edb96b2d0bfe612b732f19519ab84bb995bd4 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort #include lines for tools/...

Completely automated with sort_includes.py

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169240 91177308-0d34-0410-b5e6-96231b3b80d8
RCMigrate.cpp
Index.cpp
IndexCodeCompletion.cpp
IndexHigh.cpp
IndexInclusionStack.cpp
Indexer.cpp
XComment.cpp
XComment.h
XCompilationDatabase.cpp
XCursor.cpp
XSourceLocation.cpp
XSourceLocation.h
XString.cpp
XString.h
XType.cpp
ursorVisitor.h
ndexBody.cpp
ndexDecl.cpp
ndexTypeSourceInfo.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
9f9e0d2ecd4b9dd7ceeb57f662f6d8f549adca63 04-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Avoid copying the CompileCommand related strings when wrapping them to a CXString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169227 91177308-0d34-0410-b5e6-96231b3b80d8
XCompilationDatabase.cpp
7e96bfb4d507700a122f270a11ce3fc0e8e36c85 04-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce CompilationDatabase::getAllCompileCommands() that returns all
compile commands of the database and expose it via the libclang API.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169226 91177308-0d34-0410-b5e6-96231b3b80d8
XCompilationDatabase.cpp
ibclang.exports
7aa7eb9d0221bc67e2cd564e703a2427dc212b79 27-Nov-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Remove WorkingDir field from CIndexer, it has been rendered useless.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168738 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
Indexer.h
4d9f4e5bfa701fc870e3c481f93f1fcc52d327bb 22-Nov-2012 Benjamin Kramer <benny.kra@googlemail.com> Make helpers static/anonymous.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168500 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
6e649737898ffb627c377fd8fa0a437d0a42ae4a 13-Nov-2012 Daniel Dunbar <daniel@zuster.org> Revert r167801, "[preprocessor] When #including something that contributes no
tokens at all,". This change broke External/Nurbs in LLVM test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167858 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4d10b40ea8ee489c7b9194aa2b025df4ecd2ab01 13-Nov-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] When #including something that contributes no tokens at all,
don't recursively continue lexing.

This avoids a stack overflow with a sequence of many empty #includes.
rdar://11988695

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167801 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
3d615b2a4217200fe1226d77683f4ef57dffbffd 06-Nov-2012 Ted Kremenek <kremenek@apple.com> Remove completely irrelevant code from USR generation.

Thanks to Richard Smith for pointing this out. This code stopped
serving its purpose during r103212 in a refactoring. My initial
fix was to add back the logic to abort the USR generation for
InternalLinkage, but enough tests broke suspiciously that I fear
that USR generation for cursors with InternalLinkage is now expected
by some clients (where it wasn't the case when the refactoring
took place). I don't own this code anymore and have not looked
at it for some time, but clearly this code is dead and can be removed
pending further review on the proper logic here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167442 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
e4a990f34904eb572c8d6aa1deef19465214359c 01-Nov-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
the receiver of an ObjC message expression.

rdar://12578643

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167201 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ibclang.exports
76dd1d91692bc8ca2a0f8e74a663ca2f191e2104 29-Oct-2012 Nick Lewycky <nicholas@mxc.ca> Add missing emacs major mode marker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166914 91177308-0d34-0410-b5e6-96231b3b80d8
ursorVisitor.h
6cd2bf886c49e9e2d8fbd1d387380cc02577bee1 29-Oct-2012 Nick Lewycky <nicholas@mxc.ca> Fix name of this file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166913 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
eb86dcc0087fef6b58087a491d73d510c0658609 29-Oct-2012 Nick Lewycky <nicholas@mxc.ca> Add missing emacs major mode marker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166912 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.h
7c98499ba594116d75555f39a1cce28cd26d76a5 25-Oct-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment to XML conversion: avoid memory allocation while pretty-printing the
declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166707 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
02c23ebf41ae2f70da0ba7337e05c51fbfe35f7f 24-Oct-2012 Douglas Gregor <dgregor@apple.com> Make DiagnosticOptions intrusively reference-counted, and make sure
the various stakeholders bump up the reference count. In particular,
the diagnostics engine now keeps the DiagnosticOptions object alive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166508 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
ndexing.cpp
28f3a0e49132038be9c4c683338859ed03e94263 23-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add an environment variable to disable thread background priotity, for testing

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166466 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8cfabf2cb278efc1f694f1d9aab76888a60ee3ac 19-Oct-2012 Dmitri Gribenko <gribozavr@gmail.com> Remove const_casts by propagating constness down to called functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166287 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
262e60c1ccb5197e8e2ea49ada1196ed65183734 18-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> [doc parsing] use getParamName to access parameter
for current(rewritten) comment and getParamNameAsWritten
to access param name coming with \param marker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166231 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
922fbc41e496c6bb843de5d4cbe26d54f1ecdedf 18-Oct-2012 NAKAMURA Takumi <geek4civic@gmail.com> libclang/CXComment.cpp: Fix abuse of StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166163 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
8d7a24e94b58676e57fd3f47353cbdbc59917d81 18-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Invoke a ppIncludedFile callback when indexing implicit module imports.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166161 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
1bfb00dabf83d8c8b95b7276b4c0ae3fd64832c8 17-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> [Doc parsing]: This patch adds <Declaration> tag to
XML comment for declarations which pretty-prints
declaration. I had to XFAIL one test annotate-comments.cpp.
This test is currently unmaintainable as written.
Dmitri G., can you see what we can do about this test.
We should change this test such that adding a new tag does not wreck
havoc to the test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166130 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
263366f9241366f29ba65b703120f302490c39ff 17-Oct-2012 Derek Schuff <dschuff@google.com> Add pnaclcall convention to Native Client targets.

Because PNaCl bitcode must be target-independent, it uses some
different bitcode representations from other targets (e.g. byval and
sret for structures). This means that without additional type
information, it cannot meet some native ABI requirements for some
targets (e.g. passing structures containing unions by value on
x86-64). To allow generation of code which uses the correct native
ABIs, we also support triples such as x86_64-nacl, which uses
target-dependent IR (as opposed to le32-nacl, which uses byval and
sret).

To allow interoperation between the two types of code, this patch adds
a calling convention attribute to be used in code compiled with the
target-dependent triple, which will generate code using the le32-style
bitcode. This calling convention does not need to be explicitly
supported in the backend because it determines bitcode representation
rather than native conventions (the backend just needs to undersand
how to handle byval and sret for the Native Client OS).

This patch implements __attribute__((pnaclcall)) to generate calls in
bitcode according to the le32 bitcode conventions, an attribute which
is accepted by any Native Client target, but issues a warning
otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166065 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
88d285cc0fc4ecdbc88d1779dcd2da968aa8b191 15-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> Fixes location of overriding declaration with no comment
of their own.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165972 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
6553c686cb419b22b4c79d05a422fb1e96f6e122 15-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> structured document comment: patch to provide comment for overriding function
template when comment is comming from overridden declaration.
// rdar://12378793


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165953 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
749ace614b6ea1ae11d194a60b18e1e43e1db243 12-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> search for overridden methods with comment when overriding method
has none of its own. Factor in Doug's comments.
// rdar://12378793


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165771 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
b43d87b0646aa04951056c7e0d1ab9a58eb09f66 12-Oct-2012 Sean Silva <silvas@purdue.edu> Remove pointless classof()'s.

Updates to llvm/Support/Casting.h have rendered these classof()'s
irrelevant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165770 91177308-0d34-0410-b5e6-96231b3b80d8
ursorVisitor.h
ndexingContext.h
900ab95e12bb7483971640a91075699eec391804 11-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Improve AST serialization done by ASTUnit::Save().

The ASTUnit needs to initialize an ASTWriter at the beginning of
parsing to fully handle serialization of a translation unit that
imports modules. Do this by introducing an option to enable it, which
corresponds to CXTranslationUnit_ForSerialization on the C API side.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165717 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
bf967be66ea8c51b66c61659c23240f762a56dbe 10-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> [Doc parsing] This patch searches overridden objc/c++
methods looking for documentation on a particular base
class inherited by any method that overrides the base class.
In case of redeclaration, as when objc method is defined
in the implementation, it also looks up for documentation
in class/class extension being redeclared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165643 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
1e4691b9d8e1bdcc8ef62b323969d702c51b3c08 10-Oct-2012 Jordan Rose <jordan_rose@apple.com> Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.

This more accurately reflects its use: this flag is set when a method
matches the getter or setter name for a property in the same class,
and does not actually specify whether or not the definition of the method
will be synthesized (either implicitly or explicitly with @synthesize).

This renames the setter and backing field as well, and changes the
(soon-to-be-obsolete?) XML dump format to use 'property_accessor'
instead of 'synthesized'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165626 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexDecl.cpp
d34eca2a5b54d36c196b4f663f397fc6ea583b9b 10-Oct-2012 Bill Wendling <isanbard@gmail.com> Place temporary LTO files into their own subdirectory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165600 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
93cd6e8e17a40ee6fe1f17ab74d841e1f4fe9351 10-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Disable the preprocessing record when indexing a source file
and modules are not enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165593 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
62288edde26ff4af9fc079c979a0e1bdc577ce9d 10-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> When indexing a module file, for the ppIncludedFile callback give
an invalid location if the location points to the synthetic buffer
for the module input.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165592 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
1be79391b322ba6da85c949bb8336565dc3e90bc 10-Oct-2012 Bob Wilson <bob.wilson@apple.com> Revert "Use a special path to place the .o files in."

This reverts commit 165429 in an attempt to get our buildbots going.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165573 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
21c3607282550779c9ae5fe784928597807fd110 09-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move the logic that searches for overridden methods from libclang to
ASTContext so that it can be widely available.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165473 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
09655fcc087a019309d3eecf237848542e419286 08-Oct-2012 Bill Wendling <isanbard@gmail.com> Use a special path to place the .o files in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165429 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
53d6ded0edb70b04430cdaf7d02602799b4d4b07 06-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Don't disable the preprocessing record while indexing so as
to not mess up with module building.

It was not worth trying to combine indexing without preprocessing record
and building modules with one because:

-just importing a module/PCH that was built with a pp record, enables it anyway
-the performance gain of indexing without the preprocessing record is insignificant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165352 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
134d1e8a0b463d929ffeac5eefeae761707bf5d3 05-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Now that we have a CXModule object, pass it to the
importedASTFile indexing callback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165281 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
5d04b1af7b76ed536557d4bba24005ad0d2fd608 05-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce new C functions that provide information about modules:

clang_Cursor_getModule
clang_Module_getParent
clang_Module_getName
clang_Module_getFullName
clang_Module_getNumTopLevelHeaders
clang_Module_getTopLevelHeader

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165280 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
6a01012e6bffa246810dc5c655a9a30082331fb2 05-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce CXCursor_ModuleImportDecl cursor kind, used for a module
import declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165277 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XType.cpp
731a26202db4251ce9f98e64bed8ee257c46eb61 04-Oct-2012 Bill Wendling <isanbard@gmail.com> Add an explicit -object_path_lto flag during linking with a uniquified temporary
file name if building Apple-style.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165184 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
3da76bfbd24b2747ceb72d1918bbbe3123dac841 03-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When indexing, invoke the importedASTFile for PCH files as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165161 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
37f2f52fbc16b0d426d4d86c7e1662e5c6b9e3b8 03-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Simplify indexing of module imports by handling implicit
imports via ImportDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165160 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
7d9c975bf2ea8e607646e23c15da744490e10d5d 03-Oct-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment to XML conversion: escape XML special chars correctly; use correct
regex for version tuples.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165104 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
95c579cae01118eadd311d445ff7f491d0011fb0 03-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Some renames to use the 'visitor' nomenclature, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165083 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
8da68b8b03d72314b67ea44568e013ef79d93b40 03-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> [Doc parse]: SUpport for message in deprecated/unavailable
attribute going iinto XML document.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165066 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
2093e0bc4e436b1b2791d5423fb3274dd37231b8 02-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When indexing an AST file, only deserialize the file level
declarations of the current primary module.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165046 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
2a46533633441176e93b484739a0a27e07150b63 02-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> [Doc parsing]: Add available and deprecated attribute info
to XML output. // rdar://12378879


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165039 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
632dcc92f60ab7f806a89c5bca3a0951763a9219 02-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When indexing an AST file, only deserialize the preprocessing record
entities of the current primary module.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165023 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
8dd927cf03e85b942f323eebb42e06c839887ebb 02-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add info in the preprocessing record whether an inclusion directive
resulted in an automatic module import.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165022 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
3fe97781ad5f31dbfd9348c9488b93a7c01d7818 02-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Even though we disable the preprocessing record during indexing,
make sure that it gets enabled for when a module needs to be created.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165021 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
2c3e05c266de0d4c465b58ffd129bd0b31604368 02-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Implement the importedASTFile indexing callback to provide
info about imported modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165020 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
faab5618b5beed350d7444de97cf513ef1a42ca6 01-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> availability in structured documents. Takes
care of comments by Dimitri and Doug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164957 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
1952354bd376062c3ab3d328c0fc6c36530c9309 29-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Move the 'find macro by spelling' infrastructure to the Preprocessor class and
use it to suggest appropriate macro for __attribute__((deprecated)) in
-Wdocumentation-deprecated-sync.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164892 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f8afcffe6a0213760b64c211812b1750e1e1e967 29-Sep-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> For PPCallbacks::InclusionDirective() add a parameter for the module, whenever
an inclusion directive was automatically turned into a module import, and
PPCallbacks::moduleImport() for an explicit module import.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164874 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
257e2e836160c7e55cf160b7cae8e5665f988a5e 29-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> [Doc parsing] Add availability information to generated Comment XML.
(I still need to add a test once I figure it out).
Reviewed off-line by Doug. // rdar://12378879


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164861 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
da313592441db36cf4b06be97c4bcc238ee6fa9c 27-Sep-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Per discussion in http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120917/064551.html
have PPCallbacks::InclusionDirective pass the character range for the filename quotes or brackets.

rdar://11113134 & http://llvm.org/PR13880

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164743 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
526d24444c91404dc4165b141e5ec095125c1bc8 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164705 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
e6d22027bc22d3767a2acdc80299c76b91159867 26-Sep-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Have ASTUnit::Save() return a bool to indicate save error.

Removes a dependency of ASTUnit to clang-c/Index.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164704 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
d7a6b1640e565487d163023a6a2e83f55476ae96 26-Sep-2012 Eli Friedman <eli.friedman@gmail.com> Fix the AST representation for non-type template arguments to encode
enough information so we can mangle them correctly in cases involving
dependent parameter types. (This specifically impacts cases involving
null pointers and cases involving parameters of reference type.)
Fix the mangler to use this information instead of trying to scavenge
it out of the parameter declaration.

<rdar://problem/12296776>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164656 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
ecursiveASTVisitor.h
162884d7063646224d1b0759b6568aaf1d8935b6 25-Sep-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Do a AST concurrency check in clang_indexTranslationUnit_Impl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164626 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
f56faa01936b9cf909623d7f06e3c2569ca4a78e 15-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163983 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.h
9a4db032ecd991626d236a502e770126db32bd31 12-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13811: Add a FunctionParmPackExpr node to handle references to function
parameter packs where the reference is not being expanded but the pack has
been. Previously, Clang would segfault in such cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163672 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ecursiveASTVisitor.h
3bed3d196dbb5ad2ea7442da4b6c2fbf6bb5fcc6 11-Sep-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Do index 'extern' declarations inside functions.

rdar://12257073

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163563 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
ndexDecl.cpp
ndexingContext.cpp
ndexingContext.h
e4330a302ac20b41b9800267ebd4b5b01f8553f8 10-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.

Now we have a list of all commands. This is a good thing in itself, but it
also enables us to easily implement typo correction for command names.

With this change we have objects that contain information about each command,
so it makes sense to resolve command name just once during lexing (currently we
store command names as strings and do a linear search every time some property
value is needed). Thus comment token and AST nodes were changed to contain a
command ID -- index into a tables of builtin and registered commands. Unknown
commands are registered during parsing and thus are also uniformly assigned an
ID. Using an ID instead of a StringRef is also a nice memory optimization
since ID is a small integer that fits into a common bitfield in Comment class.

This change implies that to get any information about a command (even a command
name) we need a CommandTraits object to resolve the command ID to CommandInfo*.
Currently a fresh temporary CommandTraits object is created whenever it is
needed since it does not have any state. But with this change it has state --
new commands can be registered, so a CommandTraits object was added to
ASTContext.

Also, in libclang CXComment has to be expanded to include a CXTranslationUnit
so that all functions working on comment AST nodes can get a CommandTraits
object. This breaks binary compatibility of CXComment APIs.

Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't
need TU parameter anymore, so it was removed. This is a source-incompatible
change for this C API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163540 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XComment.cpp
XComment.h
568ba871bbac959029671b81f8e531edb7e0d7d6 04-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Revert r163083 per chandlerc's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163149 91177308-0d34-0410-b5e6-96231b3b80d8
ecursiveASTVisitor.h
4c5fa4292a2ae1fd69c8b984543519c4f119c540 04-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Revert r163099 per chandlerc's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163147 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
ac067454ad828f6cefe98fb3b02e84295396a495 03-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Added a new cursor for SEHLeaveStmt to libclang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163099 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
5be92de217a1940d0e109abd0f401df4480c1a4b 02-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Implemented parsing and AST support for the MS __leave exception statement. Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163083 91177308-0d34-0410-b5e6-96231b3b80d8
ecursiveASTVisitor.h
754a5d14d58213beb0502720e66fef8fa86a21cf 01-Sep-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix indexing type alias declarations. rdar://11878406

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163072 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
d579dd5cc43e657647f38be5dd47c8974cd43108 01-Sep-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] The annotation of tokens operation visits statement nodes code-recursively.
This can blow the stack with extremely deep hierarchies. Switch it to data-recursive.

This is implemented by introducing a post-children visitation callback that the
CursorVisitor is calling after child nodes of a cursor have been visited.
This is used by the annotate-tokens visitor to do extra work at that point.

rdar://11979525.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163071 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ursorVisitor.h
305c613af6cfc40e519c75d9d2c84c6fa9a841c0 01-Sep-2012 Ted Kremenek <kremenek@apple.com> Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.
This is similar to how we divide up the StaticAnalyzer libraries to separate
core functionality to what is clearly associated with Frontend actions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163050 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
17d35c36fbae764fcd68fa8b31624078a033aabc 01-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Normalize line endings of r163013 (part 2).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163032 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCXX.cpp
ndexingContext.cpp
ec2f579599e37ba5d2c7282d78309cc4dd36d73e 31-Aug-2012 Joao Matos <ripzonetriton@gmail.com> Normalize line endings of r163013.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163024 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
6666ed4ed2e2bc13da5ac5d0a4947019137d45be 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163013 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCXX.cpp
IndexUSRs.cpp
ndexingContext.cpp
c178d76c027d4259c00d4b0b910ad4875c286298 28-Aug-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When determining the cursor via a location, ignore synthesized ivars otherwise
if we have something like:

@synthesize prop = _prop;

and '_prop' is not declared, we will encounter a '_prop' ivar before
encountering the 'prop' synthesize declaration and we will think that
we passed the region-of-interest, missing the cursor for 'prop'.

rdar://12172700

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162715 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
5c7f59445ae68109c7ffee731aca2ce32db587c7 28-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Rename getClobber to getClobberStringLiteral. No functional
change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162710 91177308-0d34-0410-b5e6-96231b3b80d8
ecursiveASTVisitor.h
df5faf5e7ae6823d0af0b801c4ac26d47f2cee97 25-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162632 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
ecursiveASTVisitor.h
70517ca5c07c4b41ff8662b94ee22047b0299f8c 23-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Fix a bunch of -Wdocumentation warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162452 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f50555eedef33fd5a67d369aa0ae8a6f1d201543 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 declaration might have had a documentation
comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161722 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
62290ae569016345b79d4e11dd93abc300e5a681 09-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment to HTML and XML conversion: ignore commands that contain a declaration
as their argument. For example, \fn, \function, \typedef, \method, \class etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161601 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
d1db12540e572d6e3d998a4b770a6b2c7267d7fc 09-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment to HTML and XML conversion: use CommandTraits to classify commands.

This also fixes a bug in comment to XML conversion: \result was just an
ordinary paragraph, not an alias for \returns.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161596 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
1a5d421c26e3dffce9dfc1aeca846167d7bb4068 09-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add various MC components to clang build to support MS-style inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161594 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6cd4420945489e7331012103048f162288a6c7d8 09-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment XML: use xml:space="preserve" in Verbatim tags, so that XML tidy does
not compress spaces in verbatim content.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161531 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
fa1d30ddb1bbb16d8c268f79890ac39101915b5c 08-Aug-2012 Chad Rosier <mcrosier@apple.com> Add various MC components to clang build to support MS-style inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161498 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
cff339a60a571a606a7510548f661dc6a719368d 07-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment AST: DeclInfo: add a special kind for enums.
Comment XML: add a root node kind for enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161442 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
f303d4cb10648ac9c2080ae7c9dd507ba615e3a7 07-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> libclang API for comment-to-xml conversion.

The implementation also includes a Relax NG schema and tests for the schema
itself. The schema is used in c-index-test to verify that XML documents we
produce are valid. In order to do the validation, we add an optional libxml2
dependency for c-index-test.

Credits for CMake part go to Doug Gregor. Credits for Autoconf part go to Eric
Christopher. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161431 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
ibclang.exports
6a425525e52aba5a8e14db35d50a712be4e5e2e1 02-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment to HTML conversion: correct typo in CSS class name: taram -> tparam


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161145 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
2ff84b514e53f4273c7067a5aade680a155a9045 02-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment to HTML conversion: refactor. Extracted a class to for FullComment
semantic parts -- this will be reused for comment to XML conversion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161139 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
f0d151c485bec560e73c74e816cd969e0c485c71 01-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment to HTML conversion: skip \tparam commands with whitespace paragraphs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161096 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
59500fec689f7def27bb83bd21e19417ad527906 01-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment to HTML conversion: escape HTML special characters in command arguments


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161094 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
96b098674908eaa59a9128f3305cda6fbbdad563 01-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: add support for \tparam command on all levels.

The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this
breaks libclang binary compatibility, but should not be a problem since API is
so new.

This also fixes PR13372 as a side-effect.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161087 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
ibclang.exports
e5db09cf6772332c14dc7dc541de53f918f89125 30-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Move comment from member operator() to class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160980 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
221a6d74d48fb3eaa73b68eb04f253080bedd5fd 30-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Add missing include for Linux buildbot


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160971 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
b740316a122b5ceaaa7cf50557b1b39af5fbbf5f 30-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Add an assert to ParamCommandComment::getParamIndex() -- it should not be
called unless index is valid.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160970 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
3eb3755949278fe10a89b92a6c4612d536f1f295 27-Jul-2012 NAKAMURA Takumi <geek4civic@gmail.com> libclang, examples: [CMake] Add dependencies to tblgen'd headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160849 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
2c6b00e7126399210b759f4da53c680bee01a706 25-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> libclang comment to HTML rendering: \result is the same as \returns


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160738 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
1f8c529a2a938a5055f440aa063ea0b49eafae98 23-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> libclang comments AST: clang_ParamCommandComment_getParamName: don't assert
when a \param command does not have a parameter name, just return an empty
string instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160638 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
2d66a5016d4aacce362f89290261c8a1a6eef0d3 23-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment AST: add InlineContentComment::RenderKind to specify a default
rendering mode for clients that don't want to interpret Doxygen commands.

Also add a libclang API to query this information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160633 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
ibclang.exports
3e63d332baf0d3b8a5c0b7c2dac2ae85615b1d47 21-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment to HTML conversion: add more CSS classes to identify function arguments
by index. This is useful if the user does not document all arguments, and we
can't find a particular argument by index via :nth-of-type() CSS selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160595 91177308-0d34-0410-b5e6-96231b3b80d8
XComment.cpp
ae99b75fbbac1deaccdcc1b326b8fb6b07a1e72d 20-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Add libclang APIs to walk comments ASTs and an API to convert a comment to an
HTML fragment.

For testing, c-index-test now has even more output:
* HTML rendering of a comment
* comment AST tree dump in S-expressions like Comment::dump(), but implemented
* with libclang APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160577 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
MakeLists.txt
XComment.cpp
XComment.h
ibclang.exports
b619e7877f09f2984d06629fd8653f3f333d8ea2 17-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Move clang_Cursor_getBriefCommentText implementation under `extern "C"'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160331 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ff398965a5abfaf5bc47bc022876f56a28e5b9a7 11-Jul-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a flag in SourceManager to treat non-system source files
as "volatile", meaning there's a high enough chance that they may
change while we are trying to use them.

This flag is only enabled by libclang.
Currently "volatile" source files will be stat'ed immediately
before opening them, because the file size stat info
may not be accurate since when we got it (e.g. from the PCH).
This avoids crashes when trying to reference mmap'ed memory
from a file whose size is not what we expect.

Note that there's still a window for a racing issue to occur
but the window for it should be way smaller than before.
We can consider later on to avoid mmap completely on such files.

rdar://11612916

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160074 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexing.cpp
e8cf7d143446c45568bb7c9a6fbd8f32ca6ae93e 07-Jul-2012 Ted Kremenek <kremenek@apple.com> Re-apply r159875 with fixes.

- Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32
- Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159892 91177308-0d34-0410-b5e6-96231b3b80d8
XStoredDiagnostic.cpp
3b4c53259603ba389373362f476648b2b1ab9eca 07-Jul-2012 NAKAMURA Takumi <geek4civic@gmail.com> Revert rr159875, "Implement -Wpedantic and --no-pedantic to complement -Weverything." It broke several builds.

I suspect FileCheck might match assertion failure, even if clang/test/Misc/warning-flags.c passed the test.

> 0. Program arguments: bin/./clang -### -pedantic -Wpedantic clang/test/Driver/warning-options.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159886 91177308-0d34-0410-b5e6-96231b3b80d8
XStoredDiagnostic.cpp
25570a94ca6b706d19812b0f8df25a63ec3445c8 07-Jul-2012 Ted Kremenek <kremenek@apple.com> Implement -Wpedantic and --no-pedantic to complement -Weverything.

This patch introduces some magic in tablegen to create a "Pedantic" diagnostic
group which automagically includes all warnings that are extensions. This
allows a user to suppress specific warnings traditionally under -pedantic used
an ordinary warning flag. This also allows users to use #pragma to silence
specific -pedantic warnings, or promote them to errors, within blocks of text
(just like any other warning).

-Wpedantic is NOT an alias for -pedantic. Instead, it provides another way
to (a) activate -pedantic warnings and (b) disable them. Where they differ
is that -pedantic changes the behavior of the preprocessor slightly, whereas
-Wpedantic does not (it just turns on the warnings).

The magic in the tablegen diagnostic emitter has to do with computing the minimal
set of diagnostic groups and diagnostics that should go into -Wpedantic, as those
diagnostics that already members of groups that themselves are (transitively) members
of -Wpedantic do not need to be included in the Pedantic group directly. I went
back and forth on whether or not to magically generate this group, and the invariant
was that we always wanted extension warnings to be included in -Wpedantic "some how",
but the bookkeeping would be very onerous to manage by hand.

-no-pedantic (and --no-pedantic) is included for completeness, and matches many of the
same kind of flags the compiler already supports. It does what it says: cancels out
-pedantic. One discrepancy is that if one specifies --no-pedantic and -Weverything or
-Wpedantic the pedantic warnings are still enabled (essentially the -W flags win). We
can debate the correct behavior here.

Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp
that determine whether to include the "-pedantic" flag in the warning output. This is
no longer needed, as all extensions now have a -W flag.

This patch also significantly reduces the number of warnings not under flags from 229
to 158 (all extension warnings). That's a 31% reduction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159875 91177308-0d34-0410-b5e6-96231b3b80d8
XStoredDiagnostic.cpp
c70851b74c06b27df07b9a772656a2e663d432ee 03-Jul-2012 Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> [libclang] CompilationDatabase naming and comment fixes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159682 91177308-0d34-0410-b5e6-96231b3b80d8
XCompilationDatabase.cpp
ibclang.exports
f39a7aea7dd0bf0716a066e2db2f97ea8730e4fa 03-Jul-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_isDynamicCall which,
given a cursor pointing to a C++ method call or an ObjC message,
returns non-zero if the method/message is "dynamic", meaning:

For a C++ method: the call is virtual.
For an ObjC message: the receiver is an object instance, not 'super' or a
specific class.

rdar://11779185

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159627 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ibclang.exports
d99ef536b241071b6f4c01db6525dc03242ac30b 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
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).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159539 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
XCursor.cpp
ibclang.exports
685d78d0da52f611b09e728f73e83999fabaa463 30-Jun-2012 Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> [libclang] Make implementation filename match the header's name for CXCompilationDatabase

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159493 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCompilationDB.cpp
MakeLists.txt
XCompilationDatabase.cpp
e27537d2cf6936043f7abdf4c6b91ae98fb40f1c 30-Jun-2012 Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> [libclang] Fix autoconf library dependencies for tooling support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159490 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
db29318326aba9e0c5c1bbba093687dccc38fc39 30-Jun-2012 Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> [libclang] add CompilationDatabase support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159484 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCompilationDB.cpp
MakeLists.txt
ibclang.exports
3791814b2c5efb3986ec4dd40c75c9d28f325222 28-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Don't bind a StringRef to a temporary std::string object.
It may end up pointing at garbage.

Fixes the MSVC debug build. rdar://11703319

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159377 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
8376f5934a18b950ac7323d8a38ed231623010fa 28-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Remove redundant check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159355 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
2d44d77fed3200e2eff289f55493317e90d3398c 26-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Implement a lexer for structured comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159223 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
b0d8671f95fe08a220118bca29063ba4d11a9dac 21-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Remove a goofy CMake hack and use the standard CMake facilities to
express library-level dependencies within Clang.

This is no more verbose really, and plays nicer with the rest of the
CMake facilities. It should also have no change in functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158888 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
f95d4125c01fa7b98722ae8cfbceac4a87d037b4 20-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Fix a big layering violation introduced by r158771.

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158807 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
aa0cd85838f2a024e589ea4e8c2094130065af21 20-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Structured comment parsing, first step.

* Retain comments in the AST
* Serialize/deserialize comments
* Find comments attached to a certain Decl
* Expose raw comment text and SourceRange via libclang


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158771 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
MakeLists.txt
akefile
ibclang.exports
8cd64b4c5553fa6284d248336cb7c82dc960a394 11-Jun-2012 Chad Rosier <mcrosier@apple.com> Etch out the code path for MS-style inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158325 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
ecursiveASTVisitor.h
135bf8ee69e2ae2daea4f713381995028c41e264 09-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When doing the cursor visitation make sure declarations
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158258 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
374a00bcc6e26b4fc3cd1d378a5d056c4c7d618e 08-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Don't crash when saving a PCH from a prefix header
that does not exist.

rdar://11607033

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158193 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
390fff8e8b480fa146ffc14cbc63a1c2f9e2d206 08-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang/AST]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158189 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
855243789cb44799c03f4c7216d3d6308805f549 07-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Plug a long standing memory leak in TemplateArgument.

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158150 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
a08e7bc74b5635995fc50009f240dd3feb1999e2 06-Jun-2012 Francois Pichet <pichet2000@gmail.com> Zap the /Za compiler switch from MSVC projects, the option is considered 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158063 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
28b230723d5daf3c48c2e134f4b5626bd69392c8 27-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Replace some custom hash combines with the standard stuff from DenseMapInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157531 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.h
25bd27932a5b94c8314bf1b999fdea1c4032f11d 24-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Report CXType_ObjCId for 'const id', not CXType_Typedef.

rdar://11357807

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157356 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
87014f33f123461a012995b2f7eb5e6ecf6dc461 16-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Properly handle @encode() in RecursiveASTVisitor and traverse
its type source info. Fixes indexing references inside @encode().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156936 91177308-0d34-0410-b5e6-96231b3b80d8
ecursiveASTVisitor.h
7d24e289bea2accaaed79c6ca3e5cdd0c204ddc1 16-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang/AST] Index references of protocols in "@protocol(...)" syntax.

To do that, keep track of the location of the protocol id in the ObjCProtocolExpr
AST node.

rdar://11190837

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156890 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
57daf55d43dd3b605c2c5b7b4b72bbd378936aa1 15-May-2012 Manuel Klimek <klimek@google.com> This patch fixes the cmake build to create libclang.so/libclang.a on linux
instead of liblibclang.so/liblibclang.a.

Patch by Arnaud de Grandmaison.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156809 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
16afdf76b6f12e41ff6f6e6828bfb1d4732523ba 10-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix an assertion hit when the serialized diagnostics writer receive a diagnostic
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156536 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
e15db6f0d226a3bc88d244512d1004c7c1c07391 09-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [AST/libclang] Speed up clang_getOverriddenCursors() considerably by 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156476 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ae5ac1f5bdbcc5190b3867d16d0f41c2b10e0c65 08-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Map 'id'/'Class'/'SEL' to the corresponding CXType kinds.

rdar://11357807

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156352 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
cc889664dec7776ebb598e4584e7df5ba2f59ab4 08-May-2012 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API to determine the platform availability of
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>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156347 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
428499e6f5731e98c15af4fe7ff1f6ff458c2766 08-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Actually commit the changes to make libclang's RecursiveASTVisitor
data-recursive for statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156339 91177308-0d34-0410-b5e6-96231b3b80d8
ecursiveASTVisitor.h
98180d49bdbb9a41e9cacf12a3a8be30a60ba707 08-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Put the RecursiveASTVisitor in libclang in a cxindex namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156331 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
ndexTypeSourceInfo.cpp
ecursiveASTVisitor.h
e377d71d81e953939a17e94b9b684f77b5fff83d 08-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Un-revert r156142, "[libclang] Bring back BodyIndexer::TraverseCXXOperatorCallExpr".

It was reverted on r156253.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156330 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
dec35a9848b3580855ea53eaeeafd3e17a5fb934 08-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Use a copy of the data-recursive RecursiveASTVisitor inside libclang.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156329 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
ndexTypeSourceInfo.cpp
ecursiveASTVisitor.h
2643475c2282e5aaa93f12017c43804cef8d13d5 06-May-2012 NAKAMURA Takumi <geek4civic@gmail.com> Revert r156142, "[libclang] Bring back 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156253 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
2e9a44d333e9bbfc1f83222a6cd27415457bfada 04-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Bring back BodyIndexer::TraverseCXXOperatorCallExpr which
was removed in r155969 to address a deficiency of RecursiveASTVisitor
prior to recent changes on it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156142 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
c8c222830a1d8df8ed05bedfcac868fe6838fba8 02-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Unrevert r155951, reverted in r155962, with two changes:
* 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155969 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
8e5900c8e9bd32bcc385124f564f3d38a11d0e28 01-May-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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155858 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8eece46c544e79190d5b3e7c28f68c1463fbf2f9 30-Apr-2012 Ted Kremenek <kremenek@apple.com> Fix C versus C++ linkage issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155842 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
bbf66ca1dad17773cc682d69b8482c4e179aeaeb 30-Apr-2012 Ted Kremenek <kremenek@apple.com> Reduce malloc() traffic of clang_getOverridenCursors() by using a pool of SmallVector<CXCursor> objects
under the covers.

Fixes <rdar://problem/11289160>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155841 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
XTranslationUnit.h
92f4e6e8f93f6cbb4724cbe05024a153c4ca9374 25-Apr-2012 Chris Lattner <sabre@nondot.org> don't use soname on OpenBSD, it doesn't support it. Patch by
Brad Smith!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155534 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
f676608f60c523c64ccb41c70b5fdf464855ad16 21-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Don't set dylib load address to 0xe000000.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155246 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
eb382ec1507cf2c8c12d7443d0b67c076223aec6 19-Apr-2012 Patrick Beard <pcbeard@mac.com> Implements boxed expressions for Objective-C. <rdar://problem/10194391>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155082 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ndexBody.cpp
a9d45a3f423f60fa5d1f977acb5c8df50198f27e 17-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make sure that when we have multiple @class references in the 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154873 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9482a185d34d8b0f6d788c44e2c128991622c0ad 16-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Spelling range for a objc category should the category name range, not the class one.

rdar://11249386

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154853 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
0740a25e9be2dd98f44a73f58cade13b1f068c6e 16-Apr-2012 Sylvestre Ledru <sylvestre@debian.org> Like for LLVM / shlib, we also provide a SONAME to libclang.so



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154779 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
534986f2b21e6050bf00163cd6423fd92155a6ed 14-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add an AttributedStmt type to represent a statement with C++11 attributes
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!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154723 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ba8be8c422064b9bda68bdfa28d7f2775e9147f4 13-Apr-2012 Douglas Gregor <dgregor@apple.com> Kill the last vestiges of clangIndex

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154675 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6a91d385618ea4d28236c496f540a26877c95525 12-Apr-2012 Erik Verbruggen <erikjv@me.com> Added a flag to the parser to skip method bodies.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154584 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
78d5d3bb9386a5aa31d19445eb8f81bf2652acb4 12-Apr-2012 Ted Kremenek <kremenek@apple.com> Implement clang_getDiagnosticCategoryText() to provide a way for a client of 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154567 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
IndexDiagnostic.h
XLoadedDiagnostic.cpp
XLoadedDiagnostic.h
XStoredDiagnostic.cpp
ibclang.exports
d98ef9ae48ab4090d4d5d703ce65cfac62807fda 11-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce a couple of functions to make it convenient
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154523 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
XType.cpp
ibclang.exports
eba8cd5967e47592285590360bde73063c9c226f 11-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] In cxloc::translateSourceRange make sure to handle locations in macro arguments
correctly. clang diagnostics can provide fixits inside a macro argument now.

rdar://11014346

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154517 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9793428697f01b139443b7a0a882ea5dd1967e56 11-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix "error: conflicts with new declaration with ‘C’ linkage" that gcc
emits but not clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154475 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e722ed6f5464232e23be52f4976312ef526fae99 11-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] If displayDiagnostics is set (when calling clang_createIndex), 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154472 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
Indexer.h
ndexing.cpp
15f4c9819d172139c0b37e8a68767ea4fc03e5b6 10-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] For clang_getOverriddenCursors make sure to report overridden objc methods
for methods in categories of super classes. rdar://11220358

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154436 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
28a83f57003469fb615ad27dd34bcf5b0a10da8c 10-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [code-complete] Introduce CodeCompletionTUInfo which will be used for caching
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154408 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
XCursor.cpp
8e59838ed66eb8a853927a43fc25f974ee2ee838 04-Apr-2012 Ted Kremenek <kremenek@apple.com> Fix dead store warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153988 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
d786f1a6331246e7d0eedde277f126ab92089eeb 31-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix use-after-free bug when handling attributes indexing info.

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153792 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
ndexingContext.h
34ebe1e1b0779bcea2f277bc6b4e9dd98bf70b7b 31-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_getObjCSelectorIndex() function.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153781 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
ba1da14e79c1ecd49306e5175b69baa1e7ed4293 30-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_getSpellingNameRange().

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153775 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
b085d898bdfe35097eba45f4072b0f6865f561dc 30-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add info to ObjCPropertyRefExpr to indicate whether the dot syntax property
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153709 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
d0469525581a851b68f5b4f960ee4190dcc7c932 30-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] A MemberRefExpr cursor for a property dot syntax should have as
its location the location of the property.

Part of rdar://11113120

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153708 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f962eb4dde12366c8617d0b9958b9ed70a328f21 28-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix CIndexer::isOptEnabled(); not sure what I was thinking there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153594 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.h
81b5ac39a97cde1a54b8d0eb7105290c40eb84d7 28-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Rename setBackGroundPriority -> setThreadBackgroundPriority.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153566 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
Indexer.h
ndexing.cpp
8e7c48a54b4325925f5edda1738a3537ab2c3c5e 28-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix gcc error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153565 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
fdc1795acc9d5d73a767cc7d43ad1546e93adbba 28-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce options to control the priority for the threads
that libclang creates.

-Introduce CXGlobalOptFlags enum for the new options that can be
set on the CXIndex object.

-CXGlobalOpt_ThreadBackgroundPriorityForIndexing affects:
clang_indexSourceFile
clang_indexTranslationUnit
clang_parseTranslationUnit
clang_saveTranslationUnit

-CXGlobalOpt_ThreadBackgroundPriorityForEditing affects:
clang_reparseTranslationUnit
clang_codeCompleteAt
clang_annotateTokens

rdar://9075282

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153562 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
Indexer.h
XTranslationUnit.h
ndexing.cpp
ibclang.exports
bbca564eec4eb841848a40014f7ddc9e5807125e 28-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Put the CIndexer class in the clang namespace instead of having
it at global namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153561 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.h
142bcb59c012504360881e8f744d9d4a8d92c2ac 28-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] For clang_saveTranslationUnit, if the AST to save has invalid nodes
due to compiler errors, use a crash recovery thread to do the AST writing for
protection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153560 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ba1030698dbc276db86b11c5329a1edee8a1805e 28-Mar-2012 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API to determine the parent context of a code
completion item. For example, if the code completion itself represents
a declaration in a namespace (say, std::vector), then this API
retrieves the cursor kind and name of the namespace (std). Implements
<rdar://problem/11121951>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153545 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.exports
b49a29f7e4413a7a014a2b28c5c25fe54e005cf3 27-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce indexing option CXIndexOpt_SuppressWarnings, which
disables all compiler warnings.

rdar://11059556

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153539 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
30a2805c2c85e6abfe3149293f83f60da018b2df 24-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make sure we don't crash when trying to index code that
managed to insert an @interface as top level decl contained by another
@interface.

A commit to also not allow this as valid code will be coming.

rdar://11105114.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153354 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexingContext.h
ccc6f36e53274fccae024f30ac5adb6be6f815d3 23-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] For a CXCursor_ObjCInstanceMethodDecl/CXCursor_ObjCClassMethodDecl cursor,
return from clang_getCursorLocation the start location of the method name.

rdar://11105223

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153303 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
0822c5f29d91a08697416b0d0be28dd3e71d945a 20-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Have clang_getCursorExtent() return the range of the main file when
the passed cursor is the translation unit cursor.

Patch by Clint Caywood!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153062 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexUSRs.cpp
XSourceLocation.h
f4b88a45902af1802a1cb42ba48b1c474474f228 10-Mar-2012 John McCall <rjmccall@apple.com> Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to
track whether the referenced declaration comes from an enclosing
local context. I'm amenable to suggestions about the exact meaning
of this bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152491 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
96a0014f9b963d8a987f1cccd48808a47f9c6331 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [AST/Sema/libclang] Replace getSourceRange().getBegin() with getLocStart().
- getSourceRange().getBegin() is about as awesome a pattern as .copy().size().

I already killed the hot paths so this doesn't seem to impact performance on my
tests-of-the-day, but it is a much more sensible (and shorter) pattern.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152419 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
044e645605c6d75223e33d23e3c5701cb389969f 08-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Enhance clang_getOverriddenCursors.

Basically the current design is:
-for an implementation method, show as overridden the interface method.
This is not useful, and is inconsistent with the C++ side
-for an interface method, show as overridden the protocols methods (this is desirable)
and the methods from the categories; methods from categories are not useful
since they are considered the same method (same USR).
-If there is a protocol method or category method reported, it does not check the
super class for overridden methods. This is really problematic since
overridden methods from super class is what we want to give back.

Change clang_getOverriddenCursors to show as overridden any method in the class's
base class, its protocols, or its categories' protocols, that has the same
selector and is of the same kind (class or instance).
If no such method exists, the search continues to the class's superclass,
its protocols, and its categories, and so on. A method from an Objective-C
implementation is considered to override the same methods as its
corresponding method in the interface.

rdar://10967206

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152270 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
9fcce65e7e1307b5b8da9be13e4092d6bb94dc1d 07-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> AST representation for user-defined literals, plus just enough of semantic
analysis to make the AST representation testable. They are represented by a
new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic
properties, including full CodeGen support, are achieved for free by this
representation.

UserDefinedLiterals can never be dependent, so no custom instantiation
behavior is required. They are mangled as if they were direct calls to the
underlying literal operator. This matches g++'s apparent behavior (but not its
actual mangling, which is broken for literal-operator-ids).

User-defined *string* literals are now fully-operational, but the semantic
analysis is quite hacky and needs more work. No other forms of user-defined
literal are created yet, but the AST support for them is present.

This patch committed after midnight because we had already hit the quota for
new kinds of literal yesterday.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152211 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
bef35c91b594f66216f4aab303b71a6c5ab7abcf 07-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Mark a PCH file with a flag to indicate if the serialized AST had
compiler errors or not.

-Control whether ASTReader should reject such a PCH by a boolean flag at ASTReader's creation time.
By default, such a PCH file will be rejected with an error when trying to load it.

[libclang] Allow clang_saveTranslationUnit to create a PCH file even if compiler errors
occurred.
-Have libclang API calls accept a PCH that had compiler errors.

The general idea is that we want libclang to stay functional even if a PCH had a compiler error.
rdar://10976363.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152192 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexing.cpp
30660a898545416f0fea2d717f16f75640001e38 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Add new code migrator support for migrating existing Objective-C code to use
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax.

This introduces a new library, libEdit, which provides a new way to support
migration of code that improves on the original ARC migrator. We now believe
that most of its functionality can be refactored into the existing libraries,
and thus this new library may shortly disappear.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152141 91177308-0d34-0410-b5e6-96231b3b80d8
RCMigrate.cpp
MakeLists.txt
akefile
ibclang.exports
b3f7542a950ac0d585a7783e825cfe670e05c553 06-Mar-2012 Ted Kremenek <kremenek@apple.com> And libclang cursor/indexing support for new Objective-C NSArray/NSDictionary/NSNumber literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152138 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
ndexBody.cpp
b2c60b04a597cc5ba4154837cf8e0a155a376fd7 01-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move llvm/ADT/SaveAndRestore.h -> llvm/Support/SaveAndRestore.h.

Needs llvm update.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151829 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
fc399c7719e5643791564d45087fd651469aad5c 29-Feb-2012 Daniel Dunbar <daniel@zuster.org> Remove stray semi-colon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151682 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
f911242f43ae1b0a85c323631fe817df95c9cbe9 28-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [AST] When we @synthesize a property with a user-defined ivar name,
make sure to record the source location of the ivar name.
[libclang] When indexing @synthesized objc methods, report the @implementation
as the lexical container.

Fixes rdar://10905472

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151635 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexingContext.cpp
ndexingContext.h
792db266f3d2f12a7a16bf37d90074f54bca1e6f 28-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When indexing an objc property, also provide information about
the getter/setter objc method entities that the property is associated with.

rdar://10244558

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151634 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
ibclang.exports
d7c15a64ba8ebdca0dd48dd1d2f233107d34494e 28-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [AST] Associate the getter/setter methods to a property of a objc class extension.
[libclang] Index the getter/setter methods of a property of a objc class extension.

Fixes rdar://10907597

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151633 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
d45d361f2ce5c37824052357e2218e8a5509eba5 27-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move "clang/Analysis/Support/SaveAndRestore.h" to "llvm/ADT/SaveAndRestore.h"
to make it more widely available.

Depends on llvm commit r151564

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151566 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e1d4330adaaa7faf093e725c9c993207eb2d778a 25-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't record nested macro expansions in the preprocessing record,
it can only bring pain when dealing with preprocessor abuse (see: boost).

rdar://10898986

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151427 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexing.cpp
4ca8ac2e61c37ddadf37024af86f3e1019af8532 24-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement a new type trait __is_trivially_constructible(T, Args...)
that provides the behavior of the C++11 library trait
std::is_trivially_constructible<T, Args...>, which can't be
implemented purely as a library.

Since __is_trivially_constructible can have zero or more arguments, I
needed to add Yet Another Type Trait Expression Class, this one
handling arbitrary arguments. The next step will be to migrate
UnaryTypeTrait and BinaryTypeTrait over to this new, more general
TypeTrait class.

Fixes the Clang side of <rdar://problem/10895483> / PR12038.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151352 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
e0d92a43073d9a8eec220042651ccad9b0f71cc5 22-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Index the field references of a designated initializer, rdar://10906206

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151118 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
c93dc7889644293e318e19d82830ea2acc45b678 20-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import IntrusiveRefCntPtr<> into clang namespace

The class name is long enough without the llvm:: added.
Also bring in RefCountedBase and RefCountedBaseVPTR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150958 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
ndexing.cpp
ndexingContext.h
2aed8b88613863f3c439cdfb205bdf8b608fb205 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.""

This reintroduces commit r150682 with a fix for the Bullet benchmark crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150685 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
1548d14f4092a817f7d90ad3e7a65266dc85fbc5 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself."
It leads to a compiler crash in the Bullet benchmark.

This reverts commit r12014.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150684 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
5f688f4b15d02aa7ad159c46b1f78fe59d412f12 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.

Holding the constructor directly makes no sense when list-initialized arrays come into play. The constructor is now held in a CXXConstructExpr, if construction is what is done. The new design can also distinguish properly between list-initialization and direct-initialization, as well as implicit default-initialization constructors and explicit value-initialization constructors. Finally, doing it this way removes redundance from the AST because CXXNewExpr doesn't try to handle both the allocation and the initialization responsibilities.

This breaks the static analysis of new expressions. I've filed PR12014 to track this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150682 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f8490eeb966103516da4e3ecb05e1a36b3e6e3ec 16-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Do index statements inside a type source info. rdar://10872758

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150647 91177308-0d34-0410-b5e6-96231b3b80d8
ndexTypeSourceInfo.cpp
5677eafb01b64ca83f671f3aee9de103a04c2c76 15-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix typo in r150549.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150555 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
011d8b93b7cfa8492b8a9c909a850d6577e08dca 15-Feb-2012 Douglas Gregor <dgregor@apple.com> Implement indexing support for lambdas in libclang (both kinds), as
well as improving the RecursiveASTVisitor's walk of lambda
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150549 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
XType.cpp
ursorVisitor.h
ndexBody.cpp
ndexingContext.cpp
58d2dbea680a75de266c5eff77cc15c323cfd48a 14-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing: only index implicit template instantiations via an opt-in indexing option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150517 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
ndexDecl.cpp
ndexTypeSourceInfo.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
7b8290f7e53e1b9f5521dd284e78ad488a12f0d0 14-Feb-2012 Ted Kremenek <kremenek@apple.com> Fix use-after-free introduced by me being an idiot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150461 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
7473b1c6e7ba2654d4a0d469198f0e01b485b51a 14-Feb-2012 Ted Kremenek <kremenek@apple.com> Implement new DiagnosticsRenderer that packages notes retrieved by clang_getDiagnosticSetFromTU() as
child diagnostics of primary diagnostics. By using the DiagnosticRenderer, these Diagnostics now
match with those generated for serialized diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150456 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
IndexDiagnostic.h
36d592718ff342f762e32cbde73d1113f88cb275 13-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> drop more llvm:: prefixes on SmallString<>

More cleanup after r149799.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150380 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexUSRs.cpp
XString.h
ndexingContext.cpp
1e4c01b79273b9cd4e9e9ecfd3422df3900b8356 13-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> drop more llvm:: prefixes on OwningPtr<>

More cleanup after r149798.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150379 91177308-0d34-0410-b5e6-96231b3b80d8
RCMigrate.cpp
Index.cpp
IndexUSRs.cpp
XLoadedDiagnostic.cpp
ndexing.cpp
b70a3bad9c767b3cdeadf363d4dbe8ad25a26588 11-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] For a reference of an implicit template instantiation just give
a reference for the instantiation decl. Also test that its location is correct
after previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150291 91177308-0d34-0410-b5e6-96231b3b80d8
ndexTypeSourceInfo.cpp
911d717307e0d90980699cf75204c22e4462b45d 10-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: fully index using decls and directives.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150268 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
6d968363877388f0a0268711d59367907b465ae1 10-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Fully index implict template instantiations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150267 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexTypeSourceInfo.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
ad133ea9ed91904c649f7f5a1e2f784b3c3c7972 10-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Encode the template specialization parameters of a function
specialization in its USR string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150264 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
7b318d16992cb68567c3ee217b86cac2ed11d5d8 08-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing: When suppressing references, suppress references
of bases in C++ classes. rdar://10768707

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150048 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
46e75477bd24a703da11d354587c9bea69d6888f 08-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] For CXXOperatorCallExprs, give a valid source location to the DeclRefExpr
that is referencing the member function, so we can index the referenced function.

Fixes rdar://10762375&10324915 & http://llvm.org/PR11192

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150033 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
d08900848307fdaea19d52249bdced94eefdb9bb 07-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Do not index implicit C++ member functions. rdar://10769813

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150007 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexingContext.cpp
ndexingContext.h
d7a3e2c5f61cd4893f95b69a424fe4def3aa0f69 07-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line.

This seems to negatively affect compile time onsome ObjC tests
(which use a lot of partial diagnostics I assume). I have to come
up with a way to keep them inline without including Diagnostic.h
everywhere. Now adding a new diagnostic requires a full rebuild
of e.g. the static analyzer which doesn't even use those diagnostics.

This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99.
This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789.
This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7.
This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f.
This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.h
a59d20b135bfde058a5a69045bab5ec4e2553f74 07-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Print NamedDecls directly to a raw_ostream where possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149982 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
01d08018b7cf5ce1601707cfd7a84d22015fc04e 07-Feb-2012 Douglas Gregor <dgregor@apple.com> Introduce basic ASTs for lambda expressions. This covers:
- Capturing variables by-reference and by-copy within a lambda
- The representation of lambda captures
- The creation of the non-static data members in the lambda class
that store the captured variables
- The initialization of the non-static data members from the
captured variables
- Pretty-printing lambda expressions

There are a number of FIXMEs, both explicit and implied, including:
- Creating a field for a capture of 'this'
- Improved diagnostics for initialization failures when capturing
variables by copy
- Dealing with temporaries created during said initialization
- Template instantiation
- AST (de-)serialization
- Binding and returning the lambda expression; turning it into a
proper temporary
- Lots and lots of semantic constraints
- Parameter pack captures


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149977 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
55d23c925b058be29b792008ddb7d68f6c4fa9a0 06-Feb-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Added location for template keyword in TemplateSpecializationTypeLoc. In the process removed some naming ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149870 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
00bd44d5677783527d7517c1ffe45e4d75a0f56f 04-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h.

Fix all the files that depended on transitive includes of Diagnostic.h.
With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149781 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.h
1836db0f2c7527ac11af0044ab89150f9aaf22e1 04-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Stick to the silly notion that a forward class/protocol
declaration is a reference. rdar://10749990

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149733 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e4b92761b43ced611c417ae478568610f1ad7b1e 27-Jan-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Added source location for the template keyword in AST template-id expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149127 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c15707d8da08df2eb22f6ed047743fa3f7c9831b 24-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] In clang::getCursorKindForDecl() don't return "UnexposedDecl"
for forward references of classes and protocols, this breaks libclang API usage.

rdar://10747438.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148861 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
98c16b8b4fe7bb26b17a479d6872e390816e57d4 24-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When calling clang_getCursorReferenced on a class or protocol
forward reference, do give an interface or protocol cursor back, don't give
an 'UnexposedDecl' one.

rdar://10743193

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148848 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
05b7846d871fb0d3229e4b30fa5935bc858f3547 23-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] For:
@implementation I(cat)
suppress subsequent references to 'I'.

rdar://10568103

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148730 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
277b15684582193d26f6c15b40e90a6e45299857 23-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce CXXRecordDecl::isCLike() that is true if the class is C-like,
without C++-specific features.

Use it to set the language to C++ when indexing non-C-like structs.
rdar://10732579

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148708 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
145f7b2093a0050621141acd089e09edf6118a09 23-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Index C++ template specializations, rdar://10732708

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148707 91177308-0d34-0410-b5e6-96231b3b80d8
ndexTypeSourceInfo.cpp
55fa1d9b7ecb042d810b2f0f68d70492dc39e46f 23-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Index namespaces in C++ qualified lookup of members, rdar://10732798

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148706 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
8818d4570b916762513e2b5ec4ca7178b1e736a9 23-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Index C++ constructor initializers, rdar://10732164

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148705 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
3026348bd4c13a0f83b59839f64065e0fcbea253 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
1f6b2b5c82b2d2d3935b0db76352a04e9877b73f 20-Jan-2012 Douglas Gregor <dgregor@apple.com> Extract the (InputKind, std::string) pair used to describe inputs to
the front end into its own class, FrontendInputFile, to make it easier
to introduce new per-input data. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148546 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
0b28928a715c423b3471c539f1d5499b405c0ec9 20-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix crash when indexing attributes, rdar://10702250.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148524 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
7fe90f3bfa6bd7f779ecfd4ba201a296a3a1c8cb 17-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make sure Preprocessor is set in ASTUnit during indexing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148319 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
7530c034c0c71a64c5a9173206d9742ae847af8b 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148292 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCXX.cpp
IndexCodeCompletion.cpp
IndexUSRs.cpp
XLoadedDiagnostic.cpp
XStoredDiagnostic.cpp
561d3abc881033776ece385a01a510e1cbc1fa92 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches over enums.

This allows -Wswitch-enum to find switches that need updating when these enums are modified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
5e192a7d60e776fa65e633cd9c2a0d59df132f23 17-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make clang_getCursorCompletionString not depend on the ASTUnit having
a Sema.

This allows it to work when Sema is not available, like when loading AST files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148279 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ef96ee0be5f100789f451641542a69cd719144d2 14-Jan-2012 Douglas Gregor <dgregor@apple.com> De-virtualize getPreviousDecl() and getMostRecentDecl() when we know
we have a redeclarable type, and only use the new virtual versions
(getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have
that type information. This keeps us from penalizing users with strict
type information (and is the moral equivalent of a "final" method).

Plus, settle on the names getPreviousDecl() and getMostRecentDecl()
throughout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148187 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
ndexingContext.h
db4d7a5f47d13bf346260ac35eaafd2c92e5606e 14-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] If CXIndexOpt_IndexFunctionLocalSymbols is enabled, also
index parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148169 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexingContext.cpp
22490747c123a78feec089539f30426084d348cf 14-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add CXIndexOpt_IndexFunctionLocalSymbols indexing option to indicate
that one wants indexing callbacks for function-local symbols as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148160 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
ndexingContext.cpp
ndexingContext.h
b29d3e73aa23328be00df5d721ef751f4a609c29 12-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Revert 148045 to fix the bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148049 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
9f141c4be14825e715ffc3c97550e9e6aab27f5e 12-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Add a SONAME to the libclang library.
Patch by Sylvestre Ledru.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148045 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
746f5bcbfde5b25269169c63c66492311673b67d 12-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add IsImplicit field in ObjCMessageExpr that is true when the message
was constructed, e.g. for a property access.

This allows the selector identifier locations machinery for ObjCMessageExpr
to function correctly, in that there are not real locations to handle/report for
such a message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148013 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
c9d3c7edb513e9b8a6ab65b04133653e71d7a72b 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate the ForwardDecl/InitiallyForwardDecl bits from ObjCProtocolDecl. They are no longer needed

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147419 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.h
bd9482d859a74bf2c45ef8b8aedec61c0e1c8374 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
ursorVisitor.h
ndexDecl.cpp
ndexingContext.cpp
ndexingContext.h
5e2a1ff9f28d2eab256d2553e76a9c9d54693875 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Move the data that corresponds to the definition of a protocol into a
separately-allocated DefinitionData structure. Introduce various
functions that will help with the separation of declarations from
definitions (isThisDeclarationADefinition(), hasDefinition(),
getDefinition()).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147408 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexDecl.cpp
ndexingContext.cpp
375bb1413c041055262c8a416f20d10474a5eda9 27-Dec-2011 Douglas Gregor <dgregor@apple.com> Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
covers both declarations (@class) and definitions (@interface) of an
Objective-C class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
ursorVisitor.h
ndexDecl.cpp
ndexingContext.cpp
ndexingContext.h
1770e0dadcab966990cca4d7516253c886fd907c 22-Dec-2011 Dylan Noblesmith <nobled@dreamwidth.org> remove unneeded config.h includes



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147195 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.cpp
acca41167ce78bb032906f6b1d2ced62efbe059a 21-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] In visitPreprocessedEntitiesInRange we are interested in a file region
so translate the range to file locations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147058 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
7723fec9b45b7258c0eddf4cbfd0d335348f5edc 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Keep track of all declarations of an Objective-C class (both forward
declarations and definitions) as ObjCInterfaceDecls within the same
redeclaration chain. This new representation matches what we do for
C/C++ variables/functions/classes/templates/etc., and makes it
possible to answer the query "where are all of the declarations of
this class?"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146679 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexDecl.cpp
ndexingContext.h
db7a800e0b76036d0faa7123f2e05e45ee3294e5 15-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Give up on using write(); hopefully unbreaks mingw build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146648 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
53ba95612c023ecbcf142b9aaa90e4082fc1b480 15-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r146646 that was a mistake, and make the intended change in the right file.

Log:
[libclang] Try to unbreak mingw build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146647 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
2e5c15be82f362611c5928ce853d0685ff98c766 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Move the definition-specific data of ObjCInterfaceDecl into a
separately-allocated DefinitionData structure, which we manage the
same way as CXXRecordDecl::DefinitionData. This prepares the way for
making ObjCInterfaceDecls redeclarable, to more accurately model
forward declarations of Objective-C classes and eliminate the mutation
of ObjCInterfaceDecl that causes us serious trouble in the AST reader.

Note that ObjCInterfaceDecl's accessors are fairly robust against
being applied to forward declarations, because Clang (and Sema in
particular) doesn't perform RequireCompleteType/hasDefinition() checks
everywhere it has to. Each of these overly-robust cases is marked with
a FIXME, which we can tackle over time.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146644 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
fa39f5b76bafdf536c5e305f821eb1b7f11079bd 15-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Install a fatal error handler that will call abort() instead of exit()
when there is a report_fatal_error() call.

rdar://10507984

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146641 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
643d3ce93c501d19353f2fa578fee3e97f1d1b4b 15-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: provide an attribute list inside CXIdxEntityInfo
so that we can access the attributes of an entity for a reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146616 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
ndexingContext.h
90fd67af4aeec7d1661986dd25eabf924e11a76c 15-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Suppress indexing references for occurrences of the interface
in a superclass and the protocols in a protocol list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146615 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
af764723bf94f8cc7596e2b2f2a97766d188ed98 14-Dec-2011 Douglas Gregor <dgregor@apple.com> Eliminate the vistigial ObjCClassDecl::ObjCClassRef, and inline its
members into ObjCClassDecl, saving ourselves one pointer per forward
declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146564 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexingContext.cpp
c10a4c8baff3164bee9b7fc293679a5a5a90eb74 13-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Provide the protocols list for objc categories as well.

rdar://10573361

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146498 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
e422e45a6a89d450b8eca10f671b49874e87617a 13-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Fix indexing of missed references.

rdar://10567864&10567916

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146497 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
ndexDecl.cpp
ndexTypeSourceInfo.cpp
ndexingContext.h
c2be04eaec94e20fc825fb98b713112d9d82562f 13-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Fix suppressing of references in macros and suppress
@class forward references.

rdar://10568080&10568103&10568119

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146496 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
16ed0e6fda74800595cb98d11969fc4afcc00bac 10-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add defensive checks to make sure we don't try to dereference
a null pointer after getCursorDecl() is called. rdar://10298421.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146312 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexHigh.cpp
IndexUSRs.cpp
XCursor.cpp
XType.cpp
0373fcc3e5b205cc26656c70d7dff737b0e08345 09-Dec-2011 Ted Kremenek <kremenek@apple.com> Add clang_getDiagnosticSetFromTU() to libclang. Fixes <rdar://problem/10553081>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146287 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
ibclang.exports
52a9b5aa5d994a22f309c62a9e0bbc070ee5eced 09-Dec-2011 Ted Kremenek <kremenek@apple.com> Sort exports list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146286 91177308-0d34-0410-b5e6-96231b3b80d8
ibclang.exports
c6994005dc9f677c831b8e90bdab483cc2197c29 09-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Save category name loc in ObjCCategoryImplDecl, patch by Jason Haslam!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146213 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
4451746d8f658b51eaf15dd24664a488457063a9 09-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make sure we don't try to handle a CXCursor_NoDeclFound
passed to clang_findReferencesInFile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146211 91177308-0d34-0410-b5e6-96231b3b80d8
IndexHigh.cpp
XCursor.cpp
e368a641a03617983dabb1e092d880e1089f576a 08-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When doing clang_findReferencesInFile, make sure we don't crash
if we come up against a null Decl.

No test case unfortunately. rdar://10457799.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146127 91177308-0d34-0410-b5e6-96231b3b80d8
IndexHigh.cpp
bb7f5420bdd670969a02d0db33cac51633f5651b 08-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Remove IndexingContext's getScopedContext(), it's not useful
now that client containers can be set via function calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146117 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
ndexingContext.h
b1febb646bf7a2f319ad894c9833968c52d21711 07-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: provide both the semantic and the lexical container.

They are generally the same except in C++ cases like out-of-line member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146069 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
ndexingContext.h
b526a871af40b84d9878eded54a181bf4003b376 07-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix indexing of C++ bases in a C++ class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146068 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
ndexingContext.h
838d3c23204f52ae27a9f5e9a254238a7ac5d41b 07-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce CXIdxEntityLanguage that indicates the language
of an indexed entity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146067 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
68478b0cc1ff03c0d13ceca6800c5becf08791e7 07-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Index C++ namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146019 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexingContext.cpp
ndexingContext.h
13eee196469596a107762606e5cea6511368a54c 07-Dec-2011 Ted Kremenek <kremenek@apple.com> Tweak serialized diagnostics to support errors with no categories. Fixes <rdar://problem/10538300>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146011 91177308-0d34-0410-b5e6-96231b3b80d8
XLoadedDiagnostic.cpp
84b796492de8a708150dd3f86ae191041d42eef9 06-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] API enhancements by Joe Groff!

- Exposes a CXType_Vector type kind for vector types.
- Adds generalized versions of the clang_getArrayElementType and clang_getArraySize functions, named clang_getElementType and clang_getNumElements, which work on array, vector, or complex types.
- Adds additional functions for querying function types. clang_isFunctionTypeVariadic returns true if a function type is variadic. clang_getFunctionCallingConv returns an enumeration value indicating the calling convention of the function type. clang_getNumArgTypes returns the number of static argument types, and clang_getArgType gets the type of an argument.
- Adds a clang_getTypedefDeclUnderlyingType function to get the underlying type from a TypedefDecl cursor.
- Adds a clang_getEnumDeclIntegerType function to get the integer type from an EnumDecl cursor.
- Adds clang_getEnumConstantDeclValue and clang_getEnumConstantDeclUnsignedValue functions to get the value of an EnumConstantDecl as a signed or unsigned long long, respectively.
- Exposes a CXCursor_AsmLabelAttr cursor kind for __asm__("label") attributes.
- Alters clang_getCursorSpelling to return the label value for AsmLabelAttr-kind cursors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145972 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XType.cpp
ibclang.exports
da5f2d2360ace0ea32e4f3194906be4899a76c7d 05-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When indexing a field in a C++ class, return an entity
of kind CXIdxEntity_CXXInstanceVariable. rdar://10522503.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145859 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
d977e6b0eb4c9b57b0aad6e9e0be39cc67b3a8c7 03-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix infinite loop when doing visitation of an OpaqueValueExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145751 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
dcbb2fb8710459fdc8073b76a4ef73fbbcbeac9f 03-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Allow indexing/get-cursor/etc. for the exception variable in a C++ catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145750 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
15de72cf580840c61e5704c2f8a2b56f9d0638e1 03-Dec-2011 Douglas Gregor <dgregor@apple.com> Introduce a module import declaration, so that we properly represent, e.g.,

__import_module__ std.vector;

in the AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145725 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
996e6e564af7483e2d5e0b70df5fdb9f79ec4b5a 01-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Create a diagnostic set to pass at the end of indexing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145557 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
IndexDiagnostic.h
ndexing.cpp
ndexingContext.h
5c2a1f741e133fcad4782b855a18d3b220243b11 30-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Do the ConcurrencyCheck at the beginning of clang_findReferencesInFile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145455 91177308-0d34-0410-b5e6-96231b3b80d8
IndexHigh.cpp
3267e11b4bf4eb844cabf57e58ae9de8f37b5c9a 29-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Preserve constness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145397 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
85224ae68ab9c9df5dd8410a1b7188b4d64f889e 29-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Silence GCC warnings, RefCountedBase is meant to be default-initialized here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145396 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
7383550585795db4bd5ff635b650f01d374e91aa 29-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix leak in clang_indexSourceFile_Impl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145393 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
b49e728a4d1a84b72f3aebf60ff494684f9cb004 29-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make clang_findReferencesInFile also work on macros (find all expansions/definition
of a macro in a file).

As a bonus, also make searching for declarations more efficient by ignoring
preprocessing entities when we know that we are looking for a declaration.

Fixes rdar://10427411.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145369 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexHigh.cpp
ursorVisitor.h
952538d48d75b2c01d98002a46691638f9f9a4ac 29-Nov-2011 Ted Kremenek <kremenek@apple.com> Fix serialized diagnostics to handle FixIts that only remove text. Fixes <rdar://problem/10473903>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145339 91177308-0d34-0410-b5e6-96231b3b80d8
XLoadedDiagnostic.cpp
ed8bef44c0545fd55a78715606f8d733f6498b21 28-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Protect against the declaration's SourceRange being invalid
before passing to RangeCompare.

Though no idea how this can occur with the decls returned from
findFileRegionDecls().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145301 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6f3ce979a7748fd117e6473d6272b16d643b6262 28-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: If the client requested to get a CXTranslationUnit after
indexing, honor all the TU options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145229 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
991bf49f68e8caeb900dd9738712b861073363d9 28-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Capture diagnostics during indexing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145228 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
c14a03dffff69b5e1c55cc118fc52d8fd9f3a28d 23-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix operations (token annotation, getting cursor, etc.) with a file region
inside an objc container that "contains" other file-level declarations.

When getting the array of file-level declarations that overlap with a file region,
we failed to report that the region overlaps with an objc container, if
the container had other file-level declarations declared lexically inside it.

Fix this by marking such declarations as "isTopLevelDeclInObjCContainer" in the AST
and handling them appropriately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145109 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
37f40572c4c78a8c57a7b45266f8b86db172a7c1 23-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Fix issues, mostly C++ related.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145107 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexingContext.cpp
ndexingContext.h
2957e6f8c4c2e58a4b9cb639949fea801970fe36 22-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Support C++ symbols.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145058 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
XCursor.h
ndexBody.cpp
ndexDecl.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
ibclang.exports
88c2596edc8eb475e20f6033de1ea01669695a0c 18-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continue
parsing or false to abort parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144943 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
b395c63b473bf1b3783bff371a993332e8c4c5e3 18-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API:

-For indexDeclaration, also pass the declaration attributes as an array of cursors.
-Rename CXIndexOpt_OneRefPerFile -> CXIndexOpt_SuppressRedundantRefs, and only pass
a reference if a declaration/definition does not exist in the file.
-Other fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144942 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
XCursor.h
ndexBody.cpp
ndexDecl.cpp
ndexTypeSourceInfo.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
ibclang.exports
144b6c0c50b5523609cbac523f168b9e3cb01175 18-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: make sure we don't pass declarations/references without USR or location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144941 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
d3b74d9ca4f239a7a90ad193378c494306c57352 18-Nov-2011 Ted Kremenek <kremenek@apple.com> Make 'LangOptions' in CompilerInvocation a heap-allocated, reference counted object. I discovered that llvm::RefCountedBase<T> has
a bug where the reference count is copied in the copy constructor, which means that there were cases when the CompilerInvocation
objects created by ASTUnit were actually leaked. When I fixed that bug locally, it showed that a whole bunch of code assumed
that the LangOptions object that was part of CompilerInvocation was still alive. By making it heap-allocated and reference counted,
we can keep it around after the CompilerInvocation object goes away.

As part of this change, change CompilerInvocation:getLangOptions() to return a pointer, acting as another clue that this
object may outlive the CompilerInvocation object.

This commit doesn't fix the CompilerInvocation leak itself. That will come when I commit the fix to llvm::RefCountedBase<T> to
mainline LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144930 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
c88e58c0db75e7b5f9f14da0a255a0be01acf877 16-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add a comment in lazyCreateDiags to explain why the check and reset of
diagnostic set is necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144793 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
03ee2dd9fc5d5fc62b5eb0fb88ee56e553f8cda7 16-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make clang_annotateTokens use "file-targeted" deserialization and avoid
unnecessary deserializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144792 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ursorVisitor.h
e2079cf54ded1eda9e35d215aef6628373368276 16-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make clang_findReferencesInFile use "file-targeted" deserialization and avoid
unnecessary deserializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144791 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexHigh.cpp
3e340a67f4522a2f633a719cb7f3389fe2474374 16-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: fill the objc category info for a category implementation and
do not crash if no client container is registered for a declaration context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144765 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
d6c8209fd1567db9c2721f441b50cb23cdf8d835 16-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: make sure we do not try to index local declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144764 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
ndexTypeSourceInfo.cpp
ndexingContext.cpp
c6b4a5099588fd21b49c80f730a596a64b2766c6 16-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: if the CXIndexOpt_OneRefPerFile option is set, only report one reference
per file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144763 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
ndexingContext.h
220b45c95edc0ea86cd157426e0edc7f6a288620 16-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] In lazyCreateDiags, recreate the diagnostic set if the number of diagnostics
in the ASTUnit changed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144762 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
e7bbab91f5cc899104d0a1dee6059d8413c70eeb 15-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Pass an implicit ObjCInterfaceDecl (@implementation without @interface)
in a separate indexing callback than its implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144625 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexingContext.cpp
21ee5707e6e59d982d2f2ae28e079c7ff46dc519 15-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce a new function to apply the indexing callbacks on an existing
CXTranslationUnit, mainly to be used for indexing a PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144623 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
ibclang.exports
2407712d90cb1cce3bb2713d342c4df8222a2a47 15-Nov-2011 Ted Kremenek <kremenek@apple.com> Fix potential memory leak for clients of clang_getOverriddenCursors(). If the number of overriden cursors is 0, do not allocate an array of CXCursors. This fixes a memory leak in c-index-test, and clients who use this API in a similar way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144595 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c71d55469e7d5f7b376a30620617a175a9442da9 14-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Slight changes to the indexing API and bigger internal changes for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144577 91177308-0d34-0410-b5e6-96231b3b80d8
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
ibclang.exports
6ec43adc39006a7fce94188956d0239bd54c0363 12-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Further simplify the indexing API.

That stuff can be added later on if we need them.
Also add some const goodness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144446 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexTypeSourceInfo.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
ibclang.exports
e97ac9e684aecb5fc3fb9f86da09b8bb9dc31ff4 11-Nov-2011 Ted Kremenek <kremenek@apple.com> Tweak CXLoadedDiagnosticSetImpl::makeString() to include an extra null character, and change the creation of the FixIT's string to again just rely on this string (instead of duplicating it when calling createCXString).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144389 91177308-0d34-0410-b5e6-96231b3b80d8
XLoadedDiagnostic.cpp
40f6975af82dfe35bb25c2423cc095061bc51f3b 11-Nov-2011 NAKAMURA Takumi <geek4civic@gmail.com> libclang/CXLoadedDiagnostic.cpp: Work around not to miss the string terminator on fixit.

FixIts might be exposed as C string via clang_getCString(), though the zero terminator is not allocated in CXLoadedDiagnosticSetImpl::makeString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144379 91177308-0d34-0410-b5e6-96231b3b80d8
XLoadedDiagnostic.cpp
dd93c596cd95e1b96031ff47efe0a5095ff3d7f1 11-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Simplify the indexing API.

Cut down the number of callbacks to more generic ones. Clients can check
an enum to find out what kind of declaration it is and they can call functions
to get more specific information than the generic provided info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144343 91177308-0d34-0410-b5e6-96231b3b80d8
ndexDecl.cpp
ndexTypeSourceInfo.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
ibclang.exports
153221717e39ce41323d5bc6b8b8bf130923c1bd 10-Nov-2011 Ted Kremenek <kremenek@apple.com> serialized diagnostics: implement full deserialization of clang diagnostics via the libclang API.

I've tested it on simple cases and it works. Test cases to follow as well as a few tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144269 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexDiagnostic.cpp
IndexDiagnostic.h
MakeLists.txt
XLoadedDiagnostic.cpp
XLoadedDiagnostic.h
XSourceLocation.cpp
XStoredDiagnostic.cpp
XTranslationUnit.h
ibclang.exports
4c11772bb9e1bf7fb0cdf8fd3566314ef91baf8c 08-Nov-2011 Ted Kremenek <kremenek@apple.com> Sort contents of exports file. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144116 91177308-0d34-0410-b5e6-96231b3b80d8
ibclang.exports
4b9c2d235fb9449e249d74f48ecfec601650de93 06-Nov-2011 John McCall <rjmccall@apple.com> Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.

Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.

I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
e397bf1bd90cfceb0166606ebcd2580b7671a828 03-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Move CursorVisitor to its own header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143639 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ursorVisitor.h
ndex_Internal.h
ba98617b994864b7554ff75445983ad02a962f45 03-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Use CursorVisitor::Visit instead of invoking the visitor directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143637 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
b4efaa0a14dd2382aa028c03283b5a7f5345e24d 03-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add missing return in clang_getExpansionLocation that resulted in that function
always returning a null file/line/column.

Also add at least one use of clang_getExpansionLocation inside c-index-test that would have
made the tests to catch that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143606 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
dfb332d0081c6641d1dbae6a2aeff757c99cc740 03-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add infrastructure to be able to only deserialize decls in a file region and
use it for clang_getCursor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143605 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
d22718ca68ded15e46684ded719262154308e478 01-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Add missing export. Spotted by Leandro Melo.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143508 91177308-0d34-0410-b5e6-96231b3b80d8
ibclang.exports
87ec9c257c99b4136af6c7f5be5a2d486906ba84 01-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] For a class extension, give it a unique USR but for any property or ivar
it contains give it a USR based on its semantic context, which is the interface.

This follows what we already did for objc methods. rdar://10371669

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143464 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
76852c218a207ef43583515cb835b6e855353a0f 01-Nov-2011 Douglas Gregor <dgregor@apple.com> Rework the AST for the initializer of a delegating constructor, so
that it retains source location information for the type. Aside from
general goodness (being able to walk the types described in that
information), we now have a proper representation for dependent
delegating constructors. Fixes PR10457 (for real).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143410 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
51a7d5d7f6bf60c562d825bc271fd4cf696b33b5 31-Oct-2011 Ted Kremenek <kremenek@apple.com> [libclang] Tweak internals of CXSourceLocation to allow an alternate implementation if the lowest bit of ptr_data[0] is not 0. This
is prep for work on serialized diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143373 91177308-0d34-0410-b5e6-96231b3b80d8
XSourceLocation.cpp
3ddef060a94434e6b71b58348e730c4464efbc48 31-Oct-2011 Ted Kremenek <kremenek@apple.com> [libclang] Move implementation of functions for manipulation CXSourceLocations and CXSourceRanges into a separate file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143370 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
MakeLists.txt
XSourceLocation.cpp
1edabbc32a07654d9b9fe44f50533ff146abd03e 31-Oct-2011 Ted Kremenek <kremenek@apple.com> [libclang] Add CXDiagnosticImpl to represent a super class for the implementation backing a CXDiagnostic. This allows CXStoredDiagnostic
to be just one possible implementation of a CXDiagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143368 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
IndexDiagnostic.h
MakeLists.txt
XStoredDiagnostic.cpp
e70984629f3accf7e1e7187d06bd653dc8e315f2 31-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Rename VisitIncludedPreprocessingEntries -> VisitIncludedEntities

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143337 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e7de9b4a1f4a15620ab15bc8159018df7d54080a 29-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use LIBCLANG_NOTHREADS instead of CINDEXTEST_NOTHREADS inside libclang,
so the c-index-test one can be enabled without affecting libclang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143288 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ndexing.cpp
8c4b47eff0848dfd80854d70cb84b23b185828d4 29-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Check for environment variable CINDEXTEST_NOTHREADS in clang_reparseTranslationUnit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143242 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
854625f7347e4418803fe4aa9131928408e4dc53 28-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Use const_cast to make it obvious that it's just removing constness (and silence warnings).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143193 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
ndexingContext.cpp
ba0513de93d2fab6db5ab30b6927209fcc883078 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Implement support for dependent Microsoft __if_exists/__if_not_exists
statements. As noted in the documentation for the AST node, the
semantics of __if_exists/__if_not_exists are somewhat different from
the way Visual C++ implements them, because our parsed-template
representation can't accommodate VC++ semantics without serious
contortions. Hopefully this implementation is "good enough".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142901 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
f226ff9fe8c8db6c5b74a61ce649eda1491c3502 25-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] When visiting preprocessed entities, make it possible to avoid deserializing
preprocessed entities that are #included in the range that we are interested.

This is useful when we are interested in preprocessed entities of a specific file, e.g
when we are annotating tokens. There is also an optimization where we cache the last
result of PreprocessingRecord::getPreprocessedEntitiesInRange and we re-use it if
there is a call with the same range as before.

rdar://10313365

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142887 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
2dde35bc626153492f5f58202506c88a27fbff5b 19-Oct-2011 John McCall <rjmccall@apple.com> More metaprogramming with builtin types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142433 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
c705d2520a51de1dc38d36efada8e9bc2d8b0d1f 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make sure we do a correct invalid check in clang_getExpansionLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142430 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e0a22d06888c13989b3f72db319f1d498bf69153 18-Oct-2011 John McCall <rjmccall@apple.com> Macro metaprogramming for builtin types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142420 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
46d1ea40d77aa66527cc48183750710b55d74914 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Since an objc extension semantically continues the interface of the class
don't use unique USRs for them, otherwise we fail to associate @implementation methods
with the methods in extensions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142361 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
aca19be8731fc31cff68702de0dc7f30ce908979 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Index implicit property references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142355 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
ndexingContext.cpp
ndexingContext.h
9fbbf14af5582db9f2add3f66bf3da05fe8994a6 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Index method references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142353 91177308-0d34-0410-b5e6-96231b3b80d8
ndexBody.cpp
3de2fc4e42f8d58f061af3ac8bb7d57e8d86a23b 18-Oct-2011 Matt Beaumont-Gay <matthewbg@google.com> Silence a -Wc++0x-narrowing warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142292 91177308-0d34-0410-b5e6-96231b3b80d8
ndexingContext.cpp
4e7064fa7e344e8f87a5b8457e96dfdd252c4a9e 17-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce a new high level API for indexing clients that assumes
more of the work involved in indexing a translation unit and simplifies client
implementations.

Only C/ObjC for now, C++ (and comments) to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142233 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
MakeLists.txt
XCursor.cpp
XCursor.h
XTranslationUnit.h
ndexBody.cpp
ndexDecl.cpp
ndexTypeSourceInfo.cpp
ndexing.cpp
ndexingContext.cpp
ndexingContext.h
ibclang.exports
0ddaeb9b031070ec64afe92d9892875ac44df427 17-Oct-2011 John McCall <rjmccall@apple.com> Add a new placeholder type to represent "unbridged"
casts in ARC.

No semantic analysis yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142208 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
aa4a99b4a62615db243f7a5c433169f2fc704420 15-Oct-2011 Anton Korobeynikov <asl@math.spbu.ru> Provide half floating point support as a storage only type.
Lack of half FP was a regression compared to llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142016 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
b8989f27f116ff2400e92a52c067a69846119eb5 14-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer.

Passing a pointer was a bad idea as it collides with the overload for void*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
6164ea1d75385b6fc3c19e5ab9bb686298436a5a 14-Oct-2011 Erik Verbruggen <erikjv@me.com> Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations to
retrieve annotations from completion string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141953 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.exports
5f1c822def3efffe1d8f7299fbbbc3b1cdd4833d 13-Oct-2011 Erik Verbruggen <erikjv@me.com> Allow for annotate attributes after access specifiers. When such
attributes are found, propagate them to subsequent declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141861 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
b6a4ac41353476ed771d02ae6a96c2663625ffcd 12-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Allow using getDeclCursorUSR function with a Decl* and not a cursor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141770 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
XCursor.h
9049cf6cb468c856888e88251dab659955fa767e 12-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make MakeCXTranslationUnit usable outside CIndex.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141769 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XTranslationUnit.h
276b061970939293f1abaf694bd3ef05b2cbda79 11-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Initial implementation of __atomic_* (everything except __atomic_is_lock_free).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141632 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
b77d197a78b30030e34bc14c27d63afc757c7d3b 11-Oct-2011 Douglas Gregor <dgregor@apple.com> Make sure we initialize the "extra" data within the libclang code
completion context, in case we end up having no code-completion
callback. Individual instances of this problem are always bugs that
need to be fixed, but it's better to make sure we have initialized
data here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141598 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
57165bea7cdbafdafe0e8e4c4b174f4abba29f7b 10-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Do ConcurrencyCheck for clang_getLocation as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141583 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
5e1cdac63c3d9c9b32fa41fa0b2d242a58a20d49 07-Oct-2011 John McCall <rjmccall@apple.com> Rename TagDecl::isDefinition -> isCompleteDefinition
for better self-documenting code, since the semantics
are subtly different from getDefinition().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141355 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
b001de7458d17c17e6d8b8034c7cfcefd3b70c00 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.

Thanks to Jeffrey Yasskin for the thorough review!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141330 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
aed123ec3cc37e457fe20a6158fdadf8849ad916 06-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,
and a callback and finds all identifier references of the cursor in the file.

rdar://7948304

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141277 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexHigh.cpp
MakeLists.txt
XCursor.cpp
XCursor.h
ndex_Internal.h
ibclang.exports
b11be041e4f05519a2eabf6a99429ba6110f1ca9 06-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Move the bulk of clang_getOverriddenCursors into
a cxcursor::getOverriddenCursors C++ function, because SmallVectors
are groovier that malloc'ing buffers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141276 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
42b2984771a7fd1b17c78bbb2c59fed3db2f1960 05-Oct-2011 Douglas Gregor <dgregor@apple.com> Expose more statement, expression, and declaration kinds in libclang,
from Manuel Holtgrewe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141200 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
1711fc91efb36d131f7ba771f73f0154dc1abd1f 04-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Improve location fidelity of objc decls.

-Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl.
-Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the
class name, not the location of '@'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141061 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
2dfdb948bef51a601e763191e4becfe59880d382 30-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce CXCursor_CXXAccessSpecifier for C++'s public:/private:/protected: specifiers.

Patch by Paolo Capriotti!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140864 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCXX.cpp
de5db649fd5f9aedde200f443ad73d62517b1c88 28-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Range_isNull.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140706 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
30c42404202d2e2512e51efc6066bd614cfdb5a4 28-Sep-2011 Douglas Gregor <dgregor@apple.com> When 'bool' is not a built-in type but is defined as a macro, print
'bool' rather than '_Bool' within types, to make things a bit more
readable. Fixes <rdar://problem/10063263>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140650 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
5f0bfc522266f3319c4a6262b016a552de058c7f 27-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Expose array size and element type, patch by Vinay Sajip!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140614 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
ibclang.exports
fa865df489fe68668c554dece36c68b4ce03920f 27-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> MSVC is stuck in the 80s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140597 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ibclang.exports
671436e9e2794c56f3c2e62739d225571493af37 27-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Refactor the important stuff in clang_getCursor into a cxcursor::getCursor(CXTranslationUnit, SourceLocation) function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140588 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.h
b0d6eaa6b646c18c49923aefc76973801f561701 27-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_isNull and clang_Cursor_getTranslationUnit functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140587 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ibclang.exports
65ab90736ede3932b26848e39c64396c47f2941b 26-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Report implicit objc methods for properties when indexing.

Related to rdar://10087069.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140551 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ee0f84fc84ed7de7975e102668d8e53a778f7a8c 26-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't map a file:line:col triplet that is inside the preamble range to
a "loaded" location of the precompiled preamble.

Instead, handle specially locations of preprocessed entities:
-When looking up for preprocessed entities, map main file locations inside the
preamble range to a preamble loaded location.
-When getting the source range of a preprocessing cursor, map preamble loaded
locations back to main file locations.

Fixes rdar://10175093 & http://llvm.org/PR10999

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140519 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
d6471f7c1921c7802804ce3ff6fe9768310f72b9 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename Diagnostic to DiagnosticsEngine as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Removing a bunch of dead returns/breaks after llvm_unreachables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Switch assert(0/false) llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexDiagnostic.cpp
IndexUSRs.cpp
Indexer.cpp
b0c3e0909bb04af0bfb82ad01ab6909649d68cca 22-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename ExplicitTemplateArgumentList -> ASTTemplateArgumentListInfo, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140330 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
2502efd26196d5bbc1f320181aea765d469309b4 21-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When pointing at a macro expansion inside a macro argument,
return a cursor for the inner macro.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140207 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9503dce5a6158be8459697b2197bc43289929519 20-Sep-2011 Ted Kremenek <kremenek@apple.com> Sort exports list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140171 91177308-0d34-0410-b5e6-96231b3b80d8
ibclang.exports
92ddef1bf843e1e18c040d69f48a6bf0bc7c776a 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> In libclang, when visiting preprocessed entities in a source range, use
PreprocessingRecord's getPreprocessedEntitiesInRange.

Also remove all the stuff that were added in ASTUnit that are unnecessary now
that we do a binary search for preprocessed entities and deserialize only
what is necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140063 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
507097ec40105ed927cb5a744fad98f5875aacac 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When getting a source location from a file:line:col triplet
check whether the requested location points inside the precompiled preamble,
in which case the returned source location will be a "loaded" one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140060 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a64ccefdf0ea4e03ec88805d71b0af74950c7472 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.

It already works (and is useful with) macro locs as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140057 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
b81d3012ff46e99c0373ef67b1481150a1dd8609 19-Sep-2011 Erik Verbruggen <erikjv@me.com> First test commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140016 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
7ea51d5f0b4a8fc5768d1b4744a556dc756f1b3b 14-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Remove libclang.darwin.exports, it's not used anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139661 91177308-0d34-0410-b5e6-96231b3b80d8
ibclang.darwin.exports
e6be34d8f77312edf9ed38034e52cb4d22c8e1c1 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_getPresumedLocation which works like clang_getExpansionLocation
but takes into account #line directives coming from preprocessed files.

Patch by Vinay Sajip!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139647 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
221d5a5005b3dbde50b8b0a40bb5c5e6da8c1173 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Correct annotation and taking of cursor for objc class references
inside the IBOutletCollection attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139621 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
18aa2ff4641847d7f8866e8c5912d4d0ddb858ce 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename InterFace -> Interface, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139620 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6639e9255489ad8e10278d5658fdd4b3c0e1e4cd 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang]
-Allow cursor visitation of an attribute using its source range
-Add C++ 'final' and 'override' attributes as cursor kinds
-Simplify the logic that marks 'final' and 'override' attributes as tokens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139609 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
c2954616fbd11f5a6117236f58420029b773a639 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] For getDeclFromExpr in CIndex.cpp, associate the decl of
a DeclRefExpr, MemberExpr, etc. with a CastExpr if it is ImplicitCast,
since the implicit cast is the one that is invisible in source code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139547 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
08e0bc16b3312c27e87d33be7dcf3d4fe5bdd2e2 10-Sep-2011 Douglas Gregor <dgregor@apple.com> Kill of the Decl::PCHLevel field entirely. We now only need to know
whether a Decl was deserialized from an AST file (any AST file).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139438 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
35120c628595ecd05f9e82faa6a210837b48b236 10-Sep-2011 Douglas Gregor <dgregor@apple.com> The translation unit is never deserialized

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139436 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
20174221af145554b76a0b0f5e4eb3ac70d05945 31-Aug-2011 Chandler Carruth <chandlerc@gmail.com> Update libclang to have APIs corresponding to the new 'expansion' naming
system for macro-backed source locations. The old APIs are preserved for
legacy users.

This was intended to land with the main work of instantiation ->
expansion, but despite running it by Doug over a month ago, I forgot to
commit it. Very sorry for that...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138860 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
5f616b726fdf5db3cbc2fd8d92c42cc624dd4550 30-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Rename some functions and make sure we don't iterate past the tokens array.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138813 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
95ed7784a335aca53b0c6e952cf31a4cfb633360 27-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Treat top-level objective-c declarations
, such as list of forward @class decls, in a DeclGroup
node. Deal with its consequence throught clang. This
is in preparation for more Sema work ahead. // rdar://8843851.
Feel free to reverse if it breaks something important
and I am unavailable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138709 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
b5af843a20e237ad1a13ad66a867e200695b8c8e 26-Aug-2011 Douglas Gregor <dgregor@apple.com> Eliminate the -chained-pch flag and all of the frontend and libclang options associated with it. Chained PCH is the only way to build a PCH file that includes another PCH file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138597 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
467dc88512b4ba4bb16e274ea3771dc1415d31da 26-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce a -cc1 option "-emit-module", that creates a binary module
from the given source. -emit-module behaves similarly to -emit-pch,
except that Sema is somewhat more strict about the contents of
-emit-module. In the future, there are likely to be more interesting
differences.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138595 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6f155de99c59af890817146ec8526bafb6560f1f 26-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix getting a cursor that points inside tag definition that is part
of a type specifier.

e.g. for:

typedef struct _MyS {
int foo;
} MyS;

pointing at field 'foo' would give a cursor for the typedef declaration 'MyS'
instead of the field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138593 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
47695c8ad8424851f62e0d4a983b45b15daee1c5 19-Aug-2011 Ted Kremenek <kremenek@apple.com> [libclang] Remove NestedNameSpecifierVisit, as Clang says that this code is dead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137999 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a676379b26edc959193f9f919ba9c6d296a57824 18-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Annotate correctly macro argument tokens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137961 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
baf82b0fdf5c23dff80660add40bb92bd850bba0 18-Aug-2011 Ted Kremenek <kremenek@apple.com> [libclang] Workaround potential race condition with code completion AllocatedResults being freed after a CXTranslationUnit.

The Container USR's CXString had its underlying data owned by the CXTranslationUnit's string pool. This
would result in trying to access freed memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137887 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
XString.cpp
XString.h
94fe9eee8c6b7eafb9b31aa33bc9a3b544883d88 17-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Implicit objc methods are skipped, no need to check isSynthesized.

Plus, isSynthesized returning true does not mean that there is not a user-declared method declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137858 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
75cf3e86d33ce810c12084126385371b335c30ba 17-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Mark objc methods that are implicitly declared for properties (not user-declared) as implicit.
This results in libclang ignoring such methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137852 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4b43b305342ae2e49d473d0fa6152e5d0c343765 17-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make clang_getCursor able to handle locations that point inside macro arguments.

e.g. for:

\define INVOKE(METHOD, CLASS) [CLASS METHOD]

void test2() {
INVOKE(meth, MyClass);
}

Pointing at 'meth' will give a CXCursor_ObjCMessageExpr and pointing at 'MyClass'
will give a CXCursor_ObjCClassRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137796 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
427964e15f1b9595659cea3fcb4dd808a00f37b5 16-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Require explicit cursor visitation for all TypeLocs (compilation will
fail if a TypeLoc kind is not handled) and handle DecltypeTypeLoc and InjectedClassNameTypeLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137670 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
3422fbc38f35d9e486879850c5bf0175bd2eee16 15-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Handle AttributedTypeLoc for cursor visitation. Fixes rdar://9535717.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137634 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
af0f4d0b2e38c810effc8b024ad2fb6604eec5d3 14-Aug-2011 Francois Pichet <pichet2000@gmail.com> Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization.

Example:
template <class T>
class A {
public:
template <class U> void f(U p) { }
template <> void f(int p) { } // <== class scope specialization
};

This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code.
BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137573 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6bf2b9fbd3e3adc38d4712de79aeaa81d651aa08 12-Aug-2011 Douglas Gregor <dgregor@apple.com> In the serialized AST format, make the translation unit a "predefined"
declaration that never actually gets serialized. Instead, serialize
the various kinds of update records (lexical decls, visible decls, the
addition of an anonymous namespace) for the translation unit, even if
we're not chaining. This way, we won't have to deal with multiple
loaded translation unit declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137395 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8a4bfaa04bb9db98468d0b1d143819222332393f 10-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When pointing at an objc property don't return a cursor that points at the
synthesized method for the property. rdar://9771715

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137248 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
eaf4fbab08b2636103b2da08412e33baff15ad2a 10-Aug-2011 Douglas Gregor <dgregor@apple.com> Switch a C-style cast over to a const_cast. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137218 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
8fa0a80b4482ad94e82c4a19e23de17fd69140b5 04-Aug-2011 Douglas Gregor <dgregor@apple.com> Add a new libclang API to return a CXCompletionString for an arbitrary
cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136911 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ibclang.darwin.exports
ibclang.exports
0f91c8ccb398be2bd40dc402309bd79737542396 30-Jul-2011 Douglas Gregor <dgregor@apple.com> When performing code completion after at @interface, allow both
already-defined and forward-declared results. Already-defined results
are fine because they could be the start of a category. Fixes
<rdar://problem/9811691>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136559 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
d1194fbbf65374bfa3578eb40a547e4f97b497d1 27-Jul-2011 Ted Kremenek <kremenek@apple.com> clang_getCXTUResourceUsage: report memory used by HeaderSearch.

This required converting the StringMaps to use a BumpPtrAllocator. I measured the
compile time and saw no observable regression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136190 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ca7dc2b755eb81ac95121ce1a1f1aa44a4a0fe12 27-Jul-2011 Ted Kremenek <kremenek@apple.com> clang_getCXTUResourceUsage: Report memory used by data structures in SourceManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136189 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a0651c5f5d1c8928d3ae062435ed9cf0aa0d04ba 26-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Eliminate a bunch of temporary strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136092 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
0a47d69af8bda945352997af3da4687a3356096a 26-Jul-2011 Douglas Gregor <dgregor@apple.com> Add new libclang API, clang_codeCompleteGetObjCSelector(), which
provides the partial Objective-C selector used in a code
completion. From Connor Wakamo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136084 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
48a8d14fc6f064a5297024c2b34733a4080b2efe 26-Jul-2011 Francois Pichet <pichet2000@gmail.com> Fix the MSVC build. 2 problems:
- buildPieces was return a C++ object from inside an extern "C". (MSVC didn't like that)
- clang_getCursorReferenceNameRange was missing a CINDEX_LINKAGE causing a link error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135983 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
642116259e8df6286063a17361c20e95b5017a0a 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename getInstantiationLineNumber to getExpansionLineNumber in both
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135969 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a77c031cb66f75d22672070052cc6e0205289ff8 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename getInstantiationColumnNumber to getExpansionColumnNumber in both
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135965 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e7b2b6e87dbe5b1207f77b6ff9c210a02f95bb39 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename getDecomposedInstantiationLoc to getDecomposedExpansionLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135962 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
430d7a1a621a126a9ffe442ad8987ba02b46dae9 25-Jul-2011 Douglas Gregor <dgregor@apple.com> Added clang_getCursorReferenceNameRange to libclang to to retrieve parts of
a cursor reference, from Erik Verbruggen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135920 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
edc3dccece244a584f8ebdb81da6c962c08e79be 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename SourceManager::getInstantiationRange to getExpansionRange.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135915 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
402785357ab053dd53f4fdd858b9630a5e0f8bad 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Mechanically rename SourceManager::getInstantiationLoc and
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part
of the API and documentation update from 'instantiation' as the term for
macros to 'expansion'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135914 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
ab4e83b904d81d8ab1f8c594655822a023cad87d 23-Jul-2011 Douglas Gregor <dgregor@apple.com> Extend libclang with clang_equalRanges, from Erik Verbruggen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135860 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexInclusionStack.cpp
IndexUSRs.cpp
XString.cpp
e081a61bb0dc546fd623bf259435d17c9a4ea0d5 21-Jul-2011 Douglas Gregor <dgregor@apple.com> New libclang API to expose container type for code completion, from
Connor Wakamo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135651 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
4c30bb148b53c8063e940ca3e049ba4d270dc9d5 21-Jul-2011 Douglas Gregor <dgregor@apple.com> Rework the detailed preprocessing record to separate preprocessing
entities generated directly by the preprocessor from those loaded from
the external source (e.g., the ASTReader). By separating these two
sets of entities into different vectors, we allow both to grow
independently, and eliminate the need for preallocating all of the
loaded preprocessing entities. This is similar to the way the recent
SourceManager refactoring treats FileIDs and the source location
address space.

As part of this, switch over to building a continuous range map to
track preprocessing entities.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135646 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
686775deca8b8685eb90801495880e3abdd844c2 20-Jul-2011 Chris Lattner <sabre@nondot.org> now that we have a centralized place to do so, add some using declarations for
some common llvm types: stringref and smallvector. This cleans up the codebase
quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
XString.h
f62d43d2afe1960755a1b5813cae1e5983bcac1b 19-Jul-2011 Douglas Gregor <dgregor@apple.com> Revamp the SourceManager to separate the representation of parsed
source locations from source locations loaded from an AST/PCH file.

Previously, loading an AST/PCH file involved carefully pre-allocating
space at the beginning of the source manager for the source locations
and FileIDs that correspond to the prefix, and then appending the
source locations/FileIDs used for parsing the remaining translation
unit. This design forced us into loading PCH files early, as a prefix,
whic has become a rather significant limitation.

This patch splits the SourceManager space into two parts: for source
location "addresses", the lower values (growing upward) are used to
describe parsed code, while upper values (growing downward) are used
for source locations loaded from AST/PCH files. Similarly, positive
FileIDs are used to describe parsed code while negative FileIDs are
used to file/macro locations loaded from AST/PCH files. As a result,
we can load PCH/AST files even during parsing, making various
improvemnts in the future possible, e.g., teaching #include <foo.h> to
look for and load <foo.h.gch> if it happens to be already available.

This patch was originally written by Sebastian Redl, then brought
forward to the modern age by Jonathan Turner, and finally
polished/finished by me to be committed.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135484 91177308-0d34-0410-b5e6-96231b3b80d8
IndexInclusionStack.cpp
debb00f9ce1dd0f855d2b4fff3372b2ceeb20735 16-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Map canonical decl of a category implementation to the category decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135316 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e2f854ddd365e6837cef3e1a1b7621b32200fc71 16-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r135304 and apply fix in clang_getCanonicalCursor per Doug's, Fariborz's comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135314 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
91a5755ad73c5dc1dfb167e448fdd74e75a6df56 15-Jul-2011 John McCall <rjmccall@apple.com> Create a new expression node, SubstNonTypeTemplateParmExpr,
to represent a fully-substituted non-type template parameter.
This should improve source fidelity, as well as being generically
useful for diagnostics and such.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135243 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
cea731a9cb7de3f473d60e5ea544e25621cebd76 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Clean up two lingering comments that mention 'instantiation' w.r.t.
macros in libclang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135148 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ba7537febdf1bc1cc617e1f1746f2644feba6274 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> NestedMacroInstantiations -> NestedMacroExpansions

This is switches all the interfaces points (and most of the commenst
/ local variables I saw on my way through) regarding the
NestedMacroInstantiations bit.

The libclang enums corresponding to this state were renamed, but
a legacy enum was added with the old name, and the same value to keep
existing clients working. I've added a documentation blurb for it, but
let me know if there is a canonical way to document legacy elemenst of
the libclang interface.

No functionality changed here, even in tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135141 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9b2a0ac970a077bdc0bf08c6c682f80ad733c892 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Update all of the libclang code corresponding to the preprocessor
MacroInstantiation -> MacroExpansion rename. Internally, everything is
switched.

Introduce a new cursor kind enum with the new name, but retain the old
name as an alias so that we don't break backwards compatibility.

Also update the debug printing routine to use 'macro expansions' as its
explicitly not guaranteed to be stable, and mechanically switch the test
cases over to that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135140 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
9e5bb85ac899eeab7c21b5ff9030c3da6ff4837b 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Move the rest of the preprocessor terminology from 'instantiate' and
variants to 'expand'. This changed a couple of public APIs, including
one public type "MacroInstantiation" which is now "MacroExpansion". The
rest of the codebase was updated to reflect this, especially the
libclang code. Two of the C++ (and thus easily changed) libclang APIs
were updated as well because they pertained directly to the old
MacroInstantiation class.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135139 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
6e8090356fdd160f05612f8c37dbfd36f75fc844 11-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix CMake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134918 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
97c337c2bdf3ec53073c7e7dd656aa0dd37ee409 11-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Move the remapping functions to clang-c/Index.h and change 'arcmt_' prefix to 'clang_'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134916 91177308-0d34-0410-b5e6-96231b3b80d8
RCMigrate.cpp
ibclang.darwin.exports
ibclang.exports
96210199a5d6bd38bd61609f3539379b146d9f12 09-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix linker error in buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134847 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
69325d5b7cfecf1b3128745efc33612aedf1b8b4 09-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Introduce new '-ccc-arcmt-migrate <path>' ARC migration driver option.

This is a new mode of migration, where we avoid modifying the original files but
we emit temporary files instead.

<path> will be used to keep migration process metadata. Currently the temporary files
that are produced are put in the system's temp directory but we can put them
in the <path> if is necessary.

Also introduce new ARC migration functions in libclang whose only purpose,
currently, is to accept <path> and provide pairs of original file/transformed file
to map from the originals to the files after transformations are applied.

Finally introduce the c-arcmt-test utility that exercises the new libclang functions,
update arcmt-test, and add tests for the whole process.

rdar://9735086.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134844 91177308-0d34-0410-b5e6-96231b3b80d8
RCMigrate.cpp
MakeLists.txt
akefile
ibclang.darwin.exports
ibclang.exports
3da626b4f38eb0350de960d71271ca77af7a9cc8 07-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce a new libclang aPI function,
clang_codeCompleteGetContexts(), that provides the client with
information about the context in which code completion has occurred
and what kinds of entities make sense as completions at that
point. Patch by Connor Wakamo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134615 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
39c411fa229b2a6747b92f945d1702ee674d3470 06-Jul-2011 Douglas Gregor <dgregor@apple.com> libclang: Allow callers of clang_saveTranslationUnit() to distinguish
between different classes of errors. Addresses most of
<rdar://problem/9660328>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134495 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8be80e1e6effd5a333bc70e7f030dc9397d0554e 06-Jul-2011 Douglas Gregor <dgregor@apple.com> Improve the Python bindings for libclang in a few ways, from Eli
Bendersky. Specifically:

* Implemented a new function in libclang: clang_isAttribute

* Fixing TranslationUnit.get_includes to only go through the argument
* buffer when it contains something. This fixed a crash on Windows

* clang_getFileName returns CXString, not char*. Made appropriate
* fixes in cindex.py - now the relevant tests pass and we can see the
* full locations correctly again (previously there was garbage in
* place of the file name)
* Exposed clang_getCursorDisplayName to the python bindings



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134460 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
146060435c3efce95c95a092c7a1eb651cfb9ae0 30-Jun-2011 John McCall <rjmccall@apple.com> Preserve that a TemplateName was arrived at by substituting
for a template template parameter.

Uses to follow.

I've also made the uniquing of SubstTemplateTemplateParmPacks
use a ContextualFoldingSet as a minor space efficiency.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134137 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8ccac3de1335f1cfd7cea56ba1cefcf0b724ce3f 30-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce cxcursor::getCursorParentDecl(CXCursor Cursor) and use it at the appropriate place in CIndex.cpp
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134104 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
c5c5e92ec53f7e6ac7ebbbf77c6d8e4b7d88daec 30-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Preprocessor::getTotalMemory() and use it in CIndex.cpp, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134103 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
064c44b8a17d4c426b87ad1c58de81d76a13fca3 27-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Avoid having the cursor of an expression replace the declaration cursor
when the expression source range overlaps the declaration range.

This can happen for C++ constructor expressions whose range generally
include the variable declaration, e.g.:

MyCXXClass foo; // Make sure pointing at 'foo' returns a VarDecl cursor.

rdar://9124499.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133930 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
5517b89953e3c9276f161ce29831de388bb2573d 27-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Avoid having the cursor of an expression "overwrite" the annotation of the
variable declaration that it belongs to.

This can happen for C++ constructor expressions whose range generally
include the variable declaration, e.g.:

MyCXXClass foo; // Make sure we don't annotate 'foo' as a CallExpr cursor.

rdar://9124499.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133929 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
03e80030515c800d1ab44125b9052dfffd1bd04c 21-Jun-2011 Douglas Gregor <dgregor@apple.com> Introduce a new AST node describing reference binding to temporaries.

MaterializeTemporaryExpr captures a reference binding to a temporary
value, making explicit that the temporary value (a prvalue) needs to
be materialized into memory so that its address can be used. The
intended AST invariant here is that a reference will always bind to a
glvalue, and MaterializeTemporaryExpr will be used to convert prvalues
into glvalues for that binding to happen. For example, given

const int& r = 1.0;

The initializer of "r" will be a MaterializeTemporaryExpr whose
subexpression is an implicit conversion from the double literal "1.0"
to an integer value.

IR generation benefits most from this new node, since it was
previously guessing (badly) when to materialize temporaries for the
purposes of reference binding. There are likely more refactoring and
cleanups we could perform there, but the introduction of
MaterializeTemporaryExpr fixes PR9565, a case where IR generation
would effectively bind a const reference directly to a bitfield in a
struct. Addresses <rdar://problem/9552231>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133521 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
944eadbf3ffc96389161e9e5d4fb3e6a1ea30e2f 18-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Remove more unnecessary dependencies now that the Frontend -> ARCMigrate
edge has been broken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133343 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
ba45fabfce6b7ceec4966932b166755eac77d9fb 17-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Remove ARCMigrate from more builds that it isn't needed in now that the
layering problem has been addressed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133217 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
ae446421df3c06ad61b70992fe5b60f898e3013c 16-Jun-2011 John McCall <rjmccall@apple.com> ARCMigrate depends on libAnalysis, and on unhelpful linkers must appear
before it on the link line.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133145 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
979b423b37acf17d5f83fe31055e15c8503ca9d4 16-Jun-2011 John McCall <rjmccall@apple.com> Grr. Of course libARCMigrate depends on libRewrite. This is a lot to be
linking unnecessarily into libclang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133129 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
a586c74b6a50f7a299805d3426ff11caeb5b8729 16-Jun-2011 John McCall <rjmccall@apple.com> libFrontend depends on ARCMigrate, so link it into libclang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133116 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XType.cpp
61eee0ca33b29e102f11bab77c8b74cc00e2392b 04-Jun-2011 Tanya Lattner <tonic@nondot.org> Add support for builtin astype:
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132612 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
352697a87bca664356f21a838b162084013625ea 04-Jun-2011 Douglas Gregor <dgregor@apple.com> Expose @synthesize and @dynamic via their own cursor kinds in
libclang. Fixes <rdar://problem/9537904>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132603 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f968d8374791c37bc464efd9168c2d33dd73605f 27-May-2011 Douglas Gregor <dgregor@apple.com> Objective-C doesn't consider the use of incomplete types as method
parameter types to be ill-formed. However, it relies on the
completeness of method parameter types when producing metadata, e.g.,
for a protocol, leading IR generating to crash in such cases.

Since there's no real way to tighten down the semantics of Objective-C
here without breaking existing code, do something safe but lame:
suppress the generation of metadata when this happens.

Fixes <rdar://problem/9123036>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132171 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
477aab6782795e7472055a54108d2df270ce1a89 25-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> A StringRef-ication of the DiagnosticIDs API and internals.

Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static
diagnostic data structures, which resulted in a huge global-var-init function.

Depends on llvm commit r132046.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132047 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
ca63c200346c0ca9e00194ec6e34a5a7b0ed9321 25-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a new type node, UnaryTransformType, designed to represent a
type that turns one type into another. This is used as the basis to
implement __underlying_type properly - with TypeSourceInfo and proper
behavior in the face of templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132017 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
5adc0515aaacb6c4d4f0c9626d86c1e5c177467c 18-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Do some safety checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131491 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
211924b563aa31421836cee7655be729ad02733f 12-May-2011 Douglas Gregor <dgregor@apple.com> Add clang_CXXMethod_isVirtual() to libclang, from Erik Verbruggen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131230 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
10620eb5164e31208fcbf0437cd79ae535ed0559 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Modify some deleted function methods to better reflect reality:

- New isDefined() function checks for deletedness
- isThisDeclarationADefinition checks for deletedness
- New doesThisDeclarationHaveABody() does what
isThisDeclarationADefinition() used to do
- The IsDeleted bit is not propagated across redeclarations
- isDeleted() now checks the canoncial declaration
- New isDeletedAsWritten() does what it says on the tin.
- isUserProvided() now correct (thanks Richard!)

This fixes the bug that we weren't catching

void foo() = delete;
void foo() {}

as being a redefinition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131013 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
dca8ee8b7bc86076916a3a80f553f7a4e98c14af 06-May-2011 Douglas Gregor <dgregor@apple.com> Introduce a new libclang parsing flag,
CXTranslationUnit_NestedMacroInstantiations, which indicates whether
we want to see "nested" macro instantiations (e.g., those that occur
inside other macro instantiations) within the detailed preprocessing
record. Many clients (e.g., those that only care about visible tokens)
don't care about this information, and in code that uses preprocessor
metaprogramming, this information can have a very high cost.

Addresses <rdar://problem/9389320>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130990 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e 05-May-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for C++0x alias templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6df78739f3b3f672f9735445741cbcfa7c10fb1f 05-May-2011 Douglas Gregor <dgregor@apple.com> When the environment variable LIBCLANG_RESOURCE_USAGE is set, teach
libclang to emit information about resource usage after parsing, code
completion, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130946 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
Indexer.h
5e1db6a434d0e3fe0fbde0bca2ec44552818fb22 04-May-2011 Ted Kremenek <kremenek@apple.com> Enhance clang_getCXTUResourceUsage() to return the amount of memory used by the Preprocessor's bump allocator as well as those from the PreprocessingRecord.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130823 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
dd3e5549e3c11e217078938aacf72f042eea5343 04-May-2011 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(),
which determines whether a particular file is actually a header that
is intended to be guarded from multiple inclusions within the same
translation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130808 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
1d8052db5a38b62ba5f3802160dcccd87fa0b5b8 03-May-2011 Ted Kremenek <kremenek@apple.com> Use the canonical decl when generating the locations for USRs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130748 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
960d13dde337a59dacc9dc3936c26d4aa8478986 01-May-2011 Chandler Carruth <chandlerc@gmail.com> Based on the new information in the AST provided by r130628, write
3 lines of code and improve a bunch of information in the libclang view
of the code.

Updates the two tests that exercise this with the new data, checking
that each new source location actually points back to the declared
template parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130656 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8c367589b68019b040f73d44282fc30e4f526f62 29-Apr-2011 Ted Kremenek <kremenek@apple.com> Guard in USRGenerator::GenLoc() against null Decl* from invalid code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130541 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
e9b5f3d4acfc2ad6e8b65a4072464e997dea9ed3 29-Apr-2011 Ted Kremenek <kremenek@apple.com> Enhance clang_getCXTUResourceUsage() to report the sizes of the memory buffers used by PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130460 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f61b831d7f6a15676b07647f507de80324cb7056 28-Apr-2011 Ted Kremenek <kremenek@apple.com> Enhance clang_getCXTUResourceUsage() to report how much memory is used by SourceManager's memory buffers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130433 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ba29bd25515fbd99e98ba0fedb9d93617b27609e 28-Apr-2011 Ted Kremenek <kremenek@apple.com> Enhance clang_getCXTUResourceUsage() to report the amount of memory used by ASTContext's side tables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130383 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
457aaf0692dfb2d9638f383334b81027f637f20c 28-Apr-2011 Ted Kremenek <kremenek@apple.com> Enhance clang_getCXTUResourceUsage() to report the amount of memory used by SourceManager's content cache allocator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130380 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
28bbe4b8acc338476fe0825769b41fb32b423c72 28-Apr-2011 John Wiegley <johnw@boostpro.com> Parsing/AST support for Structured Exception Handling

Patch authored by Sohail Somani.

Provide parsing and AST support for Windows structured exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130366 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
21ff2e516b0e0bc8c1dbf965cb3d44bac3c64330 28-Apr-2011 John Wiegley <johnw@boostpro.com> Implementation of Embarcadero array type traits

Patch authored by John Wiegley.

These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130351 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
864c041e118155c2b1ce0ba36942a3da5a4a055e 26-Apr-2011 John McCall <rjmccall@apple.com> Make yet another placeholder type, this one marking that an expression is a bound
member function, i.e. something of the form 'x.f' where 'f' is a non-static
member function. Diagnose this in the general case. Some of the new diagnostics
are probably worse than the old ones, but we now get this right much more
universally, and there's certainly room for improvement in the diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130239 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
552622067dc45013d240f73952fece703f5e63bd 25-Apr-2011 John Wiegley <johnw@boostpro.com> t/clang/expr-traits

Patch authored by David Abrahams.

These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
13c8ccb59b38e9e7133f1c80a00f210b6514a0b1 23-Apr-2011 Douglas Gregor <dgregor@apple.com> Teach libclang to be more careful around BlockDecls, and don't assume
that a TypeSourceInfo is always available, like we do everywhere else
in libclang. Fixes <rdar://problem/9311140>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130034 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8387e2a41eef6fa17fb140a18c29b6eee9dd2b8a 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.

Using this flag is necessary for compatibility with Microsoft template code.
This also provides some parsing speed improvement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130022 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ffcd985dcbff204108f37dea5b9fe4e6709e965d 20-Apr-2011 Douglas Gregor <dgregor@apple.com> When translating a Clang source range into a libclang source range,
adjust the a ending macro location to the end of the instantiation
location before adjusting it to the end of the token. Fixes
<rdar://problem/9021561>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129872 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f787002478f09af1741fb0f82a562002e6799c49 20-Apr-2011 Ted Kremenek <kremenek@apple.com> Rename 'CXTUMemoryUsage…' to 'CXTUResourceUsage…'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129857 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
e23ac65af568ffe611b0990818ac3a57c856a4d8 20-Apr-2011 Douglas Gregor <dgregor@apple.com> Teach SourceManager::getSLocEntry() that it can fail due to problems
during deserialization from a precompiled header, and update all of
its callers to note when this problem occurs and recover (more)
gracefully. Fixes <rdar://problem/9119249>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129839 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexInclusionStack.cpp
e294ab717fc9535429ca5d8f575d41ae4441d822 19-Apr-2011 Ted Kremenek <kremenek@apple.com> Add missing break statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129750 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4e6a3f7310d3d9232877ed6f439247b1054b1e47 19-Apr-2011 Ted Kremenek <kremenek@apple.com> Report memory usage for global code completion results in CXTUMemoryUsage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129733 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
59fc1e55da9c856d1703d3d3ac14a36320d26b30 19-Apr-2011 Ted Kremenek <kremenek@apple.com> Add libclang API to query how much memory is used by a CXTranslationUnit. This is a WIP. Currently we report
the amount used for expressions, types, identifiers, and selectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129730 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
162e1c1b487352434552147967c3dd296ebee2f7 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Support for C++11 (non-template) alias declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
f111d935722ed488144600cea5ed03a6b5069e8f 15-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> C1X: implement generic selections

As an extension, generic selection support has been added for all
supported languages. The syntax is the same as for C1X.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ad762fcdc16b9e4705b12b09d92b8c026212b906 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129541 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
06d9b1ad0bca7230cbae57e3e3207dda77a9eac0 14-Apr-2011 Douglas Gregor <dgregor@apple.com> Harden Clang's cursor visitation logic against NULL declaration,
statement, and expression pointers. While these shouldn't happen, it's
better to be safe in libclang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129539 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4656b63243d926910b6f6507527114ab5306a954 10-Apr-2011 Oscar Fuentes <ofv@wanadoo.es> libclang output name is now libclang. This solves a name collision
when building with Visual Studio. `clang.dll' and `clang.exe' would
have the same `clang.ilk' and `clang.pdb'. On a serial build those
files would be overwritten as clang.exe/clang.dll are created. On a
parallel build there is a risk of both files being written at the same
time. On that case VS fails.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129239 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 07-Apr-2011 John McCall <rjmccall@apple.com> Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use. I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
9d5a165d301cc9df68631e624322dd2a962f65b3 23-Mar-2011 Ted Kremenek <kremenek@apple.com> Fix crash in clang_getInstantiationLoc() when SourceManager::getInstantiationLoc() can return a SourceLocatin with an invalid
FileID on invalid code. Fixes <rdar://problem/9164623>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128139 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
0a0d2b179085a52c10402feebeb6db8b4d96a140 23-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

void foo()
__attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

- If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
will result in a deprecation warning, as if we had placed
attribute((deprecated)) on it (but with a better diagnostic)
- If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
will result in an "unavailable" warning (in C)/error (in C++), as
if we had placed attribute((unavailable)) on it
- If we choose a deployment target prior to 10.2, foo() is
weak-imported (if it is a kind of entity that can be weak
imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4ee9926671913ea6189ef9840a244d7c4385a7d5 22-Mar-2011 Ted Kremenek <kremenek@apple.com> Hopefully fix VS build by not using std::vector::data().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128105 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
25a11e1c5fad62dbad25a265e334720157e3fbc1 22-Mar-2011 Ted Kremenek <kremenek@apple.com> Rework crash recovery cleanup in ASTUnit and CIndex to recover more memory during a Sema crash (we have just a handful of leaks left)
and to use the simplified cleanup registration API.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128059 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4f32786ac45210143654390177105eb749b614e9 21-Mar-2011 Ted Kremenek <kremenek@apple.com> Improve crash recovery cleanup to recovery CompilerInstances during crash recovery. This was a huge resource "root" during crashes.

This change requires making a bunch of fundamental Clang structures (optionally) reference counted to allow correct
ownership semantics of these objects (e.g., ASTContext) to play out between an active ASTUnit and CompilerInstance
object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128011 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
c842955140adf7b0a7c73c61390bf580c50a182d 20-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> In clang_parseTranslationUnit_Impl,p ut the source file after command_line_args otherwise
if '-x' flag is present it will be unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127971 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
d2427ddf00aacdc288c386f3882e0821ca9bd27b 19-Mar-2011 Ted Kremenek <kremenek@apple.com> Add libclang hook 'clang_toggleCrashRecovery()', which provides a mechanism for a client to enable/disable CrashRecovery within libclang function calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127920 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
6628a614c504263ae539462f049d523dd07ac1ba 18-Mar-2011 Ted Kremenek <kremenek@apple.com> Run all functional logic of clang_annotateTokens() within a CrashRecoveryContext. Fixes <rdar://problem/9121698>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127919 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
0d8d7e6067f9093e7d5abc45c9639ab977aab692 18-Mar-2011 Anders Carlsson <andersca@mac.com> Correctly store and keep track of the FileSystemOptions in ASTUnit and in clang_codeCompleteAt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127890 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
04a9eb3f0dfcc42b317057e236f73e9b196a2ff8 17-Mar-2011 Douglas Gregor <dgregor@apple.com> When libclang visits a translation unit via clang_visitChildren(),
walk the preprocessing record *before* walking the declarations, so
they we pretend that we actually respect the phases of translation.

We still walk the preprocessing record after the declarations when
performing token annotation or finding the cursor at a location, since
those routines depend on those semantics.

Fixes <rdar://problem/9137195>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127776 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
37c2e9664316b013b9a86f841f143f19ffbc0a02 16-Mar-2011 Ted Kremenek <kremenek@apple.com> c-index-test shouldn't crash when a goto has no matching label. Fixes <rdar://problem/9123493>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127711 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6656457a0a5706f797c2f1036a93eb75869bea2e 14-Mar-2011 Oscar Fuentes <ofv@wanadoo.es> Fix LIBCLANG_LINK_FLAGS for Darwin.

The previous syntax created a list with the usual semicolon as
separator, which breaks the link command.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127579 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
0b34dbaafe412a8437212805dcafa4565ee80ce5 13-Mar-2011 Oscar Fuentes <ofv@wanadoo.es> Build libclang as a static library too. Now tested on Windows!

On Windows only the shared library is created. The reason for this is
that clang.lib the static library would clash with clang.lib the
export library of the dll.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127566 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
d9e9b8f195b6fb2b54342dfa49fee900da67c3a3 13-Mar-2011 Oscar Fuentes <ofv@wanadoo.es> Reverting "Build libclang as a static library too."

This reverts commit r127556. It breaks the build for MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127564 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
29f4bacadaf6addca998873615796ccecc7f56ee 12-Mar-2011 Oscar Fuentes <ofv@wanadoo.es> Build libclang as a static library too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127556 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
06dec892b5300b43263d25c5476b506c9d6cfbad 12-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Renamed OffsetOfNode::getRange to getSourceRange for uniformity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127534 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f4e3cfbe8abd124be6341ef5d714819b4fbd9082 11-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for the OpenCL vec_step operator, by generalising and
extending the existing support for sizeof and alignof. Original
patch by Guy Benyei.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127475 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
299a4a967b02c9f0d0d94ad8560e3ced893f9116 09-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add 'OverridenFilesKeepOriginalName' field in SourceManager which if true the SourceManager
should report the original file name for contents of files that were overriden by other files,
otherwise it should report the name of the new file. Default is true.

Also add similar field in PreprocessorOptions and pass similar parameter in ASTUnit::LoadFromCommandLine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127289 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
893793b34c0f84c2239a153200b40ba1674d2400 08-Mar-2011 NAKAMURA Takumi <geek4civic@gmail.com> libclang/CIndexer.cpp: Apply a new API for Cygwin-1.7, instead of deprecated one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127283 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.cpp
f52516038ab5d0b1b90a6dd32f46b7d6dabd04c8 08-Mar-2011 Douglas Gregor <dgregor@apple.com> Teach libclang's token-annotation logic about context-sensitive
keywords for Objective-C+ and C++0x.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127253 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
841b238087d6cdb21c2443b7429cb85bd1f9fce2 06-Mar-2011 Douglas Gregor <dgregor@apple.com> Rename the type argument for the iboutletcollection attribute to not
conflict with MinGW headers, from Kirk Beitz!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127127 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
b1c86492f9a9bef01a4567408c22f961bbd604fe 05-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Currently we can only remap a file by creating a MemoryBuffer and replacing the file contents with it.
Allow remapping a file by specifying another filename whose contents should be loaded if the original
file gets loaded. This allows to override files without having to create & load buffers in advance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127052 91177308-0d34-0410-b5e6-96231b3b80d8
IndexInclusionStack.cpp
75e85048e73fcde2ce9d8a48dfdb1220e132eb59 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Fix the source range for a member access expression that includes a
nested-name-specifier and improve the detection of implicit 'this'
bases. Fixes <rdar://problem/8750392>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126880 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c314aa484524c6a310a51e7b83bc194774e95e90 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Teach libclang how to visit the children of a C++ base-class specifier
(i.e., the TypeLoc describing the base class type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126861 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
b6744efecba58792cce20d2d7b9ee39927c5422e 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into template
template arguments. I believe that this is the last place in the AST
where we were storing a source range for a nested-name-specifier
rather than a proper nested-name-specifier location structure. (Yay!)

There is still a lot of cleanup to do in the TreeTransform, which
doesn't take advantage of nested-name-specifiers with source-location
information everywhere it could.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126844 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
94fdffa4a572fc14ac296f5f1aae9db3734c72f1 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source-location information into dependent
template specialization types. There are still a few rough edges to
clean up with some of the parser actions dropping
nested-name-specifiers too early.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126776 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9e876876afc13aa671cc11a17c19907c599b9ab9 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Reinstate the introduction of source-location information for
nested-name-speciciers within elaborated type names, e.g.,

enum clang::NestedNameSpecifier::SpecifierKind

Fixes in this iteration include:

(1) Compute the type-source range properly for a dependent template
specialization type that starts with "template template-id ::", as
in a member access expression

dep->template f<T>::f()

This is a latent bug I triggered with this change (because now we're
checking the computed source ranges for dependent template
specialization types). But the real problem was...

(2) Make sure to set the qualifier range on a dependent template
specialization type appropriately. This will go away once we push
nested-name-specifier locations into dependent template
specialization types, but it was the source of the
valgrind errors on the buildbots.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126765 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
2786864406af0f3ec65b300675c6f3c809c22fd7 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Revert r126748, my second attempt at nested-name-specifier source
location information for elaborated types. *sigh*


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126753 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
be38c5f5d8fa7c43c52fafddee054b8fe8c2b964 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Reinstate r126737, extending the generation of type-source location
information for qualifier type names throughout the parser to address
several problems.

The commit message from r126737:

Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126748 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
44cd9f9d686dfdb9ad16113c41c2dca1da35a646 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Revert r126737, the most recent nested-name-specifier location change, for buildbot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126746 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
239cbb023c8da689e7722f7146914eed9755e368 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126737 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
2494dd024b392b8def58bf067cc94b51c214cf77 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
DependentNameTypeLoc. Teach the recursive AST visitor and libclang how to
walk DependentNameTypeLoc nodes.

Also, teach libclang about TypedefDecl source ranges, so that we get
those. The massive churn in test/Index/recursive-cxx-member-calls.cpp
is a good thing: we're annotating a lot more of this test correctly
now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126729 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
40d96a69c0e1e8c10f92d450c305a7aae696ca9c 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier location information into DeclRefExpr and
MemberExpr, the last of the expressions with qualifiers!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126688 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4c9be89bb615ec07eb3ed507c8fa9d0baa8a5ad7 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
UnresolvedLookupExpr and UnresolvedMemberExpr.

Also, improve the computation that checks whether the base of a member
expression (either unresolved or dependent-scoped) is implicit. The
previous check didn't cover all of the cases we use in our
representation, which threw off source-location information for these
expressions (which, in turn, caused some breakage in libclang's token
annotation).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126681 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
7c3179cf463c3b3b8c21dbb955f933ba50b74f28 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
CXXDependentScopeMemberExpr, and clean up instantiation of
nested-name-specifiers with dependent template specialization types in
the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126663 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
00cf3cc2718671aa48e8da264a523b0058a8591e 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
DependentScopeDeclRefExpr. Plus, give NestedNameSpecifierLoc == and !=
operators, since we're going to need 'em elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126508 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8435bf93757b5fe1b11ac8a3149d18649a6f4086 25-Feb-2011 Douglas Gregor <dgregor@apple.com> CMake: add version information into the clang executable and libclang
shared library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126502 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
f3db29fff6a583ecda823cf909ab7737d8d30129 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source-location information into
pseudo-destructor expressions. Also, clean up some
template-instantiation and type-checking issues with
pseudo-destructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126498 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
0cfaf6a270ecd0f5c7e541a8047c87948317548b 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into namespace
aliases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126496 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
db9924191092b4d426cc066637d81698211846aa 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into using directives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126489 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c22b5fff39a7520207f165fb16a27a34b944bd9c 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Use NestedNameSpecifierLoc within out-of-line variables, function, and
tag definitions. Also, add support for template instantiation of
NestedNameSpecifierLocs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126470 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
dc355713be51fcb4ee52d9fd6b4548ceff47fadf 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Update UsingDecl, UnresolvedUsingTypenameDecl, and
UnresolvedUsingValueDecl to use NestedNameSpecifierLoc rather than the
extremely-lossy NestedNameSpecifier/SourceRange pair it used to use,
improving source-location information.

Various infrastructure updates to support NestedNameSpecifierLoc:
- AST/PCH (de-)serialization
- Recursive AST visitor
- libclang traversal (including the first tests of this
functionality)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126459 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
14aba76042e041b2c5e439bf4ae353a0a3c7fd73 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach NestedNameSpecifier to keep track of namespace aliases the same
way it keeps track of namespaces. Previously, we would map from the
namespace alias to its underlying namespace when building a
nested-name-specifier, losing source information in the process.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126358 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e7455016e5fae3db7e2d88a61633f76ab05fc9d3 23-Feb-2011 Ted Kremenek <kremenek@apple.com> Add null check in CursorVisitor::RunVisitorWorkList() when visiting LabelDecls. Fixes <rdar://problem/9040579>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126304 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
34b41d939a1328f484511c6002ba2456db879a29 20-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement the C++0x deduced 'auto' feature.

This fixes PR 8738, 9060 and 9132.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126069 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
4b93d660c6326ec79b5e369317d1051cf826c2f3 20-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Re-instate r125819 and r125820 with no functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126060 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
96b1d4b4eb6b18dd6df7a2c0833332b45840580f 19-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 125820 and 125819 to fix PR9266.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126050 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
906c73ffbc78542ad333becb6e013dd9efc299b6 18-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenAction

This removes the final dependency edge from any lib outside of CodeGen
to core. As a result we can, and do, trim the dependency on core
from libclang, PrintFunctionNames, the unit tests and c-index-test.
While at it, review and trim other unneeded dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125820 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
56ca35d396d8692c384c785f9aeebcf22563fe1e 17-Feb-2011 John McCall <rjmccall@apple.com> Change the representation of GNU ?: expressions to use a different expression
class and to bind the shared value using OpaqueValueExpr. This fixes an
unnoticed problem with deserialization of these expressions where the
deserialized form would lose the vital pointer-equality trait; or rather,
it fixes it because this patch also does the right thing for deserializing
OVEs.

Change OVEs to not be a "temporary object" in the sense that copy elision is
permitted.

This new representation is not totally unawkward to work with, but I think
that's really part and parcel with the semantics we're modelling here. In
particular, it's much easier to fix things like the copy elision bug and to
make the CFG look right.

I've tried to update the analyzer to deal with this in at least some
obvious cases, and I think we get a much better CFG out, but the printing
of OpaqueValueExprs probably needs some work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125744 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298 17-Feb-2011 Chris Lattner <sabre@nondot.org> Step #1/N of implementing support for __label__: split labels into
LabelDecl and LabelStmt. There is a 1-1 correspondence between the
two, but this simplifies a bunch of code by itself. This is because
labels are the only place where we previously had references to random
other statements, causing grief for AST serialization and other stuff.

This does cause one regression (attr(unused) doesn't silence unused
label warnings) which I'll address next.

This does fix some minor bugs:
1. "The only valid attribute " diagnostic was capitalized.
2. Various diagnostics printed as ''labelname'' instead of 'labelname'
3. This reduces duplication of label checking between functions and blocks.

Review appreciated, particularly for the cindex and template bits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125733 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
48601b32321496b07a18fb6631f8563275d8c5fb 16-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach the CXCodeCompleteResults results structure, which stores
code-completion results accessed via libclang, to extend the lifetime
of the allocator used for cached global code-completion results at
least until these completion results are destroyed. Fixes
<rdar://problem/8997369>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125678 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
7502c1d3ce8bb97bcc4f7bebef507040bd93b26f 13-Feb-2011 John McCall <rjmccall@apple.com> Give some convenient idiomatic accessors to Stmt::child_range and
Stmt::const_child_range, then make a bunch of places use them instead
of the individual iterator accessors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125450 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
886e1606c28e970bb288abf4dbc40feb16822a79 10-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> CMake: LLVM_NO_RTTI must be obsolete now!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125275 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
e08ce650a2b02410eddd1f60a4aa6b3d4be71e73 09-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> AST, Sema, Serialization: add CUDAKernelCallExpr and related semantic actions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125217 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
63c00d7f35fa060c0a446c9df3a4402d9c7757fe 09-Feb-2011 John McCall <rjmccall@apple.com> Remove vtables from the Stmt hierarchy; this was pretty easy as
there were only three virtual methods of any significance.

The primary way to grab child iterators now is with
Stmt::child_range children();
Stmt::const_child_range children() const;
where a child_range is just a std::pair of iterators suitable for
being llvm::tie'd to some locals. I've left the old child_begin()
and child_end() accessors in place, but it's probably a substantial
penalty to grab the iterators individually now, since the
switch-based dispatch is kindof inherently slower than vtable
dispatch. Grabbing them together is probably a slight win over the
status quo, although of course we could've achieved that with vtables, too.

I also reclassified SwitchCase (correctly) as an abstract Stmt
class, which (as the first such class that wasn't an Expr subclass)
required some fiddling in a few places.

There are somewhat gross metaprogramming hooks in place to ensure
that new statements/expressions continue to implement
getSourceRange() and children(). I had to work around a recent clang
bug; dgregor actually fixed it already, but I didn't want to
introduce a selfhosting dependency on ToT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125183 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
5ffcf5de8f2b9924d3dbdf4e81f71fa2c2f5ceac 05-Feb-2011 Oscar Fuentes <ofv@wanadoo.es> CMake: libclang shall be named libclang.so, not liblibclang.so.

It is not possible to simply change that target name to `clang'
because we already have one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124972 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
52d6bbe3aa1e70d40c7cc892a12f41b6017f5c6c 05-Feb-2011 Ted Kremenek <kremenek@apple.com> Don't crash when generating USRs for ObjC methods in protocols.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124920 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
cd9175d5013700b2827fc727fed2b53ea89be027 04-Feb-2011 Ted Kremenek <kremenek@apple.com> USRs for Objective-C methods use the USR of the @interface as their base, not the USR of the class category or extension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124859 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
86a4d0dd6a630639aab7715323ed068940e650af 03-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach SourceManager::getLocation() how to cope with a source file
whose inode has changed since the file was first created and that is
being seen through a different path name (e.g., due to symlinks or
relative path elements), such that its FileEntry pointer doesn't match
a known FileEntry pointer. Since this requires a system call (to
stat()), we only perform this deeper checking if we can't find the
file by comparing FileEntry pointers.

Also, add a micro-optimization where we don't bother to compute line
numbers when given the location (1, 1). This improves the
efficiency of clang_getLocationForOffset().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124800 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
110a68e38bb37526f9bd1d4e8f1b941fe5410b27 02-Feb-2011 Douglas Gregor <dgregor@apple.com> Fix name lookup issue

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124700 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
dae687575010c9c49a4b552f5eef82cd6279d9ac 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Create a special allocator class for code completion, so that all of
the string copying goes through a single place that can have
associated state.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124698 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
218937c13ef5b0625a70aad41ca7a92da9278bd2 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Allocate CodeCompletionString and all of its components in a
BumpPtrAllocator, rather than manually new/delete'ing them. This
optimization also allows us to avoid allocating memory for and copying
constant strings (e.g., "return", "class").

This also required embedding the priority and availability of results
within the code completion string, to avoid extra memory allocation
within libclang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124673 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
e72fb6f40231a1e8372c7576b69f06f0a1eb28a7 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Add libclang functions to determine the const/volatile/restrict
qualifiers on a CXType. Patch from Stefan Seefeld, test by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124377 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
ibclang.darwin.exports
ibclang.exports
fbcfeeabed6aa60ba664be302f2b03bed3d1b24d 24-Jan-2011 Douglas Gregor <dgregor@apple.com> Eliminate the use of getTypeForDecl from clang_getCursorType() and
clang_getDeclObjCTypeEncoding(); use ASTContext's methods instead,
which will (lazily) create the type as needed. Otherwise, we can end
up with null QualTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124133 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
ba73adafabb1c0af8bec70a1673edc11e6d30a89 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach libclang to generate USRs containing parameter packs and pack expansions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123848 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
94d96291cd041adc5731a2294828a9c20e450b74 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach libclang about SizeOfPackExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123846 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f4c7371fb1d3cebcfb40abad4537bb82515704ea 19-Jan-2011 John McCall <rjmccall@apple.com> Change QualType::getTypePtr() to return a const pointer, then change a
thousand other things which were (generally inadvertantly) relying on that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XType.cpp
0b53cf834346d78985aaa9e7300445a39c245614 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Don't silently drop warning flags passed in to
clang_createTranslationUnitFromSourceFile().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123793 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
dec0984fce504a39a7f085774fb67cfd9957be58 18-Jan-2011 Jeffrey Yasskin <jyasskin@google.com> Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
-Wint-to-pointer-cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123719 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
1aee05d08b2184acadeb36de300e216390780d6c 15-Jan-2011 Douglas Gregor <dgregor@apple.com> Introduce a new kind of TemplateName that captures a substituted
template template parameter pack that cannot be fully expanded because
its enclosing pack expansion could not be expanded. This form of
TemplateName plays the same role as SubstTemplateTypeParmPackType and
SubstNonTypeTemplateParmPackExpr do for template type parameter packs
and non-type template parameter packs, respectively.

We should now handle these multi-level pack expansion substitutions
anywhere. The largest remaining gap in our variadic-templates support
is that we cannot cope with non-type template parameter packs whose
type is a pack expansion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123521 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c7793c73ba8a343de3f2552d984851985a46f159 15-Jan-2011 Douglas Gregor <dgregor@apple.com> Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr,
that captures the substitution of a non-type template argument pack
for a non-type template parameter pack within a pack expansion that
cannot be fully expanded. This follows the approach taken by
SubstTemplateTypeParmPackType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123506 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
cbb67480094b3bcb5b715acd827cbad55e2a204c 08-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,
more accurate, and makes it make sense for it to hold a delegating constructor
call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123084 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a7fc901a2e39bfe55bfcff5934b2d9fdf9656491 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Replace the representation of template template argument pack
expansions with something that is easier to use correctly: a new
template argment kind, rather than a bit on an existing kind. Update
all of the switch statements that deal with template arguments, fixing
a few latent bugs in the process. I"m happy with this representation,
now.

And, oh look! Template instantiation and deduction work for template
template argument pack expansions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122896 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
ee8aff06f6a96214731de17b2cb6df407c6c1820 04-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the sizeof...(pack) expression to compute the length of a
parameter pack.

Note that we're missing proper libclang support for the new
SizeOfPackExpr expression node.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122813 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
be230c36e32142cbdcdbe9c97511d097beeecbab 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for pack expansions whose pattern is a non-type
template argument (described by an expression, of course). For
example:

template<int...> struct int_tuple { };

template<int ...Values>
struct square {
typedef int_tuple<(Values*Values)...> type;
};

It also lays the foundation for pack expansions in an initializer-list.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122751 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
5389f48b24937ad7b4093307128b3cbf25235654 30-Dec-2010 David Chisnall <csdavec@swan.ac.uk> Expose Objective-C type encodings of declarations to libclang users. This also adds a method in ASTContext which encodes FunctionDecls using the same encoding format that is used for Objective-C methods.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122639 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
ibclang.darwin.exports
ibclang.exports
3f59c975aa5d047f7edd1b900b5e885c38af0ef7 26-Dec-2010 Chris Lattner <sabre@nondot.org> The -fshort-wchar option causes wchar_t to become unsigned, in addition to being
16-bits in size. Implement this by splitting WChar into two enums, like we have
for char. This fixes a miscompmilation of XULRunner, PR8856.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122558 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
XType.cpp
c4bf2b9afb7d47445a9dc6bc848657098a4e3851 22-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Introduced raw_identifier token kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122394 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
32038bb8486a1f31e8bd8e19ef388049669e9ed2 21-Dec-2010 Douglas Gregor <dgregor@apple.com> When determining which preprocessed entities to traverse in libclang,
take into account the region of interest. Otherwise, we may fail to
traverse some important preprocessed entity cursors.
Fixes <rdar://problem/8554072>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122350 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
3910cfd17fcd99ac80158e625fc63e4784d26435 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Teach clang_getCursorSemanticParent() and
clang_getCursorLexicalParent() to cope with class and function
templates, along with the parent of the translation unit. Fixes PR8761
and PR8766.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122324 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
87dd697dcc8ecb64df73ae64d61b8c80ff0c157c 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Clean up the handling of template argument packs, especially in the
area of printing template arguments. The functionality changes here
are limited to cases of variadic templates that aren't yet enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122250 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
7536dd5e6c99584481b7dab68b7e7d8df9c54054 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Introduce a new type, PackExpansionType, to capture types that are
pack expansions, e.g. given

template<typename... Types> struct tuple;

template<typename... Types>
struct tuple_of_refs {
typedef tuple<Types&...> types;
};

the type of the "types" typedef is a PackExpansionType whose pattern
is Types&.

This commit introduces support for creating pack expansions for
template type arguments, as above, but not for any other kind of pack
expansion, nor for any form of instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122223 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
472ccff00cdbcd095c3ba933b9e3f202719f118f 18-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Replace all uses of PathV1::getLast with PathV2::filename.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122117 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
723df245307a530da5433dfb43accf187dc3e243 14-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added missing IgnoreParens().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121795 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
1ab55e9bb87d98bff1d42c7a0ee502c64755d9f5 10-Dec-2010 Douglas Gregor <dgregor@apple.com> Eliminate the branching in QualType::getTypePtr() by providing a
common base for ExtQuals and Type that stores the underlying type
pointer. This results in a 2% performance win for -emit-llvm on a
typical C file, with 1% memory growth in the AST.

Note that there is an API change in this optimization:
QualType::getTypePtr() can no longer be invoked on a NULL
QualType. If the QualType might be NULL, use
QualType::getTypePtrOrNull(). I've audited all uses of getTypePtr() in
the code base and changed the appropriate uses over to
getTypePtrOrNull().

A future optimization opportunity would be to distinguish between
cast/dyn_cast and cast_or_null/dyn_cast_or_null; for the former, we
could use getTypePtr() rather than getTypePtrOrNull(), to take another
branch out of the cast/dyn_cast implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121489 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
075f8f1b6bed4d1b224c74f87508534cc6392ce6 10-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added ParenType type node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121488 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
85fe1560b061b5f93a52dbd07cddd6e808854710 10-Dec-2010 Douglas Gregor <dgregor@apple.com> In clang_getCursor(), don't override a preprocessing cursor within
another preprocessing cursor, since we want the outermost one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121470 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
0aefbd8d6a82fe8f70ec92871ea42fa5240a960f 10-Dec-2010 Douglas Gregor <dgregor@apple.com> Extend libclang debugging output for clang_getCursor() to show the definition we found

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121451 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e8b3de090b9de3c27c5d381e767217ddb849d5d8 09-Dec-2010 Anders Carlsson <andersca@mac.com> Fix build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121341 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
da6fb69873079a0193ed8c9fa1d1b859d4f87b95 09-Dec-2010 Ted Kremenek <kremenek@apple.com> Remove extra namespace specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121334 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
9915539294a96eb931a4e17c802be73980ba98e0 09-Dec-2010 Ted Kremenek <kremenek@apple.com> DenseMapInfo is a 'struct', not a 'class'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121321 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
eca099bdb0178d408d4f717c2e9627e0d0e673c6 09-Dec-2010 Ted Kremenek <kremenek@apple.com> Add new libclang hooks for CXCursorSet, a
DenseMap-backed hashtable for doing client-side
management of CXCursors within a set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121318 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ibclang.darwin.exports
ibclang.exports
f187237d916afa97c491ac32fe98be7d335c5b63 08-Dec-2010 Francois Pichet <pichet2000@gmail.com> Remove the TypesCompatibleExprClass AST node. Merge its functionality into BinaryTypeTraitExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121298 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
0a03a3f98b14006a54bcac9e8908a7c9f50e519f 08-Dec-2010 Francois Pichet <pichet2000@gmail.com> Fix bug where annotate tokens was not working for BinaryTypeTraitExpr.
CIndex's EnqueueVisitor must visit elements backward apparently.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121247 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6ad6f2848d7652ab2991286eb48be440d3493b28 07-Dec-2010 Francois Pichet <pichet2000@gmail.com> Type traits intrinsic implementation: __is_base_of(T, U)
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121074 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
1fd9e0def66fbd50e99be5ff87c9fd1c91c428ab 07-Dec-2010 Douglas Gregor <dgregor@apple.com> Use atomic operations for libclang's object count tracking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121073 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
4765fa05b5652fcc4356371c2f481d0ea9a1b007 06-Dec-2010 John McCall <rjmccall@apple.com> Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
00eb3f9c5b33e3d99aee1f8b75dd9c9678fdd66b 04-Dec-2010 Francois Pichet <pichet2000@gmail.com> More anonymous struct/union redesign. This one deals with anonymous field used in a constructor initializer list:

struct X {
X() : au_i1(123) {}
union {
int au_i1;
float au_f1;
};
};

clang will now deal with au_i1 explicitly as an IndirectFieldDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120900 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
12f78a6741a4cb3d904340f8d3d2714568b50e7a 02-Dec-2010 John McCall <rjmccall@apple.com> Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
into the latter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120643 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
89d9980bbc2e4a4ac86673e6ec16fb9f5babb63b 30-Nov-2010 Douglas Gregor <dgregor@apple.com> When using a precompiled preamble with detailed preprocessing records,
trap the serialized preprocessing records (macro definitions, macro
instantiations, macro definitions) from the generation of the
precompiled preamble, then replay those when walking the list of
preprocessed entities. This eliminates a bug where clang_getCursor()
wasn't able to find preprocessed-entity cursors in the preamble.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120396 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
03013fa9a0bf1ef4b907f5fec006c8f4000fdd21 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
Indexer.cpp
Indexer.h
39b49bcaaddb1049234fca9500c0ac02c088e23d 23-Nov-2010 Chris Lattner <sabre@nondot.org> now the FileManager has a FileSystemOpts ivar, stop threading
FileSystemOpts through a ton of apis, simplifying a lot of code.
This also fixes a latent bug in ASTUnit where it would invoke
methods on FileManager without creating one in some code paths
in cindextext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120010 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
7ad97ffa631af6ad678c79b38341ac995f347ce9 23-Nov-2010 Chris Lattner <sabre@nondot.org> give FileManager a 'FileSystemOptions' ivar, which will be used
to simplify a bunch of code in it. It should ultimately get inlined
into FileManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120007 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
d98114647e16796a976b04af79975b4f0eacf22b 21-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix a bunch of IndirectFieldDecl-related warnings.

- Negative ChainingSize doesn't make sense, make it unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119943 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6538227d51df249b07c8ab80ae376f5c1d14403c 21-Nov-2010 Chris Lattner <sabre@nondot.org> remove old compatibility APIs, use StringRef versions instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119935 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9ce5584553054d0cb934940586aca0186e87fa57 20-Nov-2010 Douglas Gregor <dgregor@apple.com> Implement a simple hash function for libclang cursors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119876 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
1a9d0503b67a499797141af0fd6d315d5045f0ea 20-Nov-2010 Douglas Gregor <dgregor@apple.com> Implement clang_getCanonicalCursor() in libclang, which does the obvious thing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119874 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
aa5f135f8db82b5e5fb1640fd51f8078e0b2d82d 19-Nov-2010 Douglas Gregor <dgregor@apple.com> Extend the libclang diagnostic API to provide information about the
option name, category ID, and category name corresponding to a diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119802 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
ibclang.darwin.exports
ibclang.exports
026f6911bb985c800a54446de9f6da8745ae025a 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Get the number of errors reported from the diagnostic client, in clang_parseTranslationUnit_Impl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119745 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
33e4e70c8c0a17e0ccb7465d96556b077a68ecb1 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactoring of Diagnostic class.

-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119730 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
cdba6595a61a7bd31f504260abf63c900a759d0f 18-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: switch remaining expressions over
to the data-recursion algorithm. CursorVisitor
now no longer subclasses StmtVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119596 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f64d80306144f978148ba92f36f7cea7b671dd34 18-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate handling of
'DependentScopeDeclRefExpr' and
'CXXDependentScopeMemberExpr' to the
data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119591 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
0a90d32523bfe5fa63e11b648686c9699f786d15 18-Nov-2010 Ted Kremenek <kremenek@apple.com> Make definition of CXTranslationUnitImpl private
to libclang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119585 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexInclusionStack.cpp
XCursor.cpp
XString.cpp
XTranslationUnit.h
XType.cpp
89629a746019a42797495b091711a1d68467e88a 17-Nov-2010 Douglas Gregor <dgregor@apple.com> When libclang is walking a member access expression, don't walk into
an implicit "this"; it causes clang_getCursor() to find the implicit
"this" expression (which isn't written in the source!) rather than the
actual member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119516 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6653798ff5ce6deb58112777e21307ccc453133d 17-Nov-2010 Douglas Gregor <dgregor@apple.com> When comparing the source range of a declaration against the region of
interest (e.g., as used by clang_getCursor()), count the
decl-specifier-seq as part of the source range, as we do for
clang_annotateTokens(). Makes clang_getCursor() work properly for the
result types of functions, for example.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119514 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6d0a00d9b02499d6c1253ea03d4dc7c32f8f289e 17-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: Migrate handling of
'SizeOfAlignOfExpr' and 'CXXSCalarValueInitExpr'
to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119452 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a4ffd85a6684e42f900aad5459e58ad91bb88755 17-Nov-2010 Douglas Gregor <dgregor@apple.com> For an Objective-C @synthesize statement, e.g.,

@synthesize foo = _foo;

keep track of the location of the ivar ("_foo"). Teach libclang to
visit the ivar as a member reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119447 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
1e7e877091187556bb6d644ab2b7c00a628121eb 17-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate handling of CXXUuidofExpr to
data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119444 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
2939b6f356161f572712d4d6310b65f9599e3675 17-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate handling of UnaryTypeTraitExpr
to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119443 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
60608ec12d17168a3d1f415409a6a6eaf6d94508 17-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: refactor visitation of
explicit template args within data-recursion
algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119442 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ae1fd6fd47ce3fbb878155af6f517adaeae15a51 17-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate handling of
AddrLabelExpr to data-recursion algorithm, and
unify that reasoning with GotoStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119441 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9d3bf79d94c961af95144ef63bbd6f9f3f32c59a 17-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate handling of
VAArgExpr to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119440 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
b8dd1cad52be63b18092bd9d9335cbeee3f5de9f 17-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate handling of
CXXTypeidExpr to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119439 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
fafa75aebadef8d6b44a920e3f40529f150a5574 17-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate handling of
TypesCompatibleExpr to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119438 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
55b933ae3b3efc29987b8bd92714257f00c4b53a 17-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: Migrate CXXUnresolvedConstructExpr over to data-recursive algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119437 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e3c60a7ce9e0f42c7ca2344b33203266aceca1db 17-Nov-2010 Douglas Gregor <dgregor@apple.com> Fix source-range information for Objective-C properties. Previously,
we were just getting a range covering only the property name, which is
certainly not correct (and broke token annotation, among other
things).

Also, teach libclang about the relationship between
@synthesize/@dynamic and @property, so we get property name and
cursor-reference information for @synthesize and @dynamic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119409 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
e645c72d1eceb170cd157fc3c725ebf95a74c439 16-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> MSVC doesn't like the noinline attribute at the end of a declaration. Try the other side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119349 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f019943eda4896c1bbe584b4b0439bf6cbff62a9 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Rework USR generation from CXCursors to use CXStringBufs
for the backing of generated USRs. This optmizes
for the case when a client generates a sequence
of USRs in sequence, disposing of them soon
after generating them. By using a string buffer,
we recycle malloc'ed memory instead of constantly
malloc'ing and copying strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119338 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
a60ed47da13393796d8552b9fdca12abbb3eea42 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Change CXTranslationUnit to not directly cast to an ASTUnit*,
but to wrap both an ASTUnit and a "string pool"
that will be used for fast USR generation.

This requires a bunch of mechanical changes, as
there was a ton of code that assumed that CXTranslationUnit
and ASTUnit* were the same.

Along with this change, introduce CXStringBuf,
which provides an llvm::SmallVector<char> backing
for repeatedly generating CXStrings without a huge
amount of malloc() traffic. This requires making
some changes to the representation of CXString
by renaming a few fields (but keeping the size
of the object the same).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119337 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCXX.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexInclusionStack.cpp
XCursor.cpp
XCursor.h
XString.cpp
XString.h
XType.cpp
XType.h
ea834df7cd07d67a77e7dd6e48e8db27464be2fd 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Add CXString.cpp and CXString.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119322 91177308-0d34-0410-b5e6-96231b3b80d8
XString.cpp
XString.h
ed122735639d83c10f18c28c7fd117bfcd0f62cb 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Move CXString creation/management routines into
their own .cpp file and make the interpretation
of its flags private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119319 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCXX.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexUSRs.cpp
Indexer.h
MakeLists.txt
XCursor.cpp
XType.cpp
d1ded66c4eda8d170222071dec7ebba78bd86ea4 16-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: cache worklists created for data-recursion to reduce malloc() traffic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119290 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
7cd7d1ad33fdf49eef83942e8855fe20d95aa1b9 16-Nov-2010 John McCall <rjmccall@apple.com> Add a new expression kind, OpaqueValueExpr, which is useful for
certain internal type-checking procedures as well as for representing
certain implicitly-generated operations. Uses to follow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119289 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
37f1ea0eb08a00fa90edbecb427cfbb50ca0f4d0 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Use LLVM_ATTRIBUTE_NOINLINE instead of attribute((noinline)).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119287 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
82f3c50fa163f99d1407849e556d3859a09afd78 15-Nov-2010 Ted Kremenek <kremenek@apple.com> Cast pointers instead of returning a new value within RunVisitorWorkList().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119282 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
3cb7ba0010732bbd20a8003f8d9f6a4e8d7bb20a 15-Nov-2010 Ted Kremenek <kremenek@apple.com> Annotate CursorVisitor::VisitDataRecursive() with attribute 'noinline'.
Clang currently uses a ridiculous amount of stack space when inlining
this function, which can lead to premature stack overflows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119281 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6c53fdd88f0d75875365463822fa817d7b1a9573 14-Nov-2010 Ted Kremenek <kremenek@apple.com> "Fix" some unintentional fallout from converting
the Stmt* visitation in CursorVisitor to be
data-recursive.

Since AnnotationTokensWorker explicitly calls
CursorVisitor::VisitChildren(), it essentially
transforms the data-recursive algorithm in
CursorVisitor back into a non-data recursive one.
This is particularly bad because the data-recursive
algorithm uses more stack space per stack frame,
which can cause us to blow the stack in some cases.

"Fix" this by making the stack that AnnotationTokensWorker
runs in really huge. The real fix is to modify
AnnotationTokensWorker not to do the explicit
recursive call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119047 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
Indexer.h
2bd1e7cf88adf0e6c1084ba8d285b5f5da2ebbe0 14-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: make data-recursion algorithm the default except for the few remaining Exprs still
covered by the normal recursive visitation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119030 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
91fc0259d29be805191ccf2ab91d5e6b2e774070 14-Nov-2010 Ted Kremenek <kremenek@apple.com> Remove stale #include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119028 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8b8d8c90f2d8ac651d14b57f116d20b3c911ac7f 13-Nov-2010 Ted Kremenek <kremenek@apple.com> Rewrite reverse iteration loop in a more natural countdown manner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118990 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
11b8e3e7fa67795acc968a9d5ebfd687feaf2b2c 13-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate CXXNewExpr and CXXDefaultArgExpr over to data-recursive algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118989 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
083c7e2d564033af87e507fbbd02f1c77ff462b1 13-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: special-case CompoundStmt in data-recursion algorithm so we don't have to enqueue
its children and then reverse them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118986 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
73d15c452e675b684b7eee4f2096e386e59397aa 13-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: Migrate BlockExpr, CXXTemporaryOBjectExpr, and ObjCEncodeExpr to data-recursive algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118964 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e4979ccb5960608edce73f3b274eb7c2de15dac5 13-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: Migrate DeclRefExpr over to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118961 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
1876bf6a23f33121591b5b2ef1cc0574b79a3e08 13-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate GotoStmt to data-recursive algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118960 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
035dc41b509fcc470ceb6764aa64837505a2ece3 13-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate DeclStmt over to data-recursive algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118957 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
28a719433411ef782b582946823bc648ddcc4533 13-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: Convert logic for populating data-recursion worklist from a switch statement to a StmtVisitor. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118956 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
277f47c02e665658ae7dcb6349ae7a011f690129 13-Nov-2010 Nick Lewycky <nicholas@mxc.ca> Use dyn_cast result instead of re-casting. Fixes -Werror build with:
/llvm/tools/clang/tools/libclang/CIndex.cpp:1823: error: unused variable 'E' [-Wunused-variable]


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118947 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9939424863b1497a06ca71bf0ecd06052bb8add3 12-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: Pull ObjCMessageExpr and explicit casts into data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118934 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c373e3c8448ddce58a9a0eff62b1b89513b1d9ee 12-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate ObjCMessageExpr over to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118933 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6045878f1fa7fad19d826634617991db99d3bd22 12-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate UnresolvedMemberExpr and UnresolvedLookupExpr over to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118929 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
cdb4caf6bd8beb562e169b4d3f6c604c4e4528f8 12-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate CompoundLiteralExpr over to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118928 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a6b70435ae49f2c7da1ad2b200c1aeb9f8761fdd 12-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: add data-recursion support for InitListExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118927 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
bb67713d5075690d9b0d0a97cf19529f668c2e3f 12-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate 'DoStmt', 'ForStmt', and 'WhileStmt' over to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118912 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ae3c220fddb65b63ede3533bbdeed8ac7dcd1b0d 12-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: use 'WLAddStmt' and 'WLAddDecl' for adding to data-recursion worklist.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118911 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c70ebba0e164abee26e6e1dbbe71c777f8f461a0 12-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate 'IfStmt' over to data-recursive algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118910 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f1107457c7d5cb57718725c51dfed4bf2ba6ee9e 12-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: migrate handling of SwitchStmt and CaseStmt over to general data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118909 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
cb7b1e17b63967317ab5cc55682168cf0380519a 12-Nov-2010 Douglas Gregor <dgregor@apple.com> Make sure to always check the result of
SourceManager::getPresumedLoc(), so that we don't try to make use of
an invalid presumed location. Doing so can cause crashes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118885 91177308-0d34-0410-b5e6-96231b3b80d8
IndexInclusionStack.cpp
8c269ac75569454a049385b1246140db5f2b6faa 12-Nov-2010 Ted Kremenek <kremenek@apple.com> Modify CursorVisitor to also walks CXXOperatorCallExprs using data-recursion. Fixes <rdar://problem/8659019>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118853 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ab97961fb4424d0822076eb0fd4f8faee9992763 11-Nov-2010 Ted Kremenek <kremenek@apple.com> Annotate tokens in a separate thread to avoid blowing out stack space. While the CursorVisitor
is gradually becoming more data recursive, AnnotateTokensVisitor does its own recursive call
within the visitor that can still blow out the stack. This can potentially be reworked to avoid this,
but for now just do token annotation on a separate thread.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118783 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c0e1d923231d42fb0ac86e56a29ffc5c754657ca 11-Nov-2010 Ted Kremenek <kremenek@apple.com> Generalize data-recursive visitation in CursorVisitor to also handle MemberExprs
and CXXCallMemberExprs. This scheme is hopefully general enough to extend to the
rest of the visitor if necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118782 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e47be3e9682e82da15059006f43c7f3c021e4fff 11-Nov-2010 Douglas Gregor <dgregor@apple.com> Improve ASTUnit's capture of diagnostics so that the
diagnostic-capturing client lives as long as the ASTUnit itself
does. Otherwise, we can end up with crashes when we get a diagnostic
outside of parsing/code completion. The circumstances under which this
happen are really hard to reproduce, because a file needs to change
from under us.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118751 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
826faa22bae112e01293a58534a40711043cce65 10-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Replace UsingDecl's SmallPtrSet of UsingShadowDecls with a linked list to avoid leaking memory.
Fixes rdar://8649963.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118674 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a9b06d4c246d6c301e3dd1844f5dba669ed9c631 09-Nov-2010 Douglas Gregor <dgregor@apple.com> ntroduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.

I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.

Take 2: this time, adjusted tests appropriately and used a "simple"
approach to the spelling location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118495 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexDiagnostic.cpp
ibclang.darwin.exports
ibclang.exports
27a31fe6fac7eb98ece172bf83af93a3a103f5b4 09-Nov-2010 Douglas Gregor <dgregor@apple.com> Revert r118492, which didn't update all of its tests accordingly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118494 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexDiagnostic.cpp
ibclang.darwin.exports
ibclang.exports
b6278715de9530aea42ff3f9d4064fb5bed13343 09-Nov-2010 Douglas Gregor <dgregor@apple.com> Introduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.

I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118492 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexDiagnostic.cpp
ibclang.darwin.exports
ibclang.exports
3b35a4d21c9f6e48ee7e64fdf78fde39a61f602e 09-Nov-2010 NAKAMURA Takumi <geek4civic@gmail.com> c-index-test: Be available on Cygwin by using Win32's logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118479 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.cpp
04c450c44d01169de287b64bc256d723007010da 08-Nov-2010 Ted Kremenek <kremenek@apple.com> Add CursorVisitor::VisitBinaryOperator() to explicitly handle the case where we can blow out the stack due
to deeply nested BinaryOperators. This is done by turning the explicit recursion into being data recursive.

Fixes: <rdar://problem/8289205>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118444 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
910f8008fea79120489a53593fe971b0b8a4a740 08-Nov-2010 Douglas Gregor <dgregor@apple.com> Remove broken support for variadic templates, along with the various
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.

But don't get too excited about that happening now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
93798e25d68e2d146cff9bd0355d4b7b1ca765f1 05-Nov-2010 Douglas Gregor <dgregor@apple.com> Teach clang_getCursorReferenced() that a
CXXConstructorExpr/CXXTemporaryObjectExpr references the constructor
it calls. Then, tweak clang_getCursor() to prefer such a call over a
type reference to the type being called.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118297 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
abdce7abc8a22dd2fe79a05c0b71864039bd8296 05-Nov-2010 Daniel Dunbar <daniel@zuster.org> libclang: Enable requesting a larger stack for several libclang entry points
using "safety" threads.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118278 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
bf44c3b099602c9c967f1b20995919fb4ef39a51 05-Nov-2010 Daniel Dunbar <daniel@zuster.org> libclang: Add some support for running certain entry points in a "safety"
thread, primarily to get a larger stack.
- Yes, I feel dirty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118274 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
Indexer.h
9e1ebdd97ba0c593900cb7f103324c43471e96ee 05-Nov-2010 Daniel Dunbar <daniel@zuster.org> Fix 80-col violas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118273 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
995aaf9c8f0131bef0215a9a0bc794b83a49e0b7 04-Nov-2010 Daniel Dunbar <daniel@zuster.org> libclang: Add clang_executeOnThread, for use in c-index-test (and only there,
preferably). Good thing c-index-test is written in C!!!!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118223 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
389db16c63eec6ecfa9b235155252d8da766e94e 03-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement -working-directory.

When -working-directory is passed in command line, file paths are resolved relative to the specified directory.
This helps both when using libclang (where we can't require the user to actually change the working directory)
and to help reproduce test cases when the reproduction work comes along.

--FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains
the working directory value if set).
--FileSystemOptions are passed around to various interfaces that perform file operations.
--Opening & reading the content of files should be done only through FileManager. This is useful in general since
file operations will be abstracted in the future for the reproduction mechanism.

FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same
FileManager but with different FileSystemOptions.

Addresses rdar://8583824.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118203 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
Indexer.h
3387c65a094a02b2a94c05111d035a97d3d5c794 03-Nov-2010 David Chisnall <csdavec@swan.ac.uk> Added cursor visitor that takes a block as an argument. Tested compiling
libclang with both clang -fblocks and gcc (no blocks support). Only exposed in
the header to compilers that do have blocks support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118170 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.exports
40749ee585abc84fbb3c8fdbd8aaac062f153062 03-Nov-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information for CXXConstructExpr nodes, by
ensuring that they cover all of their child nodes. There's still a
clang_getCursor()-related issue with CXXFunctionalCastExprs with
CXXConstructExprs as children (see FIXME in the test case); I'll look
at that separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118132 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
0582c897ec7261b4c6af0fe26dc2a0b6b54d266c 03-Nov-2010 Ted Kremenek <kremenek@apple.com> Don't add Decls with an invalid location to DeclsInContainer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118111 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
d8c370ca95a3bccc36c4a6b92a4042809ff51ee4 03-Nov-2010 Ted Kremenek <kremenek@apple.com> Hack to workaround deficiency in ObjC ASTs. Functions and variables may be declared
within an @implementation, but we have no way to record that information in the AST.
This may cause CursorVisitor to miss these Decls when doing a AST walk.

Fixes <rdar://problem/8595462>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118109 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
007a7c9d8dcdb2e9cd94b6075108bfc4c90e6ccd 02-Nov-2010 Ted Kremenek <kremenek@apple.com> Encapsulate within CXCursor the notion of whether a VarDecl* is the first Decl in a DeclGroup. We use this
to recover some context that is currently not modeled directly in the AST. Currently VarDecl's cannot
properly determine their source range because they have no context on whether or not they appear in a DeclGroup.
For the meantime, this bandaid suffices in libclang since that is where the correct SourceRange is directly needed.

Fixes <rdar://problem/8595749>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117973 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
81d3c04b0934c43518355289ad104d34f6fde06f 01-Nov-2010 Douglas Gregor <dgregor@apple.com> Do not compare invalid source locations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117946 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
1dfb26af4d6aa4f7818e256659a79f1ec2cba784 29-Oct-2010 Ted Kremenek <kremenek@apple.com> Remove old CrashTracer cruft from CIndex.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117634 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
99ba202f659e1885fa5ee114f97c97cf6a857491 27-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce libclang-level options for C++ precompiled preambles,
separating out chaining precompiled preambles from non-chaining ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117457 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
38f28c1189142429384996409fffbc57f67b5c60 23-Oct-2010 Douglas Gregor <dgregor@apple.com> Teach clang_getCursorReferenced() and friends about BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117167 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
4419b675577d7c281a659fab1fec10e1bfbe04c5 21-Oct-2010 Douglas Gregor <dgregor@apple.com> Improve the implementation of libclang's token-annotation logic for
entities in the preprocessing record. Previously, we would only end up
getting the first token of a preprocessing record annotated
correctly. For example, given

#include "foo.h"

we would only get the '#' annotated as an inclusion directive; the
'include' and '"foo.h"' tokens would be given the general 'processing
directive' annotation.

Now, we get proper annotations for entities in the preprocessing
record.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117001 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ecdcb883cbc6bb4a2445dc6f02d58d9bdb54a0ed 21-Oct-2010 Douglas Gregor <dgregor@apple.com> Extend the preprocessing record and libclang with support for
inclusion directives, keeping track of every #include, #import,
etc. in the translation unit. We keep track of the source location and
kind of the inclusion, how the file name was spelled, and the
underlying file to which the inclusion resolved.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116952 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
ibclang.darwin.exports
ibclang.exports
c7b7b7a8eda7a5316ad1062b7f81a339f5550bca 18-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce code completion results for Objective-C methods, both when
declaring methods and when sending messages to them, by bringing all
of the selector into TypedCheck chunks in the completion result. This
way, we can improve the sorting of these results to account for the
full selector name rather than just the first chunk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116746 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
83889a7f1f338e343ef72aeeef9c27f7b62c0f0f 15-Oct-2010 David Chisnall <csdavec@swan.ac.uk> Add clang_getLocationForOffset() to libclang, for gives a source location from a character index into a file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116587 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
8ac2d449820fd0df00fcbde5bf82165c1f49854d 14-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
096428b351ebf5de9871ce11e06ba6f2d8276ab5 13-Oct-2010 David Chisnall <csdavec@swan.ac.uk> Don't claim that things that are Objective-C keywords if preceded by an @ are keywords unless they are preceded by an @.

For example, don't claim that end is a keyword in:

unsigned end;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116439 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c44fe4bf2962bfcb323e93a63ba4a72d67839cde 12-Oct-2010 Francois Pichet <pichet2000@gmail.com> This patch remove the Win32 XFAIL from remap-complete.c

The problem was that text files were open in text mode and Microsoft implementation of fread and write will try to do nasty line-feed conversion which make the line position no longer valid. The fix is to read and write files in binary mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116286 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.cpp
4cd912aa94656697a44c3ebb159f05060300524e 12-Oct-2010 Douglas Gregor <dgregor@apple.com> When we load an ASTUnit from command-line arguments, hold on to the
diagnostics produced by the driver itself. Previously, we were
allowing these to either be dropped or to slip through to stderr.

Fixes <rdar://problem/7595339>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116285 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
d1e6fdb4c5325c61fedfa62751f70ee373880a52 12-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate CIndexer::getClangPath(), since libclang no longer depends
on the presence of a 'clang' executable. Simplify
CIndexer::getClangResourcesPath() a bit.

Patch up the CMake makefiles to install headers into two locations in
the build tree, for those silly cases where 'clang' will end up
looking into the wrong build directory for headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116260 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.cpp
Indexer.h
d3ab63e0f66429abf2a3e4cde889e420e41e8790 12-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate -fdiagnostics-binary and all of the infrastructure for
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116250 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
IndexDiagnostic.h
e0cc52ef8afc8d1cba9c534191b5f0ddaff1d694 11-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate clang_codeComplete(). libclang clients should be using the
faster, in-process, more-configurable clang_codeCompleteAt().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116245 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
32be4a588fbb87d0d163ead49c42f5438bf0b2b7 11-Oct-2010 Douglas Gregor <dgregor@apple.com> Switch c-index-test from clang_codeComplete() over to
clang_codeCompleteAt(). This uncovered a few issues with the latter:

- ASTUnit wasn't saving/restoring diagnostic state appropriately between
reparses and code completions.
- "Overload" completions weren't being passed through to the client



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116241 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
b10daedb8fc4c6f70a66dbc1a6eea01684bb4e77 11-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate clang_setUseExternalASTGeneration() from libclang. Between
improvements to the compiler and the introduction of crash recovery,
it no longer makes sense to allow this mode. Moreover, this eliminates
one use of the "clang" executable from within libclang; we'd like them
all to go away.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116207 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
Indexer.h
ibclang.darwin.exports
ibclang.exports
5a9c0bca4504eeda45a3fd0ae1c244b2994f38b2 08-Oct-2010 Douglas Gregor <dgregor@apple.com> Fix the mapping of vertical-space cursor kinds to produce a newline,
rather than a space.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116097 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
48615ffe41e41e0cc232dfb61289b707ece37ea1 08-Oct-2010 Daniel Dunbar <daniel@zuster.org> libclang: Disable LLVM pretty stack trace functionality, which inadvertently
sets up signal handlers it shouldn't when we are being used a shared library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116084 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
97475834207bf5abb5b58534f783c9b71d4b9df1 05-Oct-2010 Douglas Gregor <dgregor@apple.com> Fix a marvelous chained AST writing bug, where we end up with the
following amusing sequence:
- AST writing schedules writing a type X* that it had never seen
before
- AST writing starts writing another declaration, ends up
deserializing X* from a prior AST file. Now we have two type IDs for
the same type!
- AST writer tries to write X*. It only has the lower-numbered ID
from the the prior AST file, so references to the higher-numbered ID
that was scheduled for writing go off into lalaland.

To fix this, keep the higher-numbered ID so we end up writing the type
twice. Since this issue occurs so rarely, and type records are
generally rather small, I deemed this better than the alternative: to
keep a separate mapping from the higher-numbered IDs to the
lower-numbered IDs, which we would end up having to check whenever we
want to deserialize any type.

Fixes <rdar://problem/8511624>, I think.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115647 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
358559d8d7b458c5f64941842383a16e61f0828d 03-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce a new libclang function, clang_getCursorDisplayName(), which
produces a simple "display" name that captures the
arguments/parameters for a function, function template, class
template, or class template specialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115428 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
3f0fee315cbfa37e0c47904836948e9d0cca9eda 02-Oct-2010 Douglas Gregor <dgregor@apple.com> Teach clang_getCursorType() about base specifiers and other references
to types.

Also, teach clang_getTypeDeclaration() about template specializations,
injected-class-names, and elaborated types.

Fixes <rdar://problem/8506460>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115425 91177308-0d34-0410-b5e6-96231b3b80d8
XType.cpp
fe08e406c1d03d3bed9d93d745501e5e179d19d0 02-Oct-2010 Douglas Gregor <dgregor@apple.com> Don't add -fno-spell-checking in libclang if a spell-checking-related argument is already in the command-line arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115420 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
1b0f7af64113b63253ced088a2bc64eb98e6f388 02-Oct-2010 Douglas Gregor <dgregor@apple.com> Provide proper source location and range information for C++ base
specifier cursors in libclang. FIXME -=2, fixes the rest of
<rdar://problem/8274883>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115419 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
db1314e3ef76f38de07f1b3c7cdc1100a0678931 01-Oct-2010 Douglas Gregor <dgregor@apple.com> Teach clang_getCursorReferenced() about Objective-C property reference
and protocol expressions. Fixes <rdar://problem/7833565>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115346 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9f59234a91d057cee7c5e3cee91da8696858c692 01-Oct-2010 Douglas Gregor <dgregor@apple.com> Extend libclang with an API that determines, given a C++ virtual
member function or an Objective-C method, which other member
functions/methods it overrides.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115338 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
2a2c50b330e7754499f42173616a36865b5f313b 27-Sep-2010 Douglas Gregor <dgregor@apple.com> Enable caching of global code completion results in the suggested
libclang options for editing a translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114810 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8c8d5412cddcc1c45beb0353d91d7894db74e585 24-Sep-2010 Douglas Gregor <dgregor@apple.com> Teach libclang to enable multithreading in LLVM, since libclang clients are likely to be multithreaded. Also move the printing of timers to somewhere better for multithreaded libclang clients

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114760 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
593b0c1047f1323ebbda78ae38e96f976241c663 23-Sep-2010 Douglas Gregor <dgregor@apple.com> Add some missing concurrency checks into libclang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114682 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
2be5bc9ad3981347a000742f81b91ab3080f1214 22-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement libclang API functions for retrieving the lexical and
semantic parents of the given cursor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114587 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
a054fb46b1fb596d1719b89d2d9a5be3c32a4b0d 21-Sep-2010 Ted Kremenek <kremenek@apple.com> Correctly register the class extension as the lexical DeclContext for ObjC methods declared with @property in class extensions.
This matches the behavior for setters.

Also pass the class extension to ProcessPropertyDecl as the lexical DeclContext, even when not redeclaring the @property.

This fixes the remaining issues in <rdar://problem/7410145>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114477 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
097727ba0c0b24959a43ffe74b2d56a9d1e7e3fb 21-Sep-2010 Ted Kremenek <kremenek@apple.com> Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114394 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
c52d069277c58009a6c91a66d2f0754299f1acde 21-Sep-2010 Ted Kremenek <kremenek@apple.com> Check for null ObjCInterfaceDecls returned from getClassInterface() when generating USRs. While I have no test case for this (could not create one), this shows up in crash reports. Tentatively fixes <rdar://problem/8452791>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114392 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
66b7fbfa7b0537fac3d61494e89a1d59979974b1 20-Sep-2010 Douglas Gregor <dgregor@apple.com> Introduce a simple, substitution-based compression scheme for USRs, so
that redundant types don't result in super-long USRs. Fixes
<rdar://problem/8447875>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114347 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
692577cd3005922d9657a85c92e3fd68b50ddea1 17-Sep-2010 Douglas Gregor <dgregor@apple.com> When traversing an InitListExpr, there may not be a syntactic form;
check for NULL and visit the InitListExpr we have if there is no
syntactic form.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114203 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
7c432dd959609a3689c2e4406450c092e6d76d6d 16-Sep-2010 Douglas Gregor <dgregor@apple.com> Fix a silly typo and its pasteo. Thanks to Francois Pichet for noticing my mistake

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114075 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
560a921b85773ac7c2d1a7a4aec4682c822c5cb4 14-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> Revert "CMake: Update to use standard CMake dependency tracking facilities instead"

This reverts commit r113631

Conflicts:

CMakeLists.txt
lib/CodeGen/CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
1f60d9ea523fc321d811fe880ba9a1ec74fa8f9b 14-Sep-2010 Douglas Gregor <dgregor@apple.com> Introduce a new kind of cursor into libclang, which covers a reference
to an "overloaded" set of declarations. This cursor kind works for
unresolved references to functions/templates (e.g., a call within a
template), using declarations, and Objective-C class and protocol
forward declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113805 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
ibclang.darwin.exports
ibclang.exports
1aad34043d261fe7fe3edefa8484faa548b0176a 11-Sep-2010 Douglas Gregor <dgregor@apple.com> Fix my silly sorting predicate. I hate integer-to-bool conversions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113656 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
5a7f34958ca6f2fa8a52e9921cf521cbb92ae070 10-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
2e156225a29407a50dd19041aa5750171ad44ea3 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Define and implement CXXNoexceptExpr. Create it in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113623 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
36897b05ca2886e287f01802614bc10cbadcec22 10-Sep-2010 Douglas Gregor <dgregor@apple.com> Add libclang support for label statements, gotos, and taking the
address of a label (GNU extension).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113564 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
fa2e26f62162d90a3d117e58d6b1f47e40377987 10-Sep-2010 Douglas Gregor <dgregor@apple.com> Add libclang visitation for C99 designated initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113560 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8ccef2d0322ebf2701cc10f1ab14c9ee49e17bd7 10-Sep-2010 Douglas Gregor <dgregor@apple.com> Add libclang visitation for __builtin_offsetof's components (fields
and array references).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113556 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a67e03fdf1ae8a1f92463a307d0b6281f1161f40 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Teach libclang to walk the base and member initializers of a
constructor, in source order. Also introduces a new reference kind for
class members, which is used here (for member initializers) and will
also be used for designated initializers and offsetof.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113545 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
83cb94269015bf2770ade71e616c5322ea7e76e1 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Simplify template instantiation for C++ exception declarations,
eliminating an unnecessary use of TemporaryBase in the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113500 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
3d37c0ada0e46b87be0a10e8d52d990a97d3907a 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Add proper type-source information to UnaryTypeTraitExpr, including
libclang visitation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113492 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ec9bf475657e4fd7c8e920ff816a4e3cdb2ea213 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Clean up CMake dependencies

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113489 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
9be88403e965cc49af76c9d33d818781d44b333e 09-Sep-2010 Francois Pichet <pichet2000@gmail.com> Fix warnings caused by new CXXUuidofExprClass enumerator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113444 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
ab6677ec401cfd2c82b34e4cdfebd55a9dc25778 08-Sep-2010 Douglas Gregor <dgregor@apple.com> Provide proper type-source location information for
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113319 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
1bb2a93ab7b1499dda6f6b58865bd0dce1864228 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information for CXXNewExpr, by hanging on to
the TypeSourceInfo for the allocated type. Fixes PR7501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113291 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e8d7bebc0dd037516dd695ee1ac2eb0923753b46 04-Sep-2010 Douglas Gregor <dgregor@apple.com> Synchronize code-completion cursor kinds with indexing cursor
kinds. How shameful that this code was duplicated!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113033 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
aaa80b208de3e2c706badf45060bd126fa747b84 03-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement libclang visitation for UnresolvedMemberExpr. This is the
last of the C++-specific expressions where we have decent source
information in the AST already. In particular, various
object-construction expressions (CXXNewExpr, CXXTemporaryObjectExpr)
still have poor source-location information that needs to be addressed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112981 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
25d63629cc37a9737c6d8d5c6aa08b356649212f 03-Sep-2010 Douglas Gregor <dgregor@apple.com> libclang visitation for CXXDependentScopeMemberExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112978 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
bfebed2a839e12c3e99d635dbd1f4f875ce8b066 03-Sep-2010 Douglas Gregor <dgregor@apple.com> libclang visitation for DependentScopeDeclRefExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112975 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
1f7b590d120758d0c969a8153c38d2446935d4aa 03-Sep-2010 Douglas Gregor <dgregor@apple.com> Teach libclang to visit OverloadExprs, so that we can reuse this
code. Also, teach it about explicitly-specified template arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112884 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8ab670ee2b8147da63d1f282d928e754e4e97408 03-Sep-2010 Douglas Gregor <dgregor@apple.com> Add libclang visitation for UnresolvedLookupExprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112879 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6f7198f6380581645f416dd48a0079f83d89e884 03-Sep-2010 Douglas Gregor <dgregor@apple.com> Add libclang visitation for C++ pseudo-destructor expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112873 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e2ca6d4a2f41876930fbd304caa706452d2569d8 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Eliminate CXXBindReferenceExpr, which was used in a ton of
well-intentioned but completely unused code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112868 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
da135b14ad5366f27143c9cd9f51ad2320e62758 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Teach libclang not to recursive into default argument expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112866 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
948022908d0c16acc3411fdec15aeb1790ffaa86 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Add libclang visitation for C++ typeid expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112862 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
fbb4c98a248c54d31063aa41dbfacf4f78c93f10 02-Sep-2010 Douglas Gregor <dgregor@apple.com> In libclang, visit the nested-name-specifier and explicitly-specified template arguments of a MemberExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112860 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
8947a7501ee34577a020591d32f701e4b0656cb7 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Visit the nested-name-specifier and explicitly-specified template
arguments of a DeclRefExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112854 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c5ade2e3644a5822df63e442788d68c591ccdc97 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement basic visitation for nested name specifiers via libclang
cursors. Sadly, this visitation is a hack, because we don't have
proper source-location information for nested-name-specifiers in the
AST. It does improve on the status quo, however.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112837 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
e0329acf5c9437e2086a2fb2bf7a95ae2ac96505 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Introduce a new libclang function,
clang_getSpecializedCursorTemplate(), which determines the template
(or member thereof) that the given cursor specializes or from which it
was instantiated. This routine can be used to establish a link between
templates and their instantiations/specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112780 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCXX.cpp
ibclang.darwin.exports
ibclang.exports
84b51d77e11aaf6ea4607e01187343423ce6c8ae 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Teach libclang to visit the default arguments of template parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112734 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
7e24256c95afb64b4d5abf201a0f9f0527cb4cf3 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement libclang support for using declarations. Clang actually uses
three different kinds of AST nodes to represent using declarations:
UsingDecl, UnresolvedUsingValueDecl, and
UnresolvedUsingTypenameDecl. These three are collapsed into a single
cursor kind for using declarations, since libclang clients don't need
the distinction.

Several related changes here:
- Cursor visitation of the three AST nodes for using declarations
- Proper source-range computation for these AST nodes
- Using declarations have no USRs, since they don't actually declare
any entities.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112730 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
XCursor.cpp
0ab1e9f672a86cf3f094780d99251553a2b69fc7 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve libclang indexing support for class template specializations
in a few related ways:

- Don't recurse into instantiations of templates.
- Recurse into explicit specializations.
- Visit the template arguments of an explicit specialization or
explicit instantiation.
- Include template specialization arguments in the USRs for class
template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112720 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
2ef6944d529c94824f5bf96f65665f5bee30f5a2 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Make it clear that libclang does not modify the command-line arguments
it is given.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112717 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
0a35bceb7768fc0be62cb644a4e31d8bfd9fb44a 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement libclang support for using directives (cursor + visitation +
suppressing USRs). Also, fix up the source location information for
using directives so that the declaration location refers to the
namespace name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112693 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
XCursor.cpp
6931900f43cea558c6974075256c07728dbfecc6 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Add libclang support for namespace aliases (visitation + USRs) along
with a new cursor kind for a reference to a namespace.

There's still some oddities in the source location information for
NamespaceAliasDecl that I'll address with a separate commit, so the
source locations displayed in the load-namespaces.cpp test will
change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112676 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
XCursor.cpp
XCursor.h
49f6f5489483beaffc7ce48dfc000af4e65b9216 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Add a new libclang function clang_getTemplateCursorKind(), which
determines the kind of declaration that would be generated if the
given template were instantiated. This allows a client to distinguish
among class/struct/union templates and function/member function/static
member function templates.

Also, teach clang_CXXMethod_isStatic() about function templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112655 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCXX.cpp
ibclang.darwin.exports
ibclang.exports
0b36e614aa19df72885d5e0de996f7fbb9874ec3 31-Aug-2010 Douglas Gregor <dgregor@apple.com> Extend libclang with a new cursor kind that indicates a reference to a
template. Such cursors occur, for example, in template specialization
types such as vector<int>. Note that we do not handle the
super-interesting case where the template name is unresolved, e.g.,
within a template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112636 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
XCursor.h
74dbe640021d96a8dbb85c592471c04449ade81c 31-Aug-2010 Douglas Gregor <dgregor@apple.com> Add libclang support for class template partial specializations,
including a cursor kind, visitation, and USRs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112629 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
XCursor.cpp
39d6f07b056c31e1e6b5946165ed4b23e7887f22 31-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a libclang cursor kind, visitation support and USR support for C++
class templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112627 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
XCursor.cpp
fe72e9ceeae6cc8669cd8bb722425300190638ea 31-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement basic support for indexing function templates in
libclang. This includes:
- Cursor kind for function templates, with visitation logic
- Cursor kinds for template parameters, with visitation logic
- Visitation logic for template specialization types, qualified type
locations
- USR generation for function templates, template specialization
types, template parameter types.

Also happens to fix PR7804, which I tripped across while testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112604 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexUSRs.cpp
XCursor.cpp
01829d3afafdfd355cbe93537bc408aeeed964c6 31-Aug-2010 Douglas Gregor <dgregor@apple.com> libclang indexing support for C++ constructors, destructors, and
conversion functions. This introduces new cursor kinds for these three
C++ entities, and reworks visitation of function declarations so that
we get type-source information for the names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112600 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
6cf750298d3621d8a10a6dd07fcee8e274b9d94d 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
0016d519b831859526b79405cdae4c64c73731c8 29-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement C++0x user-defined string literals.

The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
585b318a7333b5dd1d900881db7b6610e2701fe8 27-Aug-2010 Ted Kremenek <kremenek@apple.com> Add source file I meant to include in my previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112303 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCXX.cpp
3064ef9e604d19a0cfd0d8e3ed3055bfd83f88fd 27-Aug-2010 Ted Kremenek <kremenek@apple.com> Implement CXCursor support for walking C++ base specifiers. This includes adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier.

Implements <rdar://problem/8274883>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112296 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
MakeLists.txt
XCursor.cpp
XCursor.h
ibclang.darwin.exports
ibclang.exports
df46316a423dac0dcccb3bfcb85df41e6ff88243 27-Aug-2010 Douglas Gregor <dgregor@apple.com> Teach clang_codeComplete to always sort its code-completion results

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112292 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
458433d2f0f5c96a9e0d21decdd44bebccf20b11 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement code completion for @selector expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112186 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
1e5e6684b0f27701e6f7c65f8c6a32a10cbcc3ed 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.

Provide a libclang function that sorts the results.

3rd try. How embarrassing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112180 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
1cb237fbf9e52e17f1e03b6f80c1114f47f93781 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Revert r112149, "Move the sorting of code-completion results out of the main
path and ...", it is failing tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112161 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
12f740f4cd86c1e948f004437e6b47df8e75daff 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Revert r112154, "Fix thinko in sorting operation", it depends on r112149 which
doth lay upon the chopping block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112160 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
86d00659f729473846f1681f6c003982e77e6fdd 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Fix thinko in sorting operation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112154 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
be13afea6d9a5dc8877d5553552bd07c733a99bf 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.

Provide a libclang function that sorts the results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112149 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
95f33555a6d51b6537a9ed3968c3d1c2e4991b51 26-Aug-2010 Ted Kremenek <kremenek@apple.com> Add libclang API hook "clang_getIBOutletCollectionType" to query the collection type for iboutletcollection attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112139 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
MakeLists.txt
XCursor.cpp
XCursor.h
XType.cpp
XType.h
XTypes.cpp
ibclang.darwin.exports
ibclang.exports
9214819c7d4b24fd1b38480d845d8e345d8f0196 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Revert "Move the sorting of code-completion results out of the main path and
into the clients", because the C standard library sucks. Where's my
stable sort, huh?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112121 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
d8b0a84d586bc0a08695968acf2f169c9d01da69 26-Aug-2010 Ted Kremenek <kremenek@apple.com> When annotating tokens, don't fallback to annotating with a null cursor for cursors that come before a macro instantiation. Fixes <rdar://problem/7974151>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112096 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c7ed372ec7b1c9be05d022e9bc23cd8641f2b28b 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112095 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
0a2c5e256abb4dc031c21fe4dc92c4f3afe9947c 25-Aug-2010 John McCall <rjmccall@apple.com> Teach Sema to live without CodeCompleteConsumer.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112028 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
28a7f258aefdd58db0bbf3a903f053bf2cb69c90 25-Aug-2010 Ted Kremenek <kremenek@apple.com> USRs for class extensions should "mangle" in the location of the extension. (<rdar://problem/8350262>)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111991 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
58ddb60f409125eda5436c4a1f070f7fa4744295 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce new libclang API functions that determine the availability
of a cursor or code-completion result, e.g., whether that result
refers to an unavailable, deleted, or deprecated declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111858 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
60a4543d42b6b8564a5650345de7beb7e99c60f3 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> libclang: Print more information when recovering from crashes in
clang_parseTranslationUnit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111855 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a7e6845660f91ec611427e1db842780e1ec12bdb 22-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Detabify.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111768 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
19510856727e0e14a3696b2a72c35163bff2a71f 20-Aug-2010 John McCall <rjmccall@apple.com> Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
- move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
2283d79155a3e82442fce124ce5fd704ca138801 20-Aug-2010 Douglas Gregor <dgregor@apple.com> When performing code-completion in the presence of a preamble, make
sure to (1) actually use the remapped files we were given rather
than old data, and (2) keep the remapped files alive until the
code-completion results are destroyed. Big thanks to Daniel for the
test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111597 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
b1fd3458680bc9c8988dee8967e9c0709fef3945 20-Aug-2010 Daniel Dunbar <daniel@zuster.org> libclang: Execute clang_codeCompleteAt() inside a crash recovery context.
- Test case is disabled for now, because something isn't write with file
remapping.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111581 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
57b5b4aee9f8e0bc20e142250a3109ed2e057b45 20-Aug-2010 Daniel Dunbar <daniel@zuster.org> libclang/Darwin: Always set the compatibility version in the dylib.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111578 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
3c7f4134603d04b44f997b43c0a9def270f25386 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> More PCH -> AST renaming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
cf807c4dfdb23e8fa3f400e0b24ef5b79db7a530 19-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Generate Attr subclasses with TableGen.

Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

- The constructor arguments are a SourceLocation and a Context&,
followed by the attributes arguments in the order that they were
defined in Attr.td

- Every argument in Attr.td has an appropriate accessor named getFoo,
and there are sometimes a few extra ones (such as to get the length
of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ea94bbc4769697143e717df9b0310f874102b6c1 19-Aug-2010 Daniel Dunbar <daniel@zuster.org> libclang: Put clang_reparseTranslationUnit inside a crash recovery context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111451 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
19ffd492a31a25fb691098bf79f317e5f3edf177 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> libclang: Put clang_parseTranslationUnit inside a crash recovery context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111387 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
c7df4f344d78fe0d7591be3756712e777b3d2e8d 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> libclang: Implicitly enable crash recovery when using the libclang APIs. We may need to add an explicit API call, but hopefully we can make the crash recovery seamless enough that it doesn't make sense to turn it off.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111386 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
783c56f47745f719590b17afd7ed937bf2407b53 18-Aug-2010 Douglas Gregor <dgregor@apple.com> Simplify FixItHint by eliminated the unnecessary InsertionLoc
location. Patch by Eelis van der Weegen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111362 91177308-0d34-0410-b5e6-96231b3b80d8
IndexDiagnostic.cpp
857281328fa824782bdd979c3bfdd97ecdbc1609 17-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Reintroduce the serialization library, with fixed dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111279 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
e638f86124c690f16e308f8d3822d15ebee6ecb5 17-Aug-2010 Douglas Gregor <dgregor@apple.com> Remove the last bit of the Clang Serialization library, for now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111267 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
9baa8b0be653159599263712ab316f6c923553d0 17-Aug-2010 Dan Gohman <gohman@apple.com> Add the clangSerialization library to libclang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111261 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
8071e4212ae08f8014e0c3ae6d18b7388003a5cc 15-Aug-2010 Douglas Gregor <dgregor@apple.com> Extend the code-completion caching infrastructure to include global
declarations (in addition to macros). Each kind of declaration maps to
a certain set of completion contexts, and the ASTUnit completion logic
introduces the completion strings for those declarations if the actual
code-completion occurs in one of the contexts where it matters.

There are a few new code-completion-context kinds. Without these,
certain completions (e.g., after "using namespace") would need to
suppress all global completions, which would be unfortunate.

Note that we don't get the priorities right for global completions,
because we don't have enough type information. We'll need a way to
compare types in an ASTContext-agnostic way before this can be
implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111093 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
23bc11ff1874f8875426c9a8a29fe1e6894c3503 14-Aug-2010 Ted Kremenek <kremenek@apple.com> Always recurse into sub-cursors when annotating tokens, as this information is used for annotating macro arguments. This finishes up <rdar://problem/8044584>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111066 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
3f4046004be223b03f1f895bb934e44921ccf805 14-Aug-2010 Ted Kremenek <kremenek@apple.com> As a heuristic, annotate tokens (via clang_annotateTokens) that are the arguments of a macro instantiation using the closest cursor with the same spelling location. Because macro arguments can get token pasted in any arbitrary order, we use the annotation map to paper over the token -> cursor annotations during our post-processing stage. This fixes most of <rdar://problem/8044584>, but still doesn't work for assert().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111062 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
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
Index.cpp
IndexCodeCompletion.cpp
1999844e7a18786e61e619e1dc6c789827541863 13-Aug-2010 Douglas Gregor <dgregor@apple.com> Add an options parameter to clang_saveTranslationUnit, because we'll want it later

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111016 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
7ae2faafd30524ef5f863bb3b8701977888839bb 13-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement clang_saveTranslationUnit(), which saves a translation unit
into a PCH/AST file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111006 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
e6b1bb6e7fe906d164637ca33503b8fafdbc99e5 11-Aug-2010 Douglas Gregor <dgregor@apple.com> Once code completion has completed, pass a "completion context" on to
the code-completion consumer. The consumer can use this information to
augument, filter, or display the code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110858 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
e1e13bf568a7e37c95eda6fcfa626659a06e67b1 11-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a (currently unused) "options" parameter to
clang_reparseTranslationUnit(), along with a function to retrieve the
default recommended reparsing options for a translation unit.

Also, add the CXTranslationUnit_CacheCompletionResults flag, which is
also currently unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110811 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
648220ed00711a0fb8ea4a1ab6896a4ee63d8fc5 10-Aug-2010 Douglas Gregor <dgregor@apple.com> Teach the libclang cursor visitor to walk into the type information
provided by __builtin_types_compatible_p and __builtin_va_arg
expressions, now that Abramo has added proper type-source information
to those expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110681 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
b1c031be513705d924038f497279b9b599868ba1 10-Aug-2010 Douglas Gregor <dgregor@apple.com> Instead of having a specific CXTranslationUnit_* option flag for
"editing" mode, introduce a separate function
clang_defaultEditingTranslationUnitOptions() that retrieves the set of
options. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110613 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
7a07fcb8f10fe45ea65a0a41798eb1c40777bde4 09-Aug-2010 Douglas Gregor <dgregor@apple.com> Minor libclang tweaks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110599 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
df95a13ec73d2cdaea79555cb412d767f4963120 09-Aug-2010 Douglas Gregor <dgregor@apple.com> Use precompiled preambles for in-process code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110596 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
2d490f2d8a9a093e6e36b07b70993ae739cad803 06-Aug-2010 Douglas Gregor <dgregor@apple.com> Don't pass -avoid-version to Darwin linker

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110438 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
cee235cdf0b8047761ffac598c4c3a32ab7411a2 05-Aug-2010 Douglas Gregor <dgregor@apple.com> Give clang_codeCompleteAt() an "options" parameter, and add a new
flags enumeration + default-generating function that allows
code-completion to be customized via the libclang API.

Plus, turn on spell-checking when performing code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110319 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
b75d3dfa4ca6531858b8132eb4db7260408671cf 04-Aug-2010 Douglas Gregor <dgregor@apple.com> When performing in-process code completion, don't free the remapped
file buffers until the code completion results are destroyed;
diagnostics may end up referring into the source.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110216 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
1abc6bca3d7fb0e7b1e40fbcad6cfb5e10594548 04-Aug-2010 Douglas Gregor <dgregor@apple.com> Add code-completion support directly to ASTUnit, which performs code
completion within the translation unit using the same command-line
arguments for parsing the translation unit. Eventually, we'll reuse
the precompiled preamble to improve code-completion performance, and
this also gives us a place to cache results.

Expose this function via the new libclang function
clang_codeCompleteAt(), which performs the code completion within a
CXTranslationUnit. The completion occurs in-process
(clang_codeCompletion() runs code completion out-of-process).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110210 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
eb8837b88c18631c69ac75f64ab1853762063180 03-Aug-2010 Douglas Gregor <dgregor@apple.com> When using a precompiled preamble, keep track of the top-level
declarations that we saw when creating the precompiled preamble, and
provide those declarations in addition to the declarations parsed in
the main source file when traversing top-level declarations. This
makes the use of precompiled preambles a pure optimization, rather
than changing the semantics of the parsed translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110131 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
73dfa3d30ab19d358b782c201201fa2a2dcf51a6 02-Aug-2010 Douglas Gregor <dgregor@apple.com> Add Darwin dylib versioning support to libclang when build with CMake.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110062 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
f9ae8f9f763377eb8657a3023616a701f820a185 31-Jul-2010 Daniel Dunbar <daniel@zuster.org> build: Don't pass -avoid-version or -no-undefined on Darwin, they don't do
anything.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109958 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
3ce9e7d270e7df86c09c8126b4412d55be7c123b 30-Jul-2010 Ted Kremenek <kremenek@apple.com> Add clang_isPODType() for querying if the CXType is POD. Implements <rdar://problem/8250669>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109822 91177308-0d34-0410-b5e6-96231b3b80d8
XTypes.cpp
ibclang.darwin.exports
ibclang.exports
a629ea42f6bc095190db2f3932b60a0be14f3d34 29-Jul-2010 Ted Kremenek <kremenek@apple.com> Check for an invalid SourceLocation in clang_getCursor(). This avoids a possible assertion failure in SourceManager in the call to Lexer::GetBeginningOfToken(). Fixes <rdar://problem/8244873>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109713 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6cd24e28811a2000a8d99604dd64a77c58245d4c 29-Jul-2010 Douglas Gregor <dgregor@apple.com> Visit the children of CXXOperatorCallExprs in source order within
libclang, so that clang_annotateTokens() doesn't get confused and miss
annotations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109706 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a6d6af308bfc9b72467b432a045a9fc6673e3821 28-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r109546, it broke linux build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109550 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
ee94e2d10728d1b6a87a11aeee122e8759f58c63 28-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar.

This function is part of the public CodeGen interface since it's essentially a CodeGen predicate that is also
needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes.
This fixes current (and avoids future) codegen-from-PCH bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109546 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
3d398aa5c2be8919bbc0144bce611c48119bc861 26-Jul-2010 Douglas Gregor <dgregor@apple.com> When LIBCLANG_CODE_COMPLETION_LOGGING is set in the environment, log code-completion command lines to stderr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109395 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
44c181aec37789f25f6c15543c164416f72e562a 23-Jul-2010 Douglas Gregor <dgregor@apple.com> Basic plumbing for generating a precompiled preamble for an
ASTUnit/CXTranslationUnit. We can't actually use this preamble yet,
however.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109202 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a8e5c5bdbe387b2552c1c23b828f54abcf085a40 22-Jul-2010 Douglas Gregor <dgregor@apple.com> Improve performance during cursor traversal when a region of interest
is present.

Rather than using clang_getCursorExtent(), which requires
us to lex the token at the ending position to determine its
length. Then, we'd be comparing [a, b) source ranges that cover the
characters in the range rather than the normal behavior for Clang's
source ranges, which covers the tokens in the range. However, relexing
causes us to read the source file (which may come from a precompiled
header), which is rather unfortunate and affects performance.

In the new scheme, we only use Clang-style source ranges that cover
the tokens in the range. At the entry points where this matters
(clang_annotateTokens, clang_getCursor), we make sure to move source
locations to the start of the token.

Addresses most of <rdar://problem/8049381>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109134 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
664cffd330611d78fc0286f539589920a37ca328 22-Jul-2010 Ted Kremenek <kremenek@apple.com> Fix '<rdar://problem/8214263> MakeCXCursor null dereference when body of block is invalid' by checking that the body of a BlockDecl is null before constructing a CXCursor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109097 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
f48b5313825894c5e64ee39e932142723363571b 22-Jul-2010 Ted Kremenek <kremenek@apple.com> Switch USR generation to use file offsets instead of line/columns for anonymous symbols. Fixes <rdar://problem/8221557>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109095 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
5a43021ac491bf091494167127772a20d9a9bb48 21-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new C API function, clang_parseTranslationUnit(), which
will eventually replace
clang_createTranslationUnitFromSourceFile(). The only addition in
clang_parseTranslationUnit() is a set of flags that can control how
the translation unit is loaded. More interesting flags will be coming.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109027 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
abc563f554951259bbe0315055cad92ee14d87e4 19-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API, clang_reparseTranslationUnit(), which
reparses an already-parsed translation unit. At the moment it's just a
convenience function, but we hope to use it for performance
optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108756 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
4156a4cbd56bee7f61d6c5eadb67d8e4bd141236 11-Jul-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> Rename clang.dll to libclang.dll, to fix Windows build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108067 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
52ddc5df59a26570fbca47d269f82954ae3397d1 09-Jul-2010 Douglas Gregor <dgregor@apple.com> Document my otherwise-inexplicable change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107998 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a0068fc64351db9c47916566e3b85ab733cd8d6d 09-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce -f{no-}spell-checking options to enable/disable
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107992 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ed8abf18329df67b0abcbb3a10458bd8c1d2a595 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Reinstate the fix for PR7556. A silly use of isTrivial() was
suppressing copies of objects with trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
84745677f64863e025a6733cb29d0b94bc3a6ae2 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Revert r107828 and r107827, the fix for PR7556, which seems to be
breaking bootstrap on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
016a4a90c8e75d59de731fa3aa98f0a55656e66c 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its
newly-narrowed scope. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107828 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
3d9c6e1c97bdae6a9daedc6969bc839e93074b0f 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> libclang: When invoking external clang process to get code completion results,
pass -ccc-clang-cxx to force C++ support (even if the binary was built without
it).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107324 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
1a9a0bc472ee4fec72ee8be8b575fb66ca600d1b 29-Jun-2010 Ted Kremenek <kremenek@apple.com> Per Doug's suggestion, move check for invalid SourceLocation into
cxloc::translateSourceLocation() (thus causing all clients of this
function to have the same behavior).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107101 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XSourceLocation.h
9a140845438c2fc31e7d48a6dedbc695f4c83c68 21-Jun-2010 Ted Kremenek <kremenek@apple.com> Add CXType support for querying the return type of Objective-C methods. This is done by
adding a clang_getCursorResultType() function (which complements clang_getResultType()).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106473 91177308-0d34-0410-b5e6-96231b3b80d8
XTypes.cpp
ibclang.darwin.exports
ibclang.exports
04c3cf35a80c09ab78e519f2e71ecccd5c5d8da0 21-Jun-2010 Ted Kremenek <kremenek@apple.com> Add CXType support for FunctionNoProto and FunctionProto types. This includes adding a new
function, clang_getResultType(), which returns the result type of the function type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106459 91177308-0d34-0410-b5e6-96231b3b80d8
XTypes.cpp
ibclang.darwin.exports
ibclang.exports
0d32a68cbc508f81ae6979f3e8aa6e3007d02752 21-Jun-2010 Ted Kremenek <kremenek@apple.com> Add clang_getCursorType() support for @property declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106451 91177308-0d34-0410-b5e6-96231b3b80d8
XTypes.cpp
0a76aae8c03cb7dd7bdbe683485560afaf695959 19-Jun-2010 Chris Lattner <sabre@nondot.org> introduce a new CharSourceRange class, and enhance the diagnostics routines
to use them instead of SourceRange. CharSourceRange is just a SourceRange
plus a bool that indicates whether the range has the end character resolved
or whether the end location is the start of the end token. While most of
the compiler wants to think of ranges that have ends that are the start of
the end token, the printf diagnostic stuff wants to highlight ranges within
tokens.

This is transparent to the diagnostic stuff. To start taking advantage of
the new capabilities, you can do something like this:
Diag(..) << CharSourceRange::getCharRange(Begin,End)





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106338 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XSourceLocation.h
387475d0c18aaeb022108de9d33b6c9fb7998843 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Implement first TD-based usage of attributes.

Currently, there are two effective changes:

- Attr::Kind has been changed to attr::Kind, in a separate namespace
rather than the Attr class. This is because the enumerator needs to
be visible to parse.
- The class definitions for the C++0x attributes other than aligned are
generated by TableGen.

The specific classes generated by TableGen are controlled by an array in
TableGen (see the accompanying commit to the LLVM repository). I will be
expanding the amount of code generated as I develop the new attributes system
while initially keeping it confined to these attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106172 91177308-0d34-0410-b5e6-96231b3b80d8
XCursor.cpp
746d99132bd05b189766836c393a92a96d019c2b 13-Jun-2010 Chris Lattner <sabre@nondot.org> don't make libclang depend on codegen. Patch by Peter Collingbourne!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105901 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
c9f362d73b7e76e7cfa800fd6ed8b7f2a84d2f95 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefiles: Remove unnecessary early include of Makefile.config.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105640 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
c4dec1c58eeb2ef46cdb64120eb6b819c6927afb 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105638 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
afed099bd2e759efd4bb63fdc525d3445f94cc13 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
eb5dc498da53b50633eb9b19ca43b8988c340f0d 08-Jun-2010 Douglas Gregor <dgregor@apple.com> Teach the PrintFunctionNames example to be a proper module, so that
Clang can load it as a plugin. Original fix by Troy D. Straszheim,
which I extended with Darwin support. Fixes PR6801.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105630 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6206d53f67613958ae1b023aba337ebb46f11a8b 05-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added AccessSpecDecl node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
fc929208193eff37e1d3a28b1ea3bd1c9a7913e0 05-Jun-2010 John McCall <rjmccall@apple.com> Add indexing support for the block and @property type location information
I just implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105491 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
df432e338c68e0e06dd7644c43f3f218750b3d58 03-Jun-2010 Ted Kremenek <kremenek@apple.com> Return a proper null CXSourceLocation from clang_getLocation() when the SourceLocation is invalid. Fixes <rdar://problem/8056640>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105392 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
d2010c1b05fc6dc05d0cb5959efa30da88a746a1 01-Jun-2010 Dan Gohman <gohman@apple.com> Delete a blank line to make it easier to process this file with a script.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105275 91177308-0d34-0410-b5e6-96231b3b80d8
ibclang.exports
b3da539e0dd33f3fbb55132de3c65e0b6e1a4bc4 29-May-2010 Ted Kremenek <kremenek@apple.com> Add check for an invalid CXType in clang_getTypeDeclaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105111 91177308-0d34-0410-b5e6-96231b3b80d8
XTypes.cpp
ebaf2573ccfcfef179904db1aae965b5b778c72d 27-May-2010 Dan Gohman <gohman@apple.com> When handling raw_ostream errors manually, use clear_error() so that
raw_ostream doesn't try to do its own error handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104880 91177308-0d34-0410-b5e6-96231b3b80d8
Indexer.cpp
a2ace58cf99f9279a7467d987c6094145dd19d8b 27-May-2010 Bill Wendling <isanbard@gmail.com> Silence warning about "enumeral and non-enumeral type in conditional
expression".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104863 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
a7f1c008d37927a2ffc55a95830b42762db24843 27-May-2010 Ted Kremenek <kremenek@apple.com> Remove clang_isFromMainFile(). It doesn't work correctly with CXDiagnostics, and we shouldn't
have an API around that cannot be implemented correctly yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104849 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
12e131385e892e3723483a1081a89bcad29c8a84 27-May-2010 Douglas Gregor <dgregor@apple.com> Introduce priorities into the code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104751 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
ibclang.darwin.exports
ibclang.exports
21c241ff68c18ad87e1f18a579c535385aec7af1 25-May-2010 Douglas Gregor <dgregor@apple.com> Turn vertical spacing into horizontal spacing in code-completion results

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104586 91177308-0d34-0410-b5e6-96231b3b80d8
IndexCodeCompletion.cpp
26d1f75d5b8a1a7dee8d844a0cb38a1676c84842 23-May-2010 Douglas Gregor <dgregor@apple.com> Make clang_isFromMainFile() robust against NULL source locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104474 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
d7ffd0844571d76f95bb0fc9c3ebb1bdf445eedd 22-May-2010 Ted Kremenek <kremenek@apple.com> Make crashreport data in libclang a compile-time option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104413 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
439794eea9a2afb4f572f1158f06d088f124eb20 21-May-2010 Daniel Dunbar <daniel@zuster.org> Fix __crashreport_info__ declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104301 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
bd054dba8a3023821f2a0951b0fae05e3522a7c9 20-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Renamed misleading getSourceRange -> getLocalSourceRange and getFullSourceRange -> getSourceRange for TypeLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104220 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
47e8e399d25a976345a7bf07dc6c5b5fcb811740 20-May-2010 Ted Kremenek <kremenek@apple.com> Add libclang function 'clang_isFromMainFile()' (which just wraps SourceManager::isFromMainFile()).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104208 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
50aa6acd0b8d40c8956372a69e0a73f0802a5494 19-May-2010 Ted Kremenek <kremenek@apple.com> Move CXCursor_FirstDecl definition later to make the results more readable in the debugger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104171 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
2bb106eeba7def5364a0e6c4d99541370c4950a5 19-May-2010 Ted Kremenek <kremenek@apple.com> Remove clang_isDeclarationADefinition() since its functionality is already provided by clang_isCursorDefinition().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104138 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
857e918a8a40deb128840308a318bf623d68295f 19-May-2010 Ted Kremenek <kremenek@apple.com> Add clang support for IBOutletCollection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104135 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
b12903e1a4b8d1b611b8c7e4f910665d628e68cd 19-May-2010 Ted Kremenek <kremenek@apple.com> Add function 'clang_isTagDeclDefinition()' to allow clients of libclang to distinguish between
forward declarations and definitions of structs/classes/enums.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104075 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
23173d7f029f430611caceea72ae61ba6b80af1c 18-May-2010 Ted Kremenek <kremenek@apple.com> Teach CursorVisitor about duplicate ObjCPropertyDecls that can arise because of a current
design limitation in how we handle Objective-C class extensions. This was causing the CursorVisitor
to essentially visit an @property twice (once in the @interface, the other in the class extension).
Fixes <rdar://problem/7410145>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104055 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
40b492a43bac3ed0c465772aa6921d011cfc273f 17-May-2010 Ted Kremenek <kremenek@apple.com> Fix missing '}'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103966 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9ada39a4ac82ff5f5087b0a7fa9ed0d32be55a3b 17-May-2010 Ted Kremenek <kremenek@apple.com> Add libclang function 'clang_CXXMethod_isStatic' to query of a C++ method
is declared static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103963 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ibclang.darwin.exports
ibclang.exports
c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e 15-May-2010 John McCall <rjmccall@apple.com> Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XTypes.cpp
f0229d884da7974f40f558e8cb0b11939017fe43 15-May-2010 Ted Kremenek <kremenek@apple.com> Change install_name for libclang.dylib to '@rpath/libclang.dylib'. Fixes <rdar://problem/7987039>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103837 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
8e0ac174c8c8c980927b3e1447f16f62fbe2a2e4 14-May-2010 Ted Kremenek <kremenek@apple.com> Add CXType and an initial set of supporting functions to libclang. This exposes details of
Clang's representation of the C type system to clients. It is nowhere near complete, and will
be expanded on demand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103809 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
XTypes.cpp
ibclang.darwin.exports
ibclang.exports
6bfd53360072409715fe4e4d4f41d9ebdf948479 13-May-2010 Ted Kremenek <kremenek@apple.com> Fold assertion into condition, as it does not hold all the time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103716 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
b47467ba5d6525e3f50fca6e126f0fa716cd8feb 13-May-2010 Ted Kremenek <kremenek@apple.com> Remove stale comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103696 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
0f91f6a2eacf29fb69b1b0c3131eb0385aad5777 13-May-2010 Ted Kremenek <kremenek@apple.com> Specially handle CaseStmts in CursorVisitor because they can be nested and walking them
can blow out the stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103687 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
9a700d277c38d9afaa7cb3fe93a714bfe9b62eec 12-May-2010 Ted Kremenek <kremenek@apple.com> Re-apply r103581 with updated tests. It turns out we were computing bogus locations for
many things.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103583 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
20f9ba75e5ec794824d7b2ca74dd7dd9dd0b139f 12-May-2010 Ted Kremenek <kremenek@apple.com> Temporarily revert r103581 so I can fix the failing tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103582 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
b5fb6acf2d0c6c43cc494192af77798cf1723c79 12-May-2010 Ted Kremenek <kremenek@apple.com> Correctly check if a cursor is a declaration before returning its location/range in clang_getCursorLocation()/clang_getCursorExtent(). This fixes a horrible bug reported in
<rdar://problem/7961995> and <rdar://problem/7967123> where declarations with attributes
would get grossly annotated with the wrong tokens because the attribute would be interpreted
as if it was a Decl*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103581 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
ab1af606a9ff00d892336b8025fcae345709a3dc 12-May-2010 Ted Kremenek <kremenek@apple.com> Remove debugging aids I did not intend to commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103578 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
a333c66b94f6d6dcd5ee7e625d816d3c0300e8e6 12-May-2010 Ted Kremenek <kremenek@apple.com> Adjust clang_annotateTokens() to correctly account for the TypeSourceInfo for DeclaratorDecls
when annotating tokens. Fixes <rdar://problem/7971430>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103577 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
465d41b92b2c862f3062c412a0538db65c6a2661 11-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Merged Elaborated and QualifiedName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
XCursor.cpp
2ea5baf08dc5006f2d6168948140fd3a709d5cf7 07-May-2010 Ted Kremenek <kremenek@apple.com> Extend C++ usrs to include type mangling for tag decl arguments, indicating whether a method
is static, and mangling in the qualifers of the method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103289 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
3ebd8dcbf3485303bd4c1c977a182e2ab9283970 07-May-2010 Ted Kremenek <kremenek@apple.com> Switch USR generation over from NamedDecl::getNameAsString() to NamedDecl::printName().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103285 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
8e67219a7cb0cf7bfa432f8c30da9c52999737ce 07-May-2010 Ted Kremenek <kremenek@apple.com> Add initial USR support for mangling in the types of C++ functions and methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103225 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
a0536d8dd900bb48ea886bd68d777b03b061c068 07-May-2010 Ted Kremenek <kremenek@apple.com> Add CXCursor support for LinkageSpecDecl (e.g., 'extern "C"').

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103224 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
cbd66f00cfe5c4412f8efd6e66b0bb6bae956f7c 07-May-2010 Ted Kremenek <kremenek@apple.com> Add USR support for C++ namespaces, and unify mangling of location information in USRs
for anonymous symbols.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103212 91177308-0d34-0410-b5e6-96231b3b80d8
IndexUSRs.cpp
8f06e0e9fec3ca501e5fb129f413adbfc88e82f8 07-May-2010 Ted Kremenek <kremenek@apple.com> Add CXCursor support for C++ namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103211 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
XCursor.cpp
fbd84caf62a21afa4db5f730e2e2603ead17bb65 05-May-2010 Ted Kremenek <kremenek@apple.com> Rework clang_annotateTokens() to annotate tokens with information that more closely matches
clang_getCursor(). Tokens are now annotated with the cursor (for the matching AST element)
that most closely encompasses that token.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103064 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
aa8a66de0e7951ba5a305f3e5a39c9b14a318c42 05-May-2010 Ted Kremenek <kremenek@apple.com> Map Objective-C keywords to CXToken_Keyword.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103063 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
11949cbae3f42c32a2933fb85b125620666d98ea 05-May-2010 Ted Kremenek <kremenek@apple.com> Move post-processing of token annotations to method in AnnotateTokensWorker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103062 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
6db610934bedc6896393c1e1099525b35380acd6 05-May-2010 Ted Kremenek <kremenek@apple.com> Refactor visitor logic for clang_annotateTokens() into a worker class. No functionality change yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103061 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
cdb65d8724428664af7394451863b4aa6123f52b 01-May-2010 Daniel Dunbar <daniel@zuster.org> Fix NON_ANSI_COMPILE_FLAGS setting, for MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102811 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
f51f20fa34654da75d15a9e2a1a0cd2fc0d8603d 30-Apr-2010 Daniel Dunbar <daniel@zuster.org> Rename 'CIndex' to 'libclang', since it has basically become our stable public
(C) API, and will likely grow further in this direction in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102779 91177308-0d34-0410-b5e6-96231b3b80d8
Index.cpp
IndexCodeCompletion.cpp
IndexDiagnostic.cpp
IndexDiagnostic.h
IndexInclusionStack.cpp
IndexUSRs.cpp
Indexer.cpp
Indexer.h
MakeLists.txt
XCursor.cpp
XCursor.h
XSourceLocation.h
akefile
ibclang.darwin.exports
ibclang.exports