Douglas Gregor
d612997e73
When instantiating a variable without an initializer, call
...
ActOnUninitializedDecl.
llvm-svn: 77211
2009-07-27 17:43:39 +00:00
Anders Carlsson
cabdeb4932
Use the CGRecordLayoutBuilder even if there are no fields, because in C++ an empty class will have a padding byte.
...
llvm-svn: 77205
2009-07-27 17:10:54 +00:00
Anders Carlsson
72fb384a65
Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.
...
llvm-svn: 77190
2009-07-27 15:31:55 +00:00
Anders Carlsson
b97a3ec4e7
Fix a tail padding bug in the record layout builder code. The bug was found by an existing test.
...
llvm-svn: 77189
2009-07-27 14:55:54 +00:00
Anders Carlsson
b7130ed888
Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.
...
llvm-svn: 77185
2009-07-27 05:54:15 +00:00
Anders Carlsson
bff6b49cd0
More work on the constant struct builder, fix a couple of thinkos and add support for inserting part of a bitfield in the previous byte.
...
llvm-svn: 77180
2009-07-27 02:56:37 +00:00
Anders Carlsson
ba4c6d1c91
More work on bitfield support in the new constant struct builder.
...
llvm-svn: 77177
2009-07-27 01:23:51 +00:00
Mike Stump
21e0f895a1
Fix PR4624.
...
llvm-svn: 77176
2009-07-27 00:44:23 +00:00
Nuno Lopes
bd2cd92907
fix segfault (because of erasing after the vector boundaries) when the cached token position is at the end
...
llvm-svn: 77159
2009-07-26 16:36:45 +00:00
Nuno Lopes
0b797b1c9d
add gentoo 2009.0 g++ header locations
...
llvm-svn: 77158
2009-07-26 16:14:05 +00:00
Daniel Dunbar
e59313a298
Switch to getName()
...
llvm-svn: 77151
2009-07-26 09:28:40 +00:00
Daniel Dunbar
600dfac30a
Switch to using llvm::Value::getName()
...
llvm-svn: 77147
2009-07-26 08:32:30 +00:00
Daniel Dunbar
4f7dfaf650
Update for API change.
...
llvm-svn: 77112
2009-07-26 02:21:04 +00:00
Daniel Dunbar
6a82e424d0
Lookup targets by Triple instead of Module.
...
llvm-svn: 77108
2009-07-26 01:27:26 +00:00
Mike Stump
ea086c7263
Preserve qualifiers.
...
llvm-svn: 77097
2009-07-25 23:24:03 +00:00
Ryan Flynn
e5dc8594ea
PR3575 - warn on declared variable or function attributes after a definition, which are currently ignored.
...
llvm-svn: 77095
2009-07-25 22:29:44 +00:00
Argyrios Kyrtzidis
39c348d915
Refactor ObjCImplDecl::getInstanceMethod/getClassMethod into one
...
ObjCImplDecl::getMethod.
llvm-svn: 77094
2009-07-25 22:16:03 +00:00
Argyrios Kyrtzidis
553376be19
Refactor ObjCInterfaceDecl::lookupInstanceMethod/lookupClassMethod into one
...
ObjCInterfaceDecl::lookupMethod.
llvm-svn: 77093
2009-07-25 22:15:51 +00:00
Argyrios Kyrtzidis
e6ed65bee0
Refactor ObjCProtocolDecl::lookupInstanceMethod/lookupClassMethod into one
...
ObjCProtocolDecl::lookupMethod.
llvm-svn: 77092
2009-07-25 22:15:38 +00:00
Argyrios Kyrtzidis
6de0560b97
Refactor ObjCContainerDecl::getInstanceMethod/getClassMethod into one
...
ObjCContainerDecl::getMethod.
Avoids code duplication.
llvm-svn: 77091
2009-07-25 22:15:22 +00:00
Mike Stump
8c5d7996e8
Add noreturn as a type attribute, handle printing for them and handle
...
calls to noreturn function pointers when CFG building.
llvm-svn: 77089
2009-07-25 21:26:53 +00:00
Fariborz Jahanian
dedf1e4b1a
ir-gen for non-virtual base class initialization
...
in constructors.
llvm-svn: 77087
2009-07-25 21:12:28 +00:00
Sebastian Redl
9f831dbbcd
Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators.
...
Add custom conversions to static_cast.
llvm-svn: 77076
2009-07-25 15:41:38 +00:00
John McCall
02dee0a46a
Semantic checking for main().
...
Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.
llvm-svn: 77047
2009-07-25 04:36:53 +00:00
Anders Carlsson
3b484b928d
More work on the constant struct builder. We can now convert the struct to a packed struct when necessary.
...
llvm-svn: 77038
2009-07-25 01:40:29 +00:00
Fariborz Jahanian
f464edf81f
Some code refactoring per Daniel's feedback.
...
llvm-svn: 77030
2009-07-25 01:08:28 +00:00
Anders Carlsson
87a9a34e5b
More work on the constant struct builder. We now try to layout all constant structs but throw away the result.
...
llvm-svn: 77021
2009-07-25 00:24:56 +00:00
Owen Anderson
b7a2fe6f81
Update for LLVM API change.
...
llvm-svn: 77012
2009-07-24 23:12:58 +00:00
Douglas Gregor
a6ef8f0813
Template instantiation for static data members that are defined out-of-line.
...
Note that this also fixes a bug that affects non-template code, where we
were not treating out-of-line static data members are "file-scope" variables,
and therefore not checking their initializers.
llvm-svn: 77002
2009-07-24 20:34:43 +00:00
Fariborz Jahanian
a5c335527d
More Sema check for constructor's member initializer along
...
with type conversion to fix ir-gen crash.
llvm-svn: 77000
2009-07-24 20:28:49 +00:00
Ted Kremenek
b9cb11391d
In the "use of floating point variable as loop counter" check, check
...
if the DeclRefExpr is a float, not just either argument.
llvm-svn: 76998
2009-07-24 20:26:31 +00:00
Ted Kremenek
9c3952c03e
Have 'clang --analyze' run syntactic static analysis security checks.
...
llvm-svn: 76996
2009-07-24 20:03:11 +00:00
Mike Stump
d3bb557559
Fix 80-col violations, reflow a few comments and zap some extra
...
whitespace at ends of lines.
llvm-svn: 76992
2009-07-24 19:02:52 +00:00
Anders Carlsson
5e66fb5d16
Fix a release build warning.
...
llvm-svn: 76985
2009-07-24 18:20:38 +00:00
Fariborz Jahanian
2a1b5af130
More work toward initialization of objects
...
in constructors.
llvm-svn: 76980
2009-07-24 17:57:02 +00:00
Steve Naroff
e87026a08f
Allow front-end 'isa' access on object's of type 'id'.
...
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning).
Still need back-end CodeGen for ObjCIsaExpr.
llvm-svn: 76979
2009-07-24 17:54:45 +00:00
Anders Carlsson
e2c6baf629
Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.
...
llvm-svn: 76978
2009-07-24 17:23:54 +00:00
Anders Carlsson
e1d5ca583f
Check in a half finished new constant struct builder (Obviously not used yet).
...
llvm-svn: 76969
2009-07-24 15:20:52 +00:00
Daniel Dunbar
c46a079957
Fix declaration of obc_enumerationMutation function, for GNU runtime.
...
llvm-svn: 76959
2009-07-24 07:40:24 +00:00
Ted Kremenek
963cc31583
Add doxygen comments and simplify expression.
...
llvm-svn: 76955
2009-07-24 06:55:42 +00:00
Ted Kremenek
3075428d16
Introduce a new variant type 'TryResult' to represent the result of
...
TryEvaluateBool instead of using a raw 'int'. This avoids any
confusion of how 'int' converts to bool, and makes the resultant code
easier to read.
Condense a bunch of 'addSuccessor()' calls in 'if ... else' to use the
ternary operator instead.
llvm-svn: 76947
2009-07-24 04:47:11 +00:00
Zhongxing Xu
30ac7607be
Add getDecl() to CallGraph and CallGraphNode.
...
llvm-svn: 76940
2009-07-24 03:41:11 +00:00
Zhongxing Xu
6c82313375
Constify methods.
...
llvm-svn: 76939
2009-07-24 03:38:27 +00:00
John McCall
d9baf6aed8
Test commit: make a little stub routine for semantic checking of main().
...
llvm-svn: 76934
2009-07-24 03:03:21 +00:00
Mike Stump
8e79f99b16
Implement new warning for functions declared 'noreturn' when they fall off the end.
...
llvm-svn: 76932
2009-07-24 02:49:01 +00:00
Anders Carlsson
6e853bf2b7
Get rid of the size parameter to AppendField. No functionality change.
...
llvm-svn: 76931
2009-07-24 02:45:50 +00:00
Ted Kremenek
745088c49e
Mark destructor of Checker virtual.
...
llvm-svn: 76924
2009-07-24 00:40:31 +00:00
Douglas Gregor
79f83eda84
This patch fixes the implementations of the __has_trivial_destructor
...
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!
llvm-svn: 76916
2009-07-23 23:49:00 +00:00
Daniel Dunbar
91ade14197
Output UTF-16 string literals independent of host byte order.
...
- Steve, can you take a look at this? It seems like this code should live
elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
UTF-16 conversion.
llvm-svn: 76915
2009-07-23 23:41:22 +00:00
Fariborz Jahanian
ca2f085a4e
Diagnose when base classes and members to be intialized
...
with constructors don't have a matching constructor.
llvm-svn: 76913
2009-07-23 23:32:59 +00:00