Douglas Gregor
e391b01a3a
Add test case for ? : crasher
...
llvm-svn: 94429
2010-01-25 17:48:13 +00:00
Ted Kremenek
fe0fc40c3b
Move BugReporter.h, PathDiagnostic.h, and BugType.h to 'include/Checker/BugReporter'
...
llvm-svn: 94428
2010-01-25 17:10:22 +00:00
Eli Friedman
673f94a0c9
Code simplification; this should have no visible effects.
...
llvm-svn: 94427
2010-01-25 17:04:54 +00:00
Douglas Gregor
5bce76cd53
Loosen preconditions for clang_getCursorSpelling(), returning an empty
...
string when given a cursor that does not have a name. Also, don't give
silly names for statements and non-reference expressions.
llvm-svn: 94426
2010-01-25 16:56:17 +00:00
Douglas Gregor
33f1685607
Expect the impossible
...
llvm-svn: 94425
2010-01-25 16:45:46 +00:00
Douglas Gregor
7210063126
Move the type specifier location for elaborated-type-specifiers from
...
the tag kind (union, struct, class, enum) over to the name of the tag,
if there is a name, since most clients want to point at the name.
llvm-svn: 94424
2010-01-25 16:33:23 +00:00
Douglas Gregor
7201f9f6b8
Visit the condition variables of while and for loops; also, visit the
...
condition even when we've visited the condition variable, so that
we'll see implicit conversions there.
llvm-svn: 94423
2010-01-25 16:12:32 +00:00
Benjamin Kramer
ea9f3f240c
Update C++ include paths for Exherbo, by Ingmar Vanhassel.
...
llvm-svn: 94420
2010-01-25 12:20:15 +00:00
Daniel Dunbar
f91a8d64d4
cindex/Python: Move translation unit load functions to Index, there isn't a good reason to have separate static methods for this.
...
llvm-svn: 94419
2010-01-25 09:16:55 +00:00
Daniel Dunbar
dacede8349
cindex/Python: Support file objects as unsaved_files, albeit inefficiently.
...
llvm-svn: 94418
2010-01-25 09:16:41 +00:00
Ted Kremenek
b2c9aa6cbc
Add missing header.
...
llvm-svn: 94409
2010-01-25 05:19:37 +00:00
Ted Kremenek
0a4546b6fc
Add missing file.
...
llvm-svn: 94407
2010-01-25 04:48:38 +00:00
Ted Kremenek
d6b8708643
Split libAnalysis into two libraries: libAnalysis and libChecker.
...
(1) libAnalysis is a generic analysis library that can be used by
Sema. It defines the CFG, basic dataflow analysis primitives, and
inexpensive flow-sensitive analyses (e.g. LiveVariables).
(2) libChecker contains the guts of the static analyzer, incuding the
path-sensitive analysis engine and domain-specific checks.
Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.
This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker. More changes pending. :)
This change also exposed a layering violation between AnalysisContext
and MemRegion. BlockInvocationContext shouldn't explicitly know about
BlockDataRegions. For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet). We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.
llvm-svn: 94406
2010-01-25 04:41:41 +00:00
Chris Lattner
1df52e7d6a
merge another one in.
...
llvm-svn: 94404
2010-01-25 03:38:26 +00:00
Chris Lattner
fe28ef686e
consolidate two testcases.
...
llvm-svn: 94403
2010-01-25 03:37:52 +00:00
Chris Lattner
83b0dd16c3
fix rdar://7556129 a crash in blocks debug info codegen.
...
llvm-svn: 94402
2010-01-25 03:34:56 +00:00
Chris Lattner
bf78478d35
simplify code.
...
llvm-svn: 94401
2010-01-25 03:29:35 +00:00
Daniel Dunbar
90986f5d3f
cindex/Python: Add Cursor test.
...
llvm-svn: 94397
2010-01-25 00:44:21 +00:00
Daniel Dunbar
9ad194dc18
cindex/Python: Implement support for unsaved/remapped files.
...
llvm-svn: 94396
2010-01-25 00:44:11 +00:00
Daniel Dunbar
fcf2d428e4
ASTUnit: Don't check that input files exist when parsing ASTs from the command
...
line -- they may be remapped (fake) files. This is useful for testing parsing
entirely from memory.
llvm-svn: 94395
2010-01-25 00:44:02 +00:00
Daniel Dunbar
7baaee93e7
cindex/Python: Fix/simplify Index.parse() passing command line arguments.
...
llvm-svn: 94394
2010-01-25 00:43:31 +00:00
Daniel Dunbar
d01592617f
Update comment.
...
llvm-svn: 94393
2010-01-25 00:43:14 +00:00
Daniel Dunbar
36104a8665
cindex/Python: Update comments, add module docstrings, add LLVM headers.
...
llvm-svn: 94392
2010-01-25 00:43:08 +00:00
Daniel Dunbar
2def7eb3ca
CIndex: Don't crash when visitor passes null child statements, and sprinkle some
...
asserts in cursor construction functions to make this more obvious.
Doug, please check. c-index-test would previously crash on this code:
--
for(;;) {}
--
Do we need a custom visit of the for statement to cover the variable
declarations?
llvm-svn: 94391
2010-01-25 00:40:30 +00:00
Daniel Dunbar
3e555fd85f
cindex/Python: Move Cursor.is_ methods to CursorKind, and add test.
...
Also, add CursorKind.get_all_kinds().
llvm-svn: 94389
2010-01-24 21:20:39 +00:00
Daniel Dunbar
195cdeceaf
cindex/Python: Implement explicit objects for CursorKind enumeration values.
...
llvm-svn: 94388
2010-01-24 21:20:29 +00:00
Daniel Dunbar
55d6964e28
cindex/Python: Fetch SourceLocation instantiation location information on lazily, it isn't free.
...
Also, add repr() support to SourceRange.
llvm-svn: 94387
2010-01-24 21:20:21 +00:00
Daniel Dunbar
aca5acfd01
cindex/Python: Add Cursor.get_usr().
...
Also, change Cursor.spelling to return None for non-decls, for consistency with get_usr().
llvm-svn: 94386
2010-01-24 21:20:13 +00:00
Daniel Dunbar
501e91f3b7
cindex/Python: Return null cursors as None instead of exposing this notion.
...
llvm-svn: 94385
2010-01-24 21:20:05 +00:00
Daniel Dunbar
942453284f
cindex/Python: Convert CXString objects to regular Python strings below API.
...
llvm-svn: 94384
2010-01-24 21:19:57 +00:00
Daniel Dunbar
322be3a46e
Simplify.
...
llvm-svn: 94383
2010-01-24 21:19:48 +00:00
Daniel Dunbar
18b75a4f10
cindex/Python: Remove Cursor.file forwarding method, this doesn't really fit the API.
...
llvm-svn: 94382
2010-01-24 21:19:40 +00:00
Chris Lattner
0bcc858a2b
-fno-rtti is now the default.
...
llvm-svn: 94379
2010-01-24 20:43:31 +00:00
Fariborz Jahanian
734e95e05c
Enhance test to check on expected rewritten output.
...
llvm-svn: 94368
2010-01-24 18:40:06 +00:00
Anders Carlsson
6515d877c0
Fix a pretty bad bug where if a constructor (or conversion function) was marked as 'explicit', but then defined out-of-line, we would not treat it as being explicit.
...
llvm-svn: 94366
2010-01-24 17:15:04 +00:00
Anders Carlsson
77babdb99a
Implement [dcl.fct.spec]p6.
...
llvm-svn: 94365
2010-01-24 16:49:46 +00:00
Mike Stump
20a2c618f2
Ok, turn back off -Wunreachable-code by default.
...
llvm-svn: 94364
2010-01-24 16:16:01 +00:00
Sebastian Redl
0432dcd15c
Mark PartialDiagnostic.h as a C++ header
...
llvm-svn: 94363
2010-01-24 10:02:25 +00:00
Anders Carlsson
c0ebb9412c
Land test case.
...
llvm-svn: 94362
2010-01-24 05:50:37 +00:00
Anders Carlsson
aaeef07280
Implement instantiation of AsmStmts (Crazy, I know)
...
llvm-svn: 94361
2010-01-24 05:50:09 +00:00
Daniel Dunbar
b9999fdc67
Tweak clang_visitChildren comment.
...
llvm-svn: 94360
2010-01-24 04:10:31 +00:00
Daniel Dunbar
fd7caa25a6
cindex/Python: Add Cursor.get_children()
...
llvm-svn: 94359
2010-01-24 04:10:22 +00:00
Daniel Dunbar
7bcfd6eb6d
cindex/Python: Remove Declaration class, this has been removed from the API.
...
llvm-svn: 94358
2010-01-24 04:10:06 +00:00
Daniel Dunbar
8f8f35bd6c
cindex/Python: Eliminate Entity class, it has been removed from CIndex.
...
llvm-svn: 94357
2010-01-24 04:09:58 +00:00
Daniel Dunbar
b34dde72e3
Simplify.
...
llvm-svn: 94356
2010-01-24 04:09:51 +00:00
Daniel Dunbar
e79aba4c72
cindex/Python: Add TranslationUnit.cursor.
...
llvm-svn: 94355
2010-01-24 04:09:43 +00:00
Daniel Dunbar
3615fd27f2
cindex/Python: Tweak Source{Location,Range}
...
- Add __repr__ on SourceLocation.
- Fix File object construction to use c_object_p type, and use None instead of
invalid File objects.
- Make SourceRange.{start,end} properties.
llvm-svn: 94354
2010-01-24 04:09:34 +00:00
Daniel Dunbar
3cdcfe03bf
cindex/Python: Make Cursor.is_... functions not properties.
...
Also, add ValueError check before calling Cursor_spelling.
llvm-svn: 94353
2010-01-24 04:09:23 +00:00
Alexis Hunt
aecc45cb3c
Mangle static variables with an extra name to distinguish them from non-static variables in the same TU.
...
Fixes PR5966 for real this time; also reverts r92911, which had a incorrect fix.
llvm-svn: 94352
2010-01-24 03:04:27 +00:00
Daniel Dunbar
62ebf25f44
Index.h: Tweak comments, delete trailing whitespace, fix a few typos, etc.
...
llvm-svn: 94351
2010-01-24 02:54:26 +00:00