]> granicus.if.org Git - clang/log
clang
15 years agoAdd an InOverloadResolution flag to TryCopyInitialization.
Anders Carlsson [Thu, 27 Aug 2009 17:37:39 +0000 (17:37 +0000)]
Add an InOverloadResolution flag to TryCopyInitialization.

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

15 years agoRemove more default arguments.
Anders Carlsson [Thu, 27 Aug 2009 17:30:43 +0000 (17:30 +0000)]
Remove more default arguments.

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

15 years agoRemove default arguments from TryImplicitConversion and fix a bug found in the process.
Anders Carlsson [Thu, 27 Aug 2009 17:24:15 +0000 (17:24 +0000)]
Remove default arguments from TryImplicitConversion and fix a bug found in the process.

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

15 years agoPR4800: Implement -Wpointer-arith. I think this is the correct behavior
Eli Friedman [Thu, 27 Aug 2009 17:20:36 +0000 (17:20 +0000)]
PR4800: Implement -Wpointer-arith.  I think this is the correct behavior
per the documentation, although I'm not completely sure.

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

15 years agoRemove default argument from TryCopyInitialization.
Anders Carlsson [Thu, 27 Aug 2009 17:18:13 +0000 (17:18 +0000)]
Remove default argument from TryCopyInitialization.

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

15 years agoRevert the flags change for now, I have a better idea for this.
Anders Carlsson [Thu, 27 Aug 2009 17:14:02 +0000 (17:14 +0000)]
Revert the flags change for now, I have a better idea for this.

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

15 years agoImplement instantiation of the declarations of member function
Douglas Gregor [Thu, 27 Aug 2009 16:57:43 +0000 (16:57 +0000)]
Implement instantiation of the declarations of member function
templates within class templates, producing a member function template
of a class template specialization. If you can parse that, I'm
sorry. Example:

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

When we instantiate X<int>, we now instantiate the declaration
X<int>::f, which looks like this:

  template<typename U> void X<int>::f(int, U);

The path this takes through
TemplateDeclInstantiator::VisitCXXMethodDecl is convoluted and
ugly, but I don't know how to improve it yet. I'm resting my hopes on
the multi-level substitution required to instantiate definitions of
nested templates, which may simplify this code as well.

More testing to come...

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

15 years agoAdd a OverloadResolutionFlags and start converting some of the overload methods over...
Anders Carlsson [Thu, 27 Aug 2009 16:01:18 +0000 (16:01 +0000)]
Add a OverloadResolutionFlags and start converting some of the overload methods over to using it instead of bools arguments.

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

15 years agoRemove unused utility methods of GRStmtNodeBuilder.
Zhongxing Xu [Thu, 27 Aug 2009 09:14:03 +0000 (09:14 +0000)]
Remove unused utility methods of GRStmtNodeBuilder.

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

15 years agoRemove unused utility methods of GRStmtNodeBuilder.
Zhongxing Xu [Thu, 27 Aug 2009 08:52:44 +0000 (08:52 +0000)]
Remove unused utility methods of GRStmtNodeBuilder.

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

15 years agorestore indentation
Gabor Greif [Thu, 27 Aug 2009 07:30:55 +0000 (07:30 +0000)]
restore indentation

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

15 years agoadd missing header
Gabor Greif [Thu, 27 Aug 2009 07:10:46 +0000 (07:10 +0000)]
add missing header

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

15 years agoRemove a unused member variable. Instead query the option from AnalysisManager.
Zhongxing Xu [Thu, 27 Aug 2009 06:55:26 +0000 (06:55 +0000)]
Remove a unused member variable. Instead query the option from AnalysisManager.

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

15 years agoiterator.h is no more. Be standards compliant.
Gabor Greif [Thu, 27 Aug 2009 06:49:21 +0000 (06:49 +0000)]
iterator.h is no more. Be standards compliant.

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

15 years agoWhen checking whether one declaration context encloses another, make sure to look...
Douglas Gregor [Thu, 27 Aug 2009 06:03:53 +0000 (06:03 +0000)]
When checking whether one declaration context encloses another, make sure to look at the primary contexts. Thanks to Eli for the test case

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

15 years agoDon't check member and base initializers if the constructor is dependent.
Anders Carlsson [Thu, 27 Aug 2009 05:57:30 +0000 (05:57 +0000)]
Don't check member and base initializers if the constructor is dependent.

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

15 years agoUse early returns to avoid indentation.
Anders Carlsson [Thu, 27 Aug 2009 05:45:01 +0000 (05:45 +0000)]
Use early returns to avoid indentation.

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

15 years agoStub out an error so we don't crash.
Eli Friedman [Thu, 27 Aug 2009 05:09:36 +0000 (05:09 +0000)]
Stub out an error so we don't crash.

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

15 years agoAdd a BuildCXXTemporaryObjectExpr and use it so default arguments will be instantiate...
Anders Carlsson [Thu, 27 Aug 2009 05:08:22 +0000 (05:08 +0000)]
Add a BuildCXXTemporaryObjectExpr and use it so default arguments will be instantiated correctly for temporary object expressions.

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

15 years agoIn ActOnCXXTypeConstructExpr, check that the type is complete and non-abstract before...
Anders Carlsson [Thu, 27 Aug 2009 03:53:50 +0000 (03:53 +0000)]
In ActOnCXXTypeConstructExpr, check that the type is complete and non-abstract before creating any expressions. This assures that any templates are instantiated if necessary.

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

15 years agoSimplify 'Environment' to contain only one map from 'const Stmt*' to SVals, greatly...
Ted Kremenek [Thu, 27 Aug 2009 01:39:13 +0000 (01:39 +0000)]
Simplify 'Environment' to contain only one map from 'const Stmt*' to SVals, greatly simplifying the logic of the analyzer in many places.  We now only distinguish between block-level expressions and subexpressions in Environment::RemoveDeadBindings and GRState pretty-printing.

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

15 years agoTestcase for an almost recent checkin.
Mike Stump [Thu, 27 Aug 2009 01:09:45 +0000 (01:09 +0000)]
Testcase for an almost recent checkin.

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

15 years agoCleanups.
Mike Stump [Thu, 27 Aug 2009 00:29:21 +0000 (00:29 +0000)]
Cleanups.

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

15 years agoNew RequireNonAbstractType function.
Anders Carlsson [Thu, 27 Aug 2009 00:13:57 +0000 (00:13 +0000)]
New RequireNonAbstractType function.

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

15 years agoBye-bye old RequireCompleteType.
Anders Carlsson [Wed, 26 Aug 2009 23:45:07 +0000 (23:45 +0000)]
Bye-bye old RequireCompleteType.

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

15 years agoFixup codegen for static dispatch to a virtual function that was
Mike Stump [Wed, 26 Aug 2009 23:38:08 +0000 (23:38 +0000)]
Fixup codegen for static dispatch to a virtual function that was
almost correct.  :-)

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

15 years agoTweak the list of open projects for C++
Douglas Gregor [Wed, 26 Aug 2009 23:34:30 +0000 (23:34 +0000)]
Tweak the list of open projects for C++

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

15 years agoir-gen for type convesion of class objects. WIP.
Fariborz Jahanian [Wed, 26 Aug 2009 23:31:30 +0000 (23:31 +0000)]
ir-gen for type convesion of class objects. WIP.

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

15 years agoMake sure to bump the reference count of the last element in the ParenListExpr repres...
Douglas Gregor [Wed, 26 Aug 2009 23:26:04 +0000 (23:26 +0000)]
Make sure to bump the reference count of the last element in the ParenListExpr representing the direct initializer of a declaration

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

15 years agoRemove another unused argument.
Anders Carlsson [Wed, 26 Aug 2009 23:00:36 +0000 (23:00 +0000)]
Remove another unused argument.

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

15 years agoRemove the PrintType argument from RequireCompleteType.
Anders Carlsson [Wed, 26 Aug 2009 22:59:12 +0000 (22:59 +0000)]
Remove the PrintType argument from RequireCompleteType.

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

15 years agoWhen a member reference expression includes a qualifier on the member
Douglas Gregor [Wed, 26 Aug 2009 22:36:53 +0000 (22:36 +0000)]
When a member reference expression includes a qualifier on the member
name, e.g.,

  x->Base::f()

retain the qualifier (and its source range information) in a new
subclass of MemberExpr called CXXQualifiedMemberExpr. Provide
construction, transformation, profiling, printing, etc., for this new
expression type.

When a virtual function is called via a qualified name, don't emit a
virtual call. Instead, call that function directly. Mike, could you
add a CodeGen test for this, too?

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

15 years agoAdd initial boilerplate for CIndex, a shared library that will vend high-level
Ted Kremenek [Wed, 26 Aug 2009 22:36:44 +0000 (22:36 +0000)]
Add initial boilerplate for CIndex, a shared library that will vend high-level
source symbol information (harvested by Clang) through a C API.

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

15 years agoAdd a RequireCompleteType variant that takes a PartialDiagnostic. The old RequireComp...
Anders Carlsson [Wed, 26 Aug 2009 22:33:56 +0000 (22:33 +0000)]
Add a RequireCompleteType variant that takes a PartialDiagnostic. The old RequireCompleteType now creates a PartialDiagnostic and calls the new function.

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

15 years agoThe PartialDiagnostic constructor doesn't need to be explicit.
Anders Carlsson [Wed, 26 Aug 2009 22:31:44 +0000 (22:31 +0000)]
The PartialDiagnostic constructor doesn't need to be explicit.

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

15 years agoRegularize the case and sort.
Mike Stump [Wed, 26 Aug 2009 22:31:08 +0000 (22:31 +0000)]
Regularize the case and sort.

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

15 years agoMore improvements to PartialDiagnostic.
Anders Carlsson [Wed, 26 Aug 2009 21:48:37 +0000 (21:48 +0000)]
More improvements to PartialDiagnostic.

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

15 years agoImplement support for C++ direct initializers that involve dependent
Douglas Gregor [Wed, 26 Aug 2009 21:14:46 +0000 (21:14 +0000)]
Implement support for C++ direct initializers that involve dependent
types or type-dependent expressions.

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

15 years agoMore work for conversion functions.
Mike Stump [Wed, 26 Aug 2009 21:11:25 +0000 (21:11 +0000)]
More work for conversion functions.

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

15 years agoImplement virtual dispatch. :-) This is self-consistent with clang,
Mike Stump [Wed, 26 Aug 2009 20:46:33 +0000 (20:46 +0000)]
Implement virtual dispatch.  :-) This is self-consistent with clang,
but not yet necessarily perfectly consistent with gcc.  Also addressed
Doug and John's comments.

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

15 years agoFixes a comment.
Fariborz Jahanian [Wed, 26 Aug 2009 20:37:03 +0000 (20:37 +0000)]
Fixes a comment.

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

15 years agoAST for conversion by conversion functions. WIP.
Fariborz Jahanian [Wed, 26 Aug 2009 20:34:58 +0000 (20:34 +0000)]
AST for conversion by conversion functions. WIP.

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

15 years agoAs far as I know, there aren't any warning differences between -std=gnu99 and
Eli Friedman [Wed, 26 Aug 2009 20:18:00 +0000 (20:18 +0000)]
As far as I know, there aren't any warning differences between -std=gnu99 and
-std=c99 modes, etc.

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

15 years agoSince the HexFloats option only controls a warning, it shouldn't depend
Eli Friedman [Wed, 26 Aug 2009 20:15:14 +0000 (20:15 +0000)]
Since the HexFloats option only controls a warning, it shouldn't depend
on whether we're in GNUMode.  Adjust the code appropriately.

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

15 years agoMake address-space qualification work correctly for compound literals.
Eli Friedman [Wed, 26 Aug 2009 20:01:39 +0000 (20:01 +0000)]
Make address-space qualification work correctly for compound literals.
Issue reported on cfe-dev.

Also fixed the code to use isConstant to determine whether to generate a
constant global, to be consistent with CodeGenModule.  This probably
needs to be refactored to deal with C++, though.

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

15 years agoMore support for pseudo dtors.
Anders Carlsson [Wed, 26 Aug 2009 19:22:42 +0000 (19:22 +0000)]
More support for pseudo dtors.

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

15 years agoupdate to CXXFunctionalCastExpr to support ir-gen for
Fariborz Jahanian [Wed, 26 Aug 2009 18:55:36 +0000 (18:55 +0000)]
update to CXXFunctionalCastExpr to support ir-gen for
type convesions of class objects [class.conv]. WIP.

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

15 years agoMake sure to compare primary declaration contexts when determining whether a declarat...
Douglas Gregor [Wed, 26 Aug 2009 18:54:58 +0000 (18:54 +0000)]
Make sure to compare primary declaration contexts when determining whether a declaration is in scope

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

15 years agoWhen we know that we are parsing a class-name, implicitly construct a
Douglas Gregor [Wed, 26 Aug 2009 18:27:52 +0000 (18:27 +0000)]
When we know that we are parsing a class-name, implicitly construct a
TypenameType if getTypeName is looking at a member of an unknown
specialization. This allows us to properly parse class templates that
derived from type that could only otherwise be described by a typename type,
e.g.,

  template<class T> struct X {};
  template<typename T> struct Y : public X<T>::X { };

Fixes PR4381.

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

15 years agoAdd Sema::BuildMemberReferenceExpr and have Sema::ActOnMemberReferenceExpr call it.
Anders Carlsson [Wed, 26 Aug 2009 18:25:21 +0000 (18:25 +0000)]
Add Sema::BuildMemberReferenceExpr and have Sema::ActOnMemberReferenceExpr call it.

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

15 years agoAddress some of Doug's comments.
Anders Carlsson [Wed, 26 Aug 2009 17:36:19 +0000 (17:36 +0000)]
Address some of Doug's comments.

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

15 years agoFix for overloaded binary operators whose operands need implicit
Douglas Gregor [Wed, 26 Aug 2009 17:08:25 +0000 (17:08 +0000)]
Fix for overloaded binary operators whose operands need implicit
conversions, from Sylvere Teissier!

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

15 years agoAdd the partially implemented PartialDiagnostic class.
Anders Carlsson [Wed, 26 Aug 2009 16:23:53 +0000 (16:23 +0000)]
Add the partially implemented PartialDiagnostic class.

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

15 years agoSource location information for ? and : in a ConditionalOperator, from Enea Zaffanella
Douglas Gregor [Wed, 26 Aug 2009 14:37:04 +0000 (14:37 +0000)]
Source location information for ? and : in a ConditionalOperator, from Enea Zaffanella

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

15 years agoFix bug in __extension__ handling for declarations, from Abramo
Douglas Gregor [Wed, 26 Aug 2009 14:27:30 +0000 (14:27 +0000)]
Fix bug in __extension__ handling for declarations, from Abramo
Bagnara with a fix from Enea Zaffanella!

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

15 years agoRevert r80064 since it broke the build.
Anders Carlsson [Wed, 26 Aug 2009 03:30:14 +0000 (03:30 +0000)]
Revert r80064 since it broke the build.

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

15 years agoImplement virtual dispatch. :-) This is self-consistent with clang, but not yet
Mike Stump [Wed, 26 Aug 2009 01:54:35 +0000 (01:54 +0000)]
Implement virtual dispatch.  :-)  This is self-consistent with clang, but not yet
necessarily perfectly consistent with gcc.

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

15 years agoSimplified default construction of array data members
Fariborz Jahanian [Wed, 26 Aug 2009 00:23:27 +0000 (00:23 +0000)]
Simplified default construction of array data members
in the constructor prologue.

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

15 years agoImprove diagnostics and recovery when the nested-name-specifier of a
Douglas Gregor [Wed, 26 Aug 2009 00:04:55 +0000 (00:04 +0000)]
Improve diagnostics and recovery when the nested-name-specifier of a
qualified name does not actually refer into a class/class
template/class template partial specialization.

Improve printing of nested-name-specifiers to eliminate redudant
qualifiers. Also, make it possible to output a nested-name-specifier
through a DiagnosticBuilder, although there are relatively few places
that will use this leeway.

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

15 years agoParsing of pseudo-destructors.
Anders Carlsson [Tue, 25 Aug 2009 23:46:41 +0000 (23:46 +0000)]
Parsing of pseudo-destructors.

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

15 years agoUpdate checker build.
Ted Kremenek [Tue, 25 Aug 2009 23:46:25 +0000 (23:46 +0000)]
Update checker build.

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

15 years agoFix regression in BasicStoreManager caused by implicitly casting loaded values and...
Ted Kremenek [Tue, 25 Aug 2009 23:29:04 +0000 (23:29 +0000)]
Fix regression in BasicStoreManager caused by implicitly casting loaded values and trying to load/store from arrays.  RegionStoreManager already properly handles these cases well; we just need to gracefully not handle this case in BasicStoreManager.  This fixes PR 4781.

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

15 years agoHandle pointer arithmetic in RegionStoreManager involving Objective-C pointers
Ted Kremenek [Tue, 25 Aug 2009 22:55:09 +0000 (22:55 +0000)]
Handle pointer arithmetic in RegionStoreManager involving Objective-C pointers
when using the non-fragile Objective-C ABI.  This fixes <rdar://problem/7168531>.

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

15 years agoTest out-of-line definition of a static data member of a member class of a nested...
Douglas Gregor [Tue, 25 Aug 2009 22:54:02 +0000 (22:54 +0000)]
Test out-of-line definition of a static data member of a member class of a nested class template. Phew

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

15 years agoTest out-of-line definitions of static data members of nested member class templates
Douglas Gregor [Tue, 25 Aug 2009 22:53:07 +0000 (22:53 +0000)]
Test out-of-line definitions of static data members of nested member class templates

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

15 years agoImprove support for out-of-line definitions of nested templates and
Douglas Gregor [Tue, 25 Aug 2009 22:51:20 +0000 (22:51 +0000)]
Improve support for out-of-line definitions of nested templates and
their members, including member class template, member function
templates, and member classes and functions of member templates.

To actually parse the nested-name-specifiers that qualify the name of
an out-of-line definition of a member template, e.g.,

  template<typename X> template<typename Y>
  X Outer<X>::Inner1<Y>::foo(Y) {
    return X();
  }

we need to look for the template names (e.g., "Inner1") as a member of
the current instantiation (Outer<X>), even before we have entered the
scope of the current instantiation. Since we can't do this in general
(i.e., we should not be looking into all dependent
nested-name-specifiers as if they were the current instantiation), we
rely on the parser to tell us when it is parsing a declaration
specifier sequence, and, therefore, when we should consider the
current scope specifier to be a current instantiation.

Printing of complicated, dependent nested-name-specifiers may be
somewhat broken by this commit; I'll add tests for this issue and fix
the problem (if it still exists) in a subsequent commit.

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

15 years agoClarify the difference between substitution and instantiation by renaming
John McCall [Tue, 25 Aug 2009 22:02:44 +0000 (22:02 +0000)]
Clarify the difference between substitution and instantiation by renaming
functions that don't instantiate definitions.

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

15 years agoUpdate checker build.
Ted Kremenek [Tue, 25 Aug 2009 21:14:54 +0000 (21:14 +0000)]
Update checker build.

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

15 years agoFix crash reported in <rdar://problem/7124210> by "back-porting" some of the
Ted Kremenek [Tue, 25 Aug 2009 20:51:30 +0000 (20:51 +0000)]
Fix crash reported in <rdar://problem/7124210> by "back-porting" some of the
implicit cast logic in RegionStoreManager to BasicStoreManager. This involved
moving CastRetriedVal from RegionStoreManager to StoreManager.

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

15 years agoUpdate Xcode project file to include indexing source files.
Steve Naroff [Tue, 25 Aug 2009 19:57:00 +0000 (19:57 +0000)]
Update Xcode project file to include indexing source files.

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

15 years agoChanged condition of an assert.
Fariborz Jahanian [Tue, 25 Aug 2009 18:53:16 +0000 (18:53 +0000)]
Changed condition of an assert.

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

15 years agoMove logic of GRExprEngine::EvalBinOp to SValuator::EvalBinOp.
Ted Kremenek [Tue, 25 Aug 2009 18:44:25 +0000 (18:44 +0000)]
Move logic of GRExprEngine::EvalBinOp to SValuator::EvalBinOp.

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

15 years agoModify an assert to capture the restriction on friend declarations more
John McCall [Tue, 25 Aug 2009 17:53:59 +0000 (17:53 +0000)]
Modify an assert to capture the restriction on friend declarations more
accurately.  Prevents the assert from triggering incorrectly when friending
functions first declared in extern "C" contexts.  Fixes bug 4757.

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

15 years agoImplement out-of-line definitions of nested class templates. Most of
Douglas Gregor [Tue, 25 Aug 2009 17:23:04 +0000 (17:23 +0000)]
Implement out-of-line definitions of nested class templates. Most of
the logic is there for out-of-line definitions with multiple levels of
nested templates, but this is still a work-in-progress: we're having
trouble determining when we should look into a dependent
nested-name-specifier.

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

15 years agoSkip over bases/fields with dependent types.
Fariborz Jahanian [Tue, 25 Aug 2009 16:37:49 +0000 (16:37 +0000)]
Skip over bases/fields with dependent types.
Fixes pr4771.

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

15 years agoTest case for r79968 (courtesy of Anders).
Fariborz Jahanian [Tue, 25 Aug 2009 16:09:22 +0000 (16:09 +0000)]
Test case for r79968 (courtesy of Anders).

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

15 years agoSanity checking for statement reference counts. Thanks for the suggestion, Fariborz
Douglas Gregor [Tue, 25 Aug 2009 15:47:45 +0000 (15:47 +0000)]
Sanity checking for statement reference counts. Thanks for the suggestion, Fariborz

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

15 years agoUpdate clang for raw_fd_ostream no longer requiring F_Force.
Dan Gohman [Tue, 25 Aug 2009 15:36:09 +0000 (15:36 +0000)]
Update clang for raw_fd_ostream no longer requiring F_Force.

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

15 years agoAdd a little more testing for default arguments of constructors in a class template
Douglas Gregor [Tue, 25 Aug 2009 15:24:38 +0000 (15:24 +0000)]
Add a little more testing for default arguments of constructors in a class template

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

15 years agoHandle the implicit 'this' parameter for format attributes.
Anders Carlsson [Tue, 25 Aug 2009 14:12:34 +0000 (14:12 +0000)]
Handle the implicit 'this' parameter for format attributes.

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

15 years agoIf a parameter has a default argument expression, make sure to instantiate the parame...
Anders Carlsson [Tue, 25 Aug 2009 13:46:13 +0000 (13:46 +0000)]
If a parameter has a default argument expression, make sure to instantiate the parameter type before checking that the expression is a valid initializer.

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

15 years agoEmit conversion functions correctly.
Anders Carlsson [Tue, 25 Aug 2009 13:14:46 +0000 (13:14 +0000)]
Emit conversion functions correctly.

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

15 years agoImproved support for default arguments in constructors for class templates.
Anders Carlsson [Tue, 25 Aug 2009 13:07:08 +0000 (13:07 +0000)]
Improved support for default arguments in constructors for class templates.

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

15 years agoRemove CodeDecl and CFG from GRExprEngine and GRStateManager.
Zhongxing Xu [Tue, 25 Aug 2009 06:51:30 +0000 (06:51 +0000)]
Remove CodeDecl and CFG from GRExprEngine and GRStateManager.
Now AnalysisManager is the only place we can get CodeDecl.
This leads to an API change: GRState::bindExpr() now takes the CFG argument.

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

15 years agoRemove a test that relies on old debug info format.
Devang Patel [Tue, 25 Aug 2009 06:18:11 +0000 (06:18 +0000)]
Remove a test that relies on old debug info format.

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

15 years agoInitializeVarWithConstructor now returns true on failure.
Anders Carlsson [Tue, 25 Aug 2009 05:18:00 +0000 (05:18 +0000)]
InitializeVarWithConstructor now returns true on failure.

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

15 years agoBuildCXXConstructExpr now returns an OwningExprResult.
Anders Carlsson [Tue, 25 Aug 2009 05:12:04 +0000 (05:12 +0000)]
BuildCXXConstructExpr now returns an OwningExprResult.

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

15 years agoFactor building of CXXDefaultArgExpr expressions out into a separate function.
Anders Carlsson [Tue, 25 Aug 2009 03:49:14 +0000 (03:49 +0000)]
Factor building of CXXDefaultArgExpr expressions out into a separate function.

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

15 years agoRemove Decl and CFG from ExplodedGraph. This leads to a series small changes.
Zhongxing Xu [Tue, 25 Aug 2009 03:33:41 +0000 (03:33 +0000)]
Remove Decl and CFG from ExplodedGraph. This leads to a series small changes.

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

15 years agoBasic support for default argument expressions for function templates.
Anders Carlsson [Tue, 25 Aug 2009 03:18:48 +0000 (03:18 +0000)]
Basic support for default argument expressions for function templates.

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

15 years agoFactor setting default arguments out into SetParamDefaultArgument.
Anders Carlsson [Tue, 25 Aug 2009 02:29:20 +0000 (02:29 +0000)]
Factor setting default arguments out into SetParamDefaultArgument.

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

15 years agoFix ivar layout map generation (hopefully).
Anders Carlsson [Tue, 25 Aug 2009 02:07:02 +0000 (02:07 +0000)]
Fix ivar layout map generation (hopefully).

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

15 years agoUse hasDefaultArg instead of getDefaultArg.
Anders Carlsson [Tue, 25 Aug 2009 01:23:32 +0000 (01:23 +0000)]
Use hasDefaultArg instead of getDefaultArg.

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

15 years agoAdd Decl getter/setters for uninstantiated default arguments for function parameters.
Anders Carlsson [Tue, 25 Aug 2009 01:11:14 +0000 (01:11 +0000)]
Add Decl getter/setters for uninstantiated default arguments for function parameters.

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

15 years agoCheck that the default argument is well-formed before checking the initializer types.
Anders Carlsson [Tue, 25 Aug 2009 01:02:06 +0000 (01:02 +0000)]
Check that the default argument is well-formed before checking the initializer types.

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

15 years agoEliminate a GCC warning
Douglas Gregor [Tue, 25 Aug 2009 00:17:23 +0000 (00:17 +0000)]
Eliminate a GCC warning

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

15 years agoRemove #ifdef'out code.
Fariborz Jahanian [Mon, 24 Aug 2009 23:16:37 +0000 (23:16 +0000)]
Remove #ifdef'out code.

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

15 years agoKeep track of the template parameter depth properly when we have
Douglas Gregor [Mon, 24 Aug 2009 23:03:25 +0000 (23:03 +0000)]
Keep track of the template parameter depth properly when we have
member templates declared inside other templates. This allows us to
match out-of-line definitions of member function templates within
class templates to the declarations within the class template. We
still can't handle out-of-line definitions for member class templates,
however.

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

15 years agoAdd test case for PR 4759.
Ted Kremenek [Mon, 24 Aug 2009 22:56:32 +0000 (22:56 +0000)]
Add test case for PR 4759.

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

15 years agoConstraintManager::AssumeDual now accepts a 'DefinedSVal' instead of 'SVal' for
Ted Kremenek [Mon, 24 Aug 2009 22:47:34 +0000 (22:47 +0000)]
ConstraintManager::AssumeDual now accepts a 'DefinedSVal' instead of 'SVal' for
the condition. This eliminates a source of bugs where the client doesn't
correctly reason about undefined or unknown values. This fixes PR 4759.

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