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
Kevin Enderby
ae2ec4745f
We want the dwarf AT_producer for assembly source files to match clang's
...
AT_producer. Which includes clang's version information so we can tell
which version of the compiler was used.
This is second of the two steps to allow us to do this. The first was a
change to llvm-mc with revision 172630 to provide a method to set the
AT_producer string. This second step has the clang driver passing the value
of getClangFullVersion() via the new flag -dwarf-debug-producer when invoking
the integrated assembler on assembly source files. Then using the new
setDwarfDebugProducer() method to set the AT_producer string.
rdar://12888242
llvm-svn: 172758
2013-01-17 21:38:06 +00:00
Argyrios Kyrtzidis
da4ba87181
[libclang] In clang_reparseTranslationUnit_Impl, move the check whether TU is
...
null before using it.
llvm-svn: 172632
2013-01-16 18:13:00 +00:00
Argyrios Kyrtzidis
fbd7c2d3b2
[libclang] In clang_getCursorType, don't crash if the translation unit is not
...
set on the cursor; return a null type in such a case.
llvm-svn: 172625
2013-01-16 17:04:31 +00:00
David Greene
e6c9fe035d
Fix Casting
...
Use const_cast<> to avoid a cast-away-const error.
llvm-svn: 172565
2013-01-15 22:09:51 +00:00
David Greene
02b002ac37
Fix Casting
...
Use const_cast<> to avoid a cast-away-const error.
llvm-svn: 172564
2013-01-15 22:09:49 +00:00
David Greene
4320e5e114
Fix Casting
...
Use const_cast<> to avoid a cast-away-const error.
llvm-svn: 172563
2013-01-15 22:09:48 +00:00
David Greene
0516ba604b
Fix Casting
...
Use const_cast<> to avoid a cast-away-const error.
llvm-svn: 172562
2013-01-15 22:09:46 +00:00
Chad Rosier
5f15a35114
[driver] Warnings for warning options are handled by the frontend. The driver needs to process the
...
warning options to setup diagnostic state, but should not be emitting warnings as these would be
rudndant with what the frontend emits.
rdar://13001556
llvm-svn: 172497
2013-01-15 01:21:53 +00:00
Dmitri Gribenko
9c256e379e
libclang: remove a few const_casts
...
llvm-svn: 172373
2013-01-14 00:46:27 +00:00
Dmitri Gribenko
049a4ffcb8
Constify argument of Preprocessor::getMacroInfoHistory and propagate to
...
callers, removing unneeded const_cast
llvm-svn: 172372
2013-01-14 00:36:42 +00:00
Dmitri Gribenko
f857950d39
Remove useless 'llvm::' qualifier from names like StringRef and others that are
...
brought into 'clang' namespace by clang/Basic/LLVM.h
llvm-svn: 172323
2013-01-12 19:30:44 +00:00
Dmitri Gribenko
037f9d18ae
libclang: use C++ casts in CXString.cpp
...
llvm-svn: 172272
2013-01-11 23:13:36 +00:00
Dmitri Gribenko
ec3a16fc8c
libclang: constness for CXString
...
llvm-svn: 172270
2013-01-11 23:08:18 +00:00
Argyrios Kyrtzidis
49d9d02947
[libclang] Add some constness in CXSourceLocation and CXSourceRange.
...
llvm-svn: 172261
2013-01-11 22:29:47 +00:00
Ted Kremenek
632af24eb8
Set process return code of 1 in set-xcode-analyzer when Xcode needs to be quit. Fixes <rdar://problem/12983031>.
...
llvm-svn: 172256
2013-01-11 21:49:36 +00:00
Dmitri Gribenko
7a7284d881
libclang: remove unneeded casts
...
llvm-svn: 172253
2013-01-11 21:06:06 +00:00
Dmitri Gribenko
ba2f746fea
libclang: change CXCursor to store 'const void *' pointers for
...
const-correctness, and update all users
llvm-svn: 172252
2013-01-11 21:01:49 +00:00
Dmitri Gribenko
2c173b4806
libclang: use getCursorTU and getCursorASTUnit instead of explicit casts
...
llvm-svn: 172241
2013-01-11 19:28:44 +00:00
Dmitri Gribenko
5ca49f71fd
Replace more usages of __func__ with LLVM_FUNCTION_NAME
...
llvm-svn: 172161
2013-01-11 02:23:13 +00:00
Dmitri Gribenko
9f08be0272
libclang logging: fixup for MSVC, which does not have __func__
...
llvm-svn: 172158
2013-01-11 01:15:02 +00:00
Argyrios Kyrtzidis
1489ed2b68
[libclang] Address some coding style issues pointed out by Dmitri.
...
llvm-svn: 172096
2013-01-10 19:43:44 +00:00
Ted Kremenek
4a800f876a
ccc-analyzer: Forward -msse* options to the compiler.
...
llvm-svn: 172094
2013-01-10 19:29:31 +00:00
Argyrios Kyrtzidis
f036f1a630
[libclang] Add missing header file
...
llvm-svn: 172090
2013-01-10 18:58:44 +00:00
Argyrios Kyrtzidis
ea47435861
[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.
llvm-svn: 172089
2013-01-10 18:54:52 +00:00