]> granicus.if.org Git - clang/log
clang
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

15 years agoIntroduce 'DefinedSVal', an intermediate parent class between Loc/NonLoc and
Ted Kremenek [Mon, 24 Aug 2009 22:41:15 +0000 (22:41 +0000)]
Introduce 'DefinedSVal', an intermediate parent class between Loc/NonLoc and
SVal. This allows us to use the C++ type system to distinguish between SVals
that are potentially unknown/undefined and those that are not.

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

15 years agoAdd missing '&&'...
Daniel Dunbar [Mon, 24 Aug 2009 22:29:04 +0000 (22:29 +0000)]
Add missing '&&'...

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

15 years agoPR4766: Don't pass -static to 'as' on x86_64 on Darwin.
Daniel Dunbar [Mon, 24 Aug 2009 22:26:16 +0000 (22:26 +0000)]
PR4766: Don't pass -static to 'as' on x86_64 on Darwin.

Also, do pass -static even with -dynamic on i386.

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

15 years agoRemove ivarlayout bitmap optimization, instead if all zeros,
Fariborz Jahanian [Mon, 24 Aug 2009 21:55:06 +0000 (21:55 +0000)]
Remove ivarlayout bitmap optimization, instead if all zeros,
put out the bitmap when all objects are scanned.

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

15 years agoDon't try to evaluate an expression that is type- or value-dependent while building...
Douglas Gregor [Mon, 24 Aug 2009 21:39:56 +0000 (21:39 +0000)]
Don't try to evaluate an expression that is type- or value-dependent while building the CFG

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

15 years agoSkip transparent contexts when performing C++ name lookup
Douglas Gregor [Mon, 24 Aug 2009 18:55:03 +0000 (18:55 +0000)]
Skip transparent contexts when performing C++ name lookup

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

15 years agoHandle array to pointer decay in EmitCastExpr and get rid of VisitImplicitCastExpr.
Anders Carlsson [Mon, 24 Aug 2009 18:37:17 +0000 (18:37 +0000)]
Handle array to pointer decay in EmitCastExpr and get rid of VisitImplicitCastExpr.

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

15 years agoHandle CK_NullToMemberPointer in ScalarExprEmitter::EmitCast
Anders Carlsson [Mon, 24 Aug 2009 18:26:39 +0000 (18:26 +0000)]
Handle CK_NullToMemberPointer in ScalarExprEmitter::EmitCast

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

15 years agoPass the cast kind to ScalarExprEmitter::EmitCastExpr.
Anders Carlsson [Mon, 24 Aug 2009 18:12:39 +0000 (18:12 +0000)]
Pass the cast kind to ScalarExprEmitter::EmitCastExpr.

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

15 years agoUse the right cast kind when comparing null to member pointers.
Anders Carlsson [Mon, 24 Aug 2009 18:03:14 +0000 (18:03 +0000)]
Use the right cast kind when comparing null to member pointers.

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

15 years agoImplement support for equality comparisons (!=, ==) of member
Douglas Gregor [Mon, 24 Aug 2009 17:42:35 +0000 (17:42 +0000)]
Implement support for equality comparisons (!=, ==) of member
pointers, by extending the "composite pointer type" logic to include
member pointer types.

Introduce test cases for member pointer comparisons, including those
that involve the builtin operator candidates implemented earlier.

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

15 years agonormalize the CharacterLiteral::getLocation method name, patch
Chris Lattner [Mon, 24 Aug 2009 17:39:36 +0000 (17:39 +0000)]
normalize the CharacterLiteral::getLocation method name, patch
by Enea Zaffanella!

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

15 years agoFixes pr4763.
Fariborz Jahanian [Mon, 24 Aug 2009 17:19:23 +0000 (17:19 +0000)]
Fixes pr4763.

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

15 years agoMore member pointer work.
Anders Carlsson [Mon, 24 Aug 2009 17:16:23 +0000 (17:16 +0000)]
More member pointer work.

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

15 years agoRemove dead code
Anders Carlsson [Mon, 24 Aug 2009 16:52:33 +0000 (16:52 +0000)]
Remove dead code

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

15 years agoTry to complete a type before looking for conversion functions within
Douglas Gregor [Mon, 24 Aug 2009 15:23:48 +0000 (15:23 +0000)]
Try to complete a type before looking for conversion functions within
that type. Note that we do not produce a diagnostic if the type is
incomplete; rather, we just don't look for conversion functions. Fixes PR4660.

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

15 years agoRefactor the template-instantiation logic for expressions into a
Douglas Gregor [Mon, 24 Aug 2009 13:43:27 +0000 (13:43 +0000)]
Refactor the template-instantiation logic for expressions into a
generic tree transformation (also used for recanonicalization) and a
small amount of template-instantiation-specific logic.

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

15 years agoFix build of clang with gcc-4.4: #include <cstdio> was missing.
Torok Edwin [Mon, 24 Aug 2009 13:25:12 +0000 (13:25 +0000)]
Fix build of clang with gcc-4.4: #include <cstdio> was missing.

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

15 years agoImprove top-level-semicolon test a bit
Douglas Gregor [Mon, 24 Aug 2009 12:20:57 +0000 (12:20 +0000)]
Improve top-level-semicolon test a bit

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

15 years agoTop-level semicolons are allowed in C++0x. Fixes PR4755.
Douglas Gregor [Mon, 24 Aug 2009 12:17:54 +0000 (12:17 +0000)]
Top-level semicolons are allowed in C++0x. Fixes PR4755.

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

15 years agoMake sure to adjust function template declarations to their templated
Douglas Gregor [Mon, 24 Aug 2009 11:57:43 +0000 (11:57 +0000)]
Make sure to adjust function template declarations to their templated
declarations (e.g., FunctionTemplateDecl -> CXXConstructorDecl) before
performing semantic analysis on the declarations. Fixes PR4761.

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

15 years agoRemove TargetInfo::getTargetPrefix().
Daniel Dunbar [Mon, 24 Aug 2009 09:54:37 +0000 (09:54 +0000)]
Remove TargetInfo::getTargetPrefix().

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

15 years agoSwitch to StringRef based BitstreamWriter APIs, where appropriate.
Daniel Dunbar [Mon, 24 Aug 2009 09:31:37 +0000 (09:31 +0000)]
Switch to StringRef based BitstreamWriter APIs, where appropriate.
 - There is lots of non-endian safe code in here... :/

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

15 years agoRemove arch normalization from Driver, this should be unnecessary now that
Daniel Dunbar [Mon, 24 Aug 2009 09:16:49 +0000 (09:16 +0000)]
Remove arch normalization from Driver, this should be unnecessary now that
things have moved to llvm::Triple.

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

15 years agoSwitch TargetInfo to store an llvm::Triple.
Daniel Dunbar [Mon, 24 Aug 2009 09:10:05 +0000 (09:10 +0000)]
Switch TargetInfo to store an llvm::Triple.
 - Primarily to discourage clients form making decisions based on the string.

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

15 years agoSwitch ABI selection to use llvm::Triple instead of string munging.
Daniel Dunbar [Mon, 24 Aug 2009 08:52:16 +0000 (08:52 +0000)]
Switch ABI selection to use llvm::Triple instead of string munging.

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

15 years agofix a GCC type punning warning.
Chris Lattner [Mon, 24 Aug 2009 05:19:01 +0000 (05:19 +0000)]
fix a GCC type punning warning.

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

15 years agoprune #includes.
Chris Lattner [Mon, 24 Aug 2009 04:11:30 +0000 (04:11 +0000)]
prune #includes.

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

15 years agoAPI changes to match llvm ToT.
Chris Lattner [Sun, 23 Aug 2009 22:45:33 +0000 (22:45 +0000)]
API changes to match llvm ToT.

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

15 years agoReenable clang using clang-cc for C++ and all archs by default.
Daniel Dunbar [Sun, 23 Aug 2009 19:41:53 +0000 (19:41 +0000)]
Reenable clang using clang-cc for C++ and all archs by default.

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

15 years agoFix a few tests to be -Asserts agnostic.
Daniel Dunbar [Sun, 23 Aug 2009 19:28:59 +0000 (19:28 +0000)]
Fix a few tests to be -Asserts agnostic.
 - Ugh.

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

15 years agoTemporarily switch clang back to not using clang-cc by default for C++, and only
Daniel Dunbar [Sun, 23 Aug 2009 18:42:54 +0000 (18:42 +0000)]
Temporarily switch clang back to not using clang-cc by default for C++, and only
using clang-cc on i386 and x86_64.

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

15 years agoReplace cerr with errs().
Benjamin Kramer [Sun, 23 Aug 2009 12:08:50 +0000 (12:08 +0000)]
Replace cerr with errs().

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