Steve Naroff
f2a880ca22
Incorporate feedback from Eli.
...
llvm-svn: 68107
2009-03-31 10:29:45 +00:00
Chris Lattner
8b14b98bab
Fix a problem in ASTContext::addRecordToClass handling forward declarations.
...
In a case like:
@class foo;
foo *P;
addRecordToClass was making an empty shadow struct for the foo interface and
completing it. Later when an:
@interface foo
...
@endif
foo *Q;
was seen, ASTContext::addRecordToClass would think that foo was already laid
out and not lay out the definition. This fixes it to create a forward declared
struct the first time around, then complete it when the definition is seen.
Note that this causes two tests to regress, because something is trying to get
the size of the forward declared structs returned by this. Previously, this
would end up getting a size of zero but now it properly dies. I'm not sure
what the right solution is for this, so I xfailed the tests.
Fariborz, please take a look at this. The testcase in rdar://6676794 now gets
farther, but dies later because the objc ivar is not assigned a field number.
As an aside, I really don't like the fact that the objc front-end is creating
shadow C structs for ObjC types. This seems like an implementation detail of
the code generator that could be fixed by better factoring of the extant code.
llvm-svn: 68106
2009-03-31 09:24:30 +00:00
Chris Lattner
05aa49128c
remove a dead prototype
...
llvm-svn: 68105
2009-03-31 09:07:15 +00:00
Chris Lattner
733dc19be6
remove the warning. We don't control what users do, and this code
...
is run for perfectly reasonable things like NSString* because type
layout is recursive.
llvm-svn: 68104
2009-03-31 09:04:50 +00:00
Chris Lattner
6d35cc945f
disable copying of Type objects.
...
llvm-svn: 68103
2009-03-31 08:58:42 +00:00
Chris Lattner
3e2f36e905
do not *copy* objc interface types, just use their reference.
...
llvm-svn: 68102
2009-03-31 08:55:07 +00:00
Chris Lattner
5b36ddb1ad
fill in temporary smallvectors instead of vectors for performance.
...
Fix BuildAggrIvarLayout to not access vectors out of range.
llvm-svn: 68101
2009-03-31 08:48:01 +00:00
Chris Lattner
d8a47c42cd
simplify some casting
...
llvm-svn: 68098
2009-03-31 08:36:08 +00:00
Chris Lattner
06ae0e2c3b
small cleanups.
...
llvm-svn: 68095
2009-03-31 08:33:16 +00:00
Chris Lattner
f71b69f7f3
add a const version of the lookupFieldDeclForIvar method.
...
llvm-svn: 68094
2009-03-31 08:31:13 +00:00
Chris Lattner
fe4847e331
reduce nesting.
...
llvm-svn: 68091
2009-03-31 08:18:48 +00:00
Chris Lattner
5d68896c7b
Codegen sometimes crashes on comparisons that aren't legal, just
...
disable this feature for now, to err on the side of rejecting instead
of sometimes crashing. rdar://6326239
llvm-svn: 68088
2009-03-31 07:46:52 +00:00
Anders Carlsson
dafd621b22
Check in test for namespace aliases+using directives.
...
llvm-svn: 68086
2009-03-31 05:47:19 +00:00
Anders Carlsson
10b9f81eaf
Document NamespaceAliasDecl.
...
llvm-svn: 68085
2009-03-31 04:51:13 +00:00
Ted Kremenek
f0ec333fc1
Update test case.
...
llvm-svn: 68084
2009-03-31 03:34:38 +00:00
Douglas Gregor
b67535d1b6
Parsing and AST representation for dependent template names that occur
...
within nested-name-specifiers, e.g., for the "apply" in
typename MetaFun::template apply<T1, T2>::type
At present, we can't instantiate these nested-name-specifiers, so our
testing is sketchy.
llvm-svn: 68081
2009-03-31 00:43:58 +00:00
Fariborz Jahanian
b35b4a9b42
fe support for objc2's nonfragile-abi synthesized ivars.
...
llvm-svn: 68077
2009-03-31 00:06:29 +00:00
Steve Naroff
7b753d21b5
Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller has graciously offered to write some test to help validate UCN support.
...
From a front-end perspective, I believe this code should work for ObjC @-strings. At the moment, I believe we need to tweak the code generation for @-strings (which doesn't appear to handle them). Will be investigating.
llvm-svn: 68076
2009-03-30 23:46:03 +00:00
Eli Friedman
29f80c343b
Slight generalization for Evaluate with const variables.
...
llvm-svn: 68075
2009-03-30 23:39:01 +00:00
Douglas Gregor
dc572a3266
Improve the representation of template names in the AST. This
...
representation handles the various ways in which one can name a
template, including unqualified references ("vector"), qualified
references ("std::vector"), and dependent template names
("MetaFun::template apply").
One immediate effect of this change is that the representation of
nested-name-specifiers in type names for class template
specializations (e.g., std::vector<int>) is more accurate. Rather than
representing std::vector<int> as
std::(vector<int>)
we represent it as
(std::vector)<int>
which more closely follows the C++ grammar.
Additionally, templates are no longer represented as declarations
(DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new
OpaquePtr type (TemplateTy) that holds the representation of a
TemplateName. This will simplify the handling of dependent
template-names, once we get there.
llvm-svn: 68074
2009-03-30 22:58:21 +00:00
Ted Kremenek
89cc8ea794
Add partial CFG support for Objective-C exception-handling blocks. We basically
...
assume that @catch blocks are never executed.
llvm-svn: 68072
2009-03-30 22:29:21 +00:00
Ted Kremenek
7857bd2743
Re-apply 68028. The code had drifted enough that the tests would fail without
...
it. Will discuss offline whether symbolic regions should by typed or typeless.
llvm-svn: 68070
2009-03-30 22:20:54 +00:00
Daniel Dunbar
cbe5b2f800
Comment fix.
...
llvm-svn: 68069
2009-03-30 22:11:38 +00:00
Ted Kremenek
5715393da2
Revert 68028.
...
llvm-svn: 68068
2009-03-30 21:56:17 +00:00
Fariborz Jahanian
6683b8a272
Added new info to property impl. AST node to support
...
objc2's ivar synthesis.
llvm-svn: 68064
2009-03-30 21:33:50 +00:00
Ted Kremenek
3cd88e5d99
Remove dead code.
...
llvm-svn: 68063
2009-03-30 21:27:41 +00:00
Eli Friedman
1a4029c5df
Implement -Wno-pointer-sign.
...
llvm-svn: 68062
2009-03-30 21:19:48 +00:00
Daniel Dunbar
e24297c6b5
Driver: Sketch FreeBSD tool chain.
...
- Patch by Ed Schouten!
llvm-svn: 68061
2009-03-30 21:06:03 +00:00
Fariborz Jahanian
ed308a94da
Code gen does not yet supports __asm__ on a variable
...
declaration. Reject it.
llvm-svn: 68058
2009-03-30 20:32:06 +00:00
Ted Kremenek
ac508988a5
Simplify more code by using SVal::getAsSymbol().
...
llvm-svn: 68052
2009-03-30 19:53:37 +00:00
Ted Kremenek
248fd2bc24
Simplify more code by using SVal::getAsSymbol() instead of
...
loc::SymbolVal/nonloc::SymbolVal probing.
llvm-svn: 68049
2009-03-30 18:45:36 +00:00
Ted Kremenek
a53eb7fa80
Convert use of loc::SymbolVal and nonloc::SymbolVal to V.getAsSymbol(). This
...
also makes this code more correct as it transparently handles SVals that wrapped
TypedViewRegions(SymbolicRegions).
llvm-svn: 68048
2009-03-30 18:39:15 +00:00
Ted Kremenek
cf2d8f0404
Add another uninitialized values test case illustrating that the CFG correctly
...
handles declarations with multiple variables.
llvm-svn: 68046
2009-03-30 18:29:27 +00:00
Douglas Gregor
b9a1d3fd44
Remove a trivial FIXME
...
llvm-svn: 68045
2009-03-30 18:22:51 +00:00
Daniel Dunbar
13357aef14
Driver: Unbreak ArgList::hasFlag.
...
- <rdar://problem/6726511> [driver] clang does not have -msoft-float
hooked up.
llvm-svn: 68044
2009-03-30 18:13:26 +00:00
Fariborz Jahanian
3b636c15e0
Use CodeGenModule API for ObjC runtime function references.
...
Patch by David Chisnall.
llvm-svn: 68043
2009-03-30 18:02:14 +00:00
Daniel Dunbar
759b1c9b80
Fix -MD with no -MT when -o is specified (and fix test case).
...
llvm-svn: 68042
2009-03-30 17:59:58 +00:00
Ted Kremenek
4967c8979e
Add version of GRExprEngine::AddCheck that registered a GRSimpleAPICheck that
...
will be called for every expression in a basic block.
llvm-svn: 68041
2009-03-30 17:53:05 +00:00
Daniel Dunbar
1cd3f8c54f
Some very rough Driver documentation.
...
llvm-svn: 68030
2009-03-30 06:50:01 +00:00
Daniel Dunbar
a88692df30
Missed test case update (part of previous commit)
...
llvm-svn: 68029
2009-03-30 06:49:40 +00:00
Zhongxing Xu
5415b207e3
Make SymbolicRegion untyped.
...
Layer the type information with a TypedViewRegion on top of the SymbolicRegion.
llvm-svn: 68028
2009-03-30 06:48:56 +00:00
Daniel Dunbar
d67a32252c
Driver: Support -M and -MM.
...
- Not particularly elegant, but my hand is forced by gcc.
Also, tweak -ccc-print-bindings output.
llvm-svn: 68027
2009-03-30 06:36:42 +00:00
Zhongxing Xu
a865b79f87
Implement a FIXME.
...
llvm-svn: 68024
2009-03-30 05:55:46 +00:00
Daniel Dunbar
52e96cc932
Improve dependency file support.
...
- Rip out various bits of logic from clang-cc's dependency file gen,
force driver to provide instead.
- -MD output now goes to proper location
<rdar://problem/6723948> clang -MD puts dep file in /tmp with wrong name
- -M and -MM still don't work correctly.
llvm-svn: 68022
2009-03-30 00:34:04 +00:00
Sebastian Redl
f69a94aace
Hopefully fix the rval regressions. Thanks to Chris for pointing out that valgrind complains.
...
llvm-svn: 68021
2009-03-29 22:46:24 +00:00
Daniel Dunbar
53b406f40a
Driver: Track which original arguments an arg is derived from, so that
...
we can properly claim arguments, even if they have been translated by
the tool chain.
llvm-svn: 68020
2009-03-29 22:29:05 +00:00
Daniel Dunbar
f64f5307dc
Driver: Add test case for darwin::Preprocess and darwin::Compile
...
tools, and enable them.
llvm-svn: 68019
2009-03-29 22:27:40 +00:00
Daniel Dunbar
58399aecc1
Driver: Make sure to claim -### before emitting "unused argument"
...
warnings.
llvm-svn: 68018
2009-03-29 22:24:54 +00:00
Daniel Dunbar
e2ad1c2159
Fix typo in diagnostic.
...
llvm-svn: 68017
2009-03-29 22:23:49 +00:00
Eli Friedman
32ca82a450
Fix the default for intptr_t on *BSD x86-32 and Windows. Slight cleanup
...
by moving the general case to the generic x86-32 target.
llvm-svn: 68015
2009-03-29 20:31:09 +00:00
Daniel Dunbar
afec1f58e9
Driver: Finish porting Darwin::Preprocess and Compile port (still
...
unused, and lacking a test case).
- ccc is now on death row, pending some more testing and bug fixes.
llvm-svn: 68012
2009-03-29 18:40:18 +00:00
Chris Lattner
be36eb0570
minor simplification
...
llvm-svn: 68011
2009-03-29 17:29:28 +00:00
Chris Lattner
32dc41c445
hoist some code for handling objc foreach construct out of Declaration processing
...
into ParseForStatement. Merge two tests into one.
llvm-svn: 68010
2009-03-29 17:27:48 +00:00
Chris Lattner
efb0f111f1
hoist checks for ; and in out of ParseInitDeclaratorListAfterFirstDeclarator
...
into ParseSimpleDeclaration, and improve a diagnostic.
llvm-svn: 68009
2009-03-29 17:18:04 +00:00
Daniel Dunbar
e6adeeece3
Driver: Start porting Darwin::Preprocess and Compile implementations
...
(currently unused).
llvm-svn: 68003
2009-03-29 17:08:39 +00:00
Chris Lattner
5bbb3c8ad9
Push DeclGroup much farther throughout the compiler. Now the various
...
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.
This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc). These have been
fixed.
Still TODO:
1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.
I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.
llvm-svn: 68002
2009-03-29 16:50:03 +00:00
Chris Lattner
6c84a5a394
DeclRefExpr refers to one decl, not all the declarators in a declaration.
...
Ted, please check this, this change causes no regression tests to fail.
llvm-svn: 68001
2009-03-29 16:35:09 +00:00
Chris Lattner
3d954d5d0e
simplify
...
llvm-svn: 68000
2009-03-29 16:04:50 +00:00
Sebastian Redl
4c0cd856b1
Reintroduce r67870 (rval ref overloading), since I can't reproduce any test failures on i386 or x86_64. If this fails for someone, please contact me.
...
llvm-svn: 67999
2009-03-29 15:27:50 +00:00
Chris Lattner
41b1601bdd
Implement PointerLikeTypeTraits for DeclGroupRef.
...
Make OpaquePtr work with things that are pointer-like but not
necessarily pointers.
llvm-svn: 67998
2009-03-29 14:23:52 +00:00
Chris Lattner
4de55aa4f2
reduce indentation with an early exit.
...
llvm-svn: 67997
2009-03-29 14:02:43 +00:00
Chris Lattner
87576f3639
remove unused #include
...
llvm-svn: 67994
2009-03-29 07:05:59 +00:00
Chris Lattner
63595ddcb5
switch TemplateOrInstantiation to be a PointerUnion, which
...
simplifies some code.
llvm-svn: 67993
2009-03-29 07:03:59 +00:00
Chris Lattner
51ce02d264
change another PointerIntPair into a PointerUnion.
...
llvm-svn: 67991
2009-03-29 06:43:22 +00:00
Chris Lattner
b81eb052f2
switch DeclBase::DeclCtx to the new happy and type-safe
...
llvm::PointerUnion class.
llvm-svn: 67988
2009-03-29 06:06:59 +00:00
Chris Lattner
57ce399326
Make the ActionResult optimization work for non-void*'s and switch DeclPtrTy to use it.
...
llvm-svn: 67983
2009-03-29 05:08:48 +00:00
Chris Lattner
cd8bb18624
genericize the ActionResult optimization for holding the "ininvalid" bit
...
in the low bit position a little bit (haha).
llvm-svn: 67982
2009-03-29 05:04:26 +00:00
Chris Lattner
85e2e141db
various cleanups
...
llvm-svn: 67981
2009-03-29 05:01:10 +00:00
Chris Lattner
20d79aa1c2
adjust to llvm mainline changes.
...
llvm-svn: 67980
2009-03-29 04:32:54 +00:00
Chris Lattner
114597d69b
tighten this up, the decl *must* be a declcontext, no need for the dynamic check.
...
llvm-svn: 67978
2009-03-29 04:30:19 +00:00
Chris Lattner
59f1a41f2e
add fixme
...
llvm-svn: 67977
2009-03-29 01:03:29 +00:00
Ted Kremenek
42361b3eb5
Update checker build.
...
llvm-svn: 67976
2009-03-29 00:43:39 +00:00
Chris Lattner
ed6b4b0598
add getNumLowBitsAvailable for OpaquePtr and QualType.
...
llvm-svn: 67975
2009-03-29 00:41:20 +00:00
Chris Lattner
22d059dbde
follow llvm mainline, where PointerLikeTypeInfo got renamed
...
to PointerLikeTypeTraits.
llvm-svn: 67974
2009-03-29 00:39:47 +00:00
Ted Kremenek
554b5370e4
scan-build: Also look for clang-cc in ../libexec
...
llvm-svn: 67972
2009-03-29 00:31:32 +00:00
Eli Friedman
bbcf49e410
Initial implementation of ARM ABI. Mostly untested. Note that I'm not
...
really intending to take ownership of this; I wrote this mostly because
I was curious about how the ARM ABI works. It should be a decent start,
though.
llvm-svn: 67969
2009-03-29 00:15:25 +00:00
Chris Lattner
a59a3e2d10
QualType can go in SmallPtrSet now, simplify code that used to have
...
to work around this.
llvm-svn: 67968
2009-03-29 00:04:01 +00:00
Chris Lattner
5ab14f5175
implement the PointerLikeTypeInfo trait for QualType, allowing
...
it to be stuck into a SmallPtrSet.
llvm-svn: 67967
2009-03-29 00:03:08 +00:00
Anders Carlsson
bb1e4724f1
More improvements to namespace aliases. We now support everything except aliases in using directives.
...
llvm-svn: 67966
2009-03-28 23:53:49 +00:00
Anders Carlsson
c8820e5f9f
Handle the case where the namespace decl is an alias.
...
llvm-svn: 67965
2009-03-28 23:50:18 +00:00
Anders Carlsson
3694935cd2
Fix lookup bug
...
llvm-svn: 67964
2009-03-28 23:49:35 +00:00
Anders Carlsson
f03bb51a00
Let getIdentifierNamespaceForKind know about aliases and have it treat them just like namespace decls.
...
llvm-svn: 67963
2009-03-28 23:02:53 +00:00
Anders Carlsson
ff25fdf2fb
Create AST nodes for namespace aliases.
...
llvm-svn: 67962
2009-03-28 22:58:02 +00:00
Anders Carlsson
47952aec09
Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change.
...
llvm-svn: 67961
2009-03-28 22:53:22 +00:00
Ted Kremenek
035cf930d5
Fix regression in pointer comparison with NULL (e.g., 0 != ptr). This fixes
...
<rdar://problem/6732151>.
llvm-svn: 67954
2009-03-28 19:59:33 +00:00
Chris Lattner
83f095cc7e
Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
...
pointer. Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.
Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the
entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.
We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.
The one outstanding known problem with this patch is that we lose the
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy. I will rectify
this with a subsequent patch.
llvm-svn: 67952
2009-03-28 19:18:32 +00:00
Chris Lattner
b7de9b7704
sort alphabetically
...
llvm-svn: 67951
2009-03-28 19:10:22 +00:00
Ted Kremenek
b505811250
Adjust control-flow endpoints for '&&' and '||'.
...
llvm-svn: 67948
2009-03-28 17:33:57 +00:00
Ted Kremenek
ae1c4a40ef
Add comparison operators for PathDiagosticLocation.
...
llvm-svn: 67947
2009-03-28 17:33:08 +00:00
Ted Kremenek
04ab6c8b17
Add comparison operators for SourceRange.
...
llvm-svn: 67946
2009-03-28 17:32:39 +00:00
Cedric Venet
351c71a85f
CMake: remove TranslationUnit.cpp from build (file has been removed).
...
llvm-svn: 67944
2009-03-28 12:41:49 +00:00
Chris Lattner
8372efd39a
move file to proper place.
...
llvm-svn: 67933
2009-03-28 08:04:44 +00:00
Anders Carlsson
b81608499e
As Eli pointed out, it is possible that a namespace lookup is ambiguous!
...
llvm-svn: 67932
2009-03-28 07:51:31 +00:00
Chris Lattner
a3d4aeb113
add accessors.
...
llvm-svn: 67929
2009-03-28 07:00:38 +00:00
Chris Lattner
6b6185b18f
some random cleanups
...
llvm-svn: 67928
2009-03-28 06:53:40 +00:00
Chris Lattner
e173d44137
eliminate unneeded iterator wrappers.
...
llvm-svn: 67927
2009-03-28 06:47:16 +00:00
Chris Lattner
330958e9b0
change NamespaceDecl to hold its 'NextNamespace' pointer itself
...
instead of in NextDeclarator. This temporarily increases memory
usage, but simplifies and decouples things.
llvm-svn: 67926
2009-03-28 06:44:59 +00:00
Anders Carlsson
ac2c96528f
Check that the alias points to a valid namespace.
...
llvm-svn: 67925
2009-03-28 06:42:02 +00:00
Ted Kremenek
ae1aa43617
Properly escape special characters in <string>'s in plist file.
...
llvm-svn: 67924
2009-03-28 06:40:54 +00:00
Chris Lattner
529efc74ad
rename some methods.
...
llvm-svn: 67923
2009-03-28 06:33:19 +00:00
Chris Lattner
23b88b73e1
Cleanups for DeclGroup.
...
llvm-svn: 67922
2009-03-28 06:26:18 +00:00
Anders Carlsson
dca83c4676
Check that the namespace alias doesn't conflict with a previous declaration in this scope.
...
llvm-svn: 67921
2009-03-28 06:23:46 +00:00
Chris Lattner
2f14ce0a74
tidy whitespace.
...
llvm-svn: 67920
2009-03-28 06:13:37 +00:00
Chris Lattner
fcd33a68e4
rename NextDeclInScope to NextDeclInContext, since the pointer
...
points within contexts not scopes.
llvm-svn: 67919
2009-03-28 06:04:26 +00:00
Chris Lattner
b129e28d11
simplify getNextDeclInScope
...
llvm-svn: 67918
2009-03-28 05:59:45 +00:00
Chris Lattner
c0c3dffa3d
reduce indentation, no functionality change.
...
llvm-svn: 67916
2009-03-28 05:44:17 +00:00
Anders Carlsson
9205d55390
Add an ActOnNamespaceAliasDef action and have the parser call it.
...
llvm-svn: 67915
2009-03-28 05:27:17 +00:00
Chris Lattner
1ad4eeb9c7
remove TranslationUnit.
...
llvm-svn: 67914
2009-03-28 04:31:31 +00:00
Chris Lattner
a5adead17b
push more ASTContext goodness out through interfaces that use
...
TranslationUnit
llvm-svn: 67913
2009-03-28 04:27:18 +00:00
Anders Carlsson
72f307a26e
Revert Sebastian's rvalue patch (r67870) since it caused test failures in
...
SemaCXX//overload-member-call.cpp
SemaCXX//overloaded-operator.cpp
SemaTemplate//instantiate-method.cpp
llvm-svn: 67912
2009-03-28 04:17:27 +00:00
Chris Lattner
66918ee148
remove TranslationUnit from ParseAST.
...
llvm-svn: 67911
2009-03-28 04:13:34 +00:00
Chris Lattner
cf16983179
change HandleTranslationUnit to take an ASTContext instead of TranslationUnit
...
llvm-svn: 67910
2009-03-28 04:11:33 +00:00
Ted Kremenek
cd58cced81
Text PathDiagnosticBuilder::getEnclosingStmt() about '?'
...
llvm-svn: 67909
2009-03-28 04:08:14 +00:00
Anders Carlsson
1894f0d499
Parse namespace aliases.
...
llvm-svn: 67908
2009-03-28 04:07:16 +00:00
Chris Lattner
040d4570c7
remove dead ivar.
...
llvm-svn: 67907
2009-03-28 04:05:05 +00:00
Chris Lattner
d070278ec9
simplify away some dead ownership stuff, TranslationUnit is now
...
just a wrapper around ASTContext.
llvm-svn: 67906
2009-03-28 04:00:23 +00:00
Chris Lattner
edf7eb77cf
hoist TranslationUnit some more.
...
llvm-svn: 67905
2009-03-28 03:56:54 +00:00
Chris Lattner
96c339a661
eliminate some wrappers.
...
llvm-svn: 67904
2009-03-28 03:53:02 +00:00
Chris Lattner
f7d9e2ba1c
eliminate ReadASTBitcodeFile
...
llvm-svn: 67903
2009-03-28 03:49:26 +00:00
Chris Lattner
d286851b57
move serialization logic from TranslationUnit to ASTContext.
...
llvm-svn: 67902
2009-03-28 03:45:20 +00:00
Ted Kremenek
b9411565ea
Teach PathDiagnosticBuilder::getEnclosingStmtLocation() about while/if/do/for,
...
etc., so that the "body" is always considered a top-level statement for edge
transitions (even if it is an expression).
llvm-svn: 67901
2009-03-28 03:37:59 +00:00
Chris Lattner
a0b08dcd6b
don't poke at TranslationUnit directly
...
llvm-svn: 67900
2009-03-28 03:29:40 +00:00
Eli Friedman
754d5ac658
Trivial cleanup.
...
llvm-svn: 67899
2009-03-28 03:27:06 +00:00
Eli Friedman
09a9b6e335
Move where block-related variables are initialized so that block
...
types don't get generated when blocks aren't used.
llvm-svn: 67898
2009-03-28 03:24:54 +00:00
Eli Friedman
7c7a0e86ae
Fix silly mistake in test.
...
llvm-svn: 67897
2009-03-28 03:14:28 +00:00
Eli Friedman
9127aa1caf
Minor cleanup.
...
llvm-svn: 67896
2009-03-28 03:10:45 +00:00
Eli Friedman
e381f7e3e9
Misc small fixes/cleanups/comment changes.
...
llvm-svn: 67895
2009-03-28 02:45:41 +00:00
Chris Lattner
5cf49fe587
eliminate ASTConsumer::InitializeTU, all clients are
...
happy with just ASTContext, they don't need a TU.
llvm-svn: 67894
2009-03-28 02:18:25 +00:00
Chris Lattner
8671ca9d97
revert mike's patch which broke test/CodeGen/no-common.c.
...
llvm-svn: 67893
2009-03-28 02:12:08 +00:00
Chris Lattner
a6f4ca2b6f
remove TranslationUnit::OwnsDecls, which is only set, never read.
...
llvm-svn: 67891
2009-03-28 01:44:40 +00:00
Chris Lattner
84bcc4795e
simplify ParseAST by sucking -disable-free handling logic up into
...
clang.cpp
llvm-svn: 67890
2009-03-28 01:37:17 +00:00
Eli Friedman
8b7b1b1aee
Change compound assignment operators to keep track of both the promoted
...
LHS type and the computation result type; this encodes information into
the AST which is otherwise non-obvious. Fix Sema to always come up with the
right answer for both of these types. Fix IRGen and the analyzer to
account for these changes. This fixes PR2601. The approach is inspired
by PR2601 comment 2.
Note that this changes real *= complex in CodeGen from a silent
miscompilation to an explicit error.
I'm not really sure that the analyzer changes are correct, or how to
test them... someone more familiar with the analyzer should check those
changes.
llvm-svn: 67889
2009-03-28 01:22:36 +00:00
Anders Carlsson
0cb4cc106c
Implement access checking for protected base classes.
...
llvm-svn: 67887
2009-03-28 01:09:05 +00:00
Chris Lattner
2b9e7efccd
move StatListener out to top level.
...
llvm-svn: 67886
2009-03-28 00:55:35 +00:00
Douglas Gregor
5c7c9cb678
Make our diagnostics about the obsolete GNU designated-initializer
...
syntax into extension warnings, and provide code-modification hints
showing how to fix the problem.
llvm-svn: 67885
2009-03-28 00:41:23 +00:00
Chris Lattner
a94d139a1f
various cleanups, no functionality change
...
llvm-svn: 67883
2009-03-28 00:16:20 +00:00
Douglas Gregor
c741fb15a5
Better way to free NestedNameSpecifiers. Thanks, Chris
...
llvm-svn: 67880
2009-03-27 23:54:10 +00:00
Douglas Gregor
8aa6bf5b8e
Fix <rdar://problem/6724396>, where we were silently dropping
...
GNU-style array designators, causing us to emit broken initializers.
llvm-svn: 67878
2009-03-27 23:40:29 +00:00
Douglas Gregor
6fcec66525
Perform a very, very ugly song-and-dance number to free the
...
NestedNameSpecifiers without causing problems for the FoldingSet that
contains them.
llvm-svn: 67877
2009-03-27 23:25:45 +00:00
Devang Patel
afc1c1d405
Do not emit debug information for variables while generating optimized code. The llvm optimizer and code generator are not yet ready to support optimized code debugging.
...
llvm-svn: 67876
2009-03-27 23:16:32 +00:00
Douglas Gregor
333489bba3
Initial implementation of parsing, semantic analysis, and template
...
instantiation for C++ typename-specifiers such as
typename T::type
The parsing of typename-specifiers is relatively easy thanks to
annotation tokens. When we see the "typename", we parse the
typename-specifier and produce a typename annotation token. There are
only a few places where we need to handle this. We currently parse the
typename-specifier form that terminates in an identifier, but not the
simple-template-id form, e.g.,
typename T::template apply<U, V>
Parsing of nested-name-specifiers has a similar problem, since at this
point we don't have any representation of a class template
specialization whose template-name is unknown.
Semantic analysis is only partially complete, with some support for
template instantiation that works for simple examples.
llvm-svn: 67875
2009-03-27 23:10:48 +00:00
Ted Kremenek
8f5ec29b91
Add missing header file change.
...
llvm-svn: 67871
2009-03-27 22:00:38 +00:00
Sebastian Redl
ec74096050
Better overload resolution for rvalue references.
...
llvm-svn: 67870
2009-03-27 21:36:42 +00:00
Ted Kremenek
7a621b9747
BugReporter: For control-flow edges from 'if', 'for', 'do', 'while' to
...
successor, using 'getEnclosingStmt()' to have the end location be the top-level
Stmt* enclosing the target Expr*.
llvm-svn: 67869
2009-03-27 21:16:25 +00:00
Eli Friedman
7044b76707
Finish off semantic analysis for regparm, and remove the warning. Also
...
remove a redundant error in CodeGen.
llvm-svn: 67868
2009-03-27 21:06:47 +00:00
Eli Friedman
6ecb5afcd6
Fix test failures caused by reading memory after freeing it. My fix is
...
rather nasty, but I can't think of a better fix off the top of my head.
llvm-svn: 67867
2009-03-27 20:56:17 +00:00
Ted Kremenek
41d865cbaa
BugReporter: PathDiagnosticBuilder::ExecutionContinues now returns a
...
PathDiagnosticLocation.
llvm-svn: 67866
2009-03-27 20:55:39 +00:00
Chris Lattner
8e097198fc
minor cleanups: make getIdentifierNamespace() be a single load
...
instead of a load + large inlined switch.
llvm-svn: 67864
2009-03-27 20:18:19 +00:00
Mike Stump
e5fdfd5930
Fixup -fcommon and -fno-common to be more gcc compatible.
...
llvm-svn: 67863
2009-03-27 20:15:22 +00:00
Chris Lattner
17a1bfa9d8
reduce # const_casts, no functionality change.
...
llvm-svn: 67861
2009-03-27 19:19:59 +00:00