]> granicus.if.org Git - clang/log
clang
14 years agoHide clang-wpa executable behind a CMake variable so it won't be built by default
Douglas Gregor [Fri, 25 Sep 2009 05:41:21 +0000 (05:41 +0000)]
Hide clang-wpa executable behind a CMake variable so it won't be built by default

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

14 years agoUpdate checker build.
Ted Kremenek [Fri, 25 Sep 2009 05:03:45 +0000 (05:03 +0000)]
Update checker build.

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

14 years agoFix checking for a null pointer constant when the expression itself is
Douglas Gregor [Fri, 25 Sep 2009 04:25:58 +0000 (04:25 +0000)]
Fix checking for a null pointer constant when the expression itself is
value-dependent. Audit (and fixed) all calls to
Expr::isNullPointerConstant() to provide the correct behavior with
value-dependent expressions. Fixes PR5041 and a crash in libstdc++
<locale>.

In the same vein, properly compute value- and type-dependence for
ChooseExpr. Fixes PR4996.

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

14 years agoAdd a reduced test case for the weak ivar infinite recursion.
John McCall [Fri, 25 Sep 2009 02:18:37 +0000 (02:18 +0000)]
Add a reduced test case for the weak ivar infinite recursion.

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

14 years agoWho would have thought that empty classes were so tricky? Handle cases where an empty...
Anders Carlsson [Fri, 25 Sep 2009 01:54:38 +0000 (01:54 +0000)]
Who would have thought that empty classes were so tricky? Handle cases where an empty virtual base class needs to be moved aside because it conflicts with the first field.

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

14 years agoFix an infinite loop arising when trying to generate debug information
John McCall [Fri, 25 Sep 2009 01:40:47 +0000 (01:40 +0000)]
Fix an infinite loop arising when trying to generate debug information
for a ObjC class with an ivar of weak self type.

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

14 years agoHandle array fields that contain empty structs.
Anders Carlsson [Fri, 25 Sep 2009 01:23:32 +0000 (01:23 +0000)]
Handle array fields that contain empty structs.

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

14 years agoFix <rdar://problem/7249327> by allowing silent conversions between signed and unsign...
Ted Kremenek [Fri, 25 Sep 2009 00:18:15 +0000 (00:18 +0000)]
Fix <rdar://problem/7249327> by allowing silent conversions between signed and unsigned integer values for symbolic values.  This is an intermediate solution (i.e. hack) until we support extension/truncation of symbolic integers.

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

14 years agoMore work on empty classes.
Anders Carlsson [Fri, 25 Sep 2009 00:02:51 +0000 (00:02 +0000)]
More work on empty classes.

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

14 years agoFixed another code gen bug in objc's new write-barrier API.
Fariborz Jahanian [Fri, 25 Sep 2009 00:00:20 +0000 (00:00 +0000)]
Fixed another code gen bug in objc's new write-barrier API.

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

14 years agoImprove the record layout dumper.
Anders Carlsson [Thu, 24 Sep 2009 23:50:42 +0000 (23:50 +0000)]
Improve the record layout dumper.

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

14 years agoWhen entering the scope of a declarator, make sure that the scope is
Douglas Gregor [Thu, 24 Sep 2009 23:39:01 +0000 (23:39 +0000)]
When entering the scope of a declarator, make sure that the scope is
complete (or, possibly causing template instantiation).

Test this via some explicit specializations of member functions.

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

14 years agoMake it really, really easy to change the alignment of Type (and ExtQuals).
John McCall [Thu, 24 Sep 2009 23:30:46 +0000 (23:30 +0000)]
Make it really, really easy to change the alignment of Type (and ExtQuals).

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

14 years agoWIP implementation of explicit function template specialization. This
Douglas Gregor [Thu, 24 Sep 2009 23:14:47 +0000 (23:14 +0000)]
WIP implementation of explicit function template specialization. This
first implementation recognizes when a function declaration is an
explicit function template specialization (based on the presence of a
template<> header), performs template argument deduction + ambiguity
resolution to determine which template is being specialized, and hooks

There are many caveats here:
  - We completely and totally drop any explicitly-specified template
  arguments on the floor
  - We don't diagnose any of the extra semantic things that we should
  diagnose.
  - I haven't looked to see that we're getting the right linkage for
  explicit specializations

On a happy note, this silences a bunch of errors that show up in
libstdc++'s <iostream>, although Clang still can't get through the
entire header.

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

14 years agoClean up the CodeCompletion testsuite's use of FileCheck
Douglas Gregor [Thu, 24 Sep 2009 22:57:42 +0000 (22:57 +0000)]
Clean up the CodeCompletion testsuite's use of FileCheck

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

14 years agoFix 80-col violation.
Mike Stump [Thu, 24 Sep 2009 22:31:14 +0000 (22:31 +0000)]
Fix 80-col violation.

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

14 years agoPatch fixes a code gen. bug in generation of objc_assign_ivar
Fariborz Jahanian [Thu, 24 Sep 2009 22:25:38 +0000 (22:25 +0000)]
Patch fixes a code gen. bug in generation of objc_assign_ivar
(objc GC's API).

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

14 years agoUpdate the PTH performance "script".
John McCall [Thu, 24 Sep 2009 22:03:45 +0000 (22:03 +0000)]
Update the PTH performance "script".

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

14 years agoAdd test for C-based indexing API, using FileCheck utility.
Steve Naroff [Thu, 24 Sep 2009 20:03:06 +0000 (20:03 +0000)]
Add test for C-based indexing API, using FileCheck utility.

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

14 years agoRefactor the representation of qualifiers to bring ExtQualType out of the
John McCall [Thu, 24 Sep 2009 19:53:00 +0000 (19:53 +0000)]
Refactor the representation of qualifiers to bring ExtQualType out of the
Type hierarchy.  Demote 'volatile' to extended-qualifier status.  Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right;  many more remain.

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

14 years agowpa is an experiment, don't build it by default, it adds to build times due to everyt...
Chris Lattner [Thu, 24 Sep 2009 19:45:12 +0000 (19:45 +0000)]
wpa is an experiment, don't build it by default, it adds to build times due to everything it links in.

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

14 years agoAdd a -dump-record-layouts argument to clang-cc.
Anders Carlsson [Thu, 24 Sep 2009 18:54:49 +0000 (18:54 +0000)]
Add a -dump-record-layouts argument to clang-cc.

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

14 years agoWhen building CFGs, no longer reverse the statements in the CFGBlock. Instead
Ted Kremenek [Thu, 24 Sep 2009 18:45:41 +0000 (18:45 +0000)]
When building CFGs, no longer reverse the statements in the CFGBlock. Instead
have the iterators and operator[] handle the traversal of statements, as they
are stored in reverse order. Tests show this has no real performance impact, but
it does simply the CFG construction logic and will make it slightly easier to
change the allocation strategy for CFGBlocks (as we have fewer copies).

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

14 years agocmake: Run tests with 'verbose' enabled by default, so that the failure is
Daniel Dunbar [Thu, 24 Sep 2009 07:18:36 +0000 (07:18 +0000)]
cmake: Run tests with 'verbose' enabled by default, so that the failure is
visible in the log.

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

14 years agoWe no longer need anything from the llvm/test/Scripts dir.
Daniel Dunbar [Thu, 24 Sep 2009 06:31:08 +0000 (06:31 +0000)]
We no longer need anything from the llvm/test/Scripts dir.

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

14 years agoFix crash in RegionStoreManager::Bind() by using 'getAs<PointerType>()' instead of...
Ted Kremenek [Thu, 24 Sep 2009 06:24:32 +0000 (06:24 +0000)]
Fix crash in RegionStoreManager::Bind() by using 'getAs<PointerType>()' instead of 'cast<PointerType>()' (to handle pointer typedefs).

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

14 years agoMore improvements with laying out empty bases.
Anders Carlsson [Thu, 24 Sep 2009 05:21:31 +0000 (05:21 +0000)]
More improvements with laying out empty bases.

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

14 years agoDarwin/x86-32: Enumerated types and block pointer types in structures were not
Daniel Dunbar [Thu, 24 Sep 2009 05:12:36 +0000 (05:12 +0000)]
Darwin/x86-32: Enumerated types and block pointer types in structures were not
handled correctly.
 - <rdar://problem/7247671> Function arguments incorrect when function returns a
   struct on i386 w/ llvm-g++ and clang

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

14 years agoFix: <rdar://problem/7249340> [RegionStore] model stores to symbolic parameter regions
Ted Kremenek [Thu, 24 Sep 2009 04:11:44 +0000 (04:11 +0000)]
Fix: <rdar://problem/7249340> [RegionStore] model stores to symbolic parameter regions

The issue was a discrepancy between how RegionStoreManager::Bind() and
RegionStoreManager::Retrieve() derived the "key" for the first element
of a symbolic region.

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

14 years agoMore work on empty classes.
Anders Carlsson [Thu, 24 Sep 2009 03:22:10 +0000 (03:22 +0000)]
More work on empty classes.

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

14 years agoScaffolding for supporting empty bases/fields.
Anders Carlsson [Thu, 24 Sep 2009 03:13:30 +0000 (03:13 +0000)]
Scaffolding for supporting empty bases/fields.

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

14 years agoShorten the static analyzer diagnostic for 'use of garbage value'.
Ted Kremenek [Thu, 24 Sep 2009 00:44:26 +0000 (00:44 +0000)]
Shorten the static analyzer diagnostic for 'use of garbage value'.

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

14 years agoUse Doug's DeclLoc to pinpoint location of the declaration
Fariborz Jahanian [Thu, 24 Sep 2009 00:42:43 +0000 (00:42 +0000)]
Use Doug's DeclLoc to pinpoint location of the declaration
in a reference initialization diagnostic.

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

14 years agoImprove diagnostic location information when checking the initialization of a reference
Douglas Gregor [Wed, 23 Sep 2009 23:04:10 +0000 (23:04 +0000)]
Improve diagnostic location information when checking the initialization of a reference

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

14 years agoMake C++ temporary-related expressions provide proper source-range information.
Douglas Gregor [Wed, 23 Sep 2009 22:51:26 +0000 (22:51 +0000)]
Make C++ temporary-related expressions provide proper source-range information.

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

14 years agopatch to ir-gen conversion function call used in
Fariborz Jahanian [Wed, 23 Sep 2009 22:34:00 +0000 (22:34 +0000)]
patch to ir-gen conversion function call used in
initializing a reference class.

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

14 years agoFor code completion, note that injected-class-names found as part of
Douglas Gregor [Wed, 23 Sep 2009 22:26:46 +0000 (22:26 +0000)]
For code completion, note that injected-class-names found as part of
lookup in a member access expression always start a
nested-name-specifier. Additionally, rank names that start
nested-name-specifiers after other names.

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

14 years agoRemove the FIXME as I said.
Fariborz Jahanian [Wed, 23 Sep 2009 20:56:34 +0000 (20:56 +0000)]
Remove the FIXME as I said.

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

14 years agoThis patch addresses a few issues related to 8.5.3 [dcl.init.ref]
Fariborz Jahanian [Wed, 23 Sep 2009 20:55:32 +0000 (20:55 +0000)]
This patch addresses a few issues related to 8.5.3 [dcl.init.ref]
It uses a recent API to find inherited conversion functions to do
the initializer to reference lvalue conversion (and removes a FIXME).
It issues the ambiguity diagnostics when multiple conversions are found.
WIP.

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

14 years agoSome minor cleanups...
Steve Naroff [Wed, 23 Sep 2009 20:00:53 +0000 (20:00 +0000)]
Some minor cleanups...

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

14 years agoHandle namespace aliases.
Anders Carlsson [Wed, 23 Sep 2009 19:19:16 +0000 (19:19 +0000)]
Handle namespace aliases.

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

14 years agoEmit new[] cookie when needed.
Anders Carlsson [Wed, 23 Sep 2009 18:59:48 +0000 (18:59 +0000)]
Emit new[] cookie when needed.

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

14 years agoMore work to enable more exhaustive testing of the indexing API.
Steve Naroff [Wed, 23 Sep 2009 17:52:52 +0000 (17:52 +0000)]
More work to enable more exhaustive testing of the indexing API.

Next step: Add actual some test cases:-)

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

14 years agoBasic support for new[].
Anders Carlsson [Wed, 23 Sep 2009 16:07:23 +0000 (16:07 +0000)]
Basic support for new[].

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

14 years agoWhen code-completion after a "," is building an overload set, note
Douglas Gregor [Wed, 23 Sep 2009 14:56:09 +0000 (14:56 +0000)]
When code-completion after a "," is building an overload set, note
that there is one more argument (the one following the comma) and make
the candidate non-viable if the function cannot accept any argument in
that position.

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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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