Eli Friedman
57406b2783
Add IEEE quad support to DefineFloatMacros.
...
llvm-svn: 72314
2009-05-23 03:50:01 +00:00
Daniel Dunbar
223db1c9e5
Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.
...
- Otherwise we may incorrectly miss generation of some write barriers.
llvm-svn: 72313
2009-05-23 02:49:02 +00:00
Eli Friedman
f98fc352b8
PR4247: Widen the buffer slightly so it can hold all the definitions for
...
PPC double double.
(No testcase because no normal target uses the format at the moment.)
llvm-svn: 72310
2009-05-23 02:03:39 +00:00
Mike Stump
a35af82429
Fix typo.
...
llvm-svn: 72308
2009-05-23 02:02:29 +00:00
Ted Kremenek
20e2630877
Use 'Exprs.data()' instead of 'Exprs.empty() ? NULL : ...'
...
llvm-svn: 72304
2009-05-23 00:22:11 +00:00
Douglas Gregor
4a9f481db9
Template instantiation for qualified declaration reference
...
expressions. We are now missing template instantiation logic for only
three classes of expressions:
- Blocks-related expressions (BlockExpr, BlockDeclRefExpr)
- C++ default argument expressions
- Objective-C expressions
Additionally, our handling of DeclRefExpr is still quite poor, since
it cannot handle references to many kinds of declarations.
As part of this change, converted the TemplateExprInstantiator to use
iteration through all of the expressions via clang/AST/StmtNodes.def,
ensuring that we don't forget to add template instantiation logic for
any new expression node kinds.
llvm-svn: 72303
2009-05-22 23:47:06 +00:00
Douglas Gregor
93fcf93bc6
Template instantiation for the GNU address-of-label extension.
...
llvm-svn: 72301
2009-05-22 23:25:52 +00:00
Douglas Gregor
36fe6901d4
Template instantiation for ExtVectorElementExpr.
...
llvm-svn: 72299
2009-05-22 23:07:44 +00:00
Argyrios Kyrtzidis
4a6dad68a3
Add a test case to make sure that an ambiguous paren expression is only parsed once.
...
llvm-svn: 72298
2009-05-22 23:05:39 +00:00
Douglas Gregor
5ce0f0eccf
Fix the parent classes in TypeNodes.def, from Olaf Krzikalla
...
llvm-svn: 72293
2009-05-22 22:48:45 +00:00
Douglas Gregor
038c338949
Fix lots of PCH crashes caused by the new assertions in
...
llvm::SmallVector, using data() instead of &[0]. The PCH testsuite now
runs cleanly (again).
llvm-svn: 72292
2009-05-22 22:45:36 +00:00
Ted Kremenek
92f3d1ff1c
Fix PCH crash caused by new assertions in llvm::SmallVector. Use
...
ProtoRefs.data() instead of &ProtoRefs[0] to access the raw buffer.
llvm-svn: 72291
2009-05-22 22:34:23 +00:00
Ted Kremenek
ed28b6d028
Modify begin()/end() for AsmStmt iterators to handle the case when Exprs.empty()
...
is true. Because of recent changes to llvm::SmallVector, using these iterators
when Exprs was empty would cause an assertion failure.
This fixes: PR 4245.
llvm-svn: 72286
2009-05-22 22:03:22 +00:00
Fariborz Jahanian
88fead8c48
Cannot type cast @selector expressions.
...
llvm-svn: 72284
2009-05-22 21:42:52 +00:00
Daniel Dunbar
0721c2c155
In assembler-with-cpp mode, don't error on '#' (stringize) operator applied to
...
non-argument names, pass the tokens through.
llvm-svn: 72283
2009-05-22 21:35:34 +00:00
Douglas Gregor
efe7c393e1
Add a few tests to ensure that member functions of class templates can
...
call other member functions of class templates, including after
template instantiation. No functionality change.
llvm-svn: 72282
2009-05-22 21:26:58 +00:00
Douglas Gregor
a8db954f24
Representation of and template instantiation for member
...
expressions. This change introduces another AST node,
CXXUnresolvedMemberExpr, that captures member references (x->m, x.m)
when the base of the expression (the "x") is type-dependent, and we
therefore cannot resolve the member reference yet.
Note that our parsing of member references for C++ is still quite
poor, e.g., we don't handle x->Base::m or x->operator int.
llvm-svn: 72281
2009-05-22 21:13:27 +00:00
Argyrios Kyrtzidis
c996521508
Add -fblocks for the test.
...
llvm-svn: 72280
2009-05-22 21:10:04 +00:00
Argyrios Kyrtzidis
f73f2d28a2
The disambiguation process for ambiguous paren expressions is not "side effects free", e.g:
...
(T(*)(int[x+y]));
is an (invalid) paren expression, but "x+y" will be parsed as part of the (rejected) type-id,
so unnecessary Action calls are made for an unused (and possibly leaked) "x+y".
Use a different scheme, similar to parsing inline methods. The parenthesized tokens are cached,
the context that follows is determined (possibly by parsing a cast-expression),
and then we re-introduce the cached tokens into the token stream and parse them appropriately.
llvm-svn: 72279
2009-05-22 21:09:47 +00:00
Argyrios Kyrtzidis
48ce3b553b
The TokenLexer may encounter annotations if the parser enters them using Preprocessor::EnterTokenStream.
...
So check for annotation before using the Token's IdentifierInfo.
llvm-svn: 72278
2009-05-22 21:09:31 +00:00
Fariborz Jahanian
a4404f21d1
This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when
...
compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object
planes, and a few other things.
Patch by David Chisnall.
llvm-svn: 72275
2009-05-22 20:17:16 +00:00
Fariborz Jahanian
162af638a9
Added -fblocks to the test's options.
...
llvm-svn: 72274
2009-05-22 20:06:10 +00:00
Mike Stump
c63428b192
Fixup codegen for __block int i; i += rhs();. Should also slightly
...
improve codegen in some cases.
llvm-svn: 72273
2009-05-22 19:07:20 +00:00
Daniel Dunbar
adeeb052ad
Don't warn about -funit-at-a-time, and reject -fno-unit-at-a-time.
...
- We could just warn about -fno-unit-at-a-time, but in practice people using it
probably aren't going to get what they want out of clang.
Also, use "clang" specified error for unsupported things instead of driver
unsupported error.
llvm-svn: 72272
2009-05-22 19:02:20 +00:00
Daniel Dunbar
499f3f9c5d
x86_64 ABI: Account for sret parameters consuming an integer register.
...
- PR4242.
llvm-svn: 72268
2009-05-22 17:33:44 +00:00
Fariborz Jahanian
db3a4c1388
(Next runtime only) check to see if class implements forwardInvocation method
...
and objects of this class are derived from 'NSProxy'.
Under such conditions, which means that every method possible is
implemented in the class, we should not issue "Method definition not found"
warnings.
llvm-svn: 72267
2009-05-22 17:12:32 +00:00
Argyrios Kyrtzidis
24ad692f30
Some minor comments modifications.
...
There are no unnecessary action calls period (courtesy of the annotation scheme) and too many 'this means'..
llvm-svn: 72263
2009-05-22 15:12:46 +00:00
Sanjiv Gupta
47e296149e
Targets like PIC16 generate Static decls for automatic variables, emit the appropriate debug descriptor as well in that case.
...
llvm-svn: 72261
2009-05-22 13:54:25 +00:00
Argyrios Kyrtzidis
12179bc014
Handle correctly a very ugly part of the C++ syntax. We cannot disambiguate between a parenthesized type-id and
...
a paren expression without considering the context past the parentheses.
Behold:
(T())x; - type-id
(T())*x; - type-id
(T())/x; - expression
(T()); - expression
llvm-svn: 72260
2009-05-22 10:24:42 +00:00
Argyrios Kyrtzidis
5da1f08587
Factor the compound literal parsing out from ParseParenExpression and into a new ParseCompoundLiteralExpression.
...
No functionality change.
llvm-svn: 72259
2009-05-22 10:24:05 +00:00
Argyrios Kyrtzidis
9a9c0f4eff
Modification to ParseParenExpression.
...
Now it parses the cast expression unless 'stopIfCastExpr' is true.
llvm-svn: 72258
2009-05-22 10:23:40 +00:00
Argyrios Kyrtzidis
387a334656
Remove ParseSimpleParenExpression.
...
Embed its functionality into it's only user, ParseCXXCasts.
CXXCasts now get the "actual" expression directly, they no longer always receive a ParenExpr. This is better since the
parentheses are always part of the C++ casts syntax.
llvm-svn: 72257
2009-05-22 10:23:16 +00:00
Argyrios Kyrtzidis
7bd98440b3
Refactor the common code of 'ParseTypeofSpecifier' and 'ParseSizeofAlignofExpression' into a new
...
'ParseExprAfterTypeofSizeofAlignof' method.
llvm-svn: 72256
2009-05-22 10:22:50 +00:00
Argyrios Kyrtzidis
f5cc7ac4d5
Parse typeof-specifier the same way as sizeof/alignof are parsed.
...
-Makes typeof consistent with sizeof/alignof
-Fixes a bug when '>' is in a typeof expression, inside a template type param:
A<typeof(x>1)> a;
llvm-svn: 72255
2009-05-22 10:22:18 +00:00
Zhongxing Xu
5a187dd21e
Pull EmitRecord() out of loop. It should be called only once.
...
llvm-svn: 72252
2009-05-22 08:38:27 +00:00
Torok Edwin
5b34933b90
Set correct calling convention even if there is a bitcast in the way.
...
This attempts to fix PR4239.
llvm-svn: 72251
2009-05-22 07:25:06 +00:00
Daniel Dunbar
51c7f97bea
(llvm up) Use llvm::Triple for storing target triples.
...
- This commit has some messy stuff in it to extend string lifetimes, but that
will go away once we switch to using the enum'd Triple interfaces.
llvm-svn: 72243
2009-05-22 02:53:45 +00:00
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
c902c85b6c
Tweak test case so that the expected-error text matches on both i686 and x86-64.
...
llvm-svn: 72181
2009-05-20 20:30:46 +00:00
Douglas Gregor
895ef6e6f9
Add a va_list/template instantiation test suggested by Eli
...
llvm-svn: 72178
2009-05-20 18:50:16 +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
1f275ba1b4
Add comments to test case.
...
llvm-svn: 72165
2009-05-20 09:03:10 +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
387f863dde
Bad anders.
...
llvm-svn: 72156
2009-05-20 01:27:39 +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
95fc37fd8f
Start documenting precompiled headers
...
llvm-svn: 72146
2009-05-20 00:16:32 +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
ba4a4a012f
Remove finished FIXME.
...
llvm-svn: 72137
2009-05-19 21:17:33 +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
Douglas Gregor
3234db1e13
Template instantiation for compound assignment operators.
...
llvm-svn: 72126
2009-05-19 20:02:01 +00:00
Anders Carlsson
29a1be34b7
Only do the bitcast in EmitStoreOfScalar if the type is a boolean.
...
llvm-svn: 72125
2009-05-19 19:36:19 +00:00
Douglas Gregor
71b6a37bc4
Template instantiation for cast expressions.
...
llvm-svn: 72119
2009-05-19 19:05:47 +00:00
Anders Carlsson
8370964257
Pass the destination QualType to EmitStoreOfScalar. No functionality change.
...
llvm-svn: 72118
2009-05-19 18:50:41 +00:00
Anders Carlsson
775640d248
Don't always zext the result of the not unary operator to an int.
...
llvm-svn: 72117
2009-05-19 18:44:53 +00:00
Fariborz Jahanian
960910a159
Patch finishes off application of printf attribute on blocks.
...
llvm-svn: 72111
2009-05-19 17:08:59 +00:00
Daniel Dunbar
018958d94d
Update test
...
llvm-svn: 72110
2009-05-19 16:09:59 +00:00
Duncan Sands
ca3a465b76
Add missing include for stderr and fprintf, needed
...
when compiling with gcc-4.4.
llvm-svn: 72109
2009-05-19 12:06:47 +00:00
Eli Friedman
45966b4671
Remove the -arch option from clang-cc: for all practical purposes, it's
...
redundant with -triple.
llvm-svn: 72108
2009-05-19 11:12:40 +00:00
Eli Friedman
996ef2f7b6
Move analysis command-line options out of AnalysisConsumer.cpp into
...
clang-cc.cpp.
With this commit, all of the clang-cc command-line options are defined
in clang-cc.cpp.
llvm-svn: 72107
2009-05-19 10:18:02 +00:00
Eli Friedman
69329a52cf
Fix a crash with -emit-html from stdin.
...
llvm-svn: 72104
2009-05-19 05:28:52 +00:00
Anders Carlsson
c82b86dfaa
Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. Stub out VisitCXXExprWithTemporaries.
...
llvm-svn: 72103
2009-05-19 04:48:36 +00:00
Anders Carlsson
549c5bd824
Create CXXConstructExpr calls for arguments passed to functions.
...
llvm-svn: 72102
2009-05-19 04:45:15 +00:00
Eli Friedman
cec35d7e6a
Clean up some unnecessary includes.
...
llvm-svn: 72101
2009-05-19 04:30:57 +00:00
Eli Friedman
e15ecf04a4
CMake updates for r72099; untested, so please tell me if there are any
...
issues.
llvm-svn: 72100
2009-05-19 04:21:30 +00:00
Eli Friedman
16b7b6f511
Move clang-cc.h to lib/Frontend/Utils.h, and move the associated .cpp
...
files to lib/Frontend.
llvm-svn: 72099
2009-05-19 04:14:29 +00:00
Anders Carlsson
f5012718b4
Add comment about FullExprArg.
...
llvm-svn: 72098
2009-05-19 04:13:11 +00:00
Eli Friedman
2bd0f3964c
Move CreateAnalysisConsumer into a separate header AnalysisConsumer.h.
...
Start moving things around in the direction of refactoring the
command-line options out of AnalysisConsumer.cpp.
llvm-svn: 72097
2009-05-19 03:57:28 +00:00
Eli Friedman
33cd03cd89
Move the options for dependency file generation from DependencyFile.cpp
...
to clang-cc.cpp. Also, rename CreateDependencyFileGen to
AttachDependencyFileGen, and make it take a raw_ostream rather than
opening a file itself.
llvm-svn: 72096
2009-05-19 03:35:57 +00:00
Eli Friedman
6af494b426
Move options for -E mode from PrintPreprocessedOutput.cpp to
...
clang-cc.cpp.
llvm-svn: 72095
2009-05-19 03:06:47 +00:00
Eli Friedman
26c672b490
Refactor -dM mode out of the main routine for -E handling.
...
llvm-svn: 72090
2009-05-19 01:32:34 +00:00
Eli Friedman
42279c0f07
Move the warning options from Warnings.cpp to clang-cc.cpp.
...
llvm-svn: 72089
2009-05-19 01:17:04 +00:00
Eli Friedman
fcb57d5b6a
Switch some utilities in clang-cc to take a stream instead of a
...
filename (or unconditionally using stdout).
llvm-svn: 72085
2009-05-19 01:02:07 +00:00
Ted Kremenek
59328da69f
Update checker build.
...
llvm-svn: 72084
2009-05-19 00:48:25 +00:00
Anders Carlsson
97c793ad1c
When assigning from an rvalue to a const reference, the implicit cast from T -> const T is not an lvalue cast.
...
llvm-svn: 72082
2009-05-19 00:38:24 +00:00
Douglas Gregor
be81045db7
Template instantiation for call expressions.
...
llvm-svn: 72081
2009-05-19 00:38:01 +00:00
Fariborz Jahanian
b27c94199f
This patch allows clang to generate code for declared properties on the GNU runtime. As with @synchronized, this requires some extra functions that are included with other libraries (not with the GNU runtime itself) and so will cause linker errors when these are not present.
...
Patch by David Chisnall.
llvm-svn: 72079
2009-05-19 00:28:43 +00:00
Douglas Gregor
7a77a6bcf9
Template instantiation for array subscript expressions. This was far
...
easier than expected because of the limitation that subscript
operators must be member functions.
llvm-svn: 72076
2009-05-19 00:01:19 +00:00
Fariborz Jahanian
5f1f9d7a46
BlockDecl node must be complete before block attributes
...
can be processed. No change in functionality.
llvm-svn: 72066
2009-05-18 23:17:46 +00:00
Ted Kremenek
501ba0365a
Fix PR 4230: Don't flag leaks of NSAutoreleasePools until we know that we aren' at the top-most scope of autorelease pools.
...
llvm-svn: 72065
2009-05-18 23:14:34 +00:00
Eli Friedman
351fa4b1b2
Attempted CMake build fixes for r72060; this is untested, so please tell
...
me if there are any issues.
llvm-svn: 72063
2009-05-18 23:06:15 +00:00
Eli Friedman
2b6d281e11
Build fixes for r72060; sorry for any inconvenience.
...
llvm-svn: 72062
2009-05-18 23:02:01 +00:00
Daniel Dunbar
13c358d9b8
Remove -fprintf-source-range-info from the Driver (this was renamed)
...
llvm-svn: 72061
2009-05-18 23:01:24 +00:00
Eli Friedman
9f30fc33d9
Move ASTConsumers.h to include/clang/Frontend, and move the associated
...
.cpp files to lib/Frontend. (As proposed on cfe-dev.)
llvm-svn: 72060
2009-05-18 22:50:54 +00:00
Eli Friedman
f22439a709
Move the Wno-rewrite-macros option out of RewriteObjC.cpp in prepration
...
for moving ASTConsumers.h to include/clang/Frontend.
llvm-svn: 72059
2009-05-18 22:39:16 +00:00
Douglas Gregor
38e7f8bd6d
Template instantiation for imaginary literals, because they were next in Expr.h
...
llvm-svn: 72058
2009-05-18 22:38:38 +00:00
Eli Friedman
a63ab2dc76
Rename the factory function for the ObjC rewriter to something sane.
...
llvm-svn: 72055
2009-05-18 22:29:17 +00:00
Eli Friedman
e5594d724b
Move AnalysisConsumer out of ASTConsumers.h in preparation for moving
...
ASTConsumers.h to include/clang/Frontend.
llvm-svn: 72054
2009-05-18 22:25:55 +00:00
Eli Friedman
94cf21e282
Refactor ASTConsumers to take a raw_ostream instead of a filename where
...
appropriate. There shouldn't be any significant functionality change.
llvm-svn: 72052
2009-05-18 22:20:00 +00:00
Douglas Gregor
8e35e2d7ae
"This patch fixes an obvious buffer overrun in
...
SelectInterestingSourceRegion()," from Jay Foad!
llvm-svn: 72049
2009-05-18 22:09:16 +00:00
Douglas Gregor
4182e32172
Fix sorting of using directives, from Jay Foad
...
llvm-svn: 72048
2009-05-18 22:06:54 +00:00
Daniel Dunbar
82b22101e6
Reformat a comment
...
llvm-svn: 72046
2009-05-18 21:47:54 +00:00
Daniel Dunbar
f7a24e176c
Several fixes to the clang man page.
...
- -emit-llvm isn't a stage selection option.
- Document -O4 and -flto.
- -ObjC++ and -ObjC apply to all inputs, not subsequent ones.
- Some versions of pod2man aren't happy about the comment after =over=?
- Some minor grammar fixes.
llvm-svn: 72044
2009-05-18 21:34:46 +00:00
Douglas Gregor
655fc35fcd
Deal with an icky corner case where we were complaining that a catch
...
statement was using an rvalue reference during the template
definition. However, template instantiations based on an lvalue
reference type are well-formed, so we delay checking of these property
until template instantiation time.
llvm-svn: 72041
2009-05-18 21:08:14 +00:00
Fariborz Jahanian
c1585be6bd
more printf attribute on block declaration and
...
checking when block is envoked. In progress.
llvm-svn: 72039
2009-05-18 21:05:18 +00:00
Daniel Dunbar
c61d0bd8f1
Debug info: Initialize runtime language field correctly for Objective-C
...
interface types.
llvm-svn: 72036
2009-05-18 20:51:58 +00:00
Douglas Gregor
5e16fbe562
Template instantiation for C++ try/catch statements.
...
llvm-svn: 72035
2009-05-18 20:51:54 +00:00
Anders Carlsson
9b02760923
Since we miscompile many cases when declaring a variable with a reference type, make them unsupported for now.
...
llvm-svn: 72034
2009-05-18 19:55:29 +00:00
Anders Carlsson
8dd2947696
Remove an unused builtin.
...
llvm-svn: 72033
2009-05-18 19:25:54 +00:00
Anders Carlsson
2081200b8c
Add 'cmp' SSE builtins and get rid of a bunch of other builtins.
...
llvm-svn: 72032
2009-05-18 19:16:46 +00:00
Douglas Gregor
2f547c7e3e
Include StmtNodes.def to declare Visit methods for all of the known
...
kinds of statements (in the instantiation logic). No functionality
change, but now we'll get linker errors if we add a statement but
forget to introduce its instantiation logic.
llvm-svn: 72031
2009-05-18 19:08:47 +00:00
Douglas Gregor
eaf847ab97
Simplify struct/class tag mismatch warning, per Sebastian's suggestion
...
llvm-svn: 72027
2009-05-18 18:46:22 +00:00
Daniel Dunbar
9b097a81fe
Simplify tests now that GNU runtime supports exception handling.
...
llvm-svn: 72021
2009-05-18 17:43:32 +00:00
Fariborz Jahanian
28c433dcda
Minor tweak to support format attribute on blocks. No change in functionality.
...
llvm-svn: 72020
2009-05-18 17:39:25 +00:00
Daniel Dunbar
70f924df8a
Avoid potential out-of-bounds access in SourceManager::getLineNumber.
...
- Chris, please see added FIXMEs.
llvm-svn: 72019
2009-05-18 17:30:52 +00:00
Douglas Gregor
b191180042
Oops, dropped a -verify
...
llvm-svn: 72016
2009-05-18 17:02:28 +00:00
Douglas Gregor
8567358cc9
When instantiating the definition of a member function of a class
...
template, introduce that member function into the template
instantiation stack. Also, add diagnostics showing the member function
within the instantiation stack and clean up the qualified-name
printing so that we get something like:
note: in instantiation of member function 'Switch1<int, 2, 2>::f'
requested here
in the template instantiation backtrace.
llvm-svn: 72015
2009-05-18 17:01:57 +00:00
Daniel Dunbar
f811647c27
Improve test case a wee bit
...
llvm-svn: 72014
2009-05-18 16:49:49 +00:00
Daniel Dunbar
29f36b4c9a
Silence a Release-Asserts warning.
...
llvm-svn: 72013
2009-05-18 16:48:48 +00:00
Eli Friedman
e6eb2edb50
Fix for PR2386: distinguish between insertion and replacements in the
...
delta tree.
The issue is roughly a conflict in ReplaceText between two kinds of
uses. One, it should be possible to replace a replacement: for example, the
ObjC rewriter calls ReplaceStmt for an expression, then replaces the resulting
expression with another expression. Two, it should be possible to
replace text that already has text inserted before it: for example, the
HTML rewriter inserts a bunch of tags at the beginning of the line, then
tries to escape the first character on the line. This patch
distinguishes the two cases by storing the deltas separately;
essentially, replacements and insertions no longer interfere with
each other.
Another possibility would be to add some sort of flag to ReplaceText, but
this seems a bit more intuitive and flexible.
There are a few downsides to the current solution: one is that there isn't
any way to remove/replace an insertion without touching additional
surrounding text; if such an operation turns out to be useful, an
additional method or flag can be added. Another is that an insertion
and replacing a string of length zero are distinct operations; I'm not
sure how to resolve this, or whether it will be confusing in practice.
This is relatively sensitive code, so please test and tell me if
anything breaks.
llvm-svn: 72000
2009-05-18 13:56:52 +00:00
Eli Friedman
cc89325969
Remove tabs.
...
llvm-svn: 71997
2009-05-18 07:48:06 +00:00
Eli Friedman
174c310967
Remove unused parameter.
...
llvm-svn: 71996
2009-05-18 07:39:39 +00:00
Eli Friedman
07cdffc295
Add some comments to ASTConsumers.h describing what the different
...
ASTConsumers actually do.
llvm-svn: 71992
2009-05-18 01:16:21 +00:00
Anders Carlsson
ee13926fbe
Make ActOnWhileStmt take a FullExprArg for the condition expr.
...
llvm-svn: 71990
2009-05-17 21:22:26 +00:00
Anders Carlsson
24824e5009
Make ActOnExprStmt take a FullExprArg.
...
llvm-svn: 71989
2009-05-17 21:11:30 +00:00
Anders Carlsson
0e70d84e29
Fix instantiate-function-1.cpp.
...
llvm-svn: 71988
2009-05-17 19:43:12 +00:00
Anders Carlsson
cdf1ca1cf4
Fix DISABLE_SMART_POINTERS build.
...
llvm-svn: 71984
2009-05-17 19:34:11 +00:00
Anders Carlsson
85a307dffb
Implement Sema::ActOnFinishFullExpr and create a CXXExprWithTemporaries node if necessary.
...
llvm-svn: 71983
2009-05-17 18:41:29 +00:00
Anders Carlsson
5262746c28
Add the FullExprArg wrapper and use it for if statement conditions.
...
llvm-svn: 71982
2009-05-17 18:26:53 +00:00
Anders Carlsson
23ca0b4869
Add support for converting member pointer types to LLVM types. Also mangle pointer to member functions correctly and add tests.
...
llvm-svn: 71981
2009-05-17 17:41:20 +00:00
Fariborz Jahanian
078cd52297
This patch fixes two bugs in the GNU Objective-C runtime implementation. One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed). The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly.
...
Patch by David Chisnall.
llvm-svn: 71980
2009-05-17 16:49:27 +00:00
Anders Carlsson
9303134cef
Add FIXME about not using MemberExpr nodes when the base type is a dependent type.
...
llvm-svn: 71979
2009-05-17 16:28:18 +00:00
Anders Carlsson
32440a0f48
Use the Itanium ABI for member pointers. Add a missing 'break' statement and a test case
...
llvm-svn: 71972
2009-05-17 02:06:04 +00:00
Eli Friedman
8f1d33e218
A couple of tweaks to make -ast-print produce code that's closer to
...
valid C code.
llvm-svn: 71971
2009-05-17 01:05:34 +00:00
Anders Carlsson
3c01271e93
Rewrite PureVirtualMethodCollector to use the overridden methods. Fixes <rdar://problem/6854087>
...
llvm-svn: 71970
2009-05-17 00:00:05 +00:00
Anders Carlsson
776a1403ed
Add OldMD to the list of methods NewMD overrides
...
llvm-svn: 71969
2009-05-16 23:59:08 +00:00
Anders Carlsson
36d87e179a
Add setters/getters to CXXMethodDecl so it can keep track of which virtual member functions it overrides (if any)
...
llvm-svn: 71968
2009-05-16 23:58:37 +00:00
Eli Friedman
15af3ee6a9
Make the RAII extension warning silencing for __extension__ a bit
...
narrower, so it doesn't catch expresions that aren't sub-expressions of
__extension__ operator.
llvm-svn: 71967
2009-05-16 23:40:44 +00:00
Eli Friedman
678d3bac03
Targets without long long should reduce the size of intmax_t
...
accordingly.
llvm-svn: 71966
2009-05-16 23:30:57 +00:00
Eli Friedman
ce7f900b3b
Refactor address-of-void extension a bit so that it's more obviously
...
correct. No functionality change, as far as I know.
llvm-svn: 71965
2009-05-16 23:27:50 +00:00
Eli Friedman
c3dcdd0980
A few minor updates to the user manual.
...
llvm-svn: 71964
2009-05-16 23:17:30 +00:00
Anders Carlsson
7bf3c4227d
Fix another case where the extern-ness of extern "C" wasn't being captured.
...
This makes me think that we should make hasExternalStorage perform this check...
llvm-svn: 71962
2009-05-16 22:05:23 +00:00
Anders Carlsson
5b53576fe4
Don't return member pointer types for static member functions. Fixes 6879261.
...
llvm-svn: 71961
2009-05-16 21:43:42 +00:00
Eli Friedman
b529b01985
PR3942: Don't warn on unsigned overflow in preprocessor expressions.
...
llvm-svn: 71960
2009-05-16 21:24:10 +00:00
Anders Carlsson
d3a69ceaaf
extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.
...
llvm-svn: 71957
2009-05-16 21:02:39 +00:00
Anders Carlsson
524d5a4f5a
Improve checking of member expressions where the base type is a dependent type.
...
llvm-svn: 71956
2009-05-16 20:31:20 +00:00
Daniel Dunbar
f39ea8535b
Update test case; I'm confused why this wasn't failing on the buildbot
...
though?
llvm-svn: 71955
2009-05-16 19:30:01 +00:00
Sebastian Redl
45be55d181
Test case for previous commit. Explicit instantiation does the trick. (Thanks, Anders.)
...
llvm-svn: 71954
2009-05-16 18:59:35 +00:00
Sebastian Redl
e769ecf8ab
Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though.
...
llvm-svn: 71953
2009-05-16 18:50:46 +00:00
Eli Friedman
4f8b8ed2ac
Missing change for r71941 (PR2044).
...
llvm-svn: 71947
2009-05-16 13:58:00 +00:00
Eli Friedman
168fe15b0d
Avoid calling mergeTypes in C++. I think these are the correct C++
...
alternatives, but please correct me if I'm wrong.
I eventually plan to assert in mergeTypes that we aren't in C++ mode
because composite types are fundamentally not a part of C++. The
remaining callers for code in the regression tests are
Sema::WarnConflictingTypedMethods and CodeGenFunction::EmitFunctionProlog;
I'm not quite sure what the correct approach is for those callers.
llvm-svn: 71946
2009-05-16 13:54:38 +00:00
Eli Friedman
e2cad65015
Add stricter checking for va_arg.
...
llvm-svn: 71942
2009-05-16 12:46:54 +00:00
Eli Friedman
54135838e2
PR2044: reject declarations of functions returning variably modified
...
types.
llvm-svn: 71941
2009-05-16 12:15:55 +00:00
Eli Friedman
0b4af8f755
PR3009: Get rid of bogus warning for scalar compound literals.
...
This patch isn't quite ideal in that it eliminates the warning for
constructs like "int a = {1};", where the braces are in fact redundant.
However, that would have required a bunch of refactoring, and it's
much less likely to cause confusion compared to redundant nested braces.
llvm-svn: 71939
2009-05-16 11:45:48 +00:00
Mike Stump
18bb9284ff
Reflow some comments.
...
llvm-svn: 71937
2009-05-16 07:57:57 +00:00
Mike Stump
87c57acfb7
Reflow some comments.
...
llvm-svn: 71936
2009-05-16 07:39:55 +00:00
Mike Stump
6814d1c126
Implement a FIXME, we now pass in the locations of the braces for enums.
...
llvm-svn: 71930
2009-05-16 07:06:02 +00:00
Ted Kremenek
f0d3237474
Update checker build.
...
llvm-svn: 71929
2009-05-16 06:05:27 +00:00
Eli Friedman
b05c41e0a1
Remove useless wrapper.
...
llvm-svn: 71928
2009-05-16 05:56:02 +00:00
Mike Stump
b9075ae9f7
Fixup __extension__ i = 1 parsing. Thanks Eli!
...
llvm-svn: 71927
2009-05-16 04:31:34 +00:00
Ted Kremenek
e4302ee3bb
Fix: <rdar://problem/6893565> False positive: don't flag leaks for return types that cannot be determined to be CF types
...
llvm-svn: 71921
2009-05-16 01:38:01 +00:00
Ted Kremenek
a28565ac62
Fix another bug in BugReporter where we wouldn't always select the bug report in a bug equivalence class with the shortest path.
...
llvm-svn: 71920
2009-05-16 01:11:58 +00:00
Douglas Gregor
30776d419f
Template instantiation for IndirectGotoStmt. Now my life is complete.
...
llvm-svn: 71917
2009-05-16 00:20:29 +00:00
Douglas Gregor
2a2d00f041
Template instantiation for switch statements
...
llvm-svn: 71916
2009-05-15 23:57:33 +00:00
Fariborz Jahanian
6404c420e5
Removed superfluous code.
...
llvm-svn: 71909
2009-05-15 23:19:35 +00:00
Fariborz Jahanian
4447e17c03
Early support for __format__attribute on blocks.
...
Work in progress...
llvm-svn: 71908
2009-05-15 23:15:03 +00:00
Anders Carlsson
789e2cce54
Basic support for member exprs where the base expr type is dependent.
...
llvm-svn: 71907
2009-05-15 23:10:19 +00:00
Daniel Dunbar
9a017d7fcf
Classes with "+load" methods need to go in the non-lazy class list (or
...
else the method will not be found by the runtime at class load time).
llvm-svn: 71904
2009-05-15 22:33:15 +00:00
Douglas Gregor
ca60224bbe
Template instantiation for break and continue statements.
...
llvm-svn: 71903
2009-05-15 22:32:39 +00:00
Douglas Gregor
e5cc0f3288
Introduce the EXPR macro into StmtNodes.def, so that we can
...
distinguish between expression and statement nodes. No functionality
change.
llvm-svn: 71902
2009-05-15 22:19:30 +00:00
Douglas Gregor
5d13868263
Template instantiation for "for" loops
...
llvm-svn: 71901
2009-05-15 22:12:32 +00:00
Ted Kremenek
926dffce01
Update checker build.
...
llvm-svn: 71900
2009-05-15 21:56:27 +00:00
Douglas Gregor
3daa82dba0
Template instantiation for do-while statements.
...
llvm-svn: 71899
2009-05-15 21:56:04 +00:00
Daniel Dunbar
19573e7d29
Factor code for adding module-level class lists into separate method.
...
- No functionality change.
llvm-svn: 71898
2009-05-15 21:48:48 +00:00
Mike Stump
76b824c388
Fixup parsing for (throw,throw) and __extension__ throw 1.
...
llvm-svn: 71897
2009-05-15 21:47:08 +00:00
Douglas Gregor
8a930c3b73
Template instantiation for WhileStmt and CXXConditionDeclExpr.
...
llvm-svn: 71896
2009-05-15 21:45:53 +00:00
Douglas Gregor
8d2ad873e7
Make sure that we use the canonical type for the names of instantiated
...
constructors and destructors. This is a requirement of
DeclarationNameTable::getCXXSpecialName that we weren't assert()'ing,
so it should have been caught much earlier :(
Big thanks to Anders for the test case.
llvm-svn: 71895
2009-05-15 21:18:27 +00:00
Fariborz Jahanian
6802ed9968
improved on diagnosing misplacement of sentinel attributes.
...
No change in functionality.
llvm-svn: 71894
2009-05-15 21:18:04 +00:00
Ted Kremenek
eef7a21507
Add hack to scan-build to fix PR 4215
...
(http://llvm.org/bugs/show_bug.cgi?id=4215 ): When xcodebuild is invoked with
-sdk iphonesimulator3.0, use gcc-4.2 instead of the system default gcc.
llvm-svn: 71891
2009-05-15 21:14:16 +00:00
Fariborz Jahanian
5e15186c9a
added -fblocks to the test.
...
llvm-svn: 71890
2009-05-15 20:49:33 +00:00
Douglas Gregor
3f17b47c7e
Allow instantiation of NULL expressions and statements
...
llvm-svn: 71889
2009-05-15 20:47:12 +00:00
Fariborz Jahanian
0aa5c4565d
This patch finishes off the sentinel attribute handling for
...
blocks and function pointers.
llvm-svn: 71888
2009-05-15 20:33:25 +00:00
Anders Carlsson
2cf4387931
I take it back, InstantiateExpr does not check for null.
...
llvm-svn: 71887
2009-05-15 20:29:28 +00:00
Anders Carlsson
1f911dce22
Instantiation support for 'this'
...
llvm-svn: 71886
2009-05-15 20:26:03 +00:00
Anders Carlsson
50574f5303
No need to null check the expr, Sema::SemaRef.InstantiateExpr handles all that.
...
llvm-svn: 71885
2009-05-15 20:10:48 +00:00
Anders Carlsson
2101e68398
Add SemaTemplateInstantiateStmt.cpp to Xcode project.
...
llvm-svn: 71884
2009-05-15 20:08:59 +00:00
Douglas Gregor
1ec5e9f025
Make sure that the type associated with a class template is dependent.
...
llvm-svn: 71878
2009-05-15 19:11:46 +00:00
Douglas Gregor
9d73cabf22
Template instantiation for "if" statements. Also:
...
- Skip semantic analysis of the "if" condition if it is type-dependent.
- Added the location of the "else" keyword into IfStmt, so that we can
provide it for type-checking after template instantiation.
llvm-svn: 71875
2009-05-15 18:53:42 +00:00
Ted Kremenek
a3d4d7b4fa
Update checker build.
...
llvm-svn: 71874
2009-05-15 18:40:51 +00:00
Anders Carlsson
37604a0984
A C++ member function always has either weak linkage (if it's inline or defined inline) or strong linkage (other cases).
...
llvm-svn: 71873
2009-05-15 18:35:39 +00:00
Douglas Gregor
82049e6bdd
Move statement instantiation into its own file. No functionality change
...
llvm-svn: 71872
2009-05-15 18:22:25 +00:00
Douglas Gregor
12c3a5cedf
When word-wrapping, be more defensive about a ridiculously small number of columns. Fixes <rdar://problem/6892178>
...
llvm-svn: 71870
2009-05-15 18:05:24 +00:00
Douglas Gregor
67da0d97e6
Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody when
...
instantiating the definition of a function from a template.
llvm-svn: 71869
2009-05-15 17:59:04 +00:00
Anders Carlsson
f6e9ece507
Name mangling for class template specializations and template arguments.
...
llvm-svn: 71861
2009-05-15 16:09:15 +00:00
Chris Lattner
4579b76ff6
Fix processing of -Ufoo to not inject "#undef foo 1" into the predefines
...
buffer. This caused exciting nonsense like this:
$ clang t.c -fsyntax-only -UMACRO
In file included from <built-in>:104:
<command line>:1:14: warning: extra tokens at end of #undef directive [-Wextra-tokens]
#undef MACRO 1
^
//
1 diagnostic generated.
rdar://6891800
llvm-svn: 71860
2009-05-15 16:08:43 +00:00
Ted Kremenek
3281977dbb
Fix crash when deriving the enclosing summary of a method whose first selector slot has a null IdentifierInfo*. This happens when analyzing Growl.
...
llvm-svn: 71857
2009-05-15 15:49:00 +00:00
Ted Kremenek
4785e41c12
Remove extra whitespace character in string literal. Purely cosmetic.
...
llvm-svn: 71847
2009-05-15 06:02:08 +00:00
Ted Kremenek
2aab87f393
Update checker build.
...
llvm-svn: 71846
2009-05-15 05:59:34 +00:00
Ted Kremenek
3d436c7b35
Use dyn_cast instead of cast to allow our assumptions to be safely wrong.
...
llvm-svn: 71843
2009-05-15 05:34:49 +00:00
Ted Kremenek
608a6176a1
Cleanup internal checks bug reporting, allowing intermediate diagnostics to be generated for bad argument warnings, bad branches, etc.
...
llvm-svn: 71838
2009-05-15 05:25:09 +00:00
Ted Kremenek
46727df06a
Re-enable passing analyzer options from scan-build to ccc-analyzer.
...
llvm-svn: 71836
2009-05-15 04:20:31 +00:00
Ted Kremenek
f9903da7fa
Don't strip quotes in compiler line for -D arguments.
...
Fixes PR 4205.
llvm-svn: 71835
2009-05-15 04:07:18 +00:00
Ted Kremenek
73777059f0
BugReporter (extensive diagnostics): Do not include the range of target '}'
...
llvm-svn: 71832
2009-05-15 02:46:13 +00:00
Ted Kremenek
18665fe3c9
PathDiagnosticLocation::asRange(): for a PathDiagnosticLocation, the range of a DeclStmt is only the decl, not
...
the decl + initializer.
llvm-svn: 71831
2009-05-15 02:05:25 +00:00
Ted Kremenek
cfe7d02b2c
BugReporter (extensive diagnostics): Add control-flow piece to '}' in
...
loop body when generating 'Looping back to the head of the loop'
diagnostics.
llvm-svn: 71829
2009-05-15 01:50:15 +00:00
Anders Carlsson
19b8c4ce36
Instantiate return statements.
...
llvm-svn: 71825
2009-05-15 00:48:27 +00:00
Mike Stump
2c002929b2
Fixup debug information for the location information for __block
...
variables. For this to work, the backend needs to handle more complex
forms for locations.
A typical utterance would be:
%forwarding = getelementptr %0* %use_by_ref, i32 0, i32 1 ; <i8**> [#uses=1]
%0 = load i8** %forwarding ; <i8*> [#uses=1]
%1 = bitcast i8* %0 to %0* ; <%0*> [#uses=1]
%x = getelementptr %0* %1, i32 0, i32 4 ; <i32*> [#uses=1]
%2 = bitcast i32* %x to { }* ; <{ }*> [#uses=1]
call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*))
Presently when selection finds something it doesn't understand, it
just avoids generating any information, which is safe, just
incomplete. Radar 6867696
llvm-svn: 71824
2009-05-15 00:29:54 +00:00
Anders Carlsson
03b0dd5913
Add NullStmt::Clone and use it
...
llvm-svn: 71823
2009-05-15 00:21:21 +00:00
Anders Carlsson
f42de874b3
Instantiate goto and label statements. (Very useful, I know)
...
llvm-svn: 71822
2009-05-15 00:15:26 +00:00
Anders Carlsson
ee209a6501
Add SemaTemplateInstantiateExpr.cpp to Xcode project.
...
llvm-svn: 71820
2009-05-15 00:10:12 +00:00
Douglas Gregor
923feac4e2
Implement template instantiation for DeclStmt
...
llvm-svn: 71818
2009-05-15 00:01:03 +00:00
Fariborz Jahanian
0c20bddc41
Don't warn if result/argument type of an implemented
...
method is a qualified id which conforms to the matching type
of its method declaration.
llvm-svn: 71817
2009-05-14 23:52:54 +00:00
Douglas Gregor
0555e5fbce
Template instantiation for the NULL statement. Lame, I know
...
llvm-svn: 71816
2009-05-14 23:40:54 +00:00
Douglas Gregor
b4850465b7
Introduce basic support for instantiating the definitions of member
...
functions of class templates. Only compound statements and expression
statements are currently implemented.
llvm-svn: 71814
2009-05-14 23:26:13 +00:00
Anders Carlsson
0a7c01ff2b
Check that the function being overridden is virtual.
...
llvm-svn: 71802
2009-05-14 22:15:41 +00:00
Anders Carlsson
e0dd1d57b3
Improvements to the FunctionDecl getters/setters.
...
llvm-svn: 71800
2009-05-14 21:46:00 +00:00
Douglas Gregor
372565211e
Introduce a stack of instantiation scopes that are used to store the mapping from variable declarations that occur within templates to their instantiated counterparts
...
llvm-svn: 71799
2009-05-14 21:44:34 +00:00