Anders Carlsson
d27a0c2395
Change indentation for a couple of files in the Xcode project.
...
llvm-svn: 57120
2008-10-05 18:04:30 +00:00
Chris Lattner
465fa32cd5
Wrap long lines and other minor cleanups, no functionality change.
...
llvm-svn: 57119
2008-10-05 17:34:18 +00:00
Anders Carlsson
c442c92b6f
Remove copyright notice, we decided not to have them.
...
llvm-svn: 57118
2008-10-05 17:21:08 +00:00
Argyrios Kyrtzidis
5af11b2462
Move the TentativeParsingResult enum closer to where it gets used.
...
No functionality change.
llvm-svn: 57115
2008-10-05 17:02:44 +00:00
Argyrios Kyrtzidis
bc28fefcde
Disambiguate between a declaration or an expression, in the 'for-init-statement' part of a 'for' statement.
...
llvm-svn: 57112
2008-10-05 15:50:46 +00:00
Argyrios Kyrtzidis
2534620b4e
Fix Parser::isCXXConditionDeclaration to properly resolve declarations.
...
llvm-svn: 57111
2008-10-05 15:19:49 +00:00
Argyrios Kyrtzidis
71f3e19df0
Disambiguate between a declaration or expression for the 'condition' part of a if/switch/while/for statement.
...
llvm-svn: 57109
2008-10-05 15:03:47 +00:00
Argyrios Kyrtzidis
7b87f27438
Consider GNU attributes when doing ambiguity resolution.
...
llvm-svn: 57108
2008-10-05 14:27:18 +00:00
Zhongxing Xu
8c9771bdf0
Remove redundant parameter and rename StMgr to StateMgr.
...
llvm-svn: 57107
2008-10-05 12:12:48 +00:00
Daniel Dunbar
93bc49d882
Add X86 builtin code generation test case.
...
llvm-svn: 57104
2008-10-05 06:38:36 +00:00
Daniel Dunbar
363a5c0a1b
Improve C language testing coverage.
...
llvm-svn: 57103
2008-10-05 06:36:33 +00:00
Daniel Dunbar
35bd17f1a5
Fix X86 palignr[128] builtins to match LLVM.
...
llvm-svn: 57102
2008-10-05 06:35:41 +00:00
Daniel Dunbar
b11d5d65e8
Add some builtins to codegen test case.
...
llvm-svn: 57101
2008-10-05 06:34:45 +00:00
Daniel Dunbar
b8ed192605
Make VectorType printing less broken.
...
- Print size as number of elements times "sizeof(elt type)", not
perfect but better than just printing the completely wrong type.
llvm-svn: 57100
2008-10-05 05:43:11 +00:00
Daniel Dunbar
e47e96a4a5
Fix another X86 builtin definitions.
...
- vec_set_v4hi had "v4s" in place of "V4s"
llvm-svn: 57099
2008-10-05 05:21:00 +00:00
Daniel Dunbar
91d8be141b
Fix some X86 builtin definitions.
...
- cmp instructions return int
- storedqu had bad const qualifier
- pmuldq128 used invalid type code
llvm-svn: 57098
2008-10-05 05:14:37 +00:00
Daniel Dunbar
0af89ff0fb
Add -rewrite-macros test case.
...
llvm-svn: 57094
2008-10-05 01:39:04 +00:00
Daniel Dunbar
374b8b4269
Allow -verify to be used with -rewrite-macros.
...
llvm-svn: 57093
2008-10-05 01:38:39 +00:00
Daniel Dunbar
91d085e368
Coverage test for targets.
...
- This pushes us over 80% coverage of executable LOC.
llvm-svn: 57092
2008-10-05 01:04:25 +00:00
Steve Naroff
47ddedab08
Update VC++ project file
...
llvm-svn: 57090
2008-10-05 00:52:59 +00:00
Daniel Dunbar
05d93dd73d
Improve codegen coverage tests.
...
- Hit debug info generation.
- Hit both ObjC runtimes.
llvm-svn: 57088
2008-10-05 00:31:54 +00:00
Daniel Dunbar
6b57b45b4d
Add dummy -ast-dump support for ObjC category implementations.
...
llvm-svn: 57087
2008-10-05 00:31:15 +00:00
Steve Naroff
8f9be42072
Remove old diag that alerted the user to a limitation we no longer have:-)
...
llvm-svn: 57086
2008-10-05 00:12:46 +00:00
Argyrios Kyrtzidis
72d8149a1e
Append the test runs with '&&'.
...
llvm-svn: 57085
2008-10-05 00:08:56 +00:00
Argyrios Kyrtzidis
2c7137d8d1
Resolve ambiguous C++ statements (C++ 6.8p1).
...
'ParseTentative.cpp' implements the functionality needed to resolve ambiguous C++ statements, to either a declaration or an expression, by "tentatively parsing" them.
llvm-svn: 57084
2008-10-05 00:06:24 +00:00
Steve Naroff
02da7667d2
Create a function, eliminating some redundancy between SynthesizeBlockInitExpr() and SynthesizeBlockLiterals().
...
llvm-svn: 57083
2008-10-05 00:06:12 +00:00
Steve Naroff
c7a80a5533
Finish implementing copy/dispose helpers for imported block decls.
...
llvm-svn: 57082
2008-10-04 23:47:37 +00:00
Daniel Dunbar
83f705ac20
Add coverage tests of C and Obj-C language features.
...
- AST printing, dumping, serialization, codegen.
- HTML printing.
- Parser callbacks.
Several of these are XFAIL because they trigger unimplemented code.
llvm-svn: 57081
2008-10-04 23:47:28 +00:00
Daniel Dunbar
e773d5ff16
Set exit code properly on "Unexpected program action".
...
llvm-svn: 57080
2008-10-04 23:42:49 +00:00
Daniel Dunbar
4777ba0102
Desensitize env-include-paths.c to the directory it is running in.
...
- It would probably be better if TestRunner.sh canonicalized this.
llvm-svn: 57075
2008-10-04 21:05:04 +00:00
Daniel Dunbar
3ca0a634c2
Bug fix, CPATH="" does not add '.' to search path.
...
llvm-svn: 57072
2008-10-04 20:58:18 +00:00
Daniel Dunbar
23bd6cc156
Add test/Driver.
...
- env-include-paths.c is XFAIL as it exposed a bug.
Add test/Coverage.
- For tests which achieve code coverage but don't validate anything.
llvm-svn: 57070
2008-10-04 20:46:41 +00:00
Daniel Dunbar
fdfb0a0d5e
De-XFAIL test/Parser/pragma-pack.c
...
llvm-svn: 57069
2008-10-04 19:45:56 +00:00
Chris Lattner
464e17ab20
switch to using -verify
...
llvm-svn: 57068
2008-10-04 19:43:25 +00:00
Chris Lattner
cc498392a2
Move the expected-warning lines to a place that clang -verify will pick them
...
up. Speculatularly hacktastic, but strangely beautiful?
Daniel, lines 20/21 are rejected, please investigate.
llvm-svn: 57067
2008-10-04 19:38:15 +00:00
Daniel Dunbar
921b968841
Add Parser support for #pragma pack
...
- Uses Action::ActOnPragmaPack
- Test case is XFAIL pending verifier fixes.
llvm-svn: 57066
2008-10-04 19:21:03 +00:00
Daniel Dunbar
405965323d
Add Preprocessor::RemovePragmaHandler.
...
- No functionality change.
llvm-svn: 57065
2008-10-04 19:17:46 +00:00
Steve Naroff
4017d15fed
Add indirection required for byref BlockDeclRefExpr's.
...
llvm-svn: 57063
2008-10-04 18:52:47 +00:00
Steve Naroff
564e97a2de
Handle bookkeeping for imported blocks (in SynthesizeBlockImpl).
...
This code was "lost" with my recent changes to SynthesizeBlockFunc.
llvm-svn: 57056
2008-10-04 18:00:11 +00:00
Ted Kremenek
c23dcdbb7f
Add MemRegion.cpp to VS project.
...
llvm-svn: 57055
2008-10-04 17:55:52 +00:00
Steve Naroff
87b9d298b8
Cut/paste error...need to use the expression "name" for member references (or other complex expressions that can embed a block pointer type)
...
llvm-svn: 57054
2008-10-04 17:45:51 +00:00
Steve Naroff
756efbc7f7
Clear the map that associated the rewritten block with it's corresponding BlockExpr.
...
llvm-svn: 57053
2008-10-04 17:10:02 +00:00
Steve Naroff
5f96e4dffc
Moved main control flow functions to bottom of file.
...
Reworked control flow to:
- rewrite the block expr body "in place".
- used Chris's new rewriter hook "getRewritenText" to "lift" the text for later use.
- finally, we do the block expr text replacement.
llvm-svn: 57052
2008-10-04 17:06:23 +00:00
Ted Kremenek
d1036be0ef
Updated checker build.
...
llvm-svn: 57045
2008-10-04 06:53:56 +00:00
Ted Kremenek
5ca90a244f
This is a big patch, but the functionality change is small and the rest of the patch consists of deltas due to API changes.
...
This patch overhauls the "memory region" abstraction that was prototyped (but never really used) as part of the Store.h. This patch adds MemRegion.h and MemRegion.cpp, which defines the class MemRegion and its subclasses. This classes serve to define an abstract representation of memory, with regions being layered on other regions to to capture the relationships between fields and variables, variables and the address space they are allocated in, and so on.
The main motivation of this patch is that key parts of the analyzer assumed that all value bindings were to VarDecls. In the future this won't be the case, and this patch removes lval::DeclVal and replaces it with lval::MemRegionVal. Now all pieces of the analyzer must reason about abstract memory blocks instead of just variables.
There should be no functionality change from this patch, but it opens the door for significant improvements to the analyzer such as field-sensitivity and object-sensitivity, both which were on hold until the memory abstraction got generalized.
The memory region abstraction also allows type-information to literally be affixed to a memory region. This will allow the some now redundant logic to be removed from the retain/release checker.
llvm-svn: 57042
2008-10-04 05:50:14 +00:00
Zhongxing Xu
8d1928a4ca
Reverse the RHSBlock of LogicalOp && and ||
...
llvm-svn: 57041
2008-10-04 05:48:38 +00:00
Chris Lattner
879876d26a
add a disclaimer
...
llvm-svn: 57038
2008-10-03 23:31:37 +00:00
Chris Lattner
7c306a70b9
add a new Rewriter::getRewritenText method that returns the text for a range
...
that includes any edits in the range.
llvm-svn: 57037
2008-10-03 23:31:16 +00:00
Steve Naroff
3d5a11c622
Remove an old/vacuous if clause.
...
llvm-svn: 57036
2008-10-03 23:00:50 +00:00
Steve Naroff
e3e45a8c43
More fun & games with the block rewriter.
...
llvm-svn: 57028
2008-10-03 20:28:15 +00:00
Daniel Dunbar
325601a9e5
Merge postfix attributes on record decls.
...
llvm-svn: 57019
2008-10-03 17:33:35 +00:00
Daniel Dunbar
e4ac7a4059
Remove a FIXME.
...
llvm-svn: 57015
2008-10-03 16:42:10 +00:00
Steve Naroff
a2d71df5b9
Rewrite global block expressions.
...
llvm-svn: 57004
2008-10-03 15:38:09 +00:00
Steve Naroff
239f6f9b24
- Add a convenience constructor to Type.
...
- Many rewriter modifications.
llvm-svn: 57003
2008-10-03 15:04:50 +00:00
Steve Naroff
7bf080c9cc
Rework SynthesizeBlockImpl() to include a constructor.
...
llvm-svn: 57001
2008-10-03 12:09:49 +00:00
Daniel Dunbar
4d601119c3
Pass postfix attributes to ActOnFields (mismarked a file).
...
llvm-svn: 56993
2008-10-03 02:05:12 +00:00
Daniel Dunbar
15619c7e4b
Pass postfix attributes to ActOnFields.
...
llvm-svn: 56992
2008-10-03 02:03:53 +00:00
Daniel Dunbar
438b0c0c03
Bug fix, ccc was passing -std twice.
...
llvm-svn: 56991
2008-10-03 01:54:54 +00:00
Steve Naroff
49428dbdd5
Get the right location to insert the synthesized block literals/functions.
...
llvm-svn: 56987
2008-10-03 00:12:09 +00:00
Steve Naroff
2231569f01
Add getTypeSpecStartLoc() to VarDecls and FunctionDecls.
...
This is a temporary solution to help with the block rewriter (though it certainly has general utility).
Once DeclGroup's are implemented, this SourceLocation should be stored with it (since it applies to all the decls).
llvm-svn: 56985
2008-10-03 00:02:03 +00:00
Steve Naroff
ddb1492288
Name changes and some cleanup of preamble.
...
llvm-svn: 56984
2008-10-02 23:30:43 +00:00
Daniel Dunbar
dc2ab1740a
Add Builtins.def attribute for "can be a constant expression".
...
- Enabled for builtins which are always constant expressions
(__builtin_huge_val*, __builtin_inf*, __builtin_constant_p,
__builtin_classify_type, __builtin___CFStringMakeConstantString).
Added Builtin::Context::isConstantExpr.
- Currently overly simply interface which only works for builtins
whose constantexprness does not depend on their arguments.
CallExpr::isBuiltinConstantExpr now takes an ASTContext argument.
llvm-svn: 56983
2008-10-02 23:30:31 +00:00
Daniel Dunbar
dd9b2d16f9
Add support for format string checking of object-size checking
...
versions of sprintf and friends.
- Added FIXME that this mechanism should be generalized.
llvm-svn: 56962
2008-10-02 18:44:07 +00:00
Daniel Dunbar
e23f28f8a5
Emit error unsupported for break/continue/goto inside Obj-C exception
...
handling blocks.
- This has false positives, but at least prevents miscompiles.
llvm-svn: 56958
2008-10-02 18:02:06 +00:00
Daniel Dunbar
92c4c4af58
Fix ccc handling of -mmacosx-version-min.
...
llvm-svn: 56956
2008-10-02 17:26:37 +00:00
Steve Naroff
d40a39626c
Changed Sema::CheckForConstantInitializer to allow global block literals.
...
This commit also includes some name changes in the blocks rewriter (no functionality change).
llvm-svn: 56955
2008-10-02 17:12:56 +00:00
Daniel Dunbar
c3d16493ae
(LLVM up) Rename IRBuilder::IsNonNull -> IsNotNull.
...
llvm-svn: 56954
2008-10-02 17:05:36 +00:00
Daniel Dunbar
d55a81e7fc
Unbreak build: claim an extra bit for BuiltinID.
...
llvm-svn: 56952
2008-10-02 16:40:43 +00:00
Daniel Dunbar
d03c02873a
(llvm up) If the target triple is unspecified, automatically set the
...
OS version part to that of the host on darwin.
llvm-svn: 56943
2008-10-02 01:21:33 +00:00
Daniel Dunbar
4dd154663e
Drop code to validate OS part of target triple on darwin, too fragile.
...
llvm-svn: 56941
2008-10-02 00:26:24 +00:00
Ted Kremenek
3aa89a971d
Enhance NSError** checking with analogous checking for CFErrorRef*.
...
Expand checking to include functions, not just methods.
llvm-svn: 56938
2008-10-01 23:24:09 +00:00
Mon P Wang
e13447ec81
Added SSE4.1 blend intrinsics
...
llvm-svn: 56936
2008-10-01 23:08:39 +00:00
Ted Kremenek
e8ce52e44b
Updated checker build.
...
llvm-svn: 56916
2008-10-01 05:27:13 +00:00
Ted Kremenek
63249b6e57
Added test case.
...
llvm-svn: 56915
2008-10-01 05:05:46 +00:00
Ted Kremenek
8dcd40768e
Use LVal::IsLValType(T) instead of checking to see if the type is an "lvalue" type directly.
...
llvm-svn: 56912
2008-10-01 05:02:13 +00:00
Ted Kremenek
f56afd7cdd
Update checker build.
...
llvm-svn: 56909
2008-10-01 02:03:02 +00:00
Daniel Dunbar
e8813812eb
ccc: Use CCC_NATIVE=1 by default.
...
- So far this works fairly well for me for building applications
using clang as a gcc substitute. If you are using ccc for a
different purpose and this is a problem, speak up! Note you can
also use CCC_NATIVE=0 to disable.
- Also, turn CCC_ECHO off as default.
- Also, pass through -Wl, to linker.
llvm-svn: 56904
2008-10-01 01:10:22 +00:00
Daniel Dunbar
fbe68a84f8
NeXT: Update to use CreateRuntimeFunction for the routines it imports.
...
llvm-svn: 56902
2008-10-01 01:06:06 +00:00
Daniel Dunbar
23fd462f48
Add simple interface for protecting runtime functions from name
...
collisions.
- Provide CodeGenModule::CreateRuntimeFunction which guarantees that
the function it creates will have the provided name in the final
module. This allows the runtime to have its functions protected
from declarations of the same name in the source code.
- One could argue that this is a reason to abuse the llvm::Module
namespace for dealing with function redeclarations. However, that
approach seems conceptually flawed to me. This one also happens to
be somewhat more efficient.
No functionality change.
llvm-svn: 56899
2008-10-01 00:49:24 +00:00
Ted Kremenek
d331d09e2f
Add a QualType to ConjuredSymbol to represent the type and size of the symbol.
...
Use this updated interface when invalidating arguments passed by reference; the type of symbol is of the object passed by reference, not the reference itself.
llvm-svn: 56894
2008-10-01 00:21:14 +00:00
Ted Kremenek
e8450fefdd
Support -mmacosx-version-min
...
llvm-svn: 56892
2008-09-30 23:40:25 +00:00
Ted Kremenek
7a93cd8ac6
Set reproducibility back to "Always"
...
llvm-svn: 56891
2008-09-30 23:23:58 +00:00
Daniel Dunbar
969b48cba1
ccc: Add support for another batch of OS X linker options, including
...
-mmacosx-version-min.
One might anticipate that at some point I will just break down and go
through the man page. That seems a little too obvious.
llvm-svn: 56890
2008-09-30 22:54:22 +00:00
Daniel Dunbar
123e7d1c2a
ccc: Infer action type upfront.
...
- More straightforward, e.g. -E should always imply action =
'preprocess' (I think).
- Pass another option through for OS X.
llvm-svn: 56884
2008-09-30 21:20:51 +00:00
Chris Lattner
a1cf5f9663
simplify padding, just fold it into the earlier resize.
...
llvm-svn: 56880
2008-09-30 20:53:45 +00:00
Chris Lattner
8b567f9713
fix a potential buffer overrun that Eli noticed
...
llvm-svn: 56879
2008-09-30 20:51:14 +00:00
Daniel Dunbar
106ab3bb42
Fix help for --suppress-system-warnings
...
llvm-svn: 56878
2008-09-30 20:49:53 +00:00
Chris Lattner
59f09b6fe1
Document assumptions that NumericLiteralParser makes with an assertion.
...
llvm-svn: 56876
2008-09-30 20:45:40 +00:00
Chris Lattner
97d749464d
Handle minor version numbers in __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
...
like "10.3.9"
llvm-svn: 56873
2008-09-30 20:30:12 +00:00
Chris Lattner
b5c15e8228
Finish handling of -mmacosx-version-min. If you now do something like:
...
clang -mmacosx-version-min=10.4.9 ...
you'll end up with a target triple like "i686-apple-darwin8.9".
llvm-svn: 56871
2008-09-30 20:16:56 +00:00
Daniel Dunbar
9e3b917965
scan-view: Remove some debugging prints.
...
llvm-svn: 56864
2008-09-30 17:54:44 +00:00
Ted Kremenek
b6c459ea13
Updated checker build.
...
llvm-svn: 56863
2008-09-30 17:53:26 +00:00
Ted Kremenek
05f3ccda24
Default reproducibility to "Not applicable"
...
llvm-svn: 56860
2008-09-30 17:28:54 +00:00
Daniel Dunbar
5f57710392
Add diagnostic for .{lo,hi,e,o} on odd-sized extended vectors.
...
llvm-svn: 56859
2008-09-30 17:22:47 +00:00
Ted Kremenek
9f403161d7
Make "Performance" the default Radar classification for leaks. "Other" for all others (for now).
...
llvm-svn: 56858
2008-09-30 17:12:32 +00:00
Ted Kremenek
fb0fef9157
Make a separate parameter class for "Radar classifications".
...
Do not save the radar classification to the config file.
llvm-svn: 56856
2008-09-30 17:00:30 +00:00
Ted Kremenek
b166299f2b
Add "SelectionParameter" class to represent drop-down boxes.
...
Added "Classification" field to Radar filing.
Modified FileRadar.scpt to take the classification as an argument.
llvm-svn: 56854
2008-09-30 16:37:50 +00:00
Daniel Dunbar
64fd24812a
Change ccc to not pass -x unknown down.
...
Pass through some more Mac OS X linker options.
llvm-svn: 56853
2008-09-30 16:18:31 +00:00
Ted Kremenek
fef3c4092d
Conditionally load/save default parameter value from config file.
...
llvm-svn: 56852
2008-09-30 16:11:33 +00:00
Ted Kremenek
094ff0b061
Use objects to represent form parameters. This allows us to abstract away some
...
of the details of HTML rendering of form parameters, and also us with the
ability to delegate other actions (such as in the filling in of default values)
to specific parameter objects.
llvm-svn: 56851
2008-09-30 16:08:13 +00:00
Steve Naroff
4a82d815de
Fix <rdar://problem/6191148> [sema] Objective-C method lookup (at global scope) fails to handle overloaded selectors properly.
...
Long standing bug in Sema::ActOnInstanceMessage(). We now warn when messaging an "id" with multiple method signatures in scope. The diags are a little verbose, however they can be streamlined if necessary.
llvm-svn: 56843
2008-09-30 14:38:43 +00:00
Nuno Lopes
a459f12862
fix test for latest changes in llvm asm representation
...
llvm-svn: 56842
2008-09-30 14:37:33 +00:00
Steve Naroff
9f9774cd2b
Improved fix for <rdar://problem/6247781> Parser rejecting properly mismatched properties.
...
Needed to make sure the relaxed type checking only applies to "readonly" properties.
llvm-svn: 56838
2008-09-30 10:07:56 +00:00
Nick Lewycky
e275a66538
Add missing include for use of atoi.
...
llvm-svn: 56836
2008-09-30 07:18:57 +00:00
Ted Kremenek
a930b56252
Tabs -> Spaces.
...
llvm-svn: 56833
2008-09-30 05:45:59 +00:00
Ted Kremenek
f1b299952a
Revert last patch, but add a fixme
...
llvm-svn: 56832
2008-09-30 05:35:42 +00:00
Ted Kremenek
76bccf6221
Within the transfer function of UnaryOperatorExpr, handle implicit promotions
...
from the subexpression type to the expression type.
llvm-svn: 56831
2008-09-30 05:32:44 +00:00
Mon P Wang
553b4b912b
Added support for sse intrinsics loadlpd, loadhpd, muldq128, and mulld128
...
llvm-svn: 56830
2008-09-30 05:31:27 +00:00
Chris Lattner
29c54dd6b9
start handling 'mmacosx-version-min', this is not complete yet.
...
llvm-svn: 56828
2008-09-30 01:13:12 +00:00
Daniel Dunbar
2efd538f61
Add infrastructure for proper @finally support.
...
- Provides a basic primitive to jump to an arbitrary basic block,
through the finally code.
- Only used for return statements and rethrow currently. Still need
to handle break, continue and goto.
- Code still needs to be shuffled around to live elsewhere.
llvm-svn: 56827
2008-09-30 01:06:03 +00:00
Chris Lattner
b3793bb415
The definition of __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ follows
...
the target triple on darwin. For example i386-apple-darwin9 -> 1050 because
darwin9 is "10.5".
llvm-svn: 56826
2008-09-30 01:00:25 +00:00
Chris Lattner
7ed3209332
define __PASCAL_STRINGS__ whenever -fpascal-strings is enabled.
...
llvm-svn: 56824
2008-09-30 00:48:48 +00:00
Chris Lattner
006579ddb5
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ is a darwin-specific #define
...
llvm-svn: 56822
2008-09-30 00:46:39 +00:00
Steve Naroff
506e717e4f
Fix <rdar://problem/6247781> Parser rejecting properly mismatched properties.
...
llvm-svn: 56821
2008-09-30 00:24:17 +00:00
Ted Kremenek
7273d01dd4
Updated checker build.
...
llvm-svn: 56819
2008-09-29 23:33:12 +00:00
Chris Lattner
fb8b8f298c
Fix the root cause of PR2750 instead of the side effect.
...
NumericLiteral parser is not careful about overrun because
it should never be possible. It implicitly expects that its
input matched the regex for pp-constant. Because of this, it
knows it can't be pointing to a prefix of something that
looks like a number. This is all fine, except that __LINE__
does not prevent implicit concatenation from happening. Fix
__LINE__ to not do this.
llvm-svn: 56818
2008-09-29 23:12:31 +00:00
Ted Kremenek
887c49d592
Really don't add -isysroot twice.
...
llvm-svn: 56815
2008-09-29 23:06:09 +00:00
Ted Kremenek
6b2e07a292
Don't filter out -fpascal-strings.
...
llvm-svn: 56810
2008-09-29 22:45:28 +00:00
Chris Lattner
4a80a59b6e
Fix va_arg handling to do argument decaying at the correct place. This
...
fixes problems handling references of va_list, which happens on x86_64.
This fixes PR2841 and rdar://6252231
llvm-svn: 56809
2008-09-29 22:28:25 +00:00
Chris Lattner
d9a663aeb9
Make some methods const, add some helpers to FullSourceLoc,
...
and add a dump method to FullSourceLoc! Patch by Nico Weber!
llvm-svn: 56806
2008-09-29 21:46:13 +00:00
Chris Lattner
9bb37fec6a
move ExtVectorElementExpr down into the 'clang extensions' section.
...
Wrap line to 80 cols.
llvm-svn: 56805
2008-09-29 21:30:29 +00:00
Ted Kremenek
01c61b9b2a
Update checker build.
...
llvm-svn: 56804
2008-09-29 21:24:37 +00:00
Steve Naroff
38093af363
Add a random C99 comment/reference.
...
llvm-svn: 56800
2008-09-29 20:07:05 +00:00
Ted Kremenek
8715e1c859
Extend 'IsLValType' to handle BlockPointerTypes.
...
llvm-svn: 56797
2008-09-29 19:17:30 +00:00
Steve Naroff
32d072ca45
Teach Sema::CheckAssignmentConstraints() to allow assignments between id and block pointer types (^{}).
...
llvm-svn: 56793
2008-09-29 18:10:17 +00:00
Steve Naroff
03fc762a02
Fix <rdar://problem/6251012> clang: Blocks are objects too.
...
llvm-svn: 56791
2008-09-29 16:51:41 +00:00
Ted Kremenek
8b89a65136
Discard extra -isysroot options. This fixes:
...
<rdar://problem/6253141> Parser rejection occurs when command line has more than one -isysroot switch
llvm-svn: 56790
2008-09-29 16:15:20 +00:00
Daniel Dunbar
068f7f7092
Fix braindead bug, ID number was hardcoded.
...
llvm-svn: 56789
2008-09-29 16:06:43 +00:00
Steve Naroff
c2036d5da4
Fix <rdar://problem/6253149> property declaration doesn't declare getter and setter.
...
llvm-svn: 56785
2008-09-29 14:20:56 +00:00
Nico Weber
378c5539c8
whitespace and comment changes, to fix grammar and 80 col violations
...
llvm-svn: 56776
2008-09-29 00:25:48 +00:00
Steve Naroff
b6b1abb0f5
Change a NOTE to a FIXME based on feedback from clattner.
...
llvm-svn: 56775
2008-09-28 21:07:52 +00:00
Ted Kremenek
c1048153fe
Updated checker build.
...
llvm-svn: 56774
2008-09-28 17:25:56 +00:00
Steve Naroff
8edb573a79
Fix <rdar://problem/6252129> implementation of method in category doesn't effectively declare it for methods below.
...
llvm-svn: 56771
2008-09-28 14:55:53 +00:00
Steve Naroff
4831c74d40
Fix <rdar://problem/6252108> assigning to argument passed to block should not require __block.
...
llvm-svn: 56770
2008-09-28 14:02:55 +00:00
Chris Lattner
037379d767
Fix rdar://6252231 - cannot call vsnprintf with va_list on x86_64,
...
by decaying __builtin_va_list's type when forming builtins. On
x86-64 (and other targets) __builtin_va_list is a typedef for
an array.
llvm-svn: 56768
2008-09-28 06:05:35 +00:00
Chris Lattner
ff2c187e59
Replace a comparison with a static list of builtins that was wrong (it
...
wasn't covering checking builtins like __builtin___vsnprintf_chk) with
a check that won't get out of date.
llvm-svn: 56767
2008-09-28 05:54:29 +00:00
Chris Lattner
e9d291c038
Fix rdar://6251437, references to enum constant decls in a block
...
don't need a BlockDeclRefExpr.
llvm-svn: 56766
2008-09-28 05:30:26 +00:00
Ted Kremenek
7dbc92a269
Add "Path Length" back to the table of bug reports.
...
llvm-svn: 56765
2008-09-28 04:13:09 +00:00
Steve Naroff
e18f94c20d
Fix <rdar://problem/6252216> compare block to NULL.
...
llvm-svn: 56764
2008-09-28 01:11:11 +00:00
Daniel Dunbar
d3dcb4f8ed
Add support for implicit rethrows in @catch blocks.
...
Comment exception-handling code generation strategy.
llvm-svn: 56763
2008-09-28 01:03:14 +00:00
Daniel Dunbar
a2d3570fc9
Skip redundant if.
...
llvm-svn: 56762
2008-09-28 00:19:22 +00:00
Steve Naroff
edec9ba58d
Fix <rdar://problem/6252226> parser thinks block argument is undefined identifier in NSServices.m
...
llvm-svn: 56761
2008-09-28 00:13:36 +00:00
Daniel Dunbar
7f08678f7d
(Update LLVM) Clean up obj-c exception generation to be a bit more
...
readable and to generate more readable IR.
llvm-svn: 56758
2008-09-27 23:30:04 +00:00
Daniel Dunbar
86919f45cc
Bug fix, codegen @catch(id<X> ...) acceptably.
...
- This should be rejected by sema (IMHO) but that needs some
investigation.
llvm-svn: 56756
2008-09-27 22:21:14 +00:00
Ted Kremenek
21c24f1785
Revert 56735. The old bug categories were more informative.
...
llvm-svn: 56755
2008-09-27 22:02:42 +00:00
Daniel Dunbar
523208fb4a
Simplify generate code for exceptions:
...
- There is no need to branch on the rethrow variable to determine if
we need to call objc_exception_try_exit. We know whether an
exception was thrown, so just branch to a different target if we
want to skip the try_exit.
This is a slight semantic departure from gcc, but only for throwing
nil, which is undefined (and for which gcc emits broken code).
- Also fixes a bug in current code which was calling try_exit too
many times when an exception was uncaught (but there were some
handlers).
Fix bug introduced in prev. commit, the type of the @catch parameter
was uninitialized.
llvm-svn: 56754
2008-09-27 07:36:24 +00:00
Daniel Dunbar
aec553bfdb
Prefer llvm::Function::addFnAttr(...) to F->addAttribute(~0, ...).
...
llvm-svn: 56753
2008-09-27 07:16:42 +00:00
Daniel Dunbar
274ff37583
Simplify code to emit the unified return block and move it to the end
...
of the function.
llvm-svn: 56752
2008-09-27 07:15:59 +00:00
Daniel Dunbar
b22ff59750
Bug fix, make sure to initialize exception object (to rethrow) even
...
when there are no @catch blocks.
Also, eliminated unneeded alloca for the rethrow object.
Also, avoid generating code to rethrow exception if the exception will
trivially always be caught.
llvm-svn: 56751
2008-09-27 07:03:52 +00:00
Daniel Dunbar
da04d7f4ec
Easy fix for nasty bug, exception data buffer had wrong type == wrong
...
(smaller) size == garbage on stack == heisenbugs.
llvm-svn: 56750
2008-09-27 06:32:25 +00:00