Argyrios Kyrtzidis
a2ed813afd
[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
llvm-svn: 174689
2013-02-08 01:12:25 +00:00
Dmitri Gribenko
0b62f8a632
libclang: reduce CXString abuse
...
ContainerUSR is not really a CXString, but it should own the underlying memory
buffer. Thus, it is better to change the type to std::string. This will not
introduce extra copying overhead, since the workaround that is being removed
was already making a copy.
llvm-svn: 174647
2013-02-07 19:09:22 +00:00
NAKAMURA Takumi
288c42e936
libclang: CursorVisitor::VisitBuiltinTypeLoc(): Add OCLSampler. [-Wswitch]
...
llvm-svn: 174606
2013-02-07 12:47:42 +00:00
Guy Benyei
610541989a
Add OpenCL samplers as Clang builtin types and check sampler related restrictions.
...
llvm-svn: 174601
2013-02-07 10:55:47 +00:00
Dmitri Gribenko
2aedfbd177
Comment to XML conversion: replace string comparison with command ID comparison
...
llvm-svn: 174290
2013-02-03 17:48:05 +00:00
Dmitri Gribenko
18aa3bb819
libclang: wrap CXString implementation into 'namespace cxstring'
...
This removes quite a few 'cxstring::' qualifications where they are obvious.
llvm-svn: 174286
2013-02-03 13:54:26 +00:00
Dmitri Gribenko
7489521eec
libclang: remove 'using namespace cxstring'
...
llvm-svn: 174285
2013-02-03 13:52:47 +00:00
Dmitri Gribenko
bf7bf10d45
libclang: migrate IndexingDeclVisitor to ConstDeclVisitor
...
llvm-svn: 174284
2013-02-03 13:42:20 +00:00
Dmitri Gribenko
d73f73b0dd
libclang: remove unneeded const_cast
...
llvm-svn: 174283
2013-02-03 13:26:20 +00:00
Dmitri Gribenko
82700578d4
libclang: migrate USRGenerator to ConstDeclVisitor
...
llvm-svn: 174281
2013-02-03 13:21:23 +00:00
Dmitri Gribenko
dd7dacfff9
libclang: remove unneeded const_casts
...
llvm-svn: 174280
2013-02-03 13:19:54 +00:00
Dmitri Gribenko
2f23e9c520
libclang: introduce cxstring::{createRef,createDup} for StringRefs
...
Also migrate all clients from the old API.
llvm-svn: 174263
2013-02-02 02:19:29 +00:00
Ted Kremenek
26c777c409
Add some horrible Perl code to teach scan-build to recursively walk a directory for HTML files.
...
llvm-svn: 174260
2013-02-02 01:52:41 +00:00
Dmitri Gribenko
3c66b0be90
libclang: introduce cxstring::{createRef,createDup} for C strings
...
Also migrate all clients from the old API.
llvm-svn: 174238
2013-02-02 00:02:12 +00:00
Dmitri Gribenko
2e72dd4a43
Comment parsing: improve the fidelity of XML output for many block commands
...
This change introduces a 'kind' attribute for the <Para> tag, that captures the
kind of the parent block command.
For example:
\todo Meow.
used to be just <Para>Meow.</Para>, but now it is
<Para kind="todo">Meow.</Para>
llvm-svn: 174216
2013-02-01 20:23:57 +00:00
Dmitri Gribenko
946aca8524
libclang: document the purpose of createNull()
...
llvm-svn: 174195
2013-02-01 16:38:41 +00:00
Dmitri Gribenko
74f3e1e028
libclang: add comments for CXStringFlag
...
llvm-svn: 174194
2013-02-01 16:36:31 +00:00
Dmitri Gribenko
36a6dd04ef
libclang: itroduce cxstring::createEmpty()
...
llvm-svn: 174174
2013-02-01 14:21:22 +00:00
Dmitri Gribenko
f98dfbae94
libclang: introduce cxstring::createNull()
...
llvm-svn: 174173
2013-02-01 14:13:32 +00:00
Fariborz Jahanian
1a0cf80533
[Comment parsing] Add support for recognizing
...
\headerfile command and representing it in an xml
document. Patch reviewed by Dmitri Gribenko.
// rdar://12397511
llvm-svn: 174109
2013-01-31 23:12:39 +00:00
Evgeniy Stepanov
8660623576
Attempt to fix Windows build breakage.
...
llvm-svn: 174060
2013-01-31 14:27:38 +00:00
Douglas Gregor
0a0e2b3631
Allow the computation of the base priority for a declaration code completion result to consider the completion context
...
llvm-svn: 174037
2013-01-31 04:52:16 +00:00
Ted Kremenek
23813454e9
scan-build: When using Xcode 4.6, use build settings for doing proper build interposition.
...
llvm-svn: 173954
2013-01-30 19:10:24 +00:00
Chad Rosier
dd60e09021
[driver] Refactor the driver so that a failing commands doesn't prevent
...
subsequent commands from being executed.
The diagnostics generation isn't designed for this use case, so add a note to
fix this in the very near future. For now, just generated the diagnostics for
the first failing command.
Part of rdar://12984531
llvm-svn: 173825
2013-01-29 20:15:05 +00:00
Dmitri Gribenko
b95b3f128b
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.
llvm-svn: 173595
2013-01-26 22:44:19 +00:00
Dmitri Gribenko
183436e5b6
libclang: type safety for CXTranslationUnitImpl::CIdx
...
llvm-svn: 173590
2013-01-26 21:49:50 +00:00
Dmitri Gribenko
ba82fea336
libclang: type safety for CXTranslationUnitImpl::FormatContext
...
llvm-svn: 173589
2013-01-26 21:39:50 +00:00
Dmitri Gribenko
d36209e308
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.
llvm-svn: 173588
2013-01-26 21:32:42 +00:00
Dmitri Gribenko
c22ea1ce88
libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)
...
into a getter cxtu::getASTUnit(TU)
llvm-svn: 173585
2013-01-26 18:53:38 +00:00
Dmitri Gribenko
a169118854
libclang: make getCursorParentDecl() return 'const Decl *'
...
llvm-svn: 173584
2013-01-26 18:12:08 +00:00
Dmitri Gribenko
e4baea61b5
libclang: change getCursorAttr() to return 'const Attr *'
...
llvm-svn: 173583
2013-01-26 18:08:08 +00:00
Dmitri Gribenko
e835406cd7
libclang: make getCursorStmt() and getCursorExpr() return const pointers
...
Also change EnqueueVisitor to use ConstStmtVisitor as a consequence.
llvm-svn: 173577
2013-01-26 15:29:08 +00:00
Argyrios Kyrtzidis
ac08b26611
[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
llvm-svn: 173559
2013-01-26 04:52:52 +00:00
Jordan Rose
b18179da33
scan-build: Add a --keep-empty option for better testing.
...
SATestBuild expects to compare output directories for each invocation of
scan-build that it runs, but scan-build clears out empty directories by
default. We were coincidentally not getting that behavior until r173294.
llvm-svn: 173383
2013-01-24 23:07:59 +00:00
Ted Kremenek
15b47bc872
Always process an index.html file if we have HTML output. Patch by Justin Bogner.
...
llvm-svn: 173294
2013-01-23 21:22:14 +00:00
Dmitri Gribenko
d15bb30dba
libclang: change return type of getCursorDecl() to 'const Decl *'
...
llvm-svn: 173278
2013-01-23 17:25:27 +00:00
Dmitri Gribenko
f930448bf6
Remove uneeded casts
...
llvm-svn: 173269
2013-01-23 15:56:07 +00:00
Bill Wendling
e4e2e59740
Explicitly cast away the const-ness instead of doing it implicitly.
...
llvm-svn: 173241
2013-01-23 08:58:23 +00:00
Bill Wendling
eade362f30
Explicitly cast away the const-ness instead of doing it implicitly.
...
llvm-svn: 173232
2013-01-23 08:25:41 +00:00
NAKAMURA Takumi
873a63ce19
libclang: Update comment about USEDLIBS in c-*-test/Makefile.
...
"Note that 'USEDLIBS' must include all of the core clang libraries when -static is given to linker on cygming."
llvm-svn: 173124
2013-01-22 04:11:33 +00:00
NAKAMURA Takumi
a589b96041
Add bitreader to LINK_COMPONENTS in users of libclang, c-arcmt-test and c-index-test.
...
They don't link cygclang.dll, but libclang.a on cygwin.
llvm-svn: 172980
2013-01-20 14:53:49 +00:00
Guy Benyei
1b4fb3e08b
Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)
...
llvm-svn: 172973
2013-01-20 12:31:11 +00:00
Chris Lattner
0e6c940d2c
update to use the new BitcodeCursor readRecord that takes a StringRef blob parameter,
...
and adopt "advance" in more places.
llvm-svn: 172951
2013-01-20 02:38:54 +00:00
Sean Silva
f1b49e237f
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.
llvm-svn: 172945
2013-01-20 01:58:28 +00:00
Chris Lattner
c79fcfaf8e
random tidying
...
llvm-svn: 172920
2013-01-19 21:35:35 +00:00
Chris Lattner
5b25f0b7a9
update header comment.
...
llvm-svn: 172909
2013-01-19 18:47:35 +00:00
Chris Lattner
779fe3315f
these now depend on the bitcode reader too.
...
llvm-svn: 172906
2013-01-19 18:28:24 +00:00
Chris Lattner
5b313e7b2a
this depends on the bitcode reader, since it is using it.
...
llvm-svn: 172905
2013-01-19 18:24:13 +00:00
Chandler Carruth
4b41745e05
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.
llvm-svn: 172892
2013-01-19 08:09:44 +00:00
NAKAMURA Takumi
8b517f1076
clang-check: Introduce llvm::sys::PrintStackTraceOnErrorSignal()
...
llvm-svn: 172818
2013-01-18 13:46:48 +00:00