Ted Kremenek
1624a4784a
Fix PR 4988 by removing an invalid assertion (a function can be referenced in
...
GRExprEngine::VisitDeclRefExpr without 'asLValue' being true).
llvm-svn: 82598
2009-09-23 01:30:01 +00:00
Fariborz Jahanian
21ccf06352
Produce detailed diagnostics when overload
...
resolution failed to select a candidate due to
ambiguity in type conversion function selection.
llvm-svn: 82596
2009-09-23 00:58:07 +00:00
Anders Carlsson
aa01b91f9b
Fix indentation in xcode project.
...
llvm-svn: 82595
2009-09-23 00:37:50 +00:00
Anders Carlsson
8ab20bb144
Cast the array size expr to a size_t
...
llvm-svn: 82594
2009-09-23 00:37:25 +00:00
Douglas Gregor
f0f51985a1
Print the results of code-completion for overloading by displaying the
...
signature of the function with the current parameter highlighted as a
placeholder.
llvm-svn: 82593
2009-09-23 00:34:09 +00:00
Douglas Gregor
05f477c177
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.
llvm-svn: 82592
2009-09-23 00:16:58 +00:00
Douglas Gregor
64b12b5ee7
Make sure we don't try to add code-completion results without an
...
active shadow map.
llvm-svn: 82588
2009-09-22 23:31:26 +00:00
Douglas Gregor
2b3ee156fc
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.
llvm-svn: 82587
2009-09-22 23:22:24 +00:00
Douglas Gregor
5bf52697b0
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.
llvm-svn: 82586
2009-09-22 23:15:58 +00:00
Anders Carlsson
cc52f65500
Move codegen of new and delete to CGCXXExpr.cpp
...
llvm-svn: 82585
2009-09-22 22:53:17 +00:00
Mike Stump
17abe2a620
Remove now fixed FIXME.
...
llvm-svn: 82584
2009-09-22 22:31:44 +00:00
Daniel Dunbar
5564ba743f
Push "clang-is-production" logic up to tools/driver, and make it hittable by
...
defining the CLANG_IS_PRODUCTION Makefile variable.
llvm-svn: 82583
2009-09-22 22:31:13 +00:00
Daniel Dunbar
81fff1c358
Spell clang-cc correctly.
...
llvm-svn: 82582
2009-09-22 22:30:59 +00:00
Douglas Gregor
292b68699d
Add getDeclaration()/getKind() accessors to CodeCompleteConsumer::Result
...
llvm-svn: 82581
2009-09-22 22:11:38 +00:00
Anders Carlsson
8c978b4fc2
No need to null check implicit lvalue cast exprs.
...
llvm-svn: 82580
2009-09-22 22:00:46 +00:00
Anders Carlsson
8fef09cd80
When doing a derived-to-base class and the class offset is 0 we can just do a simple bitcast.
...
llvm-svn: 82579
2009-09-22 21:58:22 +00:00
Daniel Dunbar
03184798c3
Reconcile Clang/ARM target data string with llvm-gcc (module eabi weirdness).
...
llvm-svn: 82578
2009-09-22 21:44:58 +00:00
Douglas Gregor
ba4490399b
Teach code-completion to introduce a ", ..." placeholder for variadic functions
...
llvm-svn: 82577
2009-09-22 21:42:17 +00:00
Douglas Gregor
9bfc2e50a7
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.
...
llvm-svn: 82576
2009-09-22 21:41:40 +00:00
Ted Kremenek
3003001a86
Fix: <rdar://problem/7242006> [RegionStore] compound literal assignment with floats not honored
...
llvm-svn: 82575
2009-09-22 21:19:14 +00:00
Douglas Gregor
ea9b03e6e2
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.
llvm-svn: 82571
2009-09-22 21:11:38 +00:00
Anders Carlsson
1d3b6f62df
CXXMethodDecls should always be mangled, even if they are inside an extern "C" block. Fixes PR5017.
...
llvm-svn: 82567
2009-09-22 20:33:31 +00:00
Fariborz Jahanian
f0647a5fbc
Code refactoring and cleanup.
...
llvm-svn: 82566
2009-09-22 20:24:30 +00:00
Fariborz Jahanian
0b51c729c9
Issue good ambiguity diagnostic when convesion fails.
...
llvm-svn: 82565
2009-09-22 19:53:15 +00:00
Steve Naroff
66af1aecdb
- Implement support for various types of "refs" (initially to help test clang_getCursor()).
...
- Add missing prototypes for dispose functions.
llvm-svn: 82564
2009-09-22 19:25:29 +00:00
Anders Carlsson
55640546e4
If we already set a primary base, don't set it to the first nearly empty base class.
...
llvm-svn: 82563
2009-09-22 19:16:59 +00:00
Anders Carlsson
3dc237390f
Fix speling error.
...
llvm-svn: 82562
2009-09-22 19:15:56 +00:00
Anders Carlsson
96cff1fc10
Explicitly initialize the PrimaryBase and PrimaryBaseWasVirtual members.
...
llvm-svn: 82560
2009-09-22 18:21:58 +00:00
Mike Stump
865715442e
Yes.
...
llvm-svn: 82559
2009-09-22 17:38:02 +00:00
Anders Carlsson
e7ceb85b0d
(With Doug's help) fix a crash in the code completion code that lead to a test failure.
...
llvm-svn: 82558
2009-09-22 17:29:51 +00:00
Anders Carlsson
fc51cc968b
Don't assert that linkage decls are always C++, it's not true. Fixes PR5019.
...
llvm-svn: 82557
2009-09-22 17:23:30 +00:00
Fariborz Jahanian
e983d17570
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.
llvm-svn: 82555
2009-09-22 16:48:37 +00:00
Douglas Gregor
cabea40ea3
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.
llvm-svn: 82549
2009-09-22 15:41:20 +00:00
Daniel Dunbar
e22adaebf5
Spell function pointer correctly.
...
llvm-svn: 82543
2009-09-22 10:19:04 +00:00
Daniel Dunbar
79327b6efe
Always execute tests internally on Windows.
...
llvm-svn: 82542
2009-09-22 10:08:03 +00:00
Daniel Dunbar
3967fca364
CMake: Add a clang-c++tests target for running the experimental C++ header
...
-fsyntax-only'ing tests.
llvm-svn: 82541
2009-09-22 10:07:55 +00:00
Daniel Dunbar
95d5a1d240
Add safe part of previous (reverted) commit, necessary to update to LLVM API change.
...
llvm-svn: 82540
2009-09-22 10:06:21 +00:00
Daniel Dunbar
b879c3c125
Revert "Switch a few clients over to StringLiteral::getString.", this is breaking some projects, but I don't have a test case yet.
...
llvm-svn: 82539
2009-09-22 10:03:52 +00:00
Daniel Dunbar
b45012dcde
Update PCH serialization of FunctionDecl flags.
...
llvm-svn: 82526
2009-09-22 05:38:14 +00:00
Daniel Dunbar
2d925ebd0a
Allow PCH files to be read from stdin.
...
llvm-svn: 82525
2009-09-22 05:38:01 +00:00
Daniel Dunbar
b5cbf77c2e
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.
llvm-svn: 82524
2009-09-22 05:16:02 +00:00
Ted Kremenek
f9539d0c3f
Fix: <rdar://problem/7242015> [RegionStore] variable passed-by-reference (via integer) to function call not invalidated
...
llvm-svn: 82523
2009-09-22 04:48:39 +00:00
Daniel Dunbar
0512647362
Force triple in test.
...
llvm-svn: 82519
2009-09-22 03:50:39 +00:00
Ted Kremenek
ece8524474
Update checker build.
...
llvm-svn: 82518
2009-09-22 03:38:38 +00:00
Daniel Dunbar
5de27daf93
Switch a few clients over to StringLiteral::getString.
...
- Switching all of them out-of-my-current-scope-of-interest, sorry.
llvm-svn: 82515
2009-09-22 03:27:52 +00:00
Daniel Dunbar
362178883c
Add StringLiteral::getString -> StringRef.
...
llvm-svn: 82514
2009-09-22 03:27:33 +00:00
Anders Carlsson
8143069417
Store the set of indirect primary bases directly in the record layout builder.
...
llvm-svn: 82513
2009-09-22 03:02:06 +00:00
Mike Stump
207c680ff3
Fix some typos. WIP. Large alignments don't work yet.
...
llvm-svn: 82512
2009-09-22 02:44:17 +00:00
Mike Stump
8ce0ea1360
Fix doc.
...
llvm-svn: 82511
2009-09-22 02:43:44 +00:00
Daniel Dunbar
a25a9dff0d
Add test case for PR4894 (it was fixed in LLVM).
...
llvm-svn: 82510
2009-09-22 02:18:40 +00:00