Commit Graph

5972 Commits

Author SHA1 Message Date
Chris Lattner cdceb08ca2 Use raw_ostream to output an unsigned.
llvm-svn: 54973
2008-08-19 04:23:15 +00:00
Ted Kremenek 55a3c78835 Update checker-78.
llvm-svn: 54970
2008-08-19 01:17:30 +00:00
Chris Lattner 5caafe598f add testcase we already handle.
llvm-svn: 54967
2008-08-19 00:58:40 +00:00
Argyrios Kyrtzidis 3bab3d21f9 Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):
Expr
  -> CastExpr
     -> ExplicitCastExpr
     -> ImplicitCastExpr 

llvm-svn: 54955
2008-08-18 23:01:59 +00:00
Chris Lattner 3f4c68b78e proper grammar n stuph
llvm-svn: 54954
2008-08-18 22:51:28 +00:00
Chris Lattner e5d812af59 warn when someone tries to make an array of ObjC interfaces instead of array
of pointers to them.  rdar://4304469

llvm-svn: 54953
2008-08-18 22:49:54 +00:00
Argyrios Kyrtzidis 22fc2665e6 "Remove the 'else' since the code is fallthrough after it." - suggestion by Chris.
llvm-svn: 54952
2008-08-18 22:49:40 +00:00
Ted Kremenek b3c98d3a88 Record arguments in .info file.
llvm-svn: 54947
2008-08-18 20:55:25 +00:00
Daniel Dunbar aa64b7e0a8 Support initialization of incomplete array with zero size (as
extension).

llvm-svn: 54946
2008-08-18 20:28:46 +00:00
Chris Lattner 22361bf422 Fix PR2627, support for Q constraint.
llvm-svn: 54943
2008-08-18 20:05:00 +00:00
Chris Lattner 496acc1815 Several cleanups and tweaks to diagnostics in Sema::ActOnAsmStmt,
no other functionality change.

llvm-svn: 54941
2008-08-18 19:55:17 +00:00
Chris Lattner 7f33544cc7 fix bogus run line.
llvm-svn: 54940
2008-08-18 19:54:48 +00:00
Ted Kremenek 5abf546865 scan-build/ccc-analyzer now also report clang parser failures.
llvm-svn: 54931
2008-08-18 18:38:29 +00:00
Daniel Dunbar 031ace2a6a Make TargetInfo::DescriptionString const (avoid compiler warnings)
llvm-svn: 54928
2008-08-18 18:25:59 +00:00
Daniel Dunbar 309dd7e31a Change test/Makefile to automatically test all subdirs.
llvm-svn: 54923
2008-08-18 18:05:17 +00:00
Daniel Dunbar 5a42754328 Fix test case RUN: line (thanks Argiris)
llvm-svn: 54922
2008-08-18 17:52:17 +00:00
Sanjiv Gupta 14f18f3f91 Allow targets to override description string.
llvm-svn: 54914
2008-08-18 10:05:22 +00:00
Argyrios Kyrtzidis 00441dfcd4 Type::isIntegerType() returns true for types between Bool and LongLong.
Put WChar between them to make it integer type.

llvm-svn: 54882
2008-08-17 13:24:01 +00:00
Chris Lattner 5d1cfa1229 various updates to match r54873 on mainline.
llvm-svn: 54874
2008-08-17 07:19:51 +00:00
Chris Lattner 286e5e6c61 printing with an unspecified dest means to print to stdout.
llvm-svn: 54872
2008-08-17 07:09:08 +00:00
Chris Lattner b52817bff0 don't delete a variable on the stack
llvm-svn: 54871
2008-08-17 07:07:01 +00:00
Chris Lattner 7459c86a29 simplify this code a bit more.
llvm-svn: 54864
2008-08-17 03:54:39 +00:00
Ted Kremenek 87aab6c771 Migrate the retain/release checker to not manage the RefBindings::Factory object
directly, but instead have GRStateManager manage it.

llvm-svn: 54862
2008-08-17 03:20:02 +00:00
Chris Lattner 068529a243 remove global variables for output stream.
llvm-svn: 54861
2008-08-17 03:12:02 +00:00
Ted Kremenek 90d488f724 Migrate GRState::ConstEqTy (map used from tracking constants for symbols) to use the generic data map instead.
llvm-svn: 54860
2008-08-17 03:10:22 +00:00
Ted Kremenek edd9a18050 Added GRStateTrait.h, which includes boilerplate code for creating specializations of GRStateTrait<>.
Modified GRStateTrait<ConstNotEq> in GRState to use the boilerplate in GRStateTrait<> for ImmutableMaps.

llvm-svn: 54859
2008-08-17 02:59:30 +00:00
Chris Lattner b5a92f8648 Switch to shared raw_ostream code instead of having it be clang specific.
This also helps the eventual distcc project.

llvm-svn: 54858
2008-08-17 01:47:12 +00:00
Nico Weber 0b79bfe501 honor EscapeSpaces in 2nd overload of EscapeText()
llvm-svn: 54854
2008-08-16 22:24:33 +00:00
Argyrios Kyrtzidis 3014572ea2 Move the C++ Sema tests into a separate SemaCXX directory.
llvm-svn: 54853
2008-08-16 20:53:59 +00:00
Argyrios Kyrtzidis 2ade39061c Move the type checking that Sema::ActOnCastExpr does into a new Sema::CheckCastTypes function so that it can be reused.
llvm-svn: 54852
2008-08-16 20:27:34 +00:00
Argyrios Kyrtzidis 69af9eebd7 Put (argument)-expression-list parsing in a separate function so that it can be re-used.
llvm-svn: 54851
2008-08-16 20:03:01 +00:00
Argyrios Kyrtzidis 16d63a727e C++ casts, (static_cast. dynamic_cast, etc.) can have postfix-expression pieces.
llvm-svn: 54850
2008-08-16 19:45:32 +00:00
Argyrios Kyrtzidis 37779ade44 Move handling of postfix-expression suffixes out of ParseCXXThis and into ParseCastExpression.
No functionality change, this follows the convention of how postfix-expressions are handled.

llvm-svn: 54849
2008-08-16 19:34:46 +00:00
Nick Lewycky 0fb45f60d5 It's spelt "uninitialized".
llvm-svn: 54848
2008-08-16 17:46:53 +00:00
Nico Weber f1ac2dc883 add missing class declaration
llvm-svn: 54841
2008-08-16 12:36:27 +00:00
Argyrios Kyrtzidis e97dcc1248 Set the SourceRange ending of DeclSpec, when Parser::ParseTypeofSpecifier finishes.
llvm-svn: 54840
2008-08-16 10:21:33 +00:00
Argyrios Kyrtzidis 186a18a4e8 Declarator class considers DeclSpec as immutable; Declarator::getMutableDeclSpec should be used rarely and with care.
Have Declarator accept and use a 'const DeclSpec &', instead of 'DeclSpec &', to make DeclSpec's immutability more explicit.
No functionality change.

llvm-svn: 54839
2008-08-16 09:55:52 +00:00
Daniel Dunbar a94ecd2a0b Add NeXT runtime support for generating methods.
Change CodeGenFunction::EmitParmDecl to take either a ParmVarDecl or an
  ImplicitParamDecl.

Drop hasAggregateLLVMType from CodeGenModule.cpp (use version in
  CodeGenFunction).

Change the Objective-C method generation to use EmitParmDecl for
  implicit parameters.

llvm-svn: 54838
2008-08-16 03:19:19 +00:00
Daniel Dunbar 8bc821ae7c Add CodeGen support for AddrLabelExpr in initializers.
llvm-svn: 54837
2008-08-16 01:41:47 +00:00
Daniel Dunbar a7c8cf6200 Change WarnUnsupported to ErrorUnsupported (in name and in practice).
- We are beyond the point where this shows up often and when it does
   generating miscompiled files is bad.

llvm-svn: 54836
2008-08-16 00:56:44 +00:00
Ted Kremenek ceba6ead45 GRState:
- Remove ConstNotEq from GRState/GRStateManager (!= tracking uses GDM instead).
- GRStateManager now can book-keep "contexts" (e.g., factory objects) for uses
  with data elements stored into the GDM.
- Refactor pretty-printing of states to use GRState::Printer objects
  exclusively. This removed a huge amount of pretty-printing logic from
  GRExprEngine.

CFRefCount
- Simplified some API calls based on refinements to the GDM api.

llvm-svn: 54835
2008-08-16 00:49:49 +00:00
Ted Kremenek 3b977558ce Enhance null-dereference checker test.
llvm-svn: 54834
2008-08-16 00:45:40 +00:00
Daniel Dunbar 7c6d3a7c50 Change ObjCRuntime::LookupClass -> GetClass, and now takes the
ObjCInterfaceDecl.

Change ObjCRuntime::GenerateMessageSendSuper to take the
  ObjCInterfaceDecl for the super class, instead of just its name.

Change EmitObjCMessageExpr to make the right runtime calls for super
  sends in class methods (i.e. a super send with the class object as
  the receiver).

llvm-svn: 54833
2008-08-16 00:25:02 +00:00
Daniel Dunbar bc92f8c9f9 Update Expr::{getIntegerConstantExprValue, isIntegerConstantExpr} to
use default APSInt constructor instead of embedding arbitrary
  constant.

Update OverloadExpr::getNumArgs to use getIntegerConstantExprValue.

Update OverloadExpr::getExpr to be const.

llvm-svn: 54828
2008-08-15 23:29:09 +00:00
Daniel Dunbar fce4be843e Clean up CodeGenModule interface.
- Add CodeGenModule::EmitTopLevelDecl which uses switch on kind
   instead of ugly & slow dyn_cast chains.

 - Drop some simple forwarding methods into the ObjC runtime.

 - Privatize appropriate methods.

llvm-svn: 54827
2008-08-15 23:26:23 +00:00
Daniel Dunbar db0b7f942a Ident class tree in DeclBase properly.
llvm-svn: 54826
2008-08-15 23:18:35 +00:00
Daniel Dunbar 9299250939 Change CGObjCRuntime methods to take appropriate clang Decls.
- This is in prep for implementation class support for the NeXT
   runtime, for which the existing methods don't provide enough
   information (and additionally make too many assumptions about how
   things should be emitted).

llvm-svn: 54824
2008-08-15 22:20:32 +00:00
Daniel Dunbar 2617a3abe6 Infinite loops considered harmful.
- Thanks Thomas

llvm-svn: 54818
2008-08-15 18:29:12 +00:00
Ted Kremenek 093045b011 Updated latest checker build.
llvm-svn: 54808
2008-08-14 23:35:31 +00:00
Ted Kremenek c7138bb0a7 Default initialize only pointers and integer types (for now).
llvm-svn: 54798
2008-08-14 22:11:13 +00:00