Commit Graph

2457 Commits

Author SHA1 Message Date
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
Argyrios Kyrtzidis bf1be59dae [libclang] In clang_equalCursors, clear out the "FirstInDeclGroup" part in a declaration cursor
before doing the comparison.

This is because we can't set "FirstInDeclGroup" consistently; for example, when visiting a DeclStmt we will set
it but we don't set it on the result of clang_getCursorDefinition for a reference of the same declaration.

llvm-svn: 171878
2013-01-08 18:23:28 +00:00
Argyrios Kyrtzidis 68d31ce5ff [libclang] When annotating preprocessor tokens, if we are in a macro definition,
check if the token was ever a macro name and annotate it if that's the case.

llvm-svn: 171776
2013-01-07 19:16:32 +00:00
Argyrios Kyrtzidis 2d77aeb946 [libclang] Simplify annotation of preprocessing tokens and remove the AnnotateTokensData
DenseMap and the lookups associated with it.

Instead of lexing for preprocessor tokens, associating the annotation with the location in a map,
and later lookup in the map in order to adjust the cursor annotation, just annotate the cursor
while lexing for preprocessor tokens.

llvm-svn: 171775
2013-01-07 19:16:30 +00:00
Argyrios Kyrtzidis 98a8874a0d [libclang] Make token annotation of type/storage qualifiers accurate.
Previously type/storage qualifiers would not be annotated as the declaration they belonged to.
Just use the resulting source range of getRawCursorExtent() which is more correct
than what AnnotateTokensWorker::Visit() was adjusting it to.

llvm-svn: 171774
2013-01-07 19:16:27 +00:00
Argyrios Kyrtzidis 579825a50a [libclang] When getting the cursor for an identifier inside a macro definition, check if
this was ever a macro name and return a specific CXCursor_MacroExpansion cursor in such a case,
instead of the generic CXCursor_MacroDefinition.

Checking for macro name makes sure the identifier is not part of the identifier list in a
function macro.
While, in general, resolving identifiers in macro definitions to other macros may not be completely accurate,
it greatly improves functionality such as give-me-the-definition-of-this, which was not working at all
inside macro definitions.

llvm-svn: 171773
2013-01-07 19:16:25 +00:00
Dmitri Gribenko a9cc2491dd Comment to XML conversion: no, we don't want to print instantiations for the
<Declaration> tag

llvm-svn: 171763
2013-01-07 18:45:48 +00:00
NAKAMURA Takumi 0c340a96aa libclang/Makefile: Reorder USEDLIBS along driver/clang.
llvm-svn: 171750
2013-01-07 15:45:20 +00:00
Ted Kremenek 6a4c73db23 Fix set-xcode-analyzer to only modify the ExecPath for the analyzer when using --use-xcode-clang.
Turns out that the ExecPath for the ObjC migrator would also get set.

Fixes <rdar://problem/12961769>.

llvm-svn: 171607
2013-01-05 07:31:54 +00:00
Ted Kremenek 8533dd9f58 Require set-xcode-analyzer to run with Python 2.7 or later.
Addresses LLVM PR 11661.

llvm-svn: 171503
2013-01-04 19:04:42 +00:00