]> granicus.if.org Git - clang/log
clang
15 years agoThe test/ directory needs to be created always when building objdir != srcdir,
Torok Edwin [Wed, 23 Sep 2009 14:23:05 +0000 (14:23 +0000)]
The test/ directory needs to be created always when building objdir != srcdir,
because the toplevel 'make check-all' needs the rule for test/lit.site.cfg,
and for that test/ must exist.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82624 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix typo in file name
Gabor Greif [Wed, 23 Sep 2009 13:15:04 +0000 (13:15 +0000)]
fix typo in file name

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82623 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor Windows target into VS, MinGW and Cygwin variants.
Daniel Dunbar [Wed, 23 Sep 2009 07:31:35 +0000 (07:31 +0000)]
Factor Windows target into VS, MinGW and Cygwin variants.
 - Patch by John Thompson!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82621 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement support for __builtin_eh_return_data_regno on x86-32 and x86-64.
Chris Lattner [Wed, 23 Sep 2009 06:06:36 +0000 (06:06 +0000)]
implement support for __builtin_eh_return_data_regno on x86-32 and x86-64.
This implements PR5034 and rdar://6836445.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82614 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoreturn a bool value as a bool
Chris Lattner [Wed, 23 Sep 2009 05:39:46 +0000 (05:39 +0000)]
return a bool value as a bool

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82613 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a new variant of EmitCXXAggrConstructorCall that takes a Value that holds the...
Anders Carlsson [Wed, 23 Sep 2009 02:45:36 +0000 (02:45 +0000)]
Add a new variant of EmitCXXAggrConstructorCall that takes a Value that holds the number of elements to construct, to be used when implementing new[].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82602 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR 4988 by removing an invalid assertion (a function can be referenced in
Ted Kremenek [Wed, 23 Sep 2009 01:30:01 +0000 (01:30 +0000)]
Fix PR 4988 by removing an invalid assertion (a function can be referenced in
GRExprEngine::VisitDeclRefExpr without 'asLValue' being true).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82598 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoProduce detailed diagnostics when overload
Fariborz Jahanian [Wed, 23 Sep 2009 00:58:07 +0000 (00:58 +0000)]
Produce detailed diagnostics when overload
resolution failed to select a candidate due to
ambiguity in type conversion function selection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82596 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix indentation in xcode project.
Anders Carlsson [Wed, 23 Sep 2009 00:37:50 +0000 (00:37 +0000)]
Fix indentation in xcode project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82595 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCast the array size expr to a size_t
Anders Carlsson [Wed, 23 Sep 2009 00:37:25 +0000 (00:37 +0000)]
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

15 years agoPrint the results of code-completion for overloading by displaying the
Douglas Gregor [Wed, 23 Sep 2009 00:34:09 +0000 (00:34 +0000)]
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

15 years agoSeparate the code-completion results for call completion from the
Douglas Gregor [Wed, 23 Sep 2009 00:16:58 +0000 (00:16 +0000)]
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

15 years agoMake sure we don't try to add code-completion results without an
Douglas Gregor [Tue, 22 Sep 2009 23:31:26 +0000 (23:31 +0000)]
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

15 years agoWhen code-completion finds a declaration only because it is usable as
Douglas Gregor [Tue, 22 Sep 2009 23:22:24 +0000 (23:22 +0000)]
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

15 years agoTweak the code-completion results ranking and formation, so that
Douglas Gregor [Tue, 22 Sep 2009 23:15:58 +0000 (23:15 +0000)]
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

15 years agoMove codegen of new and delete to CGCXXExpr.cpp
Anders Carlsson [Tue, 22 Sep 2009 22:53:17 +0000 (22:53 +0000)]
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

15 years agoRemove now fixed FIXME.
Mike Stump [Tue, 22 Sep 2009 22:31:44 +0000 (22:31 +0000)]
Remove now fixed FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82584 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPush "clang-is-production" logic up to tools/driver, and make it hittable by
Daniel Dunbar [Tue, 22 Sep 2009 22:31:13 +0000 (22:31 +0000)]
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

15 years agoSpell clang-cc correctly.
Daniel Dunbar [Tue, 22 Sep 2009 22:30:59 +0000 (22:30 +0000)]
Spell clang-cc correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82582 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd getDeclaration()/getKind() accessors to CodeCompleteConsumer::Result
Douglas Gregor [Tue, 22 Sep 2009 22:11:38 +0000 (22:11 +0000)]
Add getDeclaration()/getKind() accessors to CodeCompleteConsumer::Result

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82581 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNo need to null check implicit lvalue cast exprs.
Anders Carlsson [Tue, 22 Sep 2009 22:00:46 +0000 (22:00 +0000)]
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

15 years agoWhen doing a derived-to-base class and the class offset is 0 we can just do a simple...
Anders Carlsson [Tue, 22 Sep 2009 21:58:22 +0000 (21:58 +0000)]
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

15 years agoReconcile Clang/ARM target data string with llvm-gcc (module eabi weirdness).
Daniel Dunbar [Tue, 22 Sep 2009 21:44:58 +0000 (21:44 +0000)]
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

15 years agoTeach code-completion to introduce a ", ..." placeholder for variadic functions
Douglas Gregor [Tue, 22 Sep 2009 21:42:17 +0000 (21:42 +0000)]
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

15 years agoIn C++, a variadic function does not need an ellipsis prior to the comma. Parse it...
Douglas Gregor [Tue, 22 Sep 2009 21:41:40 +0000 (21:41 +0000)]
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

15 years agoFix: <rdar://problem/7242006> [RegionStore] compound literal assignment with floats...
Ted Kremenek [Tue, 22 Sep 2009 21:19:14 +0000 (21:19 +0000)]
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

15 years agoReplace the -code-completion-dump option with
Douglas Gregor [Tue, 22 Sep 2009 21:11:38 +0000 (21:11 +0000)]
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

15 years agoCXXMethodDecls should always be mangled, even if they are inside an extern "C" block...
Anders Carlsson [Tue, 22 Sep 2009 20:33:31 +0000 (20:33 +0000)]
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

15 years agoCode refactoring and cleanup.
Fariborz Jahanian [Tue, 22 Sep 2009 20:24:30 +0000 (20:24 +0000)]
Code refactoring and cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82566 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIssue good ambiguity diagnostic when convesion fails.
Fariborz Jahanian [Tue, 22 Sep 2009 19:53:15 +0000 (19:53 +0000)]
Issue good ambiguity diagnostic when convesion fails.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82565 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Implement support for various types of "refs" (initially to help test clang_getCurs...
Steve Naroff [Tue, 22 Sep 2009 19:25:29 +0000 (19:25 +0000)]
- 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

15 years agoIf we already set a primary base, don't set it to the first nearly empty base class.
Anders Carlsson [Tue, 22 Sep 2009 19:16:59 +0000 (19:16 +0000)]
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

15 years agoFix speling error.
Anders Carlsson [Tue, 22 Sep 2009 19:15:56 +0000 (19:15 +0000)]
Fix speling error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82562 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExplicitly initialize the PrimaryBase and PrimaryBaseWasVirtual members.
Anders Carlsson [Tue, 22 Sep 2009 18:21:58 +0000 (18:21 +0000)]
Explicitly initialize the PrimaryBase and PrimaryBaseWasVirtual members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82560 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoYes.
Mike Stump [Tue, 22 Sep 2009 17:38:02 +0000 (17:38 +0000)]
Yes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82559 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago(With Doug's help) fix a crash in the code completion code that lead to a test failure.
Anders Carlsson [Tue, 22 Sep 2009 17:29:51 +0000 (17:29 +0000)]
(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

15 years agoDon't assert that linkage decls are always C++, it's not true. Fixes PR5019.
Anders Carlsson [Tue, 22 Sep 2009 17:23:30 +0000 (17:23 +0000)]
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

15 years agoFix a regression in accessing class getter using the dot-syntax
Fariborz Jahanian [Tue, 22 Sep 2009 16:48:37 +0000 (16:48 +0000)]
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

15 years agoImplement code completion within a function call, triggered after the
Douglas Gregor [Tue, 22 Sep 2009 15:41:20 +0000 (15:41 +0000)]
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

15 years agoSpell function pointer correctly.
Daniel Dunbar [Tue, 22 Sep 2009 10:19:04 +0000 (10:19 +0000)]
Spell function pointer correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82543 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAlways execute tests internally on Windows.
Daniel Dunbar [Tue, 22 Sep 2009 10:08:03 +0000 (10:08 +0000)]
Always execute tests internally on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82542 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCMake: Add a clang-c++tests target for running the experimental C++ header
Daniel Dunbar [Tue, 22 Sep 2009 10:07:55 +0000 (10:07 +0000)]
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

15 years agoAdd safe part of previous (reverted) commit, necessary to update to LLVM API change.
Daniel Dunbar [Tue, 22 Sep 2009 10:06:21 +0000 (10:06 +0000)]
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

15 years agoRevert "Switch a few clients over to StringLiteral::getString.", this is breaking...
Daniel Dunbar [Tue, 22 Sep 2009 10:03:52 +0000 (10:03 +0000)]
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

15 years agoUpdate PCH serialization of FunctionDecl flags.
Daniel Dunbar [Tue, 22 Sep 2009 05:38:14 +0000 (05:38 +0000)]
Update PCH serialization of FunctionDecl flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82526 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow PCH files to be read from stdin.
Daniel Dunbar [Tue, 22 Sep 2009 05:38:01 +0000 (05:38 +0000)]
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

15 years agoRemove old test runner, this has moved to LLVM/utils/lit and all known clients
Daniel Dunbar [Tue, 22 Sep 2009 05:16:02 +0000 (05:16 +0000)]
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

15 years agoFix: <rdar://problem/7242015> [RegionStore] variable passed-by-reference (via integer...
Ted Kremenek [Tue, 22 Sep 2009 04:48:39 +0000 (04:48 +0000)]
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

15 years agoForce triple in test.
Daniel Dunbar [Tue, 22 Sep 2009 03:50:39 +0000 (03:50 +0000)]
Force triple in test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82519 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate checker build.
Ted Kremenek [Tue, 22 Sep 2009 03:38:38 +0000 (03:38 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82518 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch a few clients over to StringLiteral::getString.
Daniel Dunbar [Tue, 22 Sep 2009 03:27:52 +0000 (03:27 +0000)]
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

15 years agoAdd StringLiteral::getString -> StringRef.
Daniel Dunbar [Tue, 22 Sep 2009 03:27:33 +0000 (03:27 +0000)]
Add StringLiteral::getString -> StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82514 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStore the set of indirect primary bases directly in the record layout builder.
Anders Carlsson [Tue, 22 Sep 2009 03:02:06 +0000 (03:02 +0000)]
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

15 years agoFix some typos. WIP. Large alignments don't work yet.
Mike Stump [Tue, 22 Sep 2009 02:44:17 +0000 (02:44 +0000)]
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

15 years agoFix doc.
Mike Stump [Tue, 22 Sep 2009 02:43:44 +0000 (02:43 +0000)]
Fix doc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82511 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test case for PR4894 (it was fixed in LLVM).
Daniel Dunbar [Tue, 22 Sep 2009 02:18:40 +0000 (02:18 +0000)]
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

15 years agoThis FIXME is done.
Daniel Dunbar [Tue, 22 Sep 2009 02:17:27 +0000 (02:17 +0000)]
This FIXME is done.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82509 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove debug info generation for __block variables.
Mike Stump [Tue, 22 Sep 2009 02:12:52 +0000 (02:12 +0000)]
Improve debug info generation for __block variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82508 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRecord layout builder cleanup.
Anders Carlsson [Tue, 22 Sep 2009 00:04:45 +0000 (00:04 +0000)]
Record layout builder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82502 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange all the Type::getAsFoo() methods to specializations of Type::getAs().
John McCall [Mon, 21 Sep 2009 23:43:11 +0000 (23:43 +0000)]
Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely.  Several more 'leaf'
optimizations were introduced.

The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test case for <rdar://problem/6829164>, which was implicitly fixed in r79694.
Ted Kremenek [Mon, 21 Sep 2009 23:22:11 +0000 (23:22 +0000)]
Add test case for <rdar://problem/6829164>, which was implicitly fixed in r79694.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82495 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved -fobjc-newgc-api option. clang now conforms to
Fariborz Jahanian [Mon, 21 Sep 2009 23:03:37 +0000 (23:03 +0000)]
Removed -fobjc-newgc-api option. clang now conforms to
gcc-style write-barrier api only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82493 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoProvide intermediate solution to handling assignments to structs via an
Ted Kremenek [Mon, 21 Sep 2009 22:58:52 +0000 (22:58 +0000)]
Provide intermediate solution to handling assignments to structs via an
integer pointer.  For now just invalidate the fields of the struct.

This addresses: <rdar://problem/7185607> [RegionStore] support invalidation of bit fields using integer assignment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82492 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAnother code-completion TODO
Douglas Gregor [Mon, 21 Sep 2009 20:52:01 +0000 (20:52 +0000)]
Another code-completion TODO

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82482 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCode completion for ordinary names when we're starting a declaration, expression...
Douglas Gregor [Mon, 21 Sep 2009 20:51:25 +0000 (20:51 +0000)]
Code completion for ordinary names when we're starting a declaration, expression, or statement

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82481 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago-fobjc-newgc-api is now the default.
Fariborz Jahanian [Mon, 21 Sep 2009 20:17:37 +0000 (20:17 +0000)]
-fobjc-newgc-api is now the default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82478 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen providing a code-completion suggestion for a hidden name, include
Douglas Gregor [Mon, 21 Sep 2009 20:12:40 +0000 (20:12 +0000)]
When providing a code-completion suggestion for a hidden name, include
a nested-name-specifier that describes how to refer to that name. For
example, given:

  struct Base { int member; };
  struct Derived : Base { int member; };

the code-completion result for a member access into "Derived" will
provide both "member" to refer to Derived::member (no qualification needed) and
"Base::member" to refer to Base::member (qualification included).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82476 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnhance "case" code completion in C++ to suggest qualified names for
Douglas Gregor [Mon, 21 Sep 2009 19:57:38 +0000 (19:57 +0000)]
Enhance "case" code completion in C++ to suggest qualified names for
enumerators when either the user intentionally wrote a qualified name
(in which case we just use that nested-name-specifier to match
the user's code) or when this is the first "case" statement and we
need a qualified name to refer to an enumerator in a different scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82474 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMiscellanous fixes in generatation of objc gc's write-barriers.
Fariborz Jahanian [Mon, 21 Sep 2009 18:54:29 +0000 (18:54 +0000)]
Miscellanous fixes in generatation of objc gc's write-barriers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82472 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCode completion for "case" statements within a switch on an expression
Douglas Gregor [Mon, 21 Sep 2009 18:10:23 +0000 (18:10 +0000)]
Code completion for "case" statements within a switch on an expression
of enumeration type, providing the various unused enumerators as options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82467 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRefactor and simplify the CodeCompleteConsumer, so that all of the
Douglas Gregor [Mon, 21 Sep 2009 16:56:56 +0000 (16:56 +0000)]
Refactor and simplify the CodeCompleteConsumer, so that all of the
real work is performed within Sema. Addresses Chris's comments, but
still retains the heavyweight list-of-multimaps data structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82459 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd an XFAIL test which compiles differently from a .ast.
Daniel Dunbar [Mon, 21 Sep 2009 05:16:43 +0000 (05:16 +0000)]
Add an XFAIL test which compiles differently from a .ast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82437 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd missing PCH support for -fstack-protector.
Daniel Dunbar [Mon, 21 Sep 2009 04:16:19 +0000 (04:16 +0000)]
Add missing PCH support for -fstack-protector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82435 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement __builtin_unreachable(), a GCC 4.5 extension.
Chris Lattner [Mon, 21 Sep 2009 03:09:59 +0000 (03:09 +0000)]
Implement __builtin_unreachable(), a GCC 4.5 extension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82433 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch ProcessASTInputFile to still use ParseAST.
Daniel Dunbar [Mon, 21 Sep 2009 03:03:56 +0000 (03:03 +0000)]
Switch ProcessASTInputFile to still use ParseAST.
 - Currently this requires us to fake an input file.

 - This allows Sema to be keep all the logic for how to pull decls out of the external AST source and how to handle things like tentative definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82432 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange ASTUnit to only initialize the predefines buffer to the suggested predefines.
Daniel Dunbar [Mon, 21 Sep 2009 03:03:47 +0000 (03:03 +0000)]
Change ASTUnit to only initialize the predefines buffer to the suggested predefines.
 - It isn't really clear what to do with the preprocessor here, but this is more sensible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82431 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange ASTUnit to take the Diagnostic as an argument, the client should have control...
Daniel Dunbar [Mon, 21 Sep 2009 03:03:39 +0000 (03:03 +0000)]
Change ASTUnit to take the Diagnostic as an argument, the client should have control of this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82430 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd Diagnostic to Indexer, and have it keep its own FileManager instead of taking...
Daniel Dunbar [Mon, 21 Sep 2009 03:03:22 +0000 (03:03 +0000)]
Add Diagnostic to Indexer, and have it keep its own FileManager instead of taking an external reference (which was leaked in the case of the CIndex library).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82429 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStart mangling expressions.
Anders Carlsson [Mon, 21 Sep 2009 01:21:10 +0000 (01:21 +0000)]
Start mangling expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82423 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWork around FileCheck -NOT restriction.
Daniel Dunbar [Sun, 20 Sep 2009 23:35:52 +0000 (23:35 +0000)]
Work around FileCheck -NOT restriction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82417 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch TestRunner.sh to just use 'lit'.
Daniel Dunbar [Sun, 20 Sep 2009 22:00:23 +0000 (22:00 +0000)]
Switch TestRunner.sh to just use 'lit'.
 - Does people use this?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82406 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch to using the new LLVM lit test runner by default.
Daniel Dunbar [Sun, 20 Sep 2009 22:00:17 +0000 (22:00 +0000)]
Switch to using the new LLVM lit test runner by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82405 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInclude LLVM {src,obj} root in lit.site.cfg, to support non-standard layouts.
Daniel Dunbar [Sun, 20 Sep 2009 19:04:35 +0000 (19:04 +0000)]
Include LLVM {src,obj} root in lit.site.cfg, to support non-standard layouts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82401 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoswitch command line 'parse' methods to use StringRef for efficiency, which
Chris Lattner [Sun, 20 Sep 2009 00:39:15 +0000 (00:39 +0000)]
switch command line 'parse' methods to use StringRef for efficiency, which
is also required for an llvm-side change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82344 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOk, an AssertingVH definitely doesn't work for now because we free our cache after...
Daniel Dunbar [Sat, 19 Sep 2009 20:17:48 +0000 (20:17 +0000)]
Ok, an AssertingVH definitely doesn't work for now because we free our cache after the optimizer may have hacked on the module. Use a WeakVH instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82324 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake clang stop relying on ConstantStruct::get's default value for isPacked
Nick Lewycky [Sat, 19 Sep 2009 20:00:52 +0000 (20:00 +0000)]
Make clang stop relying on ConstantStruct::get's default value for isPacked
which will be going away (ie. it's becoming a required parameter) later today.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82323 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch CGDebugInfo type cache to using an AssertingVH.
Daniel Dunbar [Sat, 19 Sep 2009 19:27:24 +0000 (19:27 +0000)]
Switch CGDebugInfo type cache to using an AssertingVH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82321 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out CGDebugInfo::CreateTypeNode method.
Daniel Dunbar [Sat, 19 Sep 2009 19:27:14 +0000 (19:27 +0000)]
Factor out CGDebugInfo::CreateTypeNode method.
 - No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82320 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify code with a StringRef.
Benjamin Kramer [Sat, 19 Sep 2009 08:02:46 +0000 (08:02 +0000)]
Simplify code with a StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82308 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIn C++ code completion, only suggest the "template" keyword after ".",
Douglas Gregor [Fri, 18 Sep 2009 23:55:56 +0000 (23:55 +0000)]
In C++ code completion, only suggest the "template" keyword after ".",
"->", or "::" if we will be looking into a dependent context. It's not
wrong to use the "template" keyword, but it's to needed, either.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82307 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the construction of the code-completion string for a function
Douglas Gregor [Fri, 18 Sep 2009 23:21:38 +0000 (23:21 +0000)]
Make the construction of the code-completion string for a function
template smarter, by taking into account which function template
parameters are deducible from the call arguments. For example,

  template<typename RandomAccessIterator>
  void sort(RandomAccessIterator first, RandomAccessIterator last);

will have a code-completion string like

  sort({RandomAccessIterator first}, {RandomAccessIterator last})

since the template argument for its template parameter is
deducible. On the other hand,

  template<class X, class Y>
  X* dyn_cast(Y *Val);

will have a code-completion string like

  dyn_cast<{class X}>({Y *Val})

since the template type parameter X is not deducible from the function
call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82306 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce code completion patterns for templates, which provide the
Douglas Gregor [Fri, 18 Sep 2009 22:47:56 +0000 (22:47 +0000)]
Introduce code completion patterns for templates, which provide the
angle brackets < > along with placeholder template arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82304 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRe-introduce diagnostic caching in BugReporter that was originally added in
Ted Kremenek [Fri, 18 Sep 2009 22:37:37 +0000 (22:37 +0000)]
Re-introduce diagnostic caching in BugReporter that was originally added in
r82198 and then reverted. This is an intermediate solution, as diagnostic
caching should not rely on static variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82301 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReintroduce FoldingSet profiling for PathDiagnostics.
Ted Kremenek [Fri, 18 Sep 2009 22:33:39 +0000 (22:33 +0000)]
Reintroduce FoldingSet profiling for PathDiagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82299 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix regression introduced by r82198 that caused functions/methods with invalid CFGs...
Ted Kremenek [Fri, 18 Sep 2009 22:29:35 +0000 (22:29 +0000)]
Fix regression introduced by r82198 that caused functions/methods with invalid CFGs to get analyzed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82297 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce code completion strings, which describe how to *use* the
Douglas Gregor [Fri, 18 Sep 2009 22:15:54 +0000 (22:15 +0000)]
Introduce code completion strings, which describe how to *use* the
results of code completion, e.g., by providing function call syntax
with placeholders for each of the parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82293 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAttempt to make a test portable.
Daniel Dunbar [Fri, 18 Sep 2009 22:09:24 +0000 (22:09 +0000)]
Attempt to make a test portable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82292 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclean up xcode proj
Chris Lattner [Fri, 18 Sep 2009 20:39:54 +0000 (20:39 +0000)]
clean up xcode proj

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82272 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoallow clearing this value.
Chris Lattner [Fri, 18 Sep 2009 20:39:46 +0000 (20:39 +0000)]
allow clearing this value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82271 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore mangling work.
Anders Carlsson [Fri, 18 Sep 2009 20:11:09 +0000 (20:11 +0000)]
More mangling work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82265 91177308-0d34-0410-b5e6-96231b3b80d8