Erik Verbruggen
5f1c822def
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
2011-10-13 09:41:32 +00:00
Argyrios Kyrtzidis
b6a4ac4135
[libclang] Allow using getDeclCursorUSR function with a Decl* and not a cursor.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141770 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-12 07:07:36 +00:00
Argyrios Kyrtzidis
9049cf6cb4
[libclang] Make MakeCXTranslationUnit usable outside CIndex.cpp.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141769 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-12 07:07:33 +00:00
Eli Friedman
276b061970
Initial implementation of __atomic_* (everything except __atomic_is_lock_free).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141632 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11 02:20:01 +00:00
Douglas Gregor
b77d197a78
Make sure we initialize the "extra" data within the libclang code
...
completion context, in case we end up having no code-completion
callback. Individual instances of this problem are always bugs that
need to be fixed, but it's better to make sure we have initialized
data here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141598 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-10 23:37:54 +00:00
Argyrios Kyrtzidis
57165bea7c
[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
2011-10-10 21:57:15 +00:00
John McCall
5e1cdac63c
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
2011-10-07 06:10:15 +00:00
Eli Friedman
b001de7458
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
2011-10-06 23:00:33 +00:00
Erik Verbruggen
26fc0f9a07
Fixed GCC (C90) and Clang warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141281 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06 11:38:08 +00:00
Erik Verbruggen
d12059673d
Added CXAvailability_NotAccessible to indicate that a declaration is available, but not accessible from the current code completion context.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141278 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06 07:27:49 +00:00
Argyrios Kyrtzidis
aed123ec3c
[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
2011-10-06 07:00:54 +00:00
Argyrios Kyrtzidis
b11be041e4
[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
2011-10-06 07:00:46 +00:00
Douglas Gregor
42b2984771
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
2011-10-05 19:00:14 +00:00
Bob Wilson
10a82cde7c
Rip out flags for controlling C++ "production mode" separately.
...
This is old leftover cruft from the days when C++ was not yet ready
for prime time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141063 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-04 05:34:14 +00:00
Argyrios Kyrtzidis
1711fc91ef
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
2011-10-04 04:48:02 +00:00
Argyrios Kyrtzidis
2dfdb948be
[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
2011-09-30 17:58:23 +00:00
Argyrios Kyrtzidis
de5db649fd
[libclang] Introduce clang_Range_isNull.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140706 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 18:14:21 +00:00
NAKAMURA Takumi
b58404d18e
Install c-index-test also on CMake build, following up r140681.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140694 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 10:50:23 +00:00
Ted Kremenek
d1223d8654
Install c-index-test as part of install-clang-c Makefile rule.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140681 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 04:39:41 +00:00
Douglas Gregor
30c4240420
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
2011-09-27 22:38:19 +00:00
Argyrios Kyrtzidis
5f0bfc5222
[libclang] Expose array size and element type, patch by Vinay Sajip!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140614 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-27 17:44:34 +00:00
Argyrios Kyrtzidis
fa865df489
MSVC is stuck in the 80s.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140597 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-27 04:14:36 +00:00
Argyrios Kyrtzidis
671436e9e2
[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
2011-09-27 00:30:33 +00:00
Argyrios Kyrtzidis
b0d6eaa6b6
[libclang] Introduce clang_Cursor_isNull and clang_Cursor_getTranslationUnit functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140587 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-27 00:30:30 +00:00
Argyrios Kyrtzidis
65ab90736e
[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
2011-09-26 19:05:37 +00:00
Argyrios Kyrtzidis
ee0f84fc84
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
2011-09-26 08:01:41 +00:00
David Blaikie
621bc69624
Rename VerifyDiagnosticsClient to VerifyDiagnosticConsumer as per issue 5397
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140489 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-26 00:38:03 +00:00
David Blaikie
78ad0b9884
Rename DiagnosticClient to DiagnosticConsumer as per issue 5397
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140479 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-25 23:39:51 +00:00
David Blaikie
d6471f7c19
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
2011-09-25 23:23:43 +00:00
David Blaikie
eb2d1f1c88
Removing a bunch of dead returns/breaks after llvm_unreachables.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23 20:26:49 +00:00
David Blaikie
b219cfc4d7
Switch assert(0/false) llvm_unreachable.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23 05:06:16 +00:00
Argyrios Kyrtzidis
b0c3e0909b
Rename ExplicitTemplateArgumentList -> ASTTemplateArgumentListInfo, no functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140330 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-22 20:07:03 +00:00
Argyrios Kyrtzidis
2502efd261
[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
2011-09-20 23:27:33 +00:00
Ted Kremenek
9503dce5a6
Sort exports list.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140171 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-20 19:02:45 +00:00
Argyrios Kyrtzidis
92ddef1bf8
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
2011-09-19 20:40:48 +00:00
Argyrios Kyrtzidis
507097ec40
[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
2011-09-19 20:40:35 +00:00
Argyrios Kyrtzidis
a64ccefdf0
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
2011-09-19 20:40:19 +00:00
Erik Verbruggen
b81d3012ff
First test commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140016 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-19 15:03:11 +00:00
Argyrios Kyrtzidis
7ea51d5f0b
[libclang] Remove libclang.darwin.exports, it's not used anymore.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139661 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 23:12:36 +00:00
Argyrios Kyrtzidis
e6be34d8f7
[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
2011-09-13 21:49:08 +00:00
Argyrios Kyrtzidis
221d5a5005
[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
2011-09-13 18:49:56 +00:00
Argyrios Kyrtzidis
18aa2ff464
Rename InterFace -> Interface, no functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139620 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 18:49:52 +00:00
Argyrios Kyrtzidis
6639e92554
[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
2011-09-13 17:39:31 +00:00
Douglas Gregor
78243658c5
When compiling a module on-demand, re-use the diagnostics client
...
already provided. This required a little bit of clean-up in the way
that VerifyDiagnosticsClient managed ownership of its underlying
"primary" client, because now it will no longer always take ownership.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139570 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13 01:26:44 +00:00
Argyrios Kyrtzidis
c2954616fb
[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
2011-09-12 22:17:26 +00:00
Argyrios Kyrtzidis
40098e8cd7
[libclang] Make c-index-test check CINDEXTEST_REMAP_AFTER_TRIAL environment variable,
...
which when set it determines the trial number after which the remapping of files should
take effect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139511 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:09:31 +00:00
Douglas Gregor
08e0bc16b3
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
2011-09-10 00:09:20 +00:00
Douglas Gregor
35120c6285
The translation unit is never deserialized
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139436 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 23:34:14 +00:00
Anna Zaks
9134294114
[analyzer] When running scan-build with -plist on ./configure, delete the plist files.
...
(scan-build does not set the $HtmlDir when running against configure. Previously, this implied that the plist files would appear in the current directory, with this patch they will get deleted.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139382 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 18:43:53 +00:00
James Molloy
066d502b2d
Fix up MCInstPrinter creation to take the new SubtargetInfo parameter (see LLVM r139237)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139238 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-07 17:25:30 +00:00