Anders Carlsson
d489cd06a1
Fix indentation in xcode project.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 00:37:50 +00:00
Anders Carlsson
ac18b2e3af
Cast the array size expr to a size_t
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82594 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 00:37:25 +00:00
Douglas Gregor
86d802e03a
Print the results of code-completion for overloading by displaying the
...
signature of the function with the current parameter highlighted as a
placeholder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82593 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 00:34:09 +00:00
Douglas Gregor
0594438e06
Separate the code-completion results for call completion from the
...
results for other, textual completion. For call completion, we now
produce enough information to show the function call argument that we
are currently on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 00:16:58 +00:00
Douglas Gregor
8e0a0e4e45
Make sure we don't try to add code-completion results without an
...
active shadow map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82588 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 23:31:26 +00:00
Douglas Gregor
3e7253f155
When code-completion finds a declaration only because it is usable as
...
the start of a nested-name-specifier, add the "::" after the
nested-name-specifier to the code-completion string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82587 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 23:22:24 +00:00
Douglas Gregor
0563c2677c
Tweak the code-completion results ranking and formation, so that
...
members found in base classes have the same ranking as members found
in derived classes. However, we will introduce an informative note for
members found in base classes, showing (as a nested-name-specifier)
the qualification to name the base class, to make it clear which
members are from bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82586 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 23:15:58 +00:00
Anders Carlsson
16d81b8db3
Move codegen of new and delete to CGCXXExpr.cpp
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 22:53:17 +00:00
Mike Stump
45504e568c
Remove now fixed FIXME.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 22:31:44 +00:00
Daniel Dunbar
f44c585632
Push "clang-is-production" logic up to tools/driver, and make it hittable by
...
defining the CLANG_IS_PRODUCTION Makefile variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 22:31:13 +00:00
Daniel Dunbar
e06eafb771
Spell clang-cc correctly.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82582 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 22:30:59 +00:00
Douglas Gregor
76e0fece5b
Add getDeclaration()/getKind() accessors to CodeCompleteConsumer::Result
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82581 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 22:11:38 +00:00
Anders Carlsson
592a2bbc19
No need to null check implicit lvalue cast exprs.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82580 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 22:00:46 +00:00
Anders Carlsson
dfd0330267
When doing a derived-to-base class and the class offset is 0 we can just do a simple bitcast.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:58:22 +00:00
Daniel Dunbar
dff10dcee0
Reconcile Clang/ARM target data string with llvm-gcc (module eabi weirdness).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82578 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:44:58 +00:00
Douglas Gregor
b3d4525c65
Teach code-completion to introduce a ", ..." placeholder for variadic functions
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82577 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:42:17 +00:00
Douglas Gregor
ed5d651b0d
In C++, a variadic function does not need an ellipsis prior to the comma. Parse it in both C and C++, but diagnose it as an error in C with a fix-it hint to add the comma.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82576 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:41:40 +00:00
Ted Kremenek
cf54959eae
Fix: <rdar://problem/7242006> [RegionStore] compound literal assignment with floats not honored
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82575 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:19:14 +00:00
Douglas Gregor
b657f115c3
Replace the -code-completion-dump option with
...
-code-completion-at=filename:line:column
which performs code completion at the specified location by truncating
the file at that position and enabling code completion. This approach
makes it possible to run multiple tests from a single test file, and
gives a more natural command-line interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82571 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:11:38 +00:00
Anders Carlsson
add28829c7
CXXMethodDecls should always be mangled, even if they are inside an extern "C" block. Fixes PR5017.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82567 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 20:33:31 +00:00
Fariborz Jahanian
17c7a5d7ae
Code refactoring and cleanup.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82566 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 20:24:30 +00:00
Fariborz Jahanian
455acd9452
Issue good ambiguity diagnostic when convesion fails.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 19:53:15 +00:00
Steve Naroff
fb5704295c
- Implement support for various types of "refs" (initially to help test clang_getCursor()).
...
- Add missing prototypes for dispose functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82564 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 19:25:29 +00:00
Anders Carlsson
56cfdc183e
If we already set a primary base, don't set it to the first nearly empty base class.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82563 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 19:16:59 +00:00
Anders Carlsson
8ebcdfe799
Fix speling error.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82562 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 19:15:56 +00:00
Anders Carlsson
0cd40e4f90
Explicitly initialize the PrimaryBase and PrimaryBaseWasVirtual members.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82560 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 18:21:58 +00:00
Mike Stump
a48f552c74
Yes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 17:38:02 +00:00
Anders Carlsson
90756300f3
(With Doug's help) fix a crash in the code completion code that lead to a test failure.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 17:29:51 +00:00
Anders Carlsson
5cc58c6cfe
Don't assert that linkage decls are always C++, it's not true. Fixes PR5019.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82557 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 17:23:30 +00:00
Fariborz Jahanian
b2ef1beb81
Fix a regression in accessing class getter using the dot-syntax
...
notation. There is still an issue accessing field of a 'Class''s isa
in legacy code using dot field access notation (as noted in the test case)
but unrelated to this patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 16:48:37 +00:00
Douglas Gregor
9c6a0e92db
Implement code completion within a function call, triggered after the
...
opening parentheses and after each comma. We gather the set of visible
overloaded functions, perform "partial" overloading based on the set
of arguments that we have thus far, and return the still-viable
results sorted by the likelihood that they will be the best candidate.
Most of the changes in this patch are a refactoring of the overloading
routines for a function call, since we needed to separate out the
notion of building an overload set (common to code-completion and
normal semantic analysis) and then what to do with that overload
set. As part of this change, I've pushed explicit template arguments
into a few more subroutines.
There is still much more work to do in this area. Function templates
won't be handled well (unless we happen to deduce all of the template
arguments before we hit the completion point), nor will overloaded
function-call operators or calls to member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82549 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 15:41:20 +00:00
Daniel Dunbar
e119e84ea5
Spell function pointer correctly.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 10:19:04 +00:00
Daniel Dunbar
b850ddd2ce
Always execute tests internally on Windows.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82542 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 10:08:03 +00:00
Daniel Dunbar
cceef8b89e
CMake: Add a clang-c++tests target for running the experimental C++ header
...
-fsyntax-only'ing tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 10:07:55 +00:00
Daniel Dunbar
932eb6dd3f
Add safe part of previous (reverted) commit, necessary to update to LLVM API change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 10:06:21 +00:00
Daniel Dunbar
f015b03415
Revert "Switch a few clients over to StringLiteral::getString.", this is breaking some projects, but I don't have a test case yet.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82539 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 10:03:52 +00:00
Daniel Dunbar
7f8b57aa35
Update PCH serialization of FunctionDecl flags.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 05:38:14 +00:00
Daniel Dunbar
f3c740eb2c
Allow PCH files to be read from stdin.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 05:38:01 +00:00
Daniel Dunbar
5e01e3cae6
Remove old test runner, this has moved to LLVM/utils/lit and all known clients
...
have been updated.
- Please let me know of any problems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 05:16:02 +00:00
Ted Kremenek
cc969fd836
Fix: <rdar://problem/7242015> [RegionStore] variable passed-by-reference (via integer) to function call not invalidated
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 04:48:39 +00:00
Daniel Dunbar
718bb483a4
Force triple in test.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82519 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 03:50:39 +00:00
Ted Kremenek
a6dc0793d8
Update checker build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 03:38:38 +00:00
Daniel Dunbar
df4eee9b03
Switch a few clients over to StringLiteral::getString.
...
- Switching all of them out-of-my-current-scope-of-interest, sorry.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 03:27:52 +00:00
Daniel Dunbar
b648023da2
Add StringLiteral::getString -> StringRef.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82514 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 03:27:33 +00:00
Anders Carlsson
3f06652234
Store the set of indirect primary bases directly in the record layout builder.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82513 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 03:02:06 +00:00
Mike Stump
fd47b31be0
Fix some typos. WIP. Large alignments don't work yet.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82512 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 02:44:17 +00:00
Mike Stump
196efbf095
Fix doc.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82511 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 02:43:44 +00:00
Daniel Dunbar
a626b0170c
Add test case for PR4894 (it was fixed in LLVM).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 02:18:40 +00:00
Daniel Dunbar
d172bf3927
This FIXME is done.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82509 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 02:17:27 +00:00
Mike Stump
39605b4eab
Improve debug info generation for __block variables.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 02:12:52 +00:00