Commit Graph

49004 Commits

Author SHA1 Message Date
Ted Kremenek
dfaeaed0f6 Updated checker build.
llvm-svn: 58027
2008-10-23 02:50:14 +00:00
Ted Kremenek
c5092cc061 Temporarily mark this test XFAIL.
llvm-svn: 58024
2008-10-23 01:57:31 +00:00
Ted Kremenek
cc3d18877a Disable warning about potential leaks of returned values until we test it a little more (lots of noise).
llvm-svn: 58021
2008-10-23 01:56:15 +00:00
Zhongxing Xu
e7104dcab6 Added a method to ElementRegion.
llvm-svn: 58020
2008-10-23 01:35:34 +00:00
Douglas Gregor
5c407d9a9b Add support for conversions from a pointer-to-derived to a
pointer-to-base. Also, add overload ranking for pointer conversions
(for both pointer-to-void and derived-to-base pointer conversions).

Note that we do not yet diagnose derived-to-base pointer conversion
errors that stem from ambiguous or inacessible base classes. These
aren't handled during overload resolution; rather, when the conversion
is actually used we go ahead and diagnose the error.

llvm-svn: 58017
2008-10-23 00:40:37 +00:00
Chris Lattner
9246c2c8e1 make this test not depend on how the system header defines memset.
llvm-svn: 58016
2008-10-23 00:24:51 +00:00
Ted Kremenek
b205ff64e7 Update Xcode project. We still get a link error, however, because of an LLVM library that isn't being linked in for CodeGen (will fix).
llvm-svn: 58015
2008-10-23 00:00:24 +00:00
Ted Kremenek
631ff239fc Warn about potentially leaked objects that are returned from methods whose names do not follow the Cocoa Memory Management guidelines.
llvm-svn: 58012
2008-10-22 23:56:21 +00:00
Steve Naroff
9eca18e4ed Fix <rdar://problem/6312683> clang block rewriter:
llvm-svn: 58011
2008-10-22 23:42:04 +00:00
Daniel Dunbar
7f39e2d85a Change create*Pass factory functions to return Pass* instead of
LoopPass*.
 - Although less precise, this means they can be used in clients
   without RTTI (who would otherwise need to include LoopPass.h, which
   eventually includes things using dynamic_cast). This was the
   simplest solution that presented itself, but I am happy to use a
   better one if available.

llvm-svn: 58010
2008-10-22 23:32:42 +00:00
Ted Kremenek
5902794c8c Fix incorrect testing for the end of the both strings in CStrInCStrNoCase. This could cause a read-out-of-bounds error if s2 is smaller than s1.
llvm-svn: 58009
2008-10-22 23:16:52 +00:00
Argyrios Kyrtzidis
1a527ea1e5 Restrict creation of OverloadedFunctionDecl only to C++ (it was getting used for invalid redeclarations on C).
llvm-svn: 58008
2008-10-22 23:08:24 +00:00
Steve Naroff
b0c653a649 Fix <rdar://problem/6311947> clang on xcode (regression): error: use of undeclared identifier 'expandedValue'.
Mea culpa: I introduced this regresson in the following 2 commits: r57529 (10/14), r57841 (10/20).

llvm-svn: 58007
2008-10-22 22:40:28 +00:00
Jim Grosbach
1ecf1fd5c8 remove extraneous #ifdef's
llvm-svn: 58006
2008-10-22 22:27:51 +00:00
Ted Kremenek
a08a05e541 Updated checker build.
llvm-svn: 58005
2008-10-22 21:53:52 +00:00
Douglas Gregor
d8c7476bf3 Remove the GraphWriter-based version of the C++ class inheritance visualization, since it isn't being used and can't handle virtual bases properly
llvm-svn: 58002
2008-10-22 21:25:12 +00:00
Douglas Gregor
dff6a8eeef Added GraphViz visualization of C++ inheritance hierarchies.
Factored the QualTypeOrdering predicate into its own header
(TypeOrdering.h), now that it is used in two places.

llvm-svn: 58001
2008-10-22 21:13:31 +00:00
Argyrios Kyrtzidis
2147e7d88b Now that DeclRefExpr accepts a NamedDecl, use a DeclRefExpr for when a CXXFieldDecl is referenced inside a method.
llvm-svn: 58000
2008-10-22 21:00:29 +00:00
Ted Kremenek
9a96bf22ec Enhance reference-count checker to correctly identify CG "release" functions. This fixes <rdar://problem/6303488>.
llvm-svn: 57997
2008-10-22 20:54:52 +00:00
Steve Naroff
1df62692f2 Fix <rdar://problem/6257675> error: member reference base type ('NSUserDefaults *') is not a structure or union.
Teach Sema::ActOnMemberReferenceExpr() to look through local category implementations associated with the class.

llvm-svn: 57995
2008-10-22 19:16:27 +00:00
Daniel Dunbar
c49d71ea61 Only create the target machine when emitting assembly.
llvm-svn: 57993
2008-10-22 18:29:51 +00:00
Douglas Gregor
29a9247ec2 Add representation of base classes in the AST, and verify that we
don't have duplicated direct base classes.

Seriliazation of base class specifiers is not yet implemented.

llvm-svn: 57991
2008-10-22 17:49:05 +00:00
Daniel Dunbar
254be031df [LLVM up] Get rid of std::ostream usage from Backend.cpp
llvm-svn: 57990
2008-10-22 17:40:45 +00:00
Daniel Dunbar
890d0deb74 Add raw_ostream versions of WriteBitcodeToFile and BitcodeWriterPass.
- The old versions are still hanging around, but should be migrated
   away from.

llvm-svn: 57989
2008-10-22 17:39:14 +00:00
Chris Lattner
720d515ee9 Add support for assembler-with-cpp (preprocessed .S files), patch by
Roman Divacky!

llvm-svn: 57988
2008-10-22 17:29:21 +00:00
Dale Johannesen
f6655a9e79 Remove allocation of unused stack slot.
llvm-svn: 57987
2008-10-22 17:26:06 +00:00
Julien Lerouge
e9de15b88a Fix for PR2881: fix a small leak exposed by valgrind, using a ManagedStatic.
llvm-svn: 57984
2008-10-22 16:30:41 +00:00
Ted Kremenek
7c3a364355 Update server URL for checker build.
llvm-svn: 57981
2008-10-22 15:33:19 +00:00
Douglas Gregor
4b62ec6353 QualType::isMoreQualifiedThan and isAtLeastAsQualifiedAs assert that we
aren't trying to compare with address-space qualifiers (for now).

Clean up handing of DeclRefExprs in Expr::isLvalue and refactor part
of the check into a static DeclCanBeLvalue.

llvm-svn: 57980
2008-10-22 15:04:37 +00:00
Zhongxing Xu
da84f683c8 Add test case for FuncDecl and function pointer variable.
llvm-svn: 57979
2008-10-22 14:39:20 +00:00
Douglas Gregor
e1eb9d8cc4 Implement ranking of standard conversion sequences by their qualification
conversions (e.g., comparing int* -> const int* against 
int* -> const volatile int*); see C++ 13.3.3.2p3 bullet 3.

Add Sema::UnwrapSimilarPointerTypes to simplify the control flow of
IsQualificationConversion and CompareQualificationConversion (and fix
the handling of the int* -> volatile int* conversion in the former).
 

llvm-svn: 57978
2008-10-22 14:17:15 +00:00
Zhongxing Xu
2fbc35443d Add a bunch of getLValue* methods to RegionStore.
llvm-svn: 57977
2008-10-22 13:44:38 +00:00
Gordon Henriksen
e38d542d89 [PR2886] Ignore stderr from ocamlc since it prints unresolvable warnings on some platforms.
llvm-svn: 57976
2008-10-22 12:41:54 +00:00
Gordon Henriksen
9b601a4df8 Regenerate.
llvm-svn: 57975
2008-10-22 12:40:55 +00:00
Gordon Henriksen
2289eb89fb [PR2886] Don't look for ocaml's .opt executables; something in the autoconf/test machinery doesn't handle the period properly.
llvm-svn: 57974
2008-10-22 12:40:40 +00:00
Duncan Sands
8178141378 LegalizeTypes soft-float support for fpow.
llvm-svn: 57973
2008-10-22 11:49:09 +00:00
Duncan Sands
5ee1dde8fa Get this working with LegalizeTypes: (1) don't
assume that i64 has been turned into a BUILD_PAIR
node (when called from LegalizeTypes this hasn't
happened yet) and don't use a vector shuffle mask
with an illegal element type.

llvm-svn: 57972
2008-10-22 11:24:12 +00:00
Torok Edwin
822dcee526 Regenerate configure
llvm-svn: 57971
2008-10-22 09:56:27 +00:00
Argyrios Kyrtzidis
9e50bff478 Unbreak LLVM on the MSVC compiler:
-Bring in int64_t for TableGen/Record.h and TableGen/TGLexer.h
-Define strtoull

llvm-svn: 57970
2008-10-22 09:54:13 +00:00
Duncan Sands
685dcdc896 Use spaces rather than tab.
llvm-svn: 57969
2008-10-22 09:42:14 +00:00
Duncan Sands
578a68a91a Be nice to CellSPU: for this target getSetCCResultType
may return i8, which can result in SELECT nodes for
which the type of the condition is i8, but there are
no patterns for select with i8 condition.  Tweak the
LegalizeTypes logic to avoid this as much as possible.
This isn't a real fix because it is still perfectly
possible to end up with such select nodes - CellSPU
needs to be fixed IMHO.

llvm-svn: 57968
2008-10-22 09:23:20 +00:00
Duncan Sands
01a1c11218 Port from LegalizeDAG the logic to only generate
ADDC/ADDE/SUBC/SUBE if the target supports it.

llvm-svn: 57967
2008-10-22 09:07:29 +00:00
Duncan Sands
a1a388cac3 Add some comments explaining the meaning of a boolean
that is not of type MVT::i1 in SELECT and SETCC nodes.
Relax the LegalizeTypes SELECT condition promotion
sanity checks to allow other condition types than i1.

llvm-svn: 57966
2008-10-22 09:06:24 +00:00
Duncan Sands
4b6b5fcd80 Temporarily allow the operands of a BUILD_VECTOR
to have a different type to the vector element
type.  This should be fairly harmless because in
the past guys like this were being built all over
the place (and were cleaned up when I added this
check).  The reason for relaxing this check is
that it helps LegalizeTypes legalize vector
shuffles: the mask is a BUILD_VECTOR that it is
*not always possible* to legalize while keeping it
a BUILD_VECTOR (vector_shuffle requires the mask
to be a BUILD_VECTOR, as opposed to a vector with
the right vector type).  With this check it is even
harder to legalize the mask - turning the check off
means that LegalizeTypes manages to legalize almost
all vector shuffles encountered in practice.  The
correct solution is to change vector_shuffle to be a
variadic node with the mask built into it as operands.
While waiting for that change, this hack stops the
problem with vector_shuffle from blocking the turning
on of LegalizeTypes.

llvm-svn: 57965
2008-10-22 09:00:33 +00:00
Zhongxing Xu
c5382eae80 Adjust parameter order to more natural one.
llvm-svn: 57964
2008-10-22 09:00:19 +00:00
Zhongxing Xu
c272152919 Exprs of function type is another special case for ImplicitCast.
llvm-svn: 57963
2008-10-22 08:02:16 +00:00
Chris Lattner
35b40f8c2f Fix PR2907 by digging through constant expressions to find FP constants that
are their operands.

llvm-svn: 57956
2008-10-22 04:53:16 +00:00
Douglas Gregor
bc55da5768 Move Sema::GetNonReferenceType to QualType::getNonReferenceType and make it inline
llvm-svn: 57951
2008-10-22 04:14:44 +00:00
Chris Lattner
b795443082 some minor cleanups to ParseObjCTypeName:
1. Remove a bogus assertion, clients other than sema can return a
   null pointer from actions that result in ParseTypeName returning null.
2. Remove dead RParenLoc variable.
3. Simplify control flow handling error conditions.
4. On a major failure, we should skip until ')' not until '}'.

llvm-svn: 57949
2008-10-22 03:52:06 +00:00
Daniel Dunbar
09b4e71e34 Update to use raw_ostream for PrintModulePass.
- Stop playing fast and loose with the std stream.

llvm-svn: 57948
2008-10-22 03:28:13 +00:00