Devang Patel
c002464ae5
Emit debug info for virtual functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94467 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:17:15 +00:00
John McCall
841d5e607f
Fixit to remove 'volatile' in file-scope 'asm volatile'.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94466 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:12:50 +00:00
Daniel Dunbar
82b51cce8c
Driver: Fix fallback to gcc to -c instead of -S if trying to generate an LLVM bc
...
file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:35:08 +00:00
Ted Kremenek
a297de20bd
Pull functions that translate from CXSourceLocation to SourceLocation (and back) to a separate header file.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:34:44 +00:00
John McCall
7a6ae743b2
Warn on top-level 'asm volatile' (instead of misparsing it).
...
"Fixes" rdar://problem/7574870
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94458 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:27:48 +00:00
Fariborz Jahanian
616c173809
global variable that binds reference to a non-lvalue reproted
...
as NYI now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:40:39 +00:00
Ted Kremenek
2cd10b071e
Fix include guard.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94447 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:09:34 +00:00
Fariborz Jahanian
5bfc536440
Fixes a rewriting bug of access ivar of a variable cast
...
to subclass. (Fixes radar 7575882).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94444 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 20:50:02 +00:00
Fariborz Jahanian
f7c00eda7f
Fix a code gen. bug involving compiling global references.
...
(fixes radar 7574896).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94434 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 18:30:26 +00:00
Douglas Gregor
3512107be5
Add test case for ? : crasher
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94429 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 17:48:13 +00:00
Ted Kremenek
6b67630d5d
Move BugReporter.h, PathDiagnostic.h, and BugType.h to 'include/Checker/BugReporter'
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94428 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 17:10:22 +00:00
Eli Friedman
a1635d9b46
Code simplification; this should have no visible effects.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94427 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 17:04:54 +00:00
Douglas Gregor
60cbfacd94
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 16:56:17 +00:00
Douglas Gregor
fd64377225
Expect the impossible
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94425 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 16:45:46 +00:00
Douglas Gregor
b988f9cde9
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94424 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 16:33:23 +00:00
Douglas Gregor
263b47b627
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94423 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 16:12:32 +00:00
Benjamin Kramer
0db3d725ec
Update C++ include paths for Exherbo, by Ingmar Vanhassel.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 12:20:15 +00:00
Daniel Dunbar
061bae930b
cindex/Python: Move translation unit load functions to Index, there isn't a good reason to have separate static methods for this.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94419 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 09:16:55 +00:00
Daniel Dunbar
db59a7700e
cindex/Python: Support file objects as unsaved_files, albeit inefficiently.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94418 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 09:16:41 +00:00
Ted Kremenek
326be568e2
Add missing header.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94409 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 05:19:37 +00:00
Ted Kremenek
83fc147dc2
Add missing file.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94407 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 04:48:38 +00:00
Ted Kremenek
1309f9a3b2
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 04:41:41 +00:00
Chris Lattner
3db9eb1fbe
merge another one in.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94404 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 03:38:26 +00:00
Chris Lattner
9712e0be99
consolidate two testcases.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94403 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 03:37:52 +00:00
Chris Lattner
165714e026
fix rdar://7556129 a crash in blocks debug info codegen.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94402 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 03:34:56 +00:00
Chris Lattner
14b1a363fb
simplify code.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94401 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 03:29:35 +00:00
Daniel Dunbar
90859ae3b6
cindex/Python: Add Cursor test.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94397 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:44:21 +00:00
Daniel Dunbar
5b534f6794
cindex/Python: Implement support for unsaved/remapped files.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:44:11 +00:00
Daniel Dunbar
3bd54cc562
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:44:02 +00:00
Daniel Dunbar
1f8d7f94c7
cindex/Python: Fix/simplify Index.parse() passing command line arguments.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:43:31 +00:00
Daniel Dunbar
fd9f23464b
Update comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94393 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:43:14 +00:00
Daniel Dunbar
4efd632322
cindex/Python: Update comments, add module docstrings, add LLVM headers.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94392 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:43:08 +00:00
Daniel Dunbar
54d67caeee
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?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94391 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:40:30 +00:00
Daniel Dunbar
a6a6499a90
cindex/Python: Move Cursor.is_ methods to CursorKind, and add test.
...
Also, add CursorKind.get_all_kinds().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94389 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 21:20:39 +00:00
Daniel Dunbar
12bf15c48a
cindex/Python: Implement explicit objects for CursorKind enumeration values.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94388 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 21:20:29 +00:00
Daniel Dunbar
f869083cbf
cindex/Python: Fetch SourceLocation instantiation location information on lazily, it isn't free.
...
Also, add repr() support to SourceRange.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94387 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 21:20:21 +00:00
Daniel Dunbar
3d855f8d48
cindex/Python: Add Cursor.get_usr().
...
Also, change Cursor.spelling to return None for non-decls, for consistency with get_usr().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94386 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 21:20:13 +00:00
Daniel Dunbar
fb8ae1796e
cindex/Python: Return null cursors as None instead of exposing this notion.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94385 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 21:20:05 +00:00
Daniel Dunbar
a33dca490a
cindex/Python: Convert CXString objects to regular Python strings below API.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94384 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 21:19:57 +00:00
Daniel Dunbar
be0b555b80
Simplify.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94383 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 21:19:48 +00:00
Daniel Dunbar
0263a1e517
cindex/Python: Remove Cursor.file forwarding method, this doesn't really fit the API.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94382 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 21:19:40 +00:00
Chris Lattner
0bb46d285c
-fno-rtti is now the default.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:43:31 +00:00
Fariborz Jahanian
2f93a98d40
Enhance test to check on expected rewritten output.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94368 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 18:40:06 +00:00
Anders Carlsson
7a6e13aa2e
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94366 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 17:15:04 +00:00
Anders Carlsson
0757c8ccb7
Implement [dcl.fct.spec]p6.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94365 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 16:49:46 +00:00
Mike Stump
8a8fa25bae
Ok, turn back off -Wunreachable-code by default.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 16:16:01 +00:00
Sebastian Redl
8b00be5560
Mark PartialDiagnostic.h as a C++ header
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94363 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 10:02:25 +00:00
Anders Carlsson
b2e90aca3e
Land test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94362 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 05:50:37 +00:00
Anders Carlsson
703e394866
Implement instantiation of AsmStmts (Crazy, I know)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94361 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 05:50:09 +00:00
Daniel Dunbar
a57259e9d7
Tweak clang_visitChildren comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94360 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 04:10:31 +00:00