]>
granicus.if.org Git - clang/log
Eli Friedman [Thu, 21 Aug 2008 00:13:15 +0000 (00:13 +0000)]
First cut at OS detection, taking advantage of the new generic targets.
This approach allows adding OS-specific targets/defines/etc. without
completely breaking unknown subtargets. No new subtargets yet, although
I plan to add x86-Linux soon. Others can add targets that they use as
needed; adding a new subtarget takes very little code.
Also does some fixups for description strings; a lot of them were
unspecified. I think all the ones I added are correct, but
they're unverified; corrections are welcome.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 20 Aug 2008 23:11:40 +0000 (23:11 +0000)]
Class reorg for PPC; shouldn't be any visible changes unless I messed
up somehow.
This concludes the series of reorg patches for the target
implementations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 20 Aug 2008 22:17:17 +0000 (22:17 +0000)]
Fix a regression from my fix to PR2631. Fixes PR2692.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55083
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 20 Aug 2008 22:07:34 +0000 (22:07 +0000)]
Fix a minor crash-on-invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55082
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 20 Aug 2008 18:02:42 +0000 (18:02 +0000)]
Fix attributes on Obj-C interfaces & methods.
- Drop MethodAttrs parameter to ObjCMethodDecl
- Call ProcessDeclAttributeList for interface & method decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55068
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 20 Aug 2008 17:20:54 +0000 (17:20 +0000)]
Fix URL typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55066
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 20 Aug 2008 17:19:58 +0000 (17:19 +0000)]
Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55065
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 20 Aug 2008 17:08:29 +0000 (17:08 +0000)]
Patch by Zhongxing Xu:
This patch moves some code in GRStateManager::RemoveDeadBindings() to EnvironmentManager::RemoveDeadBindings().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55064
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 20 Aug 2008 16:59:15 +0000 (16:59 +0000)]
Patch by Zhongxing Xu: We should set back the modified ConstEq map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55060
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 20 Aug 2008 07:44:10 +0000 (07:44 +0000)]
Class reorg for ARM. Shouldn't be any visible changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55042
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 20 Aug 2008 07:28:14 +0000 (07:28 +0000)]
Class hierarchy reorg for Sparc architecture. While I was there, I
cleaned it up a bit, including fixing the definition of va_list; this
shouldn't break anything, but anyone using Sparc should watch for
regressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 20 Aug 2008 03:55:42 +0000 (03:55 +0000)]
Fix subtle bug introduced in r54852.
- UsualUnaryConversions takes an Expr *& and may modify its argument,
this broke when it was refactored into Sema::CheckCastTypes. This
meant that we were missing implicit casts in some places.
- Seems pretty sad that this got through our tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55039
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 20 Aug 2008 03:27:00 +0000 (03:27 +0000)]
Re-enable deletion of AST nodes upon completion of ParseAST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 20 Aug 2008 03:26:33 +0000 (03:26 +0000)]
Added ObjCAtDefsFieldDecl to represent FieldDecls created by @defs.
This fixes an ownership issue where FieldDecls could be owned both by an ObjCInterfaceDecl and a RecordDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 20 Aug 2008 02:34:37 +0000 (02:34 +0000)]
Reorganize the class hierarchy for x86 targets; shouldn't have any
visible effects, but this will significantly reduce the amount of
boilerplate code necessary to add subtargets.
If this looks okay, I'll do the rest of the processors (PPC, Sparc, ARM)
soon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55036
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 20 Aug 2008 01:05:41 +0000 (01:05 +0000)]
Fix test failure on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55032
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 20 Aug 2008 00:38:03 +0000 (00:38 +0000)]
Fix some spam from make I accidentally introduced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 20 Aug 2008 00:28:19 +0000 (00:28 +0000)]
Move all Obj-C runtime interaction into CodeGenFunction.
- Drop duplicate (and broken) code for sending messages.
- Add EmitObjCProtocolExpr to CodeGenFunction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55024
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 20 Aug 2008 00:02:01 +0000 (00:02 +0000)]
Get rid of the bogus -depth +0 argument; I really have no clue what the
heck it does on Darwin, but it's not part of POSIX, and the GNU version
of find errors out on it.
On a side note, there are a couple of new failures due to tests
including OS X specific headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 19 Aug 2008 22:24:03 +0000 (22:24 +0000)]
Move store pretty-printing logic inside of StoreManager (previously in GRState).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 19 Aug 2008 16:51:45 +0000 (16:51 +0000)]
Patch by Zhongxing Xu!
This patch extends BasicStoreManager::getInitialStore() to include code that symbolicates input variables.
It also removes redundant handling of ImplicitParamDecl, since it is a subclass of VarDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54993
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 19 Aug 2008 13:04:19 +0000 (13:04 +0000)]
Fix crasher in RewriteObjC::RewriteObjCSynchronizedStmt(). Can't depend on the source locations of the sync expression (since it may have been rewritten.
Fixes <rdar://problem/
6156363 > clang ObjC rewriter: rewriting attached file causes assertion failure: invalid FileID
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54986
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Aug 2008 04:23:15 +0000 (04:23 +0000)]
Use raw_ostream to output an unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54973
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 19 Aug 2008 01:17:30 +0000 (01:17 +0000)]
Update checker-78.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54970
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 19 Aug 2008 00:58:40 +0000 (00:58 +0000)]
add testcase we already handle.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54967
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 18 Aug 2008 23:01:59 +0000 (23:01 +0000)]
Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):
Expr
-> CastExpr
-> ExplicitCastExpr
-> ImplicitCastExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54955
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Aug 2008 22:51:28 +0000 (22:51 +0000)]
proper grammar n stuph
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54954
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Aug 2008 22:49:54 +0000 (22:49 +0000)]
warn when someone tries to make an array of ObjC interfaces instead of array
of pointers to them. rdar://
4304469
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54953
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 18 Aug 2008 22:49:40 +0000 (22:49 +0000)]
"Remove the 'else' since the code is fallthrough after it." - suggestion by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54952
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 18 Aug 2008 20:55:25 +0000 (20:55 +0000)]
Record arguments in .info file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54947
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 18 Aug 2008 20:28:46 +0000 (20:28 +0000)]
Support initialization of incomplete array with zero size (as
extension).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54946
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Aug 2008 20:05:00 +0000 (20:05 +0000)]
Fix PR2627, support for Q constraint.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54943
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Aug 2008 19:55:17 +0000 (19:55 +0000)]
Several cleanups and tweaks to diagnostics in Sema::ActOnAsmStmt,
no other functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54941
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 18 Aug 2008 19:54:48 +0000 (19:54 +0000)]
fix bogus run line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54940
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 18 Aug 2008 18:38:29 +0000 (18:38 +0000)]
scan-build/ccc-analyzer now also report clang parser failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54931
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 18 Aug 2008 18:25:59 +0000 (18:25 +0000)]
Make TargetInfo::DescriptionString const (avoid compiler warnings)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54928
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 18 Aug 2008 18:05:58 +0000 (18:05 +0000)]
Add svn:ignore on lib/Driver/Release-Asserts
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54925
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 18 Aug 2008 18:05:17 +0000 (18:05 +0000)]
Change test/Makefile to automatically test all subdirs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54923
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 18 Aug 2008 17:52:17 +0000 (17:52 +0000)]
Fix test case RUN: line (thanks Argiris)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54922
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Mon, 18 Aug 2008 10:05:22 +0000 (10:05 +0000)]
Allow targets to override description string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54914
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 17 Aug 2008 13:24:01 +0000 (13:24 +0000)]
Type::isIntegerType() returns true for types between Bool and LongLong.
Put WChar between them to make it integer type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54882
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Aug 2008 07:19:51 +0000 (07:19 +0000)]
various updates to match r54873 on mainline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54874
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Aug 2008 07:09:08 +0000 (07:09 +0000)]
printing with an unspecified dest means to print to stdout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54872
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Aug 2008 07:07:01 +0000 (07:07 +0000)]
don't delete a variable on the stack
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Aug 2008 03:54:39 +0000 (03:54 +0000)]
simplify this code a bit more.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54864
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 17 Aug 2008 03:20:02 +0000 (03:20 +0000)]
Migrate the retain/release checker to not manage the RefBindings::Factory object
directly, but instead have GRStateManager manage it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54862
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Aug 2008 03:12:02 +0000 (03:12 +0000)]
remove global variables for output stream.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54861
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 17 Aug 2008 03:10:22 +0000 (03:10 +0000)]
Migrate GRState::ConstEqTy (map used from tracking constants for symbols) to use the generic data map instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54860
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 17 Aug 2008 02:59:30 +0000 (02:59 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54859
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 17 Aug 2008 01:47:12 +0000 (01:47 +0000)]
Switch to shared raw_ostream code instead of having it be clang specific.
This also helps the eventual distcc project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54858
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 16 Aug 2008 22:24:33 +0000 (22:24 +0000)]
honor EscapeSpaces in 2nd overload of EscapeText()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54854
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 16 Aug 2008 20:53:59 +0000 (20:53 +0000)]
Move the C++ Sema tests into a separate SemaCXX directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54853
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 16 Aug 2008 20:27:34 +0000 (20:27 +0000)]
Move the type checking that Sema::ActOnCastExpr does into a new Sema::CheckCastTypes function so that it can be reused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54852
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 16 Aug 2008 20:03:01 +0000 (20:03 +0000)]
Put (argument)-expression-list parsing in a separate function so that it can be re-used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54851
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 16 Aug 2008 19:45:32 +0000 (19:45 +0000)]
C++ casts, (static_cast. dynamic_cast, etc.) can have postfix-expression pieces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54850
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 16 Aug 2008 19:34:46 +0000 (19:34 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54849
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 16 Aug 2008 17:46:53 +0000 (17:46 +0000)]
It's spelt "uninitialized".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54848
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 16 Aug 2008 12:36:27 +0000 (12:36 +0000)]
add missing class declaration
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54841
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 16 Aug 2008 10:21:33 +0000 (10:21 +0000)]
Set the SourceRange ending of DeclSpec, when Parser::ParseTypeofSpecifier finishes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54840
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 16 Aug 2008 09:55:52 +0000 (09:55 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54839
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 16 Aug 2008 03:19:19 +0000 (03:19 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54838
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 16 Aug 2008 01:41:47 +0000 (01:41 +0000)]
Add CodeGen support for AddrLabelExpr in initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54837
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 16 Aug 2008 00:56:44 +0000 (00:56 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54836
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 16 Aug 2008 00:49:49 +0000 (00:49 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54835
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 16 Aug 2008 00:45:40 +0000 (00:45 +0000)]
Enhance null-dereference checker test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54834
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 16 Aug 2008 00:25:02 +0000 (00:25 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 15 Aug 2008 23:29:09 +0000 (23:29 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54828
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 15 Aug 2008 23:26:23 +0000 (23:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54827
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 15 Aug 2008 23:18:35 +0000 (23:18 +0000)]
Ident class tree in DeclBase properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54826
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 15 Aug 2008 22:20:32 +0000 (22:20 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54824
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 15 Aug 2008 18:29:12 +0000 (18:29 +0000)]
Infinite loops considered harmful.
- Thanks Thomas
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54818
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Aug 2008 23:35:31 +0000 (23:35 +0000)]
Updated latest checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54808
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Aug 2008 22:11:13 +0000 (22:11 +0000)]
Default initialize only pointers and integer types (for now).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54798
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 14 Aug 2008 22:04:54 +0000 (22:04 +0000)]
Change Parser & Sema to use interned "super" for comparions.
- Added as private members for each because it is not clear where to
put the common definition. Perhaps the IdentifierInfos all of these
"pseudo-keywords" should be collected into one place (this would
KnownFunctionIDs and Objective-C property IDs, for example).
Remove Token::isNamedIdentifier.
- There isn't a good reason to use strcmp when we have interned
strings, and there isn't a good reason to encourage clients to do
so.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54794
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Aug 2008 21:16:54 +0000 (21:16 +0000)]
Migrated retain/release checker to use the Generic Data Map in GRState (instead
of using CheckerState).
Removed CheckerState from GRState.
Added class GRStateRef which wraps GRState* and GRStateManager*. This is handy
for generating new states with a single handle.
Added member template set/get functions to GRStateRef/GRState/GRStateManager for
accessing the Generic Data Map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54788
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 14 Aug 2008 15:00:38 +0000 (15:00 +0000)]
Fix ASTContext::getObjCEncodingForType() to limit the type info for structure bodies (mimics gcc's adhoc rules).
This fixes <rdar://problem/
6140902 > clang ObjC rewriter: If a class contains a struct ivar with a lot of members, ...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54777
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 14 Aug 2008 04:33:24 +0000 (04:33 +0000)]
Make diagnostics relating to the callee hilight just the callee
and put the caret on the ()'s. e.g. produces:
t.c:13:9: error: called object is not a function or function pointer
((B)a)();
~~~~~~^
instead of:
t.c:13:3: error: called object is not a function or function pointer
((B)a)();
^~~~~~~~
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54775
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 14 Aug 2008 03:45:07 +0000 (03:45 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54774
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 13 Aug 2008 23:47:13 +0000 (23:47 +0000)]
Update some isIntegerConstantExpr uses to use
getIntegerConstantExprValue where appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54771
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 13 Aug 2008 23:28:57 +0000 (23:28 +0000)]
make sure the size of constant arrays is respected
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54769
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 13 Aug 2008 23:20:05 +0000 (23:20 +0000)]
Add GetAddrOfConstantCString method
- Returns addr of constant for argument + '\0'.
- I couldn't think of a better name.
- Move appropriate users of GetAddrOfConstantString to this.
Rename getStringForStringLiteral to GetStringForStringLiteral.
Add GetAddrOfConstantStringFromLiteral
- This combines GetAddrOfConstantString and
GetStringForStringLiteral. This method can be, but is not yet, more
efficient.
Change GetAddrOfConstantString to not add terminating '\0'
- <rdar://problem/
6140956 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54768
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Aug 2008 21:24:49 +0000 (21:24 +0000)]
Renamed GRState::CheckerStatePrinter to GRState::Printer.
Updated checker state printer interface to allow transfer functions to return an arbitrary number of GRState::Printers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Aug 2008 20:59:32 +0000 (20:59 +0000)]
Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54759
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Aug 2008 20:43:54 +0000 (20:43 +0000)]
Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54755
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 13 Aug 2008 16:39:22 +0000 (16:39 +0000)]
Sema::ActOnStartProtocolInterface(): Make sure the protocol decl has a valid start location.
The following case resulted in an invalid start location:
// start location not being set for ObjCProtocolDecl AST (when a forward reference is in scope).
@protocol Buggy;
@protocol Buggy
@optional
- whatever;
@end
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54740
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Aug 2008 04:45:09 +0000 (04:45 +0000)]
Update VS project file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54723
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Aug 2008 04:28:02 +0000 (04:28 +0000)]
Rename ValueState.h -> GRState.h
Rename ValueState.cpp -> GRState.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Aug 2008 04:27:00 +0000 (04:27 +0000)]
Rename ValueState -> GRState.
Rename ValueStateManager -> GRStateManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54721
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Aug 2008 04:12:49 +0000 (04:12 +0000)]
Updated latest checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54720
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Aug 2008 03:55:18 +0000 (03:55 +0000)]
Added test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54717
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Aug 2008 03:28:04 +0000 (03:28 +0000)]
Initialize tracked local variables to undefined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54716
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 13 Aug 2008 03:21:16 +0000 (03:21 +0000)]
Implement Obj-C protocol metadata generation for NeXT.
- Near complete, only properties are missing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54715
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 13 Aug 2008 03:10:52 +0000 (03:10 +0000)]
Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54714
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 13 Aug 2008 00:59:25 +0000 (00:59 +0000)]
Change ObjCRuntime GenerateProtocol[Ref] methods to take
ObjCProtocolDecl directly.
Implement CodeGen support for forward protocol decls (no-ops are so
nice to implement).
Also moved CGObjCRuntime.h out of CodeGenModule.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54709
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Aug 2008 21:49:24 +0000 (21:49 +0000)]
Added GenericDataMap as a component of ValueState.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54704
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Aug 2008 21:05:43 +0000 (21:05 +0000)]
Update VS project files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54701
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Aug 2008 20:41:56 +0000 (20:41 +0000)]
More cleanups. Add missing #include.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54699
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Aug 2008 18:48:50 +0000 (18:48 +0000)]
More summary generation refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54696
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Aug 2008 18:30:56 +0000 (18:30 +0000)]
Add variadic addInstMethSummary() and refactored addPanicSummary() to use this method. (code reduction).
Misc. cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54694
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 12 Aug 2008 18:29:20 +0000 (18:29 +0000)]
Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54693
91177308 -0d34-0410-b5e6-
96231b3b80d8