]> granicus.if.org Git - clang/log
clang
15 years agoAdd some documentation, to make it so the next person doens't select
Mike Stump [Wed, 22 Jul 2009 16:55:20 +0000 (16:55 +0000)]
Add some documentation, to make it so the next person doens't select
the wrong function.  :-)

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

15 years agoFix <rdar://problem/6770276> Support Class<Proto> syntax.
Steve Naroff [Wed, 22 Jul 2009 16:07:01 +0000 (16:07 +0000)]
Fix <rdar://problem/6770276> Support Class<Proto> syntax.

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

15 years agoTest template instantiation for member functions of class templates defined
Douglas Gregor [Wed, 22 Jul 2009 15:45:39 +0000 (15:45 +0000)]
Test template instantiation for member functions of class templates defined
out of line.

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

15 years agoMake vectorized floating-point comparisons work without crashing.
Eli Friedman [Wed, 22 Jul 2009 06:07:16 +0000 (06:07 +0000)]
Make vectorized floating-point comparisons work without crashing.

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

15 years agoRestructure ProgramPoint to have the 'Kind' value be its own instance
Ted Kremenek [Wed, 22 Jul 2009 04:38:22 +0000 (04:38 +0000)]
Restructure ProgramPoint to have the 'Kind' value be its own instance
variable.  This gives us much more flexibility with defining more
ProgramPoints, which is the direction we are heading.  The removal of
various bit-mangling of pointers also cleans up the logic.

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

15 years agoTemporarily disable most use of region casts in RegionStoreManager,
Ted Kremenek [Wed, 22 Jul 2009 04:35:42 +0000 (04:35 +0000)]
Temporarily disable most use of region casts in RegionStoreManager,
instead preferring to use the a region's actual type when creating
symbols and using the QualType passed to Retrieve for implicit
casting.  This preprocessor logic is temporary; eventually we will
either remove region casts or keep them.

Temporarily toggle (via preprocessor directives) that SymbolicRegions
with heap storage are not undefined, but instead should be
symbolicated.  If we want to model that a SymbolicRegion is
uninitialized, we can explicitly model that by binding UndefinedVal to
that region.  It turns out that we want to treat most heap objects as
being defined, not the other way around.

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

15 years agoFix a crasher in StoreManager::InvalidateRegion() caused by using the
Ted Kremenek [Wed, 22 Jul 2009 04:23:20 +0000 (04:23 +0000)]
Fix a crasher in StoreManager::InvalidateRegion() caused by using the
'cast type' of a region to invalidate its binding.  This only occurs
when using RegionStoreManager, as it records the cast type.  I'm
currently considering removing the notion of a cast type (see
comments in code).

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

15 years agoPreserve address space information through member accesses, e.g.,
Mon P Wang [Wed, 22 Jul 2009 03:08:17 +0000 (03:08 +0000)]
Preserve address space information through member accesses, e.g.,
   __attribute__((address_space(1))) struct {int arr[ 3 ]; }  *p1;
   ... = p1->arr[2];  // load from address space 1

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

15 years agoRemove an unneeded header.
Mike Stump [Wed, 22 Jul 2009 01:39:14 +0000 (01:39 +0000)]
Remove an unneeded header.

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

15 years agoPrep for new warning.
Mike Stump [Wed, 22 Jul 2009 00:43:08 +0000 (00:43 +0000)]
Prep for new warning.

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

15 years agoMinor mod. per Doug's comment.
Fariborz Jahanian [Wed, 22 Jul 2009 00:42:46 +0000 (00:42 +0000)]
Minor mod. per Doug's comment.

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

15 years agoComplain if we're entering the context of a dependent nested-name-specifier but
Douglas Gregor [Wed, 22 Jul 2009 00:28:09 +0000 (00:28 +0000)]
Complain if we're entering the context of a dependent nested-name-specifier but
cannot match that nested-name-specifier to a class template or class template
partial specialization.

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

15 years agoBasic parsing and semantic analysis for out-of-line definitions of the
Douglas Gregor [Tue, 21 Jul 2009 23:53:31 +0000 (23:53 +0000)]
Basic parsing and semantic analysis for out-of-line definitions of the
member functions of class templates, e.g.,

  template<typename T>
  struct X {
    void f(T);
  };

  template<typename T> X<T>::f(T) { /* ... */ }

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

15 years agoRevert this, we can now avoid error cascades better.
Mike Stump [Tue, 21 Jul 2009 23:52:50 +0000 (23:52 +0000)]
Revert this, we can now avoid error cascades better.

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

15 years agoRevert this, was a bug in my new warning code, not the test case.
Mike Stump [Tue, 21 Jul 2009 23:50:15 +0000 (23:50 +0000)]
Revert this, was a bug in my new warning code, not the test case.

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

15 years agoRevert this, we have a better way to do this.
Mike Stump [Tue, 21 Jul 2009 23:47:12 +0000 (23:47 +0000)]
Revert this, we have a better way to do this.

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

15 years agoRevert this, we have a better way to handle this.
Mike Stump [Tue, 21 Jul 2009 23:45:39 +0000 (23:45 +0000)]
Revert this, we have a better way to handle this.

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

15 years agoRevert recent change, I now have a better way to solve this (thanks Chris).
Mike Stump [Tue, 21 Jul 2009 23:41:23 +0000 (23:41 +0000)]
Revert recent change, I now have a better way to solve this (thanks Chris).

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

15 years agoFix long-lurking bug in ObjCSummaryCache revealed by Torok's recent memory
Ted Kremenek [Tue, 21 Jul 2009 23:27:57 +0000 (23:27 +0000)]
Fix long-lurking bug in ObjCSummaryCache revealed by Torok's recent memory
poisoning changes to DenseMap. We were using an iterator after it had been
invalidated by an insertion into the DenseMap.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 22:54:02 +0000 (22:54 +0000)]
Prep for new warning.

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

15 years agoPatch to accomodate Doug's comment on default
Fariborz Jahanian [Tue, 21 Jul 2009 22:36:06 +0000 (22:36 +0000)]
Patch to accomodate Doug's comment on default
destruction of base/members for each destructor AST.

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

15 years agoRemove stale comment and fix RUN line.
Ted Kremenek [Tue, 21 Jul 2009 21:48:25 +0000 (21:48 +0000)]
Remove stale comment and fix RUN line.

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

15 years agoAdd test case for PR 4596, which is already fixed due to Steve Naroff's overhaul...
Ted Kremenek [Tue, 21 Jul 2009 21:21:04 +0000 (21:21 +0000)]
Add test case for PR 4596, which is already fixed due to Steve Naroff's overhaul of the Objective-C type system, but isn't in a checker build yet.

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

15 years agoPatch by Stefan Bühler: Escape text in macro expansion when emitting HTML in the...
Ted Kremenek [Tue, 21 Jul 2009 21:16:46 +0000 (21:16 +0000)]
Patch by Stefan Bühler: Escape text in macro expansion when emitting HTML in the HTMLRewriter.

This fixes PR 4602.

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

15 years agoUpdate stale comment.
Ted Kremenek [Tue, 21 Jul 2009 21:09:31 +0000 (21:09 +0000)]
Update stale comment.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 21:06:08 +0000 (21:06 +0000)]
Prep for new warning.

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

15 years agoReorder files.
Ted Kremenek [Tue, 21 Jul 2009 21:03:50 +0000 (21:03 +0000)]
Reorder files.

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

15 years agoFix PR 4594 by refactoring almost all casting logic from GRExprEngine::VisitCast
Ted Kremenek [Tue, 21 Jul 2009 21:03:30 +0000 (21:03 +0000)]
Fix PR 4594 by refactoring almost all casting logic from GRExprEngine::VisitCast
to SValuator::EvalCast. In the process, the StoreManagers now use this new cast
machinery, and the hack in GRExprEngine::EvalBind to handle implicit casts
involving OSAtomicCompareAndSwap and friends has been removed (and replaced with
logic closer to the logic specific to those functions).

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 21:03:09 +0000 (21:03 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 20:52:43 +0000 (20:52 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 20:50:41 +0000 (20:50 +0000)]
Prep for new warning.

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

15 years agodriver: Print --version on stdout, to match gcc.
Daniel Dunbar [Tue, 21 Jul 2009 20:06:58 +0000 (20:06 +0000)]
driver: Print --version on stdout, to match gcc.
 - Patch by Jean-Daniel Dupas

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

15 years agoMisc fixes for -Wreorder:
Eli Friedman [Tue, 21 Jul 2009 19:28:10 +0000 (19:28 +0000)]
Misc fixes for -Wreorder:

1. Make it work correctly with anonymous unions.
2. Don't compute it if the warning isn't enabled.
3. Optimize the algorithm slightly to make it linear time in the
case where we don't produce any warnings.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:03:43 +0000 (19:03 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:02:55 +0000 (19:02 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:01:48 +0000 (19:01 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:01:31 +0000 (19:01 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:01:01 +0000 (19:01 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:00:12 +0000 (19:00 +0000)]
Prep for new warning.

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

15 years agoMake Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute
Douglas Gregor [Tue, 21 Jul 2009 18:59:28 +0000 (18:59 +0000)]
Make Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute
the declaration context, as occurs with out-of-line class template member
definitions.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:59:16 +0000 (18:59 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:58:50 +0000 (18:58 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:58:15 +0000 (18:58 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:57:14 +0000 (18:57 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:56:34 +0000 (18:56 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:56:04 +0000 (18:56 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:54:29 +0000 (18:54 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:52:41 +0000 (18:52 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:51:31 +0000 (18:51 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:48:43 +0000 (18:48 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:46:15 +0000 (18:46 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:45:53 +0000 (18:45 +0000)]
Prep for new warning.

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

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:45:22 +0000 (18:45 +0000)]
Prep for new warning.

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

15 years agoPrep for new warnings about control flow falling off the ends of
Mike Stump [Tue, 21 Jul 2009 18:44:24 +0000 (18:44 +0000)]
Prep for new warnings about control flow falling off the ends of
functions that return a value.  I was going to buffer the whole lot
up, but it should be easier to review if I check them in
incrementally.  Most of the forth coming changes either add a return
value, or make it impossible to return, or alter the return type.

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Tue, 21 Jul 2009 18:06:41 +0000 (18:06 +0000)]
Update for LLVM API change.

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

15 years agoConsider nested-names as part of the declarator when resolving an ambiguous statement.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 17:05:03 +0000 (17:05 +0000)]
Consider nested-names as part of the declarator when resolving an ambiguous statement.

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

15 years agoDiagnose when a destructor uses a unrelated class type as its name.
Fariborz Jahanian [Tue, 21 Jul 2009 15:28:50 +0000 (15:28 +0000)]
Diagnose when a destructor uses a unrelated class type as its name.

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

15 years agoAdd the location of the tag keyword into TagDecl. From Enea
Douglas Gregor [Tue, 21 Jul 2009 14:46:17 +0000 (14:46 +0000)]
Add the location of the tag keyword into TagDecl. From Enea
Zaffanella, with tweaks from Abramo Bagnara.

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

15 years agoDisambiguate an if statement.
Duncan Sands [Tue, 21 Jul 2009 07:56:29 +0000 (07:56 +0000)]
Disambiguate an if statement.

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

15 years agoRemove the ASTContext parameter from Entity::getPrintableName().
Argyrios Kyrtzidis [Tue, 21 Jul 2009 07:52:21 +0000 (07:52 +0000)]
Remove the ASTContext parameter from Entity::getPrintableName().

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

15 years agoAdd an assert for safety check.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 06:48:06 +0000 (06:48 +0000)]
Add an assert for safety check.

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

15 years agoFix a crash that occurs in this C++ case:
Argyrios Kyrtzidis [Tue, 21 Jul 2009 06:43:26 +0000 (06:43 +0000)]
Fix a crash that occurs in this C++ case:

struct foo {
  static bool value;
};
bool (foo::value); // crash because of parens

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Tue, 21 Jul 2009 02:57:15 +0000 (02:57 +0000)]
Update for LLVM API change.

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

15 years agoKeep only canonical Decls in Entities.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 02:10:32 +0000 (02:10 +0000)]
Keep only canonical Decls in Entities.

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

15 years agoWire up CFG improvements for __builtin_choose_expr.
Mike Stump [Tue, 21 Jul 2009 01:46:17 +0000 (01:46 +0000)]
Wire up CFG improvements for __builtin_choose_expr.

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

15 years agoWire up CFG improvements for do { } while () when the condition is known.
Mike Stump [Tue, 21 Jul 2009 01:27:50 +0000 (01:27 +0000)]
Wire up CFG improvements for do { } while () when the condition is known.

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

15 years agoWire up for statement CFG improvements for conditionals that are known.
Mike Stump [Tue, 21 Jul 2009 01:12:51 +0000 (01:12 +0000)]
Wire up for statement CFG improvements for conditionals that are known.

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

15 years agoWire up CFG improvements for while when the condition is known.
Mike Stump [Tue, 21 Jul 2009 00:38:52 +0000 (00:38 +0000)]
Wire up CFG improvements for while when the condition is known.

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

15 years agoRemove a file from the test directory that was added by mistake.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:17:57 +0000 (00:17 +0000)]
Remove a file from the test directory that was added by mistake.

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

15 years agoRegionStore:
Ted Kremenek [Tue, 21 Jul 2009 00:12:07 +0000 (00:12 +0000)]
RegionStore:
-refactor logic for retrieving bindings from VarDecls into
 RegionStoreManager::RetrieveVar()
- improve RegionStoreManager::CastRetrievedVal() and SimpleSValuate::EvalCastNL
  to better handle casts of values of the same canonical type as well as
  casts of LocAsInteger values.

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

15 years agoChange the semantics for Entity.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:07:06 +0000 (00:07 +0000)]
Change the semantics for Entity.

Entity can now refer to declarations that are not visible outside the translation unit.
It is a wrapper of a pointer union, it's either a Decl* for declarations that don't
"cross" translation units, or an EntityImpl* which is associated with the specific "visible" Decl.

Included is a test case for handling fields across translation units.

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

15 years agodefine __STDC_VERSION__ processor token for c94
Ryan Flynn [Tue, 21 Jul 2009 00:07:02 +0000 (00:07 +0000)]
define __STDC_VERSION__ processor token for c94

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

15 years agoUse temporary output to avoid running index-test with the same commands multiple...
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:06:46 +0000 (00:06 +0000)]
Use temporary output to avoid running index-test with the same commands multiple times.

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

15 years agoImplement the virtual getNextRedeclaration() for ObjCMethodDecl.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:06:36 +0000 (00:06 +0000)]
Implement the virtual getNextRedeclaration() for ObjCMethodDecl.

If it's in an ObjCContainerDecl, its "redeclaration" is the method definition in the corresponding ObjCImplDecl.
If it's in an ObjCImplDecl, its "redeclaration" is the method in the interface.

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

15 years agoAdd an assertion for the return value of Decl::getNextRedeclaration().
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:06:27 +0000 (00:06 +0000)]
Add an assertion for the return value of Decl::getNextRedeclaration().

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

15 years agoRemove the ObjCCategoryImpls vector from Sema class.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:06:20 +0000 (00:06 +0000)]
Remove the ObjCCategoryImpls vector from Sema class.
Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality.

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

15 years agoRemove Sema::LookupObjCImplementation and replace it with just calling ObjCInterfaceD...
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:06:04 +0000 (00:06 +0000)]
Remove Sema::LookupObjCImplementation and replace it with just calling ObjCInterfaceDecl::getImplementation().

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

15 years ago- Introduce ASTContext::getObjCImplementation() and ASTContext::setObjCImplementation...
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:05:53 +0000 (00:05 +0000)]
- Introduce ASTContext::getObjCImplementation() and ASTContext::setObjCImplementation() which use a DenseMap to associate
  an interface/category with its implementation (if one exists).

- Introduce ObjCInterfaceDecl::get/setImplementation() and ObjCCategoryDecl::get/setImplementation() that use the above methods.

- Add a compiler error for when a category is reimplemented.

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

15 years agoHandle references from ObjCIvarRefExprs.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:05:38 +0000 (00:05 +0000)]
Handle references from ObjCIvarRefExprs.

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

15 years agoAdd '\n' to the end of error message.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:05:10 +0000 (00:05 +0000)]
Add '\n' to the end of error message.

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

15 years agoAdd yet more analysis for CFGs involving conditionals that are actually constant.
Mike Stump [Mon, 20 Jul 2009 23:24:15 +0000 (23:24 +0000)]
Add yet more analysis for CFGs involving conditionals that are actually constant.

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

15 years agoMove EmitCtorPrologue to CGCXX. Add an assert and FIXMEs.
Fariborz Jahanian [Mon, 20 Jul 2009 23:18:55 +0000 (23:18 +0000)]
Move EmitCtorPrologue to CGCXX. Add an assert and FIXMEs.

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

15 years agoEnhanced IsReinterpreted() (RegionStore.cpp) to reason about higher-order
Ted Kremenek [Mon, 20 Jul 2009 22:58:02 +0000 (22:58 +0000)]
Enhanced IsReinterpreted() (RegionStore.cpp) to reason about higher-order
pointers.

Enhanced RegionStoreManager::Retrieve() to handle automatic casts when the
loaded value is different from the requested value. This should be refined over
time, but essentially we should always symbolicate locations as locations, and
convert them to non-locations on demand.

These changes now cause 'misc-ps.m' to pass again.

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

15 years agoImprove message for bad destructor decl. Per Doug's comment.
Fariborz Jahanian [Mon, 20 Jul 2009 22:41:12 +0000 (22:41 +0000)]
Improve message for bad destructor decl. Per Doug's comment.

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

15 years agoEarly ir-gen for constructor prologue. This is on going.
Fariborz Jahanian [Mon, 20 Jul 2009 22:35:22 +0000 (22:35 +0000)]
Early ir-gen for constructor prologue. This is on going.

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

15 years agoReuse VarDecl::Init to store the default argument of a ParmVarDecl,
Douglas Gregor [Mon, 20 Jul 2009 22:03:28 +0000 (22:03 +0000)]
Reuse VarDecl::Init to store the default argument of a ParmVarDecl,
reducing the size of ParmVarDecl by one pointer. Also means that we'll
properly (de-)serialize default arguments in C++ PCH files.

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

15 years agoThis test now passes with RegionStore.
Ted Kremenek [Mon, 20 Jul 2009 21:44:10 +0000 (21:44 +0000)]
This test now passes with RegionStore.

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

15 years agoEnhance GRExprEngine::EvalBind to handle some implicit casts from nonlocs to
Ted Kremenek [Mon, 20 Jul 2009 21:43:20 +0000 (21:43 +0000)]
Enhance GRExprEngine::EvalBind to handle some implicit casts from nonlocs to
locs and vis versa.

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

15 years agoEnhance SimpleSValuator to handle nonloc::LocAsInteger -> location casts.
Ted Kremenek [Mon, 20 Jul 2009 21:39:27 +0000 (21:39 +0000)]
Enhance SimpleSValuator to handle nonloc::LocAsInteger -> location casts.

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

15 years agoRemove an apparently unused forward class decl.
Mike Stump [Mon, 20 Jul 2009 21:23:55 +0000 (21:23 +0000)]
Remove an apparently unused forward class decl.

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

15 years agoRemove an apparently unused header.
Mike Stump [Mon, 20 Jul 2009 21:17:53 +0000 (21:17 +0000)]
Remove an apparently unused header.

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

15 years agoAdd XFAILED test.
Ted Kremenek [Mon, 20 Jul 2009 21:00:55 +0000 (21:00 +0000)]
Add XFAILED test.

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

15 years agoAdd FIXME.
Ted Kremenek [Mon, 20 Jul 2009 20:38:59 +0000 (20:38 +0000)]
Add FIXME.

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

15 years agoWhen a field is variable-sized or is an array with a negative size,
Douglas Gregor [Mon, 20 Jul 2009 18:55:14 +0000 (18:55 +0000)]
When a field is variable-sized or is an array with a negative size,
don't replace the type of the field with 'int', from Enea Zaffanella!

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

15 years agoUpdate DataflowSolver to handle the case where a successor/predecessor block
Ted Kremenek [Mon, 20 Jul 2009 18:52:34 +0000 (18:52 +0000)]
Update DataflowSolver to handle the case where a successor/predecessor block
could be NULL. This allows the solver to handle optimized CFGs where branches
can be determined during CFG-construction to be infeasible.

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

15 years agoImprove GCC compatibility by allowing static tentative definitions of
Douglas Gregor [Mon, 20 Jul 2009 18:46:59 +0000 (18:46 +0000)]
Improve GCC compatibility by allowing static tentative definitions of
incomplete type (with a warning), from Enea Zaffanella!

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

15 years agoEnhance GRBranchNodeBuilderImpl (part of GRCoreEngine) to understand the case
Ted Kremenek [Mon, 20 Jul 2009 18:44:36 +0000 (18:44 +0000)]
Enhance GRBranchNodeBuilderImpl (part of GRCoreEngine) to understand the case
where the true or false CFGBlock* for a branch could be NULL. This will handle
the case where we can determine during CFG construction that a branch is
infeasible.

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

15 years ago5 cleanups to ObjCObjectPointerType work:
Steve Naroff [Mon, 20 Jul 2009 17:56:53 +0000 (17:56 +0000)]
5 cleanups to ObjCObjectPointerType work:

- Remove Sema::CheckPointeeTypesForAssignment(), a temporary API I added to ease migration to ObjCObjectPointerType. Convert Sema::CheckAssignmentConstraints() to no longer depend on the temporary API.
- Sema::ConvertDeclSpecToType(): Replace a couple FIXME's with an important comment/example.
- Sema::GetTypeForDeclarator(): Get the protocol's from the interface, NOT the declspec (to support the following C typedef idiom: "typedef C<P> T; T *obj").
- Sema::ObjCQualifiedIdTypesAreCompatible(): Removed some dead code.
- ASTContext::getObjCEncodingForTypeImpl(): Some minor cleanups.

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

15 years agoIssue a more descriptive diagnostics when mis-declaring
Fariborz Jahanian [Mon, 20 Jul 2009 17:43:15 +0000 (17:43 +0000)]
Issue a more descriptive diagnostics when mis-declaring
a destructor.

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

15 years agoThe children statements might be NULL. Check for this case in
Zhongxing Xu [Mon, 20 Jul 2009 08:28:49 +0000 (08:28 +0000)]
The children statements might be NULL. Check for this case in
isContainedInStatement().

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