Rafael Espindola
bb85c2644a
Document -nobuiltininc
...
llvm-svn: 85188
2009-10-27 00:29:40 +00:00
Mike Stump
7a484dd6a9
Prep for future __builtin_object_size refinements. The theory is that
...
someone will add an llvm intrinsic for us to use, so the optimizer can
figure out the hard cases. WIP.
For those that want to help, double check with Eric before starting.
He has a bit of code this will plug into.
llvm-svn: 85175
2009-10-26 23:39:48 +00:00
Mike Stump
5183a14bfb
__builtin_object_size refinements. Also handle stack based objects. WIP.
...
llvm-svn: 85174
2009-10-26 23:05:19 +00:00
Edward O'Callaghan
0e2f7930fb
Convert a few tests to FileCheck for PR5307.
...
llvm-svn: 85170
2009-10-26 22:51:02 +00:00
Ted Kremenek
12e678d550
Unify Unix and Windows code paths when executing 'clang'.
...
llvm-svn: 85163
2009-10-26 22:14:08 +00:00
Ted Kremenek
bf0690c99f
Remove unnecessary calls to 'flush()'.
...
llvm-svn: 85162
2009-10-26 22:08:39 +00:00
Fariborz Jahanian
038374f887
Add Code gen support for '->*' operator which fell
...
through the crack.
llvm-svn: 85160
2009-10-26 21:58:25 +00:00
Mike Stump
10bd7e1c5b
__builtin_object_size refinements. When we run out of object, be sure
...
to clamp at 0 bytes left. WIP.
llvm-svn: 85157
2009-10-26 21:38:39 +00:00
Edward O'Callaghan
72af806797
Convert a few tests to FileCheck for PR5307.
...
llvm-svn: 85154
2009-10-26 20:49:20 +00:00
Fariborz Jahanian
59f64202d6
Add 'fixit' hint on mis-use of pointer-to-member
...
binary operators.
llvm-svn: 85153
2009-10-26 20:45:27 +00:00
Steve Naroff
a4a347f0b9
Add some missing header files to the Xcode project.
...
llvm-svn: 85152
2009-10-26 20:36:31 +00:00
Mike Stump
99f11f769e
Be sure to zero-extend. And refactor.
...
llvm-svn: 85140
2009-10-26 18:57:47 +00:00
Mike Stump
722cedfb0d
__builtin_object_size refinements. WIP.
...
llvm-svn: 85136
2009-10-26 18:35:08 +00:00
Sebastian Redl
c6a9254f01
Convert some driver checks to FileCheck.
...
llvm-svn: 85133
2009-10-26 18:07:30 +00:00
Daniel Dunbar
431895f748
clang-cc: Allow building for x86_64 with -mmacosx-version-min=10.4.
...
llvm-svn: 85132
2009-10-26 17:52:49 +00:00
Chandler Carruth
6e0df53865
Switch vtable to linkeonce_odr. Patch by nlewycky.
...
llvm-svn: 85131
2009-10-26 17:14:14 +00:00
Sebastian Redl
4afb7c58a4
Add fixit hint to bitwise precedence warning.
...
llvm-svn: 85129
2009-10-26 17:01:32 +00:00
Douglas Gregor
e0105ad38b
assert -> llvm_unreachable
...
llvm-svn: 85125
2009-10-26 16:27:58 +00:00
Sebastian Redl
4302824fe2
Implement a warning for mixing bitwise logical with comparison ops. Fixes PR5297.
...
llvm-svn: 85117
2009-10-26 15:24:15 +00:00
Rafael Espindola
b3549d74da
Rename -nostdclanginc to -nobuiltininc.
...
llvm-svn: 85116
2009-10-26 13:36:57 +00:00
Zhongxing Xu
b7945461cb
'error' is usually used as a noreturn function. This can suppress some false
...
warnings. Eventually we need a way to import externally defined functions
summaries.
llvm-svn: 85092
2009-10-26 05:18:31 +00:00
Chandler Carruth
a3f084ce16
Update location of DataTypes.h to reflect move in LLVM with r85086.
...
llvm-svn: 85087
2009-10-26 01:37:10 +00:00
Daniel Dunbar
495b478404
Phrase compile time assert in standard way.
...
llvm-svn: 85079
2009-10-25 23:11:15 +00:00
Chris Lattner
c0c043903b
rename getTypeSigned() -> isTypeSigned() per daniel's review.
...
llvm-svn: 85076
2009-10-25 22:49:18 +00:00
Chris Lattner
c77f989687
Fix PR5298 - -Wmissing-noreturn shouldn't warn if the function is already
...
declared noreturn.
llvm-svn: 85075
2009-10-25 22:43:07 +00:00
Chris Lattner
b7df3c66c8
Implement rdar://6756623 - use of deprecated type in deprecated typedef should not warn
...
llvm-svn: 85073
2009-10-25 22:31:57 +00:00
Sebastian Redl
e24b16205f
Make sure we actually have a definition before asking if it is implicit. Fixes PR4674.
...
llvm-svn: 85072
2009-10-25 22:31:45 +00:00
Chris Lattner
ecf328e6dd
When parsing a top level struct declaration, make sure to
...
process decl attributes instead of dropping them on the floor.
This allows us to diagnose cases like the testcase. Also don't
diagnose deprecated stuff in ActOnTag: not all uses of tags
may be 'uses', and SemaType does this now.
llvm-svn: 85071
2009-10-25 22:21:57 +00:00
Chris Lattner
e40853aabd
move calls to DiagnoseUseOfDecl (which warns about deprecated/unavailable
...
types) out of Sema::getTypeName into ConvertDeclSpecToType. getTypeName
is sometimes used as a predicate in the parser, so it could cause redundant
diags to be emitted. This is also needed by two upcoming enhancements.
llvm-svn: 85070
2009-10-25 22:09:09 +00:00
Chris Lattner
de126cfa83
cleanups
...
llvm-svn: 85069
2009-10-25 22:05:13 +00:00
Sebastian Redl
d7b3d7dd79
Remove the Skip parameter from GetTypeForDeclarator and dependents. Take the opportunity to improve an error message and fix PR4498.
...
llvm-svn: 85068
2009-10-25 21:45:37 +00:00
Chris Lattner
588f19acc1
remove a nonsensical todo
...
llvm-svn: 85067
2009-10-25 21:19:07 +00:00
Daniel Dunbar
fb049eef8f
Tweak test, with -strict-whitespace $ won't match on Windows because the buffer
...
will have \r\n.
- Perhaps we should make FileCheck normalize line-endings, even in
strict-whitespace mode?
llvm-svn: 85066
2009-10-25 20:34:02 +00:00
Chris Lattner
1138f04aa5
move the extwarn about using long long out of the entry of
...
GetTypeForDeclarator and into the code that handles long long
already.
llvm-svn: 85063
2009-10-25 18:25:04 +00:00
Chris Lattner
dae17dbbed
simplify interface to ConvertDeclSpecToType, check for inferred
...
block return types only when a TST isn't specified, not every time
through GetTypeForDeclarator.
llvm-svn: 85062
2009-10-25 18:21:37 +00:00
Chris Lattner
ebfde05f29
change ConvertDeclSpecToType to be a static function in SemaType.cpp
...
llvm-svn: 85061
2009-10-25 18:07:27 +00:00
Chris Lattner
1fb66f4323
change Sema::ActOnFriendTypeDecl to use GetTypeForDeclarator instead
...
of ConvertDeclSpecToType, which I'd like to keep private to SemaType.cpp.
We do this by cons'ing up a trivial Declarator for the type.
John, please review.
llvm-svn: 85060
2009-10-25 17:47:27 +00:00
Chris Lattner
22e8563175
various cleanups for SemaType.cpp
...
llvm-svn: 85059
2009-10-25 17:36:50 +00:00
Chris Lattner
a27dd59277
minor reorg: check both attributes before decl.
...
llvm-svn: 85058
2009-10-25 17:21:40 +00:00
Chris Lattner
17e15f18c5
simplify Sema::getTypeName a bit: if control gets out of the switch,
...
IIDecl cannot be null. There is no need to check for both C++ mode and
presence of CXXRecordDecl. ObjC interfaces can't have ScopeSpecs.
llvm-svn: 85057
2009-10-25 17:16:46 +00:00
Chris Lattner
5566290b34
In objc mode, every identifier in a cast expression was using doing a
...
type looking using getTypeName() and every property access was using
NextToken() to do lookahead to see if the identifier is followed by
a '.'. Rearrange this code to not need lookahead and only do the
type lookup if we have "identifier." in the token stream. Also
improve a diagnostic a bit.
llvm-svn: 85056
2009-10-25 17:04:48 +00:00
Sebastian Redl
1054faed32
Audit the code for places where it is assumed that every base specifier refers to a RecordType. Add assertions or conditions as appropriate. This fixes another crash in the Apache stdlib vector.
...
llvm-svn: 85055
2009-10-25 17:03:50 +00:00
Sebastian Redl
c45c03c9dd
Ignore dependent bases in ADL. Fixes PR5271.
...
llvm-svn: 85054
2009-10-25 09:35:33 +00:00
Nate Begeman
e46ee9aaea
Add support for vector shifts, pretty straight forward.
...
llvm-svn: 85033
2009-10-25 02:26:48 +00:00
Nate Begeman
b8326be4d9
Fix a bug in calculating shufflevector indices when constructing vectors from other vectors.
...
If I can find it again, I will check in a testcase.
llvm-svn: 85032
2009-10-25 02:26:01 +00:00
Daniel Dunbar
841fa8e289
Fix cmake failure trying to get SVN info for non-SVN trees.
...
llvm-svn: 85015
2009-10-24 20:32:58 +00:00
Sanjiv Gupta
84f0f776e9
Add a preprocessor define for adding a "near" section attribute for allowing
...
objects to be placed at shared memory.
llvm-svn: 85007
2009-10-24 18:08:20 +00:00
Benjamin Kramer
3f81d655d7
Remove duplicated constructor declaration.
...
llvm-svn: 84997
2009-10-24 10:09:11 +00:00
Benjamin Kramer
1402ce3e42
Switch alloca/sprintf to SmallString/raw_ostream.
...
llvm-svn: 84996
2009-10-24 09:57:09 +00:00
John McCall
703a3f8a7b
Preserve type source information in TypedefDecls. Preserve it across
...
template instantiation. Preserve it through PCH. Show it off to the indexer.
I'm healthily ignoring the vector type cases because we don't have a sensible
TypeLoc implementation for them anyway.
llvm-svn: 84994
2009-10-24 08:00:42 +00:00