]>
granicus.if.org Git - clang/log
Chris Lattner [Mon, 25 Jan 2010 03:38:26 +0000 (03:38 +0000)]
merge another one in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94404
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Jan 2010 03:37:52 +0000 (03:37 +0000)]
consolidate two testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Jan 2010 03:34:56 +0000 (03:34 +0000)]
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
Chris Lattner [Mon, 25 Jan 2010 03:29:35 +0000 (03:29 +0000)]
simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94401
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 00:44:21 +0000 (00:44 +0000)]
cindex/Python: Add Cursor test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 00:44:11 +0000 (00:44 +0000)]
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
Daniel Dunbar [Mon, 25 Jan 2010 00:44:02 +0000 (00:44 +0000)]
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
Daniel Dunbar [Mon, 25 Jan 2010 00:43:31 +0000 (00:43 +0000)]
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
Daniel Dunbar [Mon, 25 Jan 2010 00:43:14 +0000 (00:43 +0000)]
Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94393
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 25 Jan 2010 00:43:08 +0000 (00:43 +0000)]
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
Daniel Dunbar [Mon, 25 Jan 2010 00:40:30 +0000 (00:40 +0000)]
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
Daniel Dunbar [Sun, 24 Jan 2010 21:20:39 +0000 (21:20 +0000)]
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
Daniel Dunbar [Sun, 24 Jan 2010 21:20:29 +0000 (21:20 +0000)]
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
Daniel Dunbar [Sun, 24 Jan 2010 21:20:21 +0000 (21:20 +0000)]
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
Daniel Dunbar [Sun, 24 Jan 2010 21:20:13 +0000 (21:20 +0000)]
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
Daniel Dunbar [Sun, 24 Jan 2010 21:20:05 +0000 (21:20 +0000)]
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
Daniel Dunbar [Sun, 24 Jan 2010 21:19:57 +0000 (21:19 +0000)]
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
Daniel Dunbar [Sun, 24 Jan 2010 21:19:48 +0000 (21:19 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94383
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 21:19:40 +0000 (21:19 +0000)]
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
Chris Lattner [Sun, 24 Jan 2010 20:43:31 +0000 (20:43 +0000)]
-fno-rtti is now the default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sun, 24 Jan 2010 18:40:06 +0000 (18:40 +0000)]
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
Anders Carlsson [Sun, 24 Jan 2010 17:15:04 +0000 (17:15 +0000)]
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
Anders Carlsson [Sun, 24 Jan 2010 16:49:46 +0000 (16:49 +0000)]
Implement [dcl.fct.spec]p6.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sun, 24 Jan 2010 16:16:01 +0000 (16:16 +0000)]
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
Sebastian Redl [Sun, 24 Jan 2010 10:02:25 +0000 (10:02 +0000)]
Mark PartialDiagnostic.h as a C++ header
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 24 Jan 2010 05:50:37 +0000 (05:50 +0000)]
Land test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94362
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 24 Jan 2010 05:50:09 +0000 (05:50 +0000)]
Implement instantiation of AsmStmts (Crazy, I know)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94361
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:10:31 +0000 (04:10 +0000)]
Tweak clang_visitChildren comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94360
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:10:22 +0000 (04:10 +0000)]
cindex/Python: Add Cursor.get_children()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94359
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:10:06 +0000 (04:10 +0000)]
cindex/Python: Remove Declaration class, this has been removed from the API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:09:58 +0000 (04:09 +0000)]
cindex/Python: Eliminate Entity class, it has been removed from CIndex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94357
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:09:51 +0000 (04:09 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94356
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:09:43 +0000 (04:09 +0000)]
cindex/Python: Add TranslationUnit.cursor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:09:34 +0000 (04:09 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94354
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 04:09:23 +0000 (04:09 +0000)]
cindex/Python: Make Cursor.is_... functions not properties.
Also, add ValueError check before calling Cursor_spelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Hunt [Sun, 24 Jan 2010 03:04:27 +0000 (03:04 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94352
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 02:54:26 +0000 (02:54 +0000)]
Index.h: Tweak comments, delete trailing whitespace, fix a few typos, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 24 Jan 2010 02:02:07 +0000 (02:02 +0000)]
Initial checkin of CIndex Python bindings, by Andrew Sutton!
- Some tweaks by me for API changes, Darwin, and x86_64 support. Still needs
substantial updating to match recent CIndex API changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94349
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Jan 2010 01:50:29 +0000 (01:50 +0000)]
fix PR6034, a crash on invalid where the switch stack would get
unbalanced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94347
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Jan 2010 01:30:04 +0000 (01:30 +0000)]
add a prototype for __builtin_fpclassify. We don't know how to
codegen it, so we get 'cannot compile this builtin function yet'
errors, just like we do currently for __builtin_isinf. However,
this should let us parse headers that use it without barfing,
which should help PR6083.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94346
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 24 Jan 2010 00:30:31 +0000 (00:30 +0000)]
disable this test, it is failing sporadically.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94344
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 24 Jan 2010 00:20:05 +0000 (00:20 +0000)]
Fix a nasty bug where temporaries weren't marked as being conditional in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94341
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 24 Jan 2010 00:19:41 +0000 (00:19 +0000)]
Use new initialization code when dealing with [dcl.init.aggr]p12. This fixes the bug where array elements and member initializers weren't copied correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94340
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 23:23:01 +0000 (23:23 +0000)]
Change all InitializedEntity pointers over to be references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94335
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 22:49:02 +0000 (22:49 +0000)]
Start passing InitializedEntity to CheckDesignatedInitializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94334
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 23 Jan 2010 22:37:59 +0000 (22:37 +0000)]
Preserve access for enum constants during template instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94333
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 20:47:59 +0000 (20:47 +0000)]
More init work, adding more entity parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94332
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 23 Jan 2010 20:23:40 +0000 (20:23 +0000)]
Temporary flip default for -Wunreachable-code so some bots can test it
out. They should all be done later tonight, but if something bad
happens, feel free to revert sooner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 20:20:40 +0000 (20:20 +0000)]
Use the new init code for member subobjects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94329
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 20:13:41 +0000 (20:13 +0000)]
Switch some array initialization over to the new init code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94327
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 23 Jan 2010 20:12:18 +0000 (20:12 +0000)]
Insulate these from changes to the default for -Wunreachable-code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94326
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 19:55:29 +0000 (19:55 +0000)]
Baby steps towards migrating the InitListChecker over to the new initialization code. Pass an InitializedEntity pointer through to most init checker functions. Right now, it's ignored everywhere except when initializing vectors in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94325
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 19:22:30 +0000 (19:22 +0000)]
When an InitializedEntity is passed to CheckSingleInitializer, call the new Sema::PerformCopyInitialization overload.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 23 Jan 2010 19:00:10 +0000 (19:00 +0000)]
Add bzero builtin; this should help codegen quality for code using this
function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94320
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 18:35:41 +0000 (18:35 +0000)]
Change CheckSingleInitializer to take/return OwningExprResults instead. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94316
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 18:26:49 +0000 (18:26 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94315
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Jan 2010 18:16:35 +0000 (18:16 +0000)]
Simplify code with StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94314
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Jan 2010 18:16:07 +0000 (18:16 +0000)]
No need to terminate this buffer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94313
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 23 Jan 2010 17:51:23 +0000 (17:51 +0000)]
Add doxygen comment to clang_getClangVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Jan 2010 10:15:32 +0000 (10:15 +0000)]
Adjust testcase for recent AsmPrinter changes, sigh.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 23 Jan 2010 10:14:58 +0000 (10:14 +0000)]
Adjust testcase for recent DWARF printer changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94306
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 23 Jan 2010 08:10:49 +0000 (08:10 +0000)]
Produce a special diagnostic when users call a function with an argument of
incomplete type (or a pointer/reference to such).
The causes of this problem are different enough to justify a different "design"
for the diagnostic. Most notably, it doesn't give an operand index:
it's usually pretty obvious which operand is the problem, it adds a lot of
clutter to mention it, and the fix is usually in a different part of the file
anyway.
This is yet another diagnostic that should really have an analogue in the
non-overloaded case --- which should be much easier to write because of
the weaker space constraints.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 05:47:27 +0000 (05:47 +0000)]
Fix the EntityKind order so that all entity kinds that can be copied (using copy constructors) come first. Also, fix a bug where EK_New was left out of the err_init_conversion_failed diagnostic (It is now reported as 'new value'). Please review Doug :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94289
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 23 Jan 2010 05:17:32 +0000 (05:17 +0000)]
During overload resolution diagnostics, sort non-viable candidates by the quality of their
conversions. To make this work, fill out all conversions for all candidates
(but only when diagnosing overload failure). Split out a few cases from
ovl_fail_bad_conversion which didn't actually involve a failed argument
conversion.
I'm pretty sure this is not a well-founded ordering, but I'm not sure it matters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 23 Jan 2010 04:34:47 +0000 (04:34 +0000)]
Separate EK_ArrayOrVectorElement into EK_ArrayElement and EK_VectorElement; arrays and vectors are pretty different beasts in C++. Doug, please review/comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94279
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Sat, 23 Jan 2010 02:40:42 +0000 (02:40 +0000)]
Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 23 Jan 2010 02:11:34 +0000 (02:11 +0000)]
Rename getClangFullVendorVersion() to getClangFullVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94273
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 23 Jan 2010 00:46:32 +0000 (00:46 +0000)]
Implement elementary access control.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 23 Jan 2010 00:40:08 +0000 (00:40 +0000)]
Teach the cursor visitor to recurse into the type information of
explicit casts, sizeof, alignof, and compound literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 23 Jan 2010 00:26:38 +0000 (00:26 +0000)]
Extern darwin-clang_rt.c test to also test targetting ARM ({armv6, armv7} x
{thumb,no-thumb}).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94264
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 23 Jan 2010 00:26:29 +0000 (00:26 +0000)]
Fix a FIXME, this test folds to a constant now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 23 Jan 2010 00:14:00 +0000 (00:14 +0000)]
Extend clang_createTranslationUnitFromSourceFile() to support creating
translation units that include unsaved files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 22 Jan 2010 23:04:44 +0000 (23:04 +0000)]
outside a method, 'super' should resolve in a normal name look up
to mimic gcc's behavior. Fixes radar
7400691 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 22:44:15 +0000 (22:44 +0000)]
Add 'clang_getClangVersion()' function to CIndex. This exposes the full Clang version string through the CIndex API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94242
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 22:37:17 +0000 (22:37 +0000)]
Fixup the rest of the testcases to grep the .ll file instead of the .s
file, and add FIXMEs to the remaining broken tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 22 Jan 2010 22:30:25 +0000 (22:30 +0000)]
Fixes test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 22:29:50 +0000 (22:29 +0000)]
Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 22:29:16 +0000 (22:29 +0000)]
Improve content and structure of the Doxygen documentation for the
CIndex API. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 22:12:47 +0000 (22:12 +0000)]
(1) Rename getClangSubversionRevision() to getClangRevision(), and
have it return a StringRef instead of an integer (to be more VCS
agnostic).
(2) Add getClangFullRepositoryVersion(), which contains an
amalgamation of the repository name and the revision.
(3) Change PCH to only emit the string returned by
getClangFullRepositoryVersion() instead of also emitting the value
of getClangSubversionRevision() (which has been removed). This is
functionally equivalent.
More cleanup to version string generation pending...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94231
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 22:06:55 +0000 (22:06 +0000)]
Convert more testcases to checking the .ll file instead of the .s file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94229
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 21:44:22 +0000 (21:44 +0000)]
Yet more CIndex API cleanup:
- Added more routines to manipulate/compare source locations and ranges
- Switched clang_getCursor() over to take a CXSourceLocation rather
than file/line/column.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94226
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 22 Jan 2010 21:36:53 +0000 (21:36 +0000)]
ui64, etc. are valid VS suffixes.
Fixes radar
7562363 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94224
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 20:59:36 +0000 (20:59 +0000)]
Rename pch::SVN_BRANCH_REVISION to pch::VERSION_CONTROL_BRANCH_REVISION.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94214
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 22 Jan 2010 20:55:35 +0000 (20:55 +0000)]
Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94213
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 20:40:20 +0000 (20:40 +0000)]
Eliminate index-test; all of its tested functionality is now in c-index-test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 20:35:53 +0000 (20:35 +0000)]
Eliminate CIndex's dependency on the Clang Index library, since we
weren't actually using any of its facilities.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94210
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 20:27:17 +0000 (20:27 +0000)]
Be sure to select primary bases among the nearly empties in preorder,
not just among the direct bases. Before we where missing nearly
empties that were bases of virtual base classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94208
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 19:49:59 +0000 (19:49 +0000)]
Teach CIndex's cursor visitor to restrict its traversal to a specific
region of interest (if provided). Implement clang_getCursor() in terms
of this traversal rather than using the Index library; the unified
cursor visitor is more complete, and will be The Way Forward.
Minor other tweaks needed to make this work:
- Extend Preprocessor::getLocForEndOfToken() to accept an offset
from the end, making it easy to move to the last character in the
token (rather than just past the end of the token).
- In Lexer::MeasureTokenLength(), the length of whitespace is zero.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94200
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 18:48:47 +0000 (18:48 +0000)]
Finish off fixing up debug information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 22 Jan 2010 18:30:17 +0000 (18:30 +0000)]
Patch fixes a lookup bug in c++'s anonymous union member
lookup. Fixes radar
7562438 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 22 Jan 2010 17:37:20 +0000 (17:37 +0000)]
No need to canonicalize the type and use dyn_cast. Also, correctly diagnose trying to override a function returning an lvalue reference with a function overriding an rvalue reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 22 Jan 2010 15:41:14 +0000 (15:41 +0000)]
Eliminate some Clang warnings
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 22 Jan 2010 13:59:13 +0000 (13:59 +0000)]
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 22 Jan 2010 13:07:41 +0000 (13:07 +0000)]
Fix an obvious goof that caused us to only see the top level of return types
when checking for covariance. Added some fun test cases, fixes PR6110.
This felt obvious enough to just commit. ;] Let me know if anything needs
tweaking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 06:45:05 +0000 (06:45 +0000)]
Ensure we output all non-virtual base vtables. Fixes PR5890.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94163
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 22 Jan 2010 04:30:00 +0000 (04:30 +0000)]
Process cast according to the cast kind. Prepare for more specific cast
handling (for C++). No functionality change for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 22 Jan 2010 03:38:14 +0000 (03:38 +0000)]
Driver/Darwin: Update tool chain to use static clang_rt libraries provided by
compiler-rt. This tool chain now works on x86 and ARM, but isn't the x86 default
yet.
This drastically cleans up the linker invocation, old invocation:
--
"/Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-weak_reference_mismatches" "non-weak" "-o" "a.out" "-lcrt1.10.6.o" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.." "t.o" "-lSystem" "-lgcc"
--
New invocation:
--
# For 10.6:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-o" "a.out" "-lcrt1.10.6.o" "t.o" "-lSystem"
# For 10.4:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.4" "-o" "a.out" "-lcrt1.o" "t.o" "-lSystem" "-lgcc_s.10.4" "/Volumes/Data/ddunbar/llvm.obj.64/Debug/lib/clang/1.1/lib/darwin/libclang_rt.10.4.a"
--
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 22 Jan 2010 03:37:33 +0000 (03:37 +0000)]
Driver/Darwin/ld: Fix refacto, -force_cpusubtype_ALL should only be forwarded,
not always added.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 22 Jan 2010 02:51:26 +0000 (02:51 +0000)]
Update debugging code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94145
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 22 Jan 2010 02:04:58 +0000 (02:04 +0000)]
Driver/Darwin/ld: Factor out getDarwinArchName, for getting the "Darwin" arch
name being used in an driver invocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94139
91177308 -0d34-0410-b5e6-
96231b3b80d8