Chris Lattner
9e2aafea38
move a few methods, no other change.
...
llvm-svn: 52878
2008-06-29 00:23:49 +00:00
Chris Lattner
c4ecec545e
handle type attributes when converting types, not when processing decls.
...
llvm-svn: 52877
2008-06-29 00:19:33 +00:00
Chris Lattner
58418ffa32
Make ProcessDeclAttributes walk the declarator structure pulling
...
decl attributes out of the various places they can hide. This makes
us correctly reject things like this:
t.c:2:22: error: mode attribute only supported for integer and floating-point types
int **__attribute((mode(HI)))* i32;
^
because you can't make a pointer be HImode.
llvm-svn: 52876
2008-06-29 00:16:31 +00:00
Chris Lattner
2727d1b221
move some code from all callers of ProcessDeclAttributes into
...
the implementation of ProcessDeclAttributes.
llvm-svn: 52875
2008-06-29 00:02:00 +00:00
Chris Lattner
a574154106
more attribute refactoring/renaming, no functionality change.
...
llvm-svn: 52874
2008-06-28 23:58:55 +00:00
Chris Lattner
4627b74233
more minor tidiness.
...
llvm-svn: 52873
2008-06-28 23:50:44 +00:00
Chris Lattner
ed9cbbc4f0
more cleanups, refactor HandleVectorTypeAttribute
...
to work list the rest of the attr handlers. Also, rename
it to HandleVectorSizeAttribute to match its attr name.
No functionality change.
llvm-svn: 52872
2008-06-28 23:48:25 +00:00
Chris Lattner
4a927cba2e
adjust the prototypes of a bunch of decl processing methods to take
...
the single attribute they look at by reference instead of by pointer.
This is a subtle indicator that they take the specified attribute, not
a whole list of them.
This also make HandleExtVectorTypeAttribute work the same way as the rest
of the attributes, adds some comments etc. No functionality change.
llvm-svn: 52871
2008-06-28 23:36:30 +00:00
Argyrios Kyrtzidis
f4ebe9ea4f
Handle unnamed bitfields when parsing C++ classes.
...
llvm-svn: 52855
2008-06-28 08:10:48 +00:00
Eli Friedman
4f89ccb1df
Fix for PR2501; this patch makes usual arithmetic conversions for
...
integers which have the same width and different signedness work
correctly. (The testcase in PR2501 uses a comparison between long and
unsigned int).
llvm-svn: 52853
2008-06-28 06:23:08 +00:00
Argyrios Kyrtzidis
853fbea313
Replace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() and getCurMethodDecl() that return the appropriate Decl through CurContext.
...
llvm-svn: 52852
2008-06-28 06:07:14 +00:00
Ted Kremenek
62ea6e8b6a
Updated checker build to checker-47.
...
llvm-svn: 52848
2008-06-28 00:13:07 +00:00
Chris Lattner
e6c693d932
Fix a bug where we didn't promote 'const float' (or typedefs) to
...
double in some places.
llvm-svn: 52846
2008-06-27 22:48:56 +00:00
Chris Lattner
acbc2d200d
the 'mode' attribute is a decl attribute, not a type attribute. Move it to
...
SemaDeclAttr, and do some cleanups.
llvm-svn: 52844
2008-06-27 22:18:37 +00:00
Chris Lattner
0e7c7c9ee1
Nuno points out that my numbers were out of date
...
llvm-svn: 52840
2008-06-27 21:56:03 +00:00
Chris Lattner
d9f8413402
making progress!
...
llvm-svn: 52833
2008-06-27 19:02:23 +00:00
Cedric Venet
3903908794
Add missing include file (due to a file splitting in llvm).
...
Add new file to Sema Project for VS.
this unbreak the build for VS2005 (with the associated patch on llvm).
llvm-svn: 52830
2008-06-27 17:53:02 +00:00
Ted Kremenek
cf1ab19086
Added a simple static analysis check to look for improper uses of CFCreateNumber.
...
llvm-svn: 52799
2008-06-26 23:59:48 +00:00
Chris Lattner
2c6fcf5abb
move decl attribute processing to a new SemaDeclAttr.cpp.
...
llvm-svn: 52792
2008-06-26 18:38:35 +00:00
Ted Kremenek
a4c52a3366
Update Xcode project so that the clang target depends on LLVMAnalysis.a
...
llvm-svn: 52790
2008-06-26 17:53:57 +00:00
Chris Lattner
d1224b2493
clang uses the llvm backend, so define __llvm__ like llvm-gcc.
...
Additionally, define __clang__ so clients can predicate based on
clang features.
llvm-svn: 52788
2008-06-26 17:26:01 +00:00
Cedric Venet
68cbee847e
Another class -> struct in declaration to match definition.
...
llvm-svn: 52782
2008-06-26 12:50:52 +00:00
Matthijs Kooijman
0fb56e50b1
Make clang work on 32 bit powerpc linux.
...
Patch by Nick Lewycky!
llvm-svn: 52777
2008-06-26 08:39:30 +00:00
Matthijs Kooijman
70574af7d8
Link in LLVMAnalysis after LLVMCodeGen, since the latter depends on the former
...
since LLVM r52748.
llvm-svn: 52776
2008-06-26 08:37:29 +00:00
Chris Lattner
cf31de3760
Make Declarator::getDeclSpec() return a const reference to avoid
...
cases where mutation can introduce bugs. Propagate around 'const'.
llvm-svn: 52772
2008-06-26 06:49:43 +00:00
Chris Lattner
3e39fa365d
add a comment about something that was surprising, at least to me.
...
llvm-svn: 52771
2008-06-26 06:39:41 +00:00
Chris Lattner
2239b7d3d2
rename some attr tests for consistency.
...
llvm-svn: 52770
2008-06-26 06:32:02 +00:00
Chris Lattner
4b413ea3bf
fix a bug handling type attributes in the declspec. declspec processing
...
used to mutate the attribute list for declspecs when the type was
converted, breaking the case where one declspec was shared by multiple
declarators.
This fixes rdar://6032532.
llvm-svn: 52769
2008-06-26 06:27:57 +00:00
Chris Lattner
dd7c10227b
another const correctness bug with declspec.
...
llvm-svn: 52768
2008-06-26 06:11:04 +00:00
Chris Lattner
c8846a19d4
fix const correctness of accessor.
...
llvm-svn: 52767
2008-06-26 06:07:52 +00:00
Chris Lattner
bf231a61fd
refactor more objc codegen interfaces to pass around selectors so
...
we don't push strings into LLVM IR and then have to read them back out.
llvm-svn: 52765
2008-06-26 05:08:00 +00:00
Chris Lattner
882034dd99
indenting and other minor things.
...
llvm-svn: 52764
2008-06-26 04:52:29 +00:00
Chris Lattner
da35bc8e53
refactor interface to GenerateClassStructure to avoid converting a
...
string to LLVM IR and then regenerating the string from IR.
llvm-svn: 52762
2008-06-26 04:47:04 +00:00
Chris Lattner
d9b98863c4
remove the old getSelector implementation, which removes some
...
calls to getStringValue
llvm-svn: 52761
2008-06-26 04:44:19 +00:00
Chris Lattner
6cfec78e48
avoid a lot of unneeded selector processing work by passing around
...
selectors instead of Value*'s.
llvm-svn: 52760
2008-06-26 04:42:20 +00:00
Chris Lattner
9a05d04a0d
use cheaper/simpler getselector call for @selector exprs.
...
llvm-svn: 52759
2008-06-26 04:38:58 +00:00
Chris Lattner
6d522c0133
start avoid doing lots of unneeded work handling selectors
...
llvm-svn: 52758
2008-06-26 04:37:12 +00:00
Chris Lattner
42587147d4
improve indentation, avoid thrashing on maps and recalculating strings as much.
...
llvm-svn: 52757
2008-06-26 04:24:57 +00:00
Chris Lattner
87ab27d42f
give CreateObjCRuntime a full CGM so it can get whatever state it needs,
...
instead of passing in just a couple random things it currently
happens to use.
llvm-svn: 52756
2008-06-26 04:19:03 +00:00
Chris Lattner
63dd337fc2
Fix 80 col violations, assert on assumptions.
...
llvm-svn: 52755
2008-06-26 04:10:42 +00:00
Chris Lattner
64d8d074a8
fix this testcase after Mon Ping's intrinsic rename.
...
llvm-svn: 52754
2008-06-26 04:06:27 +00:00
Chris Lattner
d46944d639
a temporary minimal hack to get clang building after the getStringValue changes in llvm mainline.
...
llvm-svn: 52753
2008-06-26 04:05:20 +00:00
Ted Kremenek
f7b72b6940
Updated latest checker build to checker-45.
...
llvm-svn: 52746
2008-06-26 00:04:08 +00:00
Ted Kremenek
3185c9c9cd
CF ref checker:
...
Tracked objects now have their type information tracked with them.
Enhanced summaries for ObjC methods to include the type information of the receiver.
Used the enhanced summaries to support the idiom that NSWindow owns itself (it sends a release message to itself upon close).
Added some comments.
Did some cleanups with the checker logic using operator overloading (reduced redundant code which I was concerned about being the source of bugs).
llvm-svn: 52741
2008-06-25 21:21:56 +00:00
Ted Kremenek
0654d156b0
Add Profile method to QualType.
...
llvm-svn: 52735
2008-06-25 17:24:26 +00:00
Ted Kremenek
c5d1e443ed
Update VS project files.
...
llvm-svn: 52732
2008-06-25 17:14:52 +00:00
Ted Kremenek
c9d1f45210
Update Xcode project.
...
llvm-svn: 52720
2008-06-25 15:15:35 +00:00
Argyrios Kyrtzidis
8a73d1f327
The assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl instead of CurFunctionDecl.
...
llvm-svn: 52719
2008-06-25 14:24:09 +00:00
Argyrios Kyrtzidis
90ba8b6de2
Set CXXClassVar to identifier namespace IDNS_Ordinary.
...
llvm-svn: 52718
2008-06-25 14:04:17 +00:00
Mon P Wang
28898b2888
Updated atomic intrinsic name from llvm r52706. Fixed dropped bit in shufps.
...
llvm-svn: 52707
2008-06-25 08:21:36 +00:00