]> granicus.if.org Git - clang/log
clang
15 years agoMake -Wreturn-type be part of -Wmost and therefore -Wall.
Mike Stump [Wed, 22 Jul 2009 21:00:27 +0000 (21:00 +0000)]
Make -Wreturn-type be part of -Wmost and therefore -Wall.

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

15 years agoFix some memory allocation/deallocation issues
Douglas Gregor [Wed, 22 Jul 2009 20:55:49 +0000 (20:55 +0000)]
Fix some memory allocation/deallocation issues

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

15 years agoFix a nasty little use-after-free bug.
Eli Friedman [Wed, 22 Jul 2009 20:29:16 +0000 (20:29 +0000)]
Fix a nasty little use-after-free bug.

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

15 years agoCanonicalize the types produced by template argument deduction.
Douglas Gregor [Wed, 22 Jul 2009 20:25:36 +0000 (20:25 +0000)]
Canonicalize the types produced by template argument deduction.

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

15 years agoImproved on performance of the algorithm for proper ordering of
Fariborz Jahanian [Wed, 22 Jul 2009 20:25:00 +0000 (20:25 +0000)]
Improved on performance of the algorithm for proper ordering of
ctor's initialization of bases and fields.

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

15 years agoSlighty more testing for template argument deduction with array arguments
Douglas Gregor [Wed, 22 Jul 2009 20:07:21 +0000 (20:07 +0000)]
Slighty more testing for template argument deduction with array arguments

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

15 years agoImprove template argument deduction for array types, so that a parameter
Douglas Gregor [Wed, 22 Jul 2009 20:02:25 +0000 (20:02 +0000)]
Improve template argument deduction for array types, so that a parameter

  const T

can be matched with, e.g.,

  volatile int [5]

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

15 years agoPrep for new warning.
Mike Stump [Wed, 22 Jul 2009 20:02:03 +0000 (20:02 +0000)]
Prep for new warning.

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

15 years agoUse isa instead of dyn_cast for conditionals.
Mike Stump [Wed, 22 Jul 2009 18:58:19 +0000 (18:58 +0000)]
Use isa instead of dyn_cast for conditionals.

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

15 years agoUse DICompositeType->replaceAllUsesWith().
Devang Patel [Wed, 22 Jul 2009 18:57:00 +0000 (18:57 +0000)]
Use DICompositeType->replaceAllUsesWith().

This requires llvm rev. 76769 or higher.

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

15 years ago"This patch implements the restrictions on union members detailed in
Douglas Gregor [Wed, 22 Jul 2009 18:25:24 +0000 (18:25 +0000)]
"This patch implements the restrictions on union members detailed in
[class.union]p1", from John McCall!

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

15 years agoMove bug reporter "visitors" to their own file and make them part of the public
Ted Kremenek [Wed, 22 Jul 2009 17:55:28 +0000 (17:55 +0000)]
Move bug reporter "visitors" to their own file and make them part of the public
BugReporter API.  No real functionality change.

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

15 years agoAllocate BaseOrMemberInitializers and CXXBaseSpecifier nodes
Fariborz Jahanian [Wed, 22 Jul 2009 17:41:53 +0000 (17:41 +0000)]
Allocate BaseOrMemberInitializers and CXXBaseSpecifier nodes
via ASTContext.

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

15 years agoImplement parsing and semantic analysis for out-of-line definitions of static
Douglas Gregor [Wed, 22 Jul 2009 17:18:37 +0000 (17:18 +0000)]
Implement parsing and semantic analysis for out-of-line definitions of static
data members of class templates. We don't instantiate the definitions yet,
however.

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

15 years agoFix a couple recent ABI regressions noticed during code review (fallout from the...
Steve Naroff [Wed, 22 Jul 2009 17:14:51 +0000 (17:14 +0000)]
Fix a couple recent ABI regressions noticed during code review (fallout from the ObjC type system rewrite).

It's unfortunate that the mangling includes the low-level structs. Nevertheless, we need this for binary compatibility with GCC.

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

15 years agoSwitch some functions from using x86 builtins to using vector
Eli Friedman [Wed, 22 Jul 2009 17:08:01 +0000 (17:08 +0000)]
Switch some functions from using x86 builtins to using vector
operations.

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

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