Abramo Bagnara
6206d53f67
Added AccessSpecDecl node.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-05 05:09:32 +00:00
John McCall
fc92920819
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
2010-06-04 22:33:30 +00:00
Ted Kremenek
df432e338c
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
2010-06-03 15:52:32 +00:00
Dan Gohman
d2010c1b05
Delete a blank line to make it easier to process this file with a script.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-01 16:56:42 +00:00
Ted Kremenek
b3da539e0d
Add check for an invalid CXType in clang_getTypeDeclaration.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105111 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-29 20:01:52 +00:00
Dan Gohman
ebaf2573cc
When handling raw_ostream errors manually, use clear_error() so that
...
raw_ostream doesn't try to do its own error handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104880 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 20:16:37 +00:00
Bill Wendling
a2ace58cf9
Silence warning about "enumeral and non-enumeral type in conditional
...
expression".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104863 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 18:35:05 +00:00
Ted Kremenek
a7f1c008d3
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
2010-05-27 16:57:42 +00:00
Douglas Gregor
12e131385e
Introduce priorities into the code-completion results.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104751 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 22:00:08 +00:00
Daniel Dunbar
32148cef25
Driver/Frontend: Add -emit-codegen-only, for running irgen + codegen but not the
...
.s printer or .o writer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104623 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 18:41:01 +00:00
Douglas Gregor
21c241ff68
Turn vertical spacing into horizontal spacing in code-completion results
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104586 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 06:14:46 +00:00
Douglas Gregor
26d1f75d5b
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
2010-05-23 21:31:22 +00:00
Ted Kremenek
d7ffd08445
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
2010-05-22 00:06:46 +00:00
Daniel Dunbar
439794eea9
Fix __crashreport_info__ declaration.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104301 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-20 23:50:23 +00:00
Daniel Dunbar
c673af7fe6
clang -cc1as: Add -help, -version, and -mllvm support.
...
Also, fix output defaulting to match llvm-mc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104246 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-20 18:15:20 +00:00
Daniel Dunbar
41b5b17445
Driver/MC: Add 'clang -cc1as' integrated assembler tool, currently accepts approximately the same interface as 'llvm-mc'.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104239 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-20 17:49:16 +00:00
Abramo Bagnara
bd054dba8a
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
2010-05-20 10:00:11 +00:00
Ted Kremenek
47e8e399d2
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
2010-05-20 02:59:19 +00:00
Ted Kremenek
50aa6acd0b
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
2010-05-19 21:51:10 +00:00
Ted Kremenek
2bb106eeba
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
2010-05-19 18:36:55 +00:00
Ted Kremenek
857e918a8a
Add clang support for IBOutletCollection.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104135 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-19 17:38:06 +00:00
Ted Kremenek
b12903e1a4
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
2010-05-18 22:32:15 +00:00
Ted Kremenek
23173d7f02
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
2010-05-18 21:09:07 +00:00
Ted Kremenek
40b492a43b
Fix missing '}'.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103966 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-17 20:12:45 +00:00
Ted Kremenek
9ada39a4ac
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
2010-05-17 20:06:56 +00:00
John McCall
c12c5bba6c
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
2010-05-15 11:32:37 +00:00
Ted Kremenek
f0229d884d
Change install_name for libclang.dylib to '@rpath/libclang.dylib'. Fixes <rdar://problem/7987039>.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103837 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 23:50:33 +00:00
Ted Kremenek
8e0ac174c8
Add CXType and an initial set of supporting functions to libclang. This exposes details of
...
Clang's representation of the C type system to clients. It is nowhere near complete, and will
be expanded on demand.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 21:29:26 +00:00
Ted Kremenek
6bfd533600
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
2010-05-13 15:38:38 +00:00
Ted Kremenek
b47467ba5d
Remove stale comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103696 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 03:40:51 +00:00
Ted Kremenek
0f91f6a2ea
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
2010-05-13 00:25:00 +00:00
Ted Kremenek
9a700d277c
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
2010-05-12 06:16:13 +00:00
Ted Kremenek
20f9ba75e5
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
2010-05-12 06:03:33 +00:00
Ted Kremenek
b5fb6acf2d
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
2010-05-12 06:00:25 +00:00
Ted Kremenek
ab1af606a9
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
2010-05-12 05:30:50 +00:00
Ted Kremenek
a333c66b94
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
2010-05-12 05:29:33 +00:00
Abramo Bagnara
465d41b92b
Merged Elaborated and QualifiedName types.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 21:36:43 +00:00
Ted Kremenek
2ea5baf08d
Extend C++ usrs to include type mangling for tag decl arguments, indicating whether a method
...
is static, and mangling in the qualifers of the method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103289 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 20:39:40 +00:00
Ted Kremenek
3ebd8dcbf3
Switch USR generation over from NamedDecl::getNameAsString() to NamedDecl::printName().
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 20:07:23 +00:00
Douglas Gregor
f78cc4360e
Add a stub frontend action for BoostCon, for next week's workshop.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103258 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 15:41:56 +00:00
Ted Kremenek
8e67219a7c
Add initial USR support for mangling in the types of C++ functions and methods.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103225 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 01:04:32 +00:00
Ted Kremenek
a0536d8dd9
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
2010-05-07 01:04:29 +00:00
Ted Kremenek
cbd66f00cf
Add USR support for C++ namespaces, and unify mangling of location information in USRs
...
for anonymous symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103212 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 23:38:28 +00:00
Ted Kremenek
8f06e0e9fe
Add CXCursor support for C++ namespaces.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103211 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 23:38:21 +00:00
Ted Kremenek
fbd84caf62
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
2010-05-05 00:55:23 +00:00
Ted Kremenek
aa8a66de0e
Map Objective-C keywords to CXToken_Keyword.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103063 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 00:55:20 +00:00
Ted Kremenek
11949cbae3
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
2010-05-05 00:55:17 +00:00
Ted Kremenek
6db610934b
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
2010-05-05 00:55:15 +00:00
Daniel Dunbar
cdb65d8724
Fix NON_ANSI_COMPILE_FLAGS setting, for MSVC.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102811 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-01 00:06:42 +00:00
Daniel Dunbar
f51f20fa34
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
2010-04-30 21:51:10 +00:00