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

15 years agocerr -> errs.
Daniel Dunbar [Sun, 23 Aug 2009 08:52:09 +0000 (08:52 +0000)]
cerr -> errs.

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

15 years agoTests for C++ lex.trigraph, patch by Mats!
Daniel Dunbar [Sun, 23 Aug 2009 08:22:33 +0000 (08:22 +0000)]
Tests for C++ lex.trigraph, patch by Mats!

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

15 years agouse errs() instead of cerr.
Chris Lattner [Sun, 23 Aug 2009 05:57:09 +0000 (05:57 +0000)]
use errs() instead of cerr.

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

15 years agoCMake: Improve installation of Clang
Douglas Gregor [Sun, 23 Aug 2009 05:28:29 +0000 (05:28 +0000)]
CMake: Improve installation of Clang

  - Install clang-cc into libexec
  - Install headers into lib/clang/<version>/include
  - Don't install other clang-based tools (clang-wpa, clang-index, etc.)

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

15 years agoDon't install Clang libraries.
Douglas Gregor [Sun, 23 Aug 2009 05:02:18 +0000 (05:02 +0000)]
Don't install Clang libraries.

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

15 years agoadjust for raw_fd_ostream api change.
Chris Lattner [Sun, 23 Aug 2009 02:59:41 +0000 (02:59 +0000)]
adjust for raw_fd_ostream api change.

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

15 years agoWhoops, comment this out for now. I'll fix it shortly.
Anders Carlsson [Sun, 23 Aug 2009 01:28:08 +0000 (01:28 +0000)]
Whoops, comment this out for now. I'll fix it shortly.

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

15 years agoMore work towards zero-initializing structs that contain member pointers in constant...
Anders Carlsson [Sun, 23 Aug 2009 01:25:01 +0000 (01:25 +0000)]
More work towards zero-initializing structs that contain member pointers in constant expressions.

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

15 years agoRemove the PaddingFields member from CGRecordLayout, it wasn't used anyway.
Anders Carlsson [Sun, 23 Aug 2009 01:01:04 +0000 (01:01 +0000)]
Remove the PaddingFields member from CGRecordLayout, it wasn't used anyway.

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

15 years agoCatch a few more cases of illegal comparisons.
Eli Friedman [Sun, 23 Aug 2009 00:27:47 +0000 (00:27 +0000)]
Catch a few more cases of illegal comparisons.

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

15 years agoEli points out that we really must diagnose "void* > 0" as an extension.
Chris Lattner [Sun, 23 Aug 2009 00:03:44 +0000 (00:03 +0000)]
Eli points out that we really must diagnose "void* > 0" as an extension.
Explicitly add it as an EXTENSION instead of an EXTWARN so that it only
comes out with -pedantic.  Thanks Eli!

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

15 years agoHandle CK_NullToMemberPointer casts in the constant expr emitter.
Anders Carlsson [Sun, 23 Aug 2009 00:02:11 +0000 (00:02 +0000)]
Handle CK_NullToMemberPointer casts in the constant expr emitter.

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

15 years agoChange the constant expression emitter to look at the cast kind for to-union casts.
Anders Carlsson [Sat, 22 Aug 2009 23:54:44 +0000 (23:54 +0000)]
Change the constant expression emitter to look at the cast kind for to-union casts.

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

15 years agoAdd CK_NullToMemberPointer and CK_BaseToDerivedMemberPointer cast kinds. Make -ast...
Anders Carlsson [Sat, 22 Aug 2009 23:33:40 +0000 (23:33 +0000)]
Add CK_NullToMemberPointer and CK_BaseToDerivedMemberPointer cast kinds. Make -ast-dump print out the cast kinds of cast expressions.

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

15 years agoAdd a -fno-elide-constructors option to clang-cc.
Anders Carlsson [Sat, 22 Aug 2009 22:30:33 +0000 (22:30 +0000)]
Add a -fno-elide-constructors option to clang-cc.

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

15 years agoType of a ?: expression whose either expression is a built-in 'id'
Fariborz Jahanian [Sat, 22 Aug 2009 22:27:17 +0000 (22:27 +0000)]
Type of a ?: expression whose either expression is a built-in 'id'
type is 'id' type.

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

15 years agoDon't issue warning on multiple selector found when
Fariborz Jahanian [Sat, 22 Aug 2009 21:13:55 +0000 (21:13 +0000)]
Don't issue warning on multiple selector found when
selector name is for a @selector expression.

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

15 years agoRemoved couple of FIXME comments.
Fariborz Jahanian [Sat, 22 Aug 2009 20:32:44 +0000 (20:32 +0000)]
Removed couple of FIXME comments.

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

15 years agoRemoved -Wundeclared-selector and -Wreadonly-setter-attrs from
Fariborz Jahanian [Sat, 22 Aug 2009 19:24:56 +0000 (19:24 +0000)]
Removed -Wundeclared-selector and -Wreadonly-setter-attrs from
-Wmost group (too noisy). Placed warning on parameter type
misatch between methods in sub and super class under
-Wsuper-class-method-mismatch (also too noisy).

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

15 years agotweak some pointer sema checking stuff (which was added to implement PR4175) to
Chris Lattner [Sat, 22 Aug 2009 18:58:31 +0000 (18:58 +0000)]
tweak some pointer sema checking stuff (which was added to implement PR4175) to
avoid emitting a warning on "someptr > 0".  This is obviously questionable (they
could use != instead) but is reasonable, and the warning "ordered comparison
between pointer and integer" didn't make a ton of sense because 0 is a valid
null pointer constant.

Just silence the warning in this case, it is unlikely to indicate a bug.

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

15 years agoSecond half of, clang, AuroraUX toolchain support.
Edward O'Callaghan [Sat, 22 Aug 2009 01:06:46 +0000 (01:06 +0000)]
Second half of, clang, AuroraUX toolchain support.

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

15 years agoImplement delayed parsing for member function templates. Fixes PR4608.
Douglas Gregor [Sat, 22 Aug 2009 00:34:47 +0000 (00:34 +0000)]
Implement delayed parsing for member function templates. Fixes PR4608.

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

15 years agoUpdated statuc page to reflect recent implementations
Fariborz Jahanian [Sat, 22 Aug 2009 00:18:52 +0000 (00:18 +0000)]
Updated statuc page to reflect recent implementations
of section 12 [special member functions]

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

15 years agoRemove 'AnalysisContext::setDecl()', as we the Decl associated with an
Ted Kremenek [Fri, 21 Aug 2009 23:58:43 +0000 (23:58 +0000)]
Remove 'AnalysisContext::setDecl()', as we the Decl associated with an
AnalysisContext should never change. Along the way, propagate some constness
around.

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

15 years agoConstify LocationContext* (parent) and Stmt* fields in LocationContext.
Ted Kremenek [Fri, 21 Aug 2009 23:39:58 +0000 (23:39 +0000)]
Constify LocationContext* (parent) and Stmt* fields in LocationContext.

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

15 years agoAdd test taking the address of a member function template and converting it to a...
Douglas Gregor [Fri, 21 Aug 2009 23:32:45 +0000 (23:32 +0000)]
Add test taking the address of a member function template and converting it to a member pointer.

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

15 years agoUpdate Clang C++ status to better reflect what is implemented.
Douglas Gregor [Fri, 21 Aug 2009 23:27:46 +0000 (23:27 +0000)]
Update Clang C++ status to better reflect what is implemented.

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

15 years agoRemove 'SelfRegion' field from both BasicStoreManager and RegionStoreManager.
Ted Kremenek [Fri, 21 Aug 2009 23:25:54 +0000 (23:25 +0000)]
Remove 'SelfRegion' field from both BasicStoreManager and RegionStoreManager.
SelfRegion represented the object bound to 'self' (when analyzing Objective-C
methods) upon entry to a method. Having this region stored on the side ignores
the current stack frame that we might be analyzing (among other things), and is
a problem for interprocedural analysis.

For RegionStoreManager, the value for SelfRegion is just lazily created.

For BasicStoreManager, the value for SelfRegion is bound eagerly to 'self', but
no explicit tracking of SelfRegion on the side is made.

As part of this change, remove the restriction in BasicStoreManager that we only
track ivars for 'self'. This shouldn't actually change anything in terms of
precision, and simplifies the logic.

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

15 years agoImplement conversion function templates, along with the ability to use
Douglas Gregor [Fri, 21 Aug 2009 23:19:43 +0000 (23:19 +0000)]
Implement conversion function templates, along with the ability to use
template argument deduction from a conversion function (C++
[temp.deduct.conv]) with implicit conversions.

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

15 years agoCalculate the address point for a vtable better, and start fleshing out the vcall
Mike Stump [Fri, 21 Aug 2009 23:09:30 +0000 (23:09 +0000)]
Calculate the address point for a vtable better, and start fleshing out the vcall
calculations better.

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

15 years agoRefactor instantiation of destructors to use the common CXXMethodDecl
Douglas Gregor [Fri, 21 Aug 2009 22:43:28 +0000 (22:43 +0000)]
Refactor instantiation of destructors to use the common CXXMethodDecl
code, fixing a problem where instantiations of out-of-line destructor
definitions would had the wrong lexical context.

Introduce tests for out-of-line definitions of the constructors,
destructors, and conversion functions of a class template partial
specialization.

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

15 years agoPatch to ir-gen copy assigning array members when synthesizing
Fariborz Jahanian [Fri, 21 Aug 2009 22:34:55 +0000 (22:34 +0000)]
Patch to ir-gen copy assigning array members when synthesizing
a copy assignment operator function.

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

15 years agoAdd LocationContext* field to VarRegion. This is needed for interprocedural analysis.
Ted Kremenek [Fri, 21 Aug 2009 22:28:32 +0000 (22:28 +0000)]
Add LocationContext* field to VarRegion.  This is needed for interprocedural analysis.

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

15 years agoAdd test for out-of-line definition of a conversion function
Douglas Gregor [Fri, 21 Aug 2009 22:23:24 +0000 (22:23 +0000)]
Add test for out-of-line definition of a conversion function

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

15 years agoFix parsing for out-of-line definitions of constructors and
Douglas Gregor [Fri, 21 Aug 2009 22:16:40 +0000 (22:16 +0000)]
Fix parsing for out-of-line definitions of constructors and
destructors of class templates.

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

15 years agoIntroduce support for constructor templates, which can now be declared
Douglas Gregor [Fri, 21 Aug 2009 18:42:58 +0000 (18:42 +0000)]
Introduce support for constructor templates, which can now be declared
and will participate in overload resolution. Unify the instantiation
of CXXMethodDecls and CXXConstructorDecls, which had already gotten
out-of-sync.

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

15 years agoPatch to provide ir-gen support in copying array members
Fariborz Jahanian [Fri, 21 Aug 2009 18:30:26 +0000 (18:30 +0000)]
Patch to provide ir-gen support in copying array members
when synthesizing a copy constructor. Arrays's base element
may have a trivial or non-trivial copy constructor.

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

15 years agoTestcase for a recent checkin.
Mike Stump [Fri, 21 Aug 2009 18:05:02 +0000 (18:05 +0000)]
Testcase for a recent checkin.

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

15 years agoremove a dead warning.
Chris Lattner [Fri, 21 Aug 2009 17:15:06 +0000 (17:15 +0000)]
remove a dead warning.

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

15 years agoArray member construction in prologue of user-declared
Fariborz Jahanian [Fri, 21 Aug 2009 17:09:38 +0000 (17:09 +0000)]
Array member construction in prologue of user-declared
constructors.

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

15 years agoIntroduce getConstantArrayElementCount API and use it in
Fariborz Jahanian [Fri, 21 Aug 2009 16:31:06 +0000 (16:31 +0000)]
Introduce getConstantArrayElementCount API and use it in
construction/destruction of array members.

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

15 years agoFix typo.
Mike Stump [Fri, 21 Aug 2009 15:22:41 +0000 (15:22 +0000)]
Fix typo.

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

15 years agoEagerly bind 'self' to SelfRegion. Thus we do not need to get code decl from
Zhongxing Xu [Fri, 21 Aug 2009 13:25:15 +0000 (13:25 +0000)]
Eagerly bind 'self' to SelfRegion. Thus we do not need to get code decl from
GRStateManager to create the SelfRegion.

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

15 years agoFix commentos
Daniel Dunbar [Fri, 21 Aug 2009 08:24:45 +0000 (08:24 +0000)]
Fix commentos

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

15 years agoFix refacto.
Daniel Dunbar [Fri, 21 Aug 2009 08:22:12 +0000 (08:22 +0000)]
Fix refacto.

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

15 years agoReversing part of 79544.
Sanjiv Gupta [Fri, 21 Aug 2009 04:58:03 +0000 (04:58 +0000)]
Reversing part of 79544.
Need to find a new way to do target specific semanitc checking.

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