Daniel Dunbar
5bbebfe9bc
Don't rely on getArchName() to return a constant string reference.
...
llvm-svn: 72241
2009-05-22 02:21:04 +00:00
Eli Friedman
7942674be0
A few more tweaks for Solaris; please correct me if it's wrong somehow.
...
llvm-svn: 72240
2009-05-22 01:12:57 +00:00
Daniel Dunbar
58f345ceb1
Add --analyzer-no-default-checks and --analyzer-output options.
...
llvm-svn: 72238
2009-05-22 00:38:15 +00:00
Douglas Gregor
4871c4739d
Improve target support for Solaris.
...
llvm-svn: 72237
2009-05-21 23:51:30 +00:00
Douglas Gregor
1c37d9eed5
Template instantiation for C99 compound literals
...
llvm-svn: 72236
2009-05-21 23:48:18 +00:00
Douglas Gregor
0f9d4003df
Template instantiation for GNU array-range designators.
...
llvm-svn: 72234
2009-05-21 23:30:39 +00:00
Douglas Gregor
ca1aeecd37
Template instantiation for C99 designated initializers, because we
...
can. Also, delay semantic analysis of initialization for
value-dependent as well as type-dependent expressions, since we can't
always properly type-check a value-dependent expression.
llvm-svn: 72233
2009-05-21 23:17:49 +00:00
Douglas Gregor
c2607b9a08
Template instantiation for initializer lists
...
llvm-svn: 72229
2009-05-21 21:38:12 +00:00
Douglas Gregor
122660eb19
Fix CMake build for AST XML dumper
...
llvm-svn: 72228
2009-05-21 21:21:53 +00:00
Mike Stump
aed08f9929
Fixup blocks codegen for { __block i; i = rhs(); }, we want the rhs
...
evaluated first. This can also improve codegen just a bit as we might
have another register to play with for the evaluation of the rhs.
llvm-svn: 72226
2009-05-21 21:05:15 +00:00
Fariborz Jahanian
8c46fec43d
Fixed a warning bug when receiver is an object via
...
setting of NSObject attribute.
llvm-svn: 72225
2009-05-21 21:04:28 +00:00
Douglas Gregor
7f5601e55f
AST XML dump, from Olaf Krzikalla!
...
llvm-svn: 72224
2009-05-21 20:55:50 +00:00
Douglas Gregor
31c7e99401
Template instantiation for unary type traits, e.g., __is_pod
...
llvm-svn: 72220
2009-05-21 18:55:48 +00:00
Fariborz Jahanian
cd1a88da02
Check on null arguments in the presense of nonnull attribute.
...
llvm-svn: 72219
2009-05-21 18:48:51 +00:00
Douglas Gregor
aa85d8221c
Template instantiation for C++ "typeid" expressions.
...
llvm-svn: 72218
2009-05-21 18:34:44 +00:00
Douglas Gregor
728d41bbb9
Template instantiation for C++ throw expressions
...
llvm-svn: 72217
2009-05-21 17:37:52 +00:00
Douglas Gregor
29fe6aeef3
Template instantiation for C++ delete expression
...
llvm-svn: 72216
2009-05-21 17:21:12 +00:00
Douglas Gregor
269f0b1b69
Merge the ASTVector and ASTOwningVector templates, since they offered
...
redundant functionality. The result (ASTOwningVector) lives in
clang/Parse/Ownership.h and is used by both the parser and semantic
analysis. No intended functionality change.
llvm-svn: 72214
2009-05-21 16:25:11 +00:00
Sebastian Redl
027de2adcd
Avoid using the built-in type checker for assignment in C++ when classes are involved. Patch by Vyacheslav Kononenko.
...
llvm-svn: 72212
2009-05-21 11:50:50 +00:00
Jay Foad
7d0479f2c2
Use v.data() instead of &v[0] when SmallVector v might be empty.
...
llvm-svn: 72210
2009-05-21 09:52:38 +00:00
Fariborz Jahanian
a6bed8370e
Minor refactoring. Uses an existing API to lookup a class method.
...
llvm-svn: 72203
2009-05-21 01:03:45 +00:00
Douglas Gregor
d0fefbafd1
Template instantiation for C++ "new" expressions.
...
llvm-svn: 72199
2009-05-21 00:00:09 +00:00
Douglas Gregor
920e3af495
Fix template instantiation for compound statements so that it properly
...
passes the "isStmtExpr" flag, to suppress warnings about unused
expressions.
llvm-svn: 72190
2009-05-20 22:57:03 +00:00
Ted Kremenek
1036912118
Add special cases to retain checker for 'create' methods in QCView, QCRenderer, and CIContext (Apple APIs).
...
This fixes:
<rdar://problem/6902710> clang: false positives w/QC and CoreImage methods.
llvm-svn: 72187
2009-05-20 22:39:57 +00:00
Douglas Gregor
1301fdd6c4
Introduce a new kind of RAII class, ASTOwningVector, which is an
...
llvm::SmallVector that owns all of the AST nodes inside of it. This
RAII class is used to ensure proper destruction of AST nodes when
template instantiation fails.
llvm-svn: 72186
2009-05-20 22:33:37 +00:00
Douglas Gregor
06555f134a
Template instantiation for CXXExprWithTemporaries, which occurs when
...
temporaries are generated for some object-constructing expressions in
templates that are not type-dependent.
Also, be sure to introduce the variable from a CXXConditionDeclExpr
into the set of instantiated local variables.
llvm-svn: 72185
2009-05-20 21:51:01 +00:00
Douglas Gregor
e70f108158
Template instantiation for the various kinds of AST nodes that occur
...
due to C++ type construction of the form T(a1, a2, ..., aN).
llvm-svn: 72183
2009-05-20 21:38:11 +00:00
Douglas Gregor
ce934146d0
Introduce a new expression type, CXXUnresolvedConstructExpr, to
...
describe the construction of a value of a given type using function
syntax, e.g.,
T(a1, a2, ..., aN)
when the type or any of its arguments are type-dependent. In this
case, we don't know what kind of type-construction this will be: it
might construct a temporary of type 'T' (which might be a class or
non-class type) or might perform a conversion to type 'T'. Also,
implement printing of and template instantiation for this new
expression type. Due to the change in Sema::ActOnCXXTypeConstructExpr,
our existing tests cover template instantiation of this new expression
node.
llvm-svn: 72176
2009-05-20 18:46:25 +00:00
Fariborz Jahanian
d20a03f308
This patch provides preliminary support for non-fragile instance variables on the GNU runtime.
...
It currently requires a patches to GNU libobjc (and so is not enabled by default) which are currently
being tested and reviewed by GNUstep before being pushed upstream.
This patch does not allow support for synthesized ivars, but does provide the infrastructure
needed for supporting them.
Patch by David Chisnall
llvm-svn: 72175
2009-05-20 18:41:51 +00:00
Fariborz Jahanian
f1c25029b4
implementation of format_arg for ObjC methods/functions.
...
Still more to do.
llvm-svn: 72173
2009-05-20 17:41:43 +00:00
Zhongxing Xu
1075cc0b02
Treat AllocaRegion as SymbolicRegion in RegionStore::Retrieve().
...
llvm-svn: 72166
2009-05-20 09:18:48 +00:00
Zhongxing Xu
a7907608fb
* API change: we need to pass GRState to GRExprEngine::EvalBinOp() because
...
RegionStore needs to know the type of alloca region.
* RegionStoreManager::EvalBinOp() now converts the alloca region to its first
element region, as what is done to symbolic region.
llvm-svn: 72164
2009-05-20 09:00:16 +00:00
Eli Friedman
c21cb44de2
Handle the remaining unhandled cases in EmitReferenceBindingToExpr.
...
It would be nice if someone could write an ObjC++ testcase for the case
of passing a property returning a struct to a function taking a const
reference.
llvm-svn: 72159
2009-05-20 02:31:19 +00:00
Zhongxing Xu
050379b865
add header to be built by gcc 4.3 on Linux.
...
llvm-svn: 72158
2009-05-20 01:55:10 +00:00
Anders Carlsson
02bb7f0ac8
irgen for references to complex rvales (Very important...)
...
llvm-svn: 72157
2009-05-20 01:35:03 +00:00
Anders Carlsson
ad007d44b6
Create a temporary if the lvalue is a bitfield. Reported by Eli.
...
llvm-svn: 72155
2009-05-20 01:24:22 +00:00
Anders Carlsson
145eae5224
Add support for binding references to scalar rvalues.
...
llvm-svn: 72153
2009-05-20 01:03:17 +00:00
Anders Carlsson
7d4c083c19
Bind references to lvalues correctly.
...
llvm-svn: 72150
2009-05-20 00:36:58 +00:00
Anders Carlsson
6f5a015bd9
Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support anything but at least we don't crash ;)
...
llvm-svn: 72147
2009-05-20 00:24:07 +00:00
Douglas Gregor
68f1096212
Add FIXMEs for the remaining C and C++ expression types that still
...
need template instantiation logic. Remove one FIXME by instantiating
the callee in a non-type-dependent CXXOperatorCallExpr.
llvm-svn: 72145
2009-05-19 23:29:16 +00:00
Douglas Gregor
ad3150cd38
Template instantiation for __builtin_va_arg.
...
llvm-svn: 72144
2009-05-19 23:10:31 +00:00
Douglas Gregor
0df91121ba
Template instantiation for __builtin_choose_expr.
...
llvm-svn: 72143
2009-05-19 22:43:30 +00:00
Douglas Gregor
f907cbf634
Ban the use of __builtin_types_compatible_p in C++; g++ doesn't support it,
...
and it isn't clear exactly what it's supposed to mean. Thanks Eli!
llvm-svn: 72142
2009-05-19 22:28:02 +00:00
Douglas Gregor
c25f766065
Template instantiation for __builtin_shufflevector.
...
llvm-svn: 72139
2009-05-19 22:10:17 +00:00
Eli Friedman
58ed0f2a80
Build fixes for r72135.
...
llvm-svn: 72136
2009-05-19 21:16:18 +00:00
Eli Friedman
5b5bd90a21
Move AnalysisConsumer.h and Analyses.def from tools/clang-cc to
...
include/clang/Frontend, and move AnalysisConsumer.cpp from
tools/clang-cc to lib/Frontend.
llvm-svn: 72135
2009-05-19 21:10:40 +00:00
Douglas Gregor
4b58ca02c5
Template instantiation for __builtin_types_compatible_p.
...
llvm-svn: 72134
2009-05-19 20:55:31 +00:00
Anders Carlsson
2d228cef50
Improve support for irgen of references.
...
llvm-svn: 72133
2009-05-19 20:40:02 +00:00
Douglas Gregor
8d7fef3cf2
Template instantiation for GNU statement expressions
...
llvm-svn: 72129
2009-05-19 20:31:21 +00:00
Douglas Gregor
115652db4a
Fix handling of the GNU "t ? : f" extension to the conditional
...
operator in C++, and verify that template instantiation for the
condition operator does the right thing.
llvm-svn: 72127
2009-05-19 20:13:50 +00:00