]> granicus.if.org Git - clang/log
clang
15 years agoCollect multiple levels of template arguments into a new type,
Douglas Gregor [Fri, 28 Aug 2009 17:37:35 +0000 (17:37 +0000)]
Collect multiple levels of template arguments into a new type,
MultiLevelTemplateArgumentList. This is a baby step toward
instantiating member templates; no intended functionality change yet.

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

15 years agoFix this for real.
Anders Carlsson [Fri, 28 Aug 2009 16:57:08 +0000 (16:57 +0000)]
Fix this for real.

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

15 years agoHide IdxVisitor and remove unimplemented method (causing link errors on x86_64
Daniel Dunbar [Fri, 28 Aug 2009 16:30:07 +0000 (16:30 +0000)]
Hide IdxVisitor and remove unimplemented method (causing link errors on x86_64
linux builder).

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

15 years agoTest case for conversion type method call ir-gen.
Fariborz Jahanian [Fri, 28 Aug 2009 16:23:54 +0000 (16:23 +0000)]
Test case for conversion type method call ir-gen.

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

15 years agoAllow explicit ctors for casts.
Anders Carlsson [Fri, 28 Aug 2009 16:22:20 +0000 (16:22 +0000)]
Allow explicit ctors for casts.

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

15 years agoWhen doing overload resolution, expressions that are value dependent but not type...
Anders Carlsson [Fri, 28 Aug 2009 15:55:56 +0000 (15:55 +0000)]
When doing overload resolution, expressions that are value dependent but not type dependent and of integral type should not be treated as null pointer constants.

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

15 years agoPass InOverloadResolution all the way down to IsPointerConversion.
Anders Carlsson [Fri, 28 Aug 2009 15:33:32 +0000 (15:33 +0000)]
Pass InOverloadResolution all the way down to IsPointerConversion.

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

15 years agoLot's of little changes to get the C-based indexing API going...
Steve Naroff [Fri, 28 Aug 2009 15:28:48 +0000 (15:28 +0000)]
Lot's of little changes to get the C-based indexing API going...

Work in progress.

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

15 years agoInstantiate unresolved using declarations.
Anders Carlsson [Fri, 28 Aug 2009 15:18:15 +0000 (15:18 +0000)]
Instantiate unresolved using declarations.

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

15 years agoir-gen related patch for type conversion
Fariborz Jahanian [Fri, 28 Aug 2009 15:11:24 +0000 (15:11 +0000)]
ir-gen related patch for type conversion
with class type conversion methods. WIP.

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

15 years agoAdd CX prefix to Cursor and move a comment.
Steve Naroff [Fri, 28 Aug 2009 12:07:44 +0000 (12:07 +0000)]
Add CX prefix to Cursor and move a comment.

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

15 years agoOmnibus friend decl refactoring. Instead of cloning AST classes for friend
John McCall [Fri, 28 Aug 2009 07:59:38 +0000 (07:59 +0000)]
Omnibus friend decl refactoring.  Instead of cloning AST classes for friend
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not.  Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.

Refactor the Sema methods specific to friends for cleaner flow and less nesting.

Incidentally solve a few bugs, but I remain confident that we can put them back.

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

15 years agoCreate UnresolvedUsingDecls.
Anders Carlsson [Fri, 28 Aug 2009 05:49:21 +0000 (05:49 +0000)]
Create UnresolvedUsingDecls.

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

15 years agoFactor declaration building out to Sema::BuildUsingDeclaration.
Anders Carlsson [Fri, 28 Aug 2009 05:40:36 +0000 (05:40 +0000)]
Factor declaration building out to Sema::BuildUsingDeclaration.

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

15 years agoCheck in UnresolvedUsingDecl.
Anders Carlsson [Fri, 28 Aug 2009 05:30:28 +0000 (05:30 +0000)]
Check in UnresolvedUsingDecl.

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

15 years agoUse SymbolicRegion instead of CodeTextRegion for symbolic function
Ted Kremenek [Fri, 28 Aug 2009 04:49:15 +0000 (04:49 +0000)]
Use SymbolicRegion instead of CodeTextRegion for symbolic function
pointers.  Most logic cares first about whether or not a region is
symbolic, and second if represents code.  This should fix a series of
silent corner case bugs (as well as simplify a bunch of code).

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

15 years agoMore work on using declarations.
Anders Carlsson [Fri, 28 Aug 2009 03:35:18 +0000 (03:35 +0000)]
More work on using declarations.

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

15 years agoMany improvements to using declarations.
Anders Carlsson [Fri, 28 Aug 2009 03:16:11 +0000 (03:16 +0000)]
Many improvements to using declarations.

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

15 years agoAccept and ignore a few more -Wflags.
Chris Lattner [Fri, 28 Aug 2009 00:35:39 +0000 (00:35 +0000)]
Accept and ignore a few more -Wflags.

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

15 years agoUpdate checker build.
Ted Kremenek [Fri, 28 Aug 2009 00:30:56 +0000 (00:30 +0000)]
Update checker build.

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

15 years agoUse C++ style comments.
Ted Kremenek [Fri, 28 Aug 2009 00:24:55 +0000 (00:24 +0000)]
Use C++ style comments.

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

15 years agoImplement: <rdar://problem/6337132> CWE-273: Failure to Check Whether Privileges
Ted Kremenek [Fri, 28 Aug 2009 00:08:09 +0000 (00:08 +0000)]
Implement: <rdar://problem/6337132> CWE-273: Failure to Check Whether Privileges
                                    Were Dropped Successfully

Patch by Geoff Keating!

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

15 years agoUpdate exports list.
Ted Kremenek [Thu, 27 Aug 2009 23:50:46 +0000 (23:50 +0000)]
Update exports list.

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

15 years agoWhen looking for overloaded member operators, make sure to instantiate
Douglas Gregor [Thu, 27 Aug 2009 23:35:55 +0000 (23:35 +0000)]
When looking for overloaded member operators, make sure to instantiate
class template specializations (when possible) and look into base
classes. Thanks to Eli for the test case!

FIXME -=1.

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

15 years agoconvert to filecheck and force a triple so that this passes on big
Chris Lattner [Thu, 27 Aug 2009 23:22:19 +0000 (23:22 +0000)]
convert to filecheck and force a triple so that this passes on big
endian hosts.  Fixes PR4792

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

15 years agoCFG construction: Abort CFG construction when processing a CompoundStmt if any
Ted Kremenek [Thu, 27 Aug 2009 23:16:26 +0000 (23:16 +0000)]
CFG construction: Abort CFG construction when processing a CompoundStmt if any
of its subexpressions resulted in a "bad CFG".

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

15 years agoRename 'bindExpr' to 'BindExpr'.
Ted Kremenek [Thu, 27 Aug 2009 22:17:37 +0000 (22:17 +0000)]
Rename 'bindExpr' to 'BindExpr'.

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

15 years agoMove the AnalysisContext* from GRState to Environment.
Ted Kremenek [Thu, 27 Aug 2009 22:15:20 +0000 (22:15 +0000)]
Move the AnalysisContext* from GRState to Environment.

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

15 years agoDefine _GNU_SOURCE in C++ mode so that clang works with GNU libstdc++.
Eli Friedman [Thu, 27 Aug 2009 22:01:41 +0000 (22:01 +0000)]
Define _GNU_SOURCE in C++ mode so that clang works with GNU libstdc++.

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

15 years agoAdd __builtin_memchr (used by GNU libstdc++).
Eli Friedman [Thu, 27 Aug 2009 22:00:18 +0000 (22:00 +0000)]
Add __builtin_memchr (used by GNU libstdc++).

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

15 years agoClean up CodeGenFunction::EmitCastLValue to use the cast kind. Error
Eli Friedman [Thu, 27 Aug 2009 21:19:33 +0000 (21:19 +0000)]
Clean up CodeGenFunction::EmitCastLValue to use the cast kind.  Error
out for user-defined conversions instead of crashing.

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

15 years agoFill in Index.h header file and add stubs to implementation file.
Steve Naroff [Thu, 27 Aug 2009 19:51:58 +0000 (19:51 +0000)]
Fill in Index.h header file and add stubs to implementation file.

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

15 years agoFix for PR4794 (instantiating friend class decl); this version shouldn't
Eli Friedman [Thu, 27 Aug 2009 19:11:42 +0000 (19:11 +0000)]
Fix for PR4794 (instantiating friend class decl); this version shouldn't
cause any regressions.

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

15 years agoExtend the exception spec test even further. Now I need to implement this.
Sebastian Redl [Thu, 27 Aug 2009 19:07:16 +0000 (19:07 +0000)]
Extend the exception spec test even further. Now I need to implement this.

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

15 years agoRemove unnecessary include.
Eli Friedman [Thu, 27 Aug 2009 19:02:44 +0000 (19:02 +0000)]
Remove unnecessary include.

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

15 years agoDon't create a junk file in the source directory.
Eli Friedman [Thu, 27 Aug 2009 19:01:37 +0000 (19:01 +0000)]
Don't create a junk file in the source directory.

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

15 years agoBack out bad piece of r80272. Will look at fixing this a different way.
Eli Friedman [Thu, 27 Aug 2009 18:44:04 +0000 (18:44 +0000)]
Back out bad piece of r80272.  Will look at fixing this a different way.

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

15 years agoPR4794: Make instantiating friend class decls not crash.
Eli Friedman [Thu, 27 Aug 2009 18:38:56 +0000 (18:38 +0000)]
PR4794: Make instantiating friend class decls not crash.

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

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