Eli Friedman
61108f2378
Add missing export. Spotted by Leandro Melo.
...
llvm-svn: 143508
2011-11-01 22:25:07 +00:00
Argyrios Kyrtzidis
b9689bb46f
[libclang] For a class extension, give it a unique USR but for any property or ivar
...
it contains give it a USR based on its semantic context, which is the interface.
This follows what we already did for objc methods. rdar://10371669
llvm-svn: 143464
2011-11-01 17:14:12 +00:00
Douglas Gregor
d73f3ddb44
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).
llvm-svn: 143410
2011-11-01 01:16:03 +00:00
Ted Kremenek
ce6a5718ce
[libclang] Tweak internals of CXSourceLocation to allow an alternate implementation if the lowest bit of ptr_data[0] is not 0. This
...
is prep for work on serialized diagnostics.
llvm-svn: 143373
2011-10-31 22:23:51 +00:00
Ted Kremenek
4c4f08d555
[libclang] Move implementation of functions for manipulation CXSourceLocations and CXSourceRanges into a separate file.
...
llvm-svn: 143370
2011-10-31 22:05:42 +00:00
Ted Kremenek
bb2c7101b5
[libclang] Add CXDiagnosticImpl to represent a super class for the implementation backing a CXDiagnostic. This allows CXStoredDiagnostic
...
to be just one possible implementation of a CXDiagnostic.
llvm-svn: 143368
2011-10-31 21:40:19 +00:00
Argyrios Kyrtzidis
f3068a73f7
[libclang] Rename VisitIncludedPreprocessingEntries -> VisitIncludedEntities
...
llvm-svn: 143337
2011-10-31 07:19:54 +00:00
Argyrios Kyrtzidis
9780553ef0
Use LIBCLANG_NOTHREADS instead of CINDEXTEST_NOTHREADS inside libclang,
...
so the c-index-test one can be enabled without affecting libclang.
llvm-svn: 143288
2011-10-29 19:32:39 +00:00
Argyrios Kyrtzidis
d92ced00b1
[libclang] Check for environment variable CINDEXTEST_NOTHREADS in clang_reparseTranslationUnit.
...
llvm-svn: 143242
2011-10-28 22:54:33 +00:00
Benjamin Kramer
f1b4e0052f
Use const_cast to make it obvious that it's just removing constness (and silence warnings).
...
llvm-svn: 143193
2011-10-28 13:37:11 +00:00
Douglas Gregor
deb4a2be67
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".
llvm-svn: 142901
2011-10-25 01:33:02 +00:00
Argyrios Kyrtzidis
429ec024f8
[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
llvm-svn: 142887
2011-10-25 00:29:50 +00:00
John McCall
59207978e6
More metaprogramming with builtin types.
...
llvm-svn: 142433
2011-10-18 22:28:37 +00:00
Argyrios Kyrtzidis
72a3cf0a4a
[libclang] Make sure we do a correct invalid check in clang_getExpansionLocation.
...
llvm-svn: 142430
2011-10-18 21:59:54 +00:00
John McCall
e314e27c58
Macro metaprogramming for builtin types.
...
llvm-svn: 142420
2011-10-18 21:02:43 +00:00
Argyrios Kyrtzidis
098c4eabd2
[libclang] Since an objc extension semantically continues the interface of the class
...
don't use unique USRs for them, otherwise we fail to associate @implementation methods
with the methods in extensions.
llvm-svn: 142361
2011-10-18 16:50:06 +00:00
Argyrios Kyrtzidis
0c7735e525
[libclang] Index implicit property references.
...
llvm-svn: 142355
2011-10-18 15:50:50 +00:00
Argyrios Kyrtzidis
321e30216a
[libclang] Index method references.
...
llvm-svn: 142353
2011-10-18 15:13:11 +00:00
Matt Beaumont-Gay
cb6e5c16ef
Silence a -Wc++0x-narrowing warning
...
llvm-svn: 142292
2011-10-17 22:19:09 +00:00
Argyrios Kyrtzidis
dc199a3152
[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.
llvm-svn: 142233
2011-10-17 19:48:19 +00:00
John McCall
8a6b59ad97
Add a new placeholder type to represent "unbridged"
...
casts in ARC.
No semantic analysis yet.
llvm-svn: 142208
2011-10-17 18:09:15 +00:00
Anton Korobeynikov
f0c267e6e0
Provide half floating point support as a storage only type.
...
Lack of half FP was a regression compared to llvm-gcc.
llvm-svn: 142016
2011-10-14 23:23:15 +00:00
Benjamin Kramer
b89514a9b8
Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer.
...
Passing a pointer was a bad idea as it collides with the overload for void*.
llvm-svn: 141971
2011-10-14 18:45:37 +00:00
Erik Verbruggen
98ea7f6737
Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations to
...
retrieve annotations from completion string.
llvm-svn: 141953
2011-10-14 15:31:08 +00:00
Erik Verbruggen
ca98f2a63f
Allow for annotate attributes after access specifiers. When such
...
attributes are found, propagate them to subsequent declarations.
llvm-svn: 141861
2011-10-13 09:41:32 +00:00
Argyrios Kyrtzidis
e454986617
[libclang] Allow using getDeclCursorUSR function with a Decl* and not a cursor.
...
llvm-svn: 141770
2011-10-12 07:07:36 +00:00
Argyrios Kyrtzidis
769c7bcd9a
[libclang] Make MakeCXTranslationUnit usable outside CIndex.cpp.
...
llvm-svn: 141769
2011-10-12 07:07:33 +00:00
Eli Friedman
df14b3a837
Initial implementation of __atomic_* (everything except __atomic_is_lock_free).
...
llvm-svn: 141632
2011-10-11 02:20:01 +00:00
Douglas Gregor
e442fe3db9
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.
llvm-svn: 141598
2011-10-10 23:37:54 +00:00
Argyrios Kyrtzidis
ffd530f2c0
[libclang] Do ConcurrencyCheck for clang_getLocation as well.
...
llvm-svn: 141583
2011-10-10 21:57:15 +00:00
John McCall
f937c023bf
Rename TagDecl::isDefinition -> isCompleteDefinition
...
for better self-documenting code, since the semantics
are subtly different from getDefinition().
llvm-svn: 141355
2011-10-07 06:10:15 +00:00
Eli Friedman
0dfb889575
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!
llvm-svn: 141330
2011-10-06 23:00:33 +00:00
Argyrios Kyrtzidis
cddafd3969
[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
llvm-svn: 141277
2011-10-06 07:00:54 +00:00
Argyrios Kyrtzidis
3b947f72da
[libclang] Move the bulk of clang_getOverriddenCursors into
...
a cxcursor::getOverriddenCursors C++ function, because SmallVectors
are groovier that malloc'ing buffers.
llvm-svn: 141276
2011-10-06 07:00:46 +00:00
Douglas Gregor
4c362d5310
Expose more statement, expression, and declaration kinds in libclang,
...
from Manuel Holtgrewe!
llvm-svn: 141200
2011-10-05 19:00:14 +00:00
Argyrios Kyrtzidis
52f53fb303
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 '@'.
llvm-svn: 141061
2011-10-04 04:48:02 +00:00
Argyrios Kyrtzidis
12afd70370
[libclang] Introduce CXCursor_CXXAccessSpecifier for C++'s public:/private:/protected: specifiers.
...
Patch by Paolo Capriotti!
llvm-svn: 140864
2011-09-30 17:58:23 +00:00
Argyrios Kyrtzidis
e7e4291448
[libclang] Introduce clang_Range_isNull.
...
llvm-svn: 140706
2011-09-28 18:14:21 +00:00
Douglas Gregor
c0b07286cf
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>.
llvm-svn: 140650
2011-09-27 22:38:19 +00:00
Argyrios Kyrtzidis
2b0cf60df3
[libclang] Expose array size and element type, patch by Vinay Sajip!
...
llvm-svn: 140614
2011-09-27 17:44:34 +00:00
Argyrios Kyrtzidis
a1bcb6adb5
MSVC is stuck in the 80s.
...
llvm-svn: 140597
2011-09-27 04:14:36 +00:00
Argyrios Kyrtzidis
fd51520d5f
[libclang] Refactor the important stuff in clang_getCursor into a cxcursor::getCursor(CXTranslationUnit, SourceLocation) function.
...
llvm-svn: 140588
2011-09-27 00:30:33 +00:00
Argyrios Kyrtzidis
d6e9fa55eb
[libclang] Introduce clang_Cursor_isNull and clang_Cursor_getTranslationUnit functions.
...
llvm-svn: 140587
2011-09-27 00:30:30 +00:00
Argyrios Kyrtzidis
a4fa0d8be7
[libclang] Report implicit objc methods for properties when indexing.
...
Related to rdar://10087069.
llvm-svn: 140551
2011-09-26 19:05:37 +00:00
Argyrios Kyrtzidis
4cdfcae75d
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
llvm-svn: 140519
2011-09-26 08:01:41 +00:00
David Blaikie
9c902b5502
Rename Diagnostic to DiagnosticsEngine as per issue 5397
...
llvm-svn: 140478
2011-09-25 23:23:43 +00:00
David Blaikie
aa347f9392
Removing a bunch of dead returns/breaks after llvm_unreachables.
...
llvm-svn: 140407
2011-09-23 20:26:49 +00:00
David Blaikie
83d382b1ca
Switch assert(0/false) llvm_unreachable.
...
llvm-svn: 140367
2011-09-23 05:06:16 +00:00
Argyrios Kyrtzidis
de6aa08013
Rename ExplicitTemplateArgumentList -> ASTTemplateArgumentListInfo, no functionality change.
...
llvm-svn: 140330
2011-09-22 20:07:03 +00:00
Argyrios Kyrtzidis
45e8cf5732
[libclang] When pointing at a macro expansion inside a macro argument,
...
return a cursor for the inner macro.
llvm-svn: 140207
2011-09-20 23:27:33 +00:00