History log of /external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/tools/libclang/CIndex.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.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
/external/clang/tools/libclang/CIndex.cpp
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
/external/clang/tools/libclang/CIndex.cpp