Chris Lattner
5b3ddc8ef9
merge recovery-1 into recovery-3.
...
llvm-svn: 60930
2008-12-12 06:21:18 +00:00
Chris Lattner
bc2d77cdf2
merge recovery-2.c into recovery-3.c.
...
Substantially improve error recovery after broken if conditions by
parsing the full if when we have a semantic error instead of using
parser recovery techniques to recover from a semantic error.
This fixes rdar://6094870 - spurious error after invalid 'if' condition
llvm-svn: 60929
2008-12-12 06:19:11 +00:00
Chris Lattner
d8980509b3
minor refactoring of ParseParenExpression
...
llvm-svn: 60928
2008-12-12 06:00:12 +00:00
Chris Lattner
dca17ceb19
add expected diag
...
llvm-svn: 60927
2008-12-12 05:59:56 +00:00
Chris Lattner
db44f532c0
add ownership.h to xcode project
...
llvm-svn: 60926
2008-12-12 05:54:54 +00:00
Anders Carlsson
8a472c3151
Work in preparation for VLAs. Make sure to restore the stack if necessary (Saving the stack isn't implemented right now :)
...
llvm-svn: 60925
2008-12-12 05:52:00 +00:00
Chris Lattner
053441f39d
Fix rdar://6095061 - gcc allows __builtin_choose_expr as an lvalue
...
llvm-svn: 60924
2008-12-12 05:35:08 +00:00
Chris Lattner
54139445ba
Testcase for something that already works. Clang agrees with Comeau,
...
and this makes sense. likely a gcc bug that it doesn't diagnose the bad
restrict.
llvm-svn: 60923
2008-12-12 05:25:55 +00:00
Chris Lattner
b4396f40a0
add codegen support for __func__ and friends, producing the same
...
output that GCC does. rdar://6440297
llvm-svn: 60922
2008-12-12 05:18:02 +00:00
Chris Lattner
f45c5ecb3b
fix rdar://6097892 - gcc incompat: clang rejects __func__, __FUNCTION__, and __PRETTY_FUNCTION__ outside func
...
Yeah, this is "useful".
llvm-svn: 60921
2008-12-12 05:05:20 +00:00
Chris Lattner
81ed6805db
Implement rdar://6138816 - [sema] named bitfields cannot have 0 width
...
llvm-svn: 60920
2008-12-12 04:56:04 +00:00
Douglas Gregor
1d248c53ab
In C++, set the type of each of the enumerators in an enumeration to
...
the type of the enumeration once the enumeration has been defined.
Fix the overloading test-case to properly create enums that promote
the way we want them to.
Implement C++0x promotions from enumeration types to long
long/unsigned long long. We're using these promotions in Carbon.h
(since long long is a common extension).
Fixes PR clang/2954: http://llvm.org/bugs/show_bug.cgi?id=2954
llvm-svn: 60917
2008-12-12 02:00:36 +00:00
Ted Kremenek
864eb39233
PTH:
...
- Added a side-table per each token-cached file with the preprocessor conditional stack. This tracks what #if's are matched with what #endifs and where their respective tokens are in the PTH file. This will allow for quick skipping of excluded conditional branches in the Preprocessor.
- Performance testing shows the addition of this information (without actually utilizing it) leads to no performance regressions.
llvm-svn: 60911
2008-12-11 23:36:38 +00:00
Chris Lattner
ece9ae718b
add annotation
...
llvm-svn: 60907
2008-12-11 23:11:52 +00:00
Sebastian Redl
d65cea8dde
Convert a big bunch of expression parsers to use smart pointers.
...
llvm-svn: 60906
2008-12-11 22:51:44 +00:00
Ted Kremenek
ca153f7349
PTHLexer: Keep track of the location of the last '#' token and provide the means to jump ahead in the token stream.
...
llvm-svn: 60905
2008-12-11 22:41:47 +00:00
Sebastian Redl
90893187c4
Convert some more expression parsers to use smart pointers.
...
llvm-svn: 60904
2008-12-11 22:33:27 +00:00
Sebastian Redl
59b5e517c7
Convert selected expression parsers to use smart pointers.
...
llvm-svn: 60900
2008-12-11 21:36:32 +00:00
Steve Naroff
a5c0db8467
Rename a local predicate to avoid confusion with Type::isBlockPointerType().
...
llvm-svn: 60899
2008-12-11 21:05:33 +00:00
Steve Naroff
5ac4eac3b6
Fixup generated code for imported block decl refs.
...
Found while investigating <rdar://problem/6435837> clang ObjC rewriter: use Block_release instead of Block_destroy.
llvm-svn: 60898
2008-12-11 20:51:38 +00:00
Douglas Gregor
7a4fad1b0b
Address some comments on the name lookup/DeclContext patch from Chris
...
llvm-svn: 60897
2008-12-11 20:41:00 +00:00
Ted Kremenek
67ab296d5c
Remove unused ivar CurTokenIdx.
...
llvm-svn: 60896
2008-12-11 20:39:48 +00:00
Sebastian Redl
bab9a4b5ea
Convert the remaining statement parsers to smart pointers.
...
llvm-svn: 60895
2008-12-11 20:12:42 +00:00
Sebastian Redl
b62406f6e4
Convert some more statement parsers to smart pointers.
...
llvm-svn: 60892
2008-12-11 19:48:14 +00:00
Steve Naroff
e4d722bf2f
Fix <rdar://problem/6435842> clang ObjC rewriter: #include Block.h, Block_private.h or come up with #define to prevent double-definition
...
llvm-svn: 60890
2008-12-11 19:43:14 +00:00
Sebastian Redl
042ad95d4e
Convert a number of statement parsers to smart pointers.
...
llvm-svn: 60888
2008-12-11 19:30:53 +00:00
Steve Naroff
1fa7bd16c8
Fix <rdar://problem/6435382> clang ObjC rewriter: @property/@synthesize and blocks don't work together
...
llvm-svn: 60887
2008-12-11 19:29:16 +00:00
Douglas Gregor
e029561346
Actually distinguish between RecordDecl::field_iterator and RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls.
...
llvm-svn: 60883
2008-12-11 17:59:21 +00:00
Douglas Gregor
91f84216f7
Unifies the name-lookup mechanisms used in various parts of the AST
...
and separates lexical name lookup from qualified name lookup. In
particular:
* Make DeclContext the central data structure for storing and
looking up declarations within existing declarations, e.g., members
of structs/unions/classes, enumerators in C++0x enums, members of
C++ namespaces, and (later) members of Objective-C
interfaces/implementations. DeclContext uses a lazily-constructed
data structure optimized for fast lookup (array for small contexts,
hash table for larger contexts).
* Implement C++ qualified name lookup in terms of lookup into
DeclContext.
* Implement C++ unqualified name lookup in terms of
qualified+unqualified name lookup (since unqualified lookup is not
purely lexical in C++!)
* Limit the use of the chains of declarations stored in
IdentifierInfo to those names declared lexically.
* Eliminate CXXFieldDecl, collapsing its behavior into
FieldDecl. (FieldDecl is now a ScopedDecl).
* Make RecordDecl into a DeclContext and eliminates its
Members/NumMembers fields (since one can just iterate through the
DeclContext to get the fields).
llvm-svn: 60878
2008-12-11 16:49:14 +00:00
Zhongxing Xu
26776c2784
Identify AnonPointeeRegion by the symbol that is concretized.
...
llvm-svn: 60870
2008-12-11 09:08:46 +00:00
Zhongxing Xu
02fe71290a
AnonPointeeRegions are now identified by the MemRegion of the pointer pointing
...
to them.
llvm-svn: 60868
2008-12-11 02:27:34 +00:00
Ted Kremenek
0bc1320d95
Updated checker build.
...
llvm-svn: 60864
2008-12-11 00:20:13 +00:00
Anders Carlsson
591b2224cb
Add another complex promotion test.
...
llvm-svn: 60863
2008-12-10 23:57:51 +00:00
Anders Carlsson
b05961c700
Make sure to promote expressions of the form (floating point + complex integer) correctly, to (complex floating point + complex floating point)
...
llvm-svn: 60862
2008-12-10 23:30:05 +00:00
Ted Kremenek
8e1f05fc26
PreprocessorLexer (and subclasses):
...
- Added virtual method 'getSourceLocation()' (no arguments) that gets the location of the next "observable" location (e.g., next character, next token).
PPLexerChange.cpp:
- Implemented FIXME by using PreprocessorLexer::getSourceLocation() to get the location in the file we are returning to after lexing a #included file. This appears to be slightly faster than having the branch (i.e., 'if(CurLexer)'). It's also not a really hot part of the Preprocessor.
llvm-svn: 60860
2008-12-10 23:20:59 +00:00
Douglas Gregor
85970ca84c
Added a warning when referencing an if's condition variable in the
...
"else" clause, e.g.,
if (int X = foo()) {
} else {
if (X) { // warning: X is always zero in this context
}
}
Fixes rdar://6425550 and lets me think about something other than
DeclContext.
llvm-svn: 60858
2008-12-10 23:01:14 +00:00
Steve Naroff
c68cfcfd03
The "real" fix for <rdar://problem/6424347> clang on xcode: Assertion failed: (0 && "unexpected type"), function mergeTypes,
...
Commit r60845 was premature.
llvm-svn: 60852
2008-12-10 22:14:21 +00:00
Douglas Gregor
9aa8b55d10
Fix PR clang/3175: CheckAddressOfOperand does not handle references to class vars
...
llvm-svn: 60849
2008-12-10 21:26:49 +00:00
Douglas Gregor
872ffce257
Some cleanups to the dependent-types commit, as suggested by Sebastian
...
llvm-svn: 60848
2008-12-10 20:57:37 +00:00
Steve Naroff
13ac125edf
Fix <rdar://problem/6424347> clang on xcode: Assertion failed: (0 && "unexpected type"), function mergeTypes,
...
llvm-svn: 60845
2008-12-10 20:07:25 +00:00
Ted Kremenek
d40ab7b72a
Declare PerIDCache as IdentifierInfo** instead of void*. This is just cleaner. No performance change.
...
llvm-svn: 60843
2008-12-10 19:40:23 +00:00
Steve Naroff
68e167df8e
Fix <rdar://problem/6418623> Bogus block type compatibility warning.
...
llvm-svn: 60842
2008-12-10 17:49:55 +00:00
Steve Naroff
df70577b9c
Fix regression caused by fixing <rdar://problem/6429113> clang ObjC rewriter: crash rewriting file with Blocks and properties
...
llvm-svn: 60839
2008-12-10 14:53:27 +00:00
Douglas Gregor
7307d6ca96
Use a scoped object to manage entry/exit from a parser scope rather than explicitly calling EnterScope/ExitScope
...
llvm-svn: 60830
2008-12-10 06:34:36 +00:00
Anders Carlsson
a726c1763a
Append an extra newline to the module inline asm if it's not empty.
...
llvm-svn: 60827
2008-12-10 02:21:04 +00:00
Ted Kremenek
a30391c31f
Updated checker build.
...
llvm-svn: 60819
2008-12-10 00:50:24 +00:00
Fariborz Jahanian
7572ac5614
Patch to allow a getter call using property dot-syntax notation.
...
llvm-svn: 60816
2008-12-10 00:21:50 +00:00
Sebastian Redl
d9f7b1c230
Modify the move emulation according to the excellent design of Howard Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers.
...
llvm-svn: 60809
2008-12-10 00:02:53 +00:00
Ted Kremenek
42a217f4c0
Fix to BasicStoreManager::getElementLValue: If the base region is a symbol, layer an AnonTypedRegion on top of it.
...
llvm-svn: 60808
2008-12-09 23:50:57 +00:00
Fariborz Jahanian
ea831ee11c
Prevent bogus warning on unimplemented setter/getter when user
...
has added declaration of these methods in its @interface.
llvm-svn: 60803
2008-12-09 22:43:22 +00:00
Ted Kremenek
62cc9daae3
Have BasicStoreManager::getLValueElement() have logic similar to BasicStoreManager::getLValueField() (i.e., don't just return the 'base' as the SVal)
...
llvm-svn: 60795
2008-12-09 21:20:27 +00:00
Steve Naroff
70cb0071c9
Add testcase for commit r60781.
...
llvm-svn: 60793
2008-12-09 20:59:16 +00:00
Fariborz Jahanian
3d8552a75d
Support for implementation of property in the case where
...
the synthesis is in an implementation of s subclass of
a super class where the property has been declared.
llvm-svn: 60792
2008-12-09 20:23:04 +00:00
Sebastian Redl
c13f26873f
Kick out the proof-of-concept ASTOwner and replace it with ASTOwningResult
...
llvm-svn: 60791
2008-12-09 20:22:58 +00:00
Ted Kremenek
93041ba483
Add preliminary CFG support for @throw. We basically treat it like a return statement.
...
llvm-svn: 60790
2008-12-09 20:20:09 +00:00
Ted Kremenek
1857ff4e2c
In GRExprEngine treat @throw as an 'abort' that ends the current path. This is a temporary solution.
...
llvm-svn: 60789
2008-12-09 20:18:58 +00:00
Sebastian Redl
7379577ab0
Lay the groundwork for converting the entire parser-sema chain to smart pointers.
...
llvm-svn: 60782
2008-12-09 19:36:21 +00:00
Steve Naroff
b0498eebc2
Sema::ActOnMethodDeclaration(): Make sure we perform the default function/array conversion for parameter types.
...
This fixes <rdar://problem/6424064> checker on xcode: (possible bad AST) can the type of a method parameter really have "isFunctionType() == true"?
and http://llvm.org/bugs/show_bug.cgi?id=2997 .
llvm-svn: 60781
2008-12-09 19:36:17 +00:00
Chris Lattner
2e41b0e6e7
Fix a serious null termination bug found by David Chisnall!
...
llvm-svn: 60778
2008-12-09 19:10:54 +00:00
Sebastian Redl
e0c2affc5e
Fill in C++ status table for expressions.
...
llvm-svn: 60763
2008-12-09 14:40:01 +00:00
Sebastian Redl
17f2c7d251
Consistently use smart pointers for stmt and expr nodes in parser local variables.
...
llvm-svn: 60761
2008-12-09 13:15:23 +00:00
Steve Naroff
08628db9d2
Fix <rdar://problem/6429113> clang ObjC rewriter: crash rewriting file with Blocks and properties
...
More fancy footwork to cope with rewriting property 'setters'.
llvm-svn: 60760
2008-12-09 12:56:34 +00:00
Zhongxing Xu
2a46a8ef52
initialize member variable.
...
llvm-svn: 60759
2008-12-09 12:26:46 +00:00
Zhongxing Xu
2e8123e5bb
Add utility method. Remove an unused method.
...
llvm-svn: 60758
2008-12-09 10:51:19 +00:00
Ted Kremenek
c28ce29a12
[static analyzer] Extend VLA size checking to look for undefined sizes.
...
llvm-svn: 60734
2008-12-09 00:44:16 +00:00
Ted Kremenek
08134c984b
Update Driver to new interface for LiveVariables.
...
llvm-svn: 60732
2008-12-09 00:17:51 +00:00
Ted Kremenek
d7266bf20a
Add zero-sized VLA check test case.
...
llvm-svn: 60731
2008-12-09 00:14:48 +00:00
Ted Kremenek
6ee0a11814
Fixed LiveVariables bug where we didn't consider block-level expressions that functioned as the size of a VLA to be live.
...
llvm-svn: 60730
2008-12-09 00:14:14 +00:00
Fariborz Jahanian
8e0079c787
Change condition under which 'retain'/'copy' are directly evaluated.
...
llvm-svn: 60729
2008-12-08 23:56:17 +00:00
Ted Kremenek
8f7afdd21e
Add checking for zero-sized VLAs.
...
llvm-svn: 60726
2008-12-08 22:47:34 +00:00
Ted Kremenek
223005f35a
Incorporate MissingDealloc_IBOutlet.m test case into MissingDealloc.m
...
llvm-svn: 60722
2008-12-08 22:05:43 +00:00
Ted Kremenek
1f9dd45f57
Incorporate MissingDeallc_SEL.m test case into MissingDealloc.m
...
llvm-svn: 60721
2008-12-08 22:01:50 +00:00
Ted Kremenek
8f5c0ede0f
Add test case for <rdar://problem/6380411>.
...
llvm-svn: 60720
2008-12-08 21:59:21 +00:00
Chris Lattner
46415261ee
Fix PR3172: if we see an eof or } at the top level, reject it.
...
This is important because ParseDeclarationOrFunctionDefinition
skips to, but does not consume, an } on error.
llvm-svn: 60719
2008-12-08 21:59:01 +00:00
Chris Lattner
3a90716f6a
improve comment.
...
llvm-svn: 60718
2008-12-08 21:53:24 +00:00
Ted Kremenek
96d2eecf85
'self.myIvar = nil' (properties) only releases myIvar when the property has kind 'assign'. This fixes <rdar://problem/6380411>.
...
llvm-svn: 60717
2008-12-08 21:44:15 +00:00
Steve Naroff
5fd31b17df
ObjCInterfaceDecl::lookupInstanceMethod() needs to look through a categories protocols.
...
Fixes <rdar://problem/6418640> clang on prokit: error: incompatible type returning 'id', expected 'NSSize'
llvm-svn: 60716
2008-12-08 20:57:28 +00:00
Steve Naroff
f1ab600362
Fix a couple uninitialized variables from my previous commit.
...
llvm-svn: 60713
2008-12-08 20:01:41 +00:00
Dan Gohman
16873c6284
Remove the #include of ScheduleDAGSDNodes.h, which is no longer necessary.
...
llvm-svn: 60712
2008-12-08 19:45:33 +00:00
Fariborz Jahanian
3edadfc730
Changed 'readonly' 'retain/copy' diagnostics into
...
warning as it is allowed in gcc and will break projects.
llvm-svn: 60710
2008-12-08 19:28:10 +00:00
Fariborz Jahanian
3685995d2c
Since we do not allow a readonly property to be 'copy'retain', we
...
must allow the continuation class to extend it to a 'readwrite'
and 'copy/retain'.
llvm-svn: 60709
2008-12-08 18:47:29 +00:00
Douglas Gregor
5daeee2bd6
Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs
...
llvm-svn: 60708
2008-12-08 18:40:42 +00:00
Steve Naroff
f122ff0cad
Fix <rdar://problem/6423452> clang ObjC rewriter: Don't use __declspec(dllimport) for Blocks functions, as they are linked statically.
...
llvm-svn: 60704
2008-12-08 17:30:33 +00:00
Steve Naroff
1042ff345a
Handle chained/nested property 'getters' (obj.p1.p2.p3).
...
This is a follow-up to fixing <rdar://problem/6213955> clang ObjC rewriter: rewriter doesn't appear to support @property and @synthesize.
llvm-svn: 60700
2008-12-08 16:43:47 +00:00
Sebastian Redl
82639aff7b
Fill in some parts of cxx_status.html
...
llvm-svn: 60699
2008-12-08 16:24:08 +00:00
Zhongxing Xu
17a37ebf32
fix 80-col violation.
...
llvm-svn: 60693
2008-12-08 07:14:51 +00:00
Zhongxing Xu
8df5083bb4
fix typo.
...
llvm-svn: 60686
2008-12-08 05:12:38 +00:00
Eli Friedman
14fb8587be
Workaround for PR3173. The fix is correct in the sense that if the enum
...
code were working correctly, it would be a no-op, but it's not really a
proper fix. That said, I don't really want to touch the enum code at
the moment because I don't understand it very well, and this seems to
be a relatively visible regression.
llvm-svn: 60680
2008-12-08 02:21:03 +00:00
Sebastian Redl
66f6fa1b2b
Fix outdated comment. Checks so much more than just typedefs in C++.
...
llvm-svn: 60676
2008-12-07 20:13:57 +00:00
Nuno Lopes
cbab7f6b29
add missing gentoo c++ include paths
...
llvm-svn: 60655
2008-12-07 12:11:37 +00:00
Chris Lattner
b3582b939e
a minor grammar fix
...
llvm-svn: 60646
2008-12-07 00:59:53 +00:00
Anders Carlsson
a1a9c28d30
Pass the VLA size expr range to the VLA diags
...
llvm-svn: 60645
2008-12-07 00:49:48 +00:00
Anders Carlsson
0d8f0ba6ed
Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352.
...
llvm-svn: 60638
2008-12-07 00:20:55 +00:00
Fariborz Jahanian
06d0dd641b
Setters returning a typedef of 'void' should not cause error.
...
Bug reported by Chris L.
llvm-svn: 60635
2008-12-06 23:12:49 +00:00
Fariborz Jahanian
d2c2ad515e
Use of properties declared in protocols in the category
...
via the category's protocol list1s, with appropriate
diagnsostics and a test case.
llvm-svn: 60634
2008-12-06 23:03:39 +00:00
Anders Carlsson
3bb1ffca94
Simplify test.
...
llvm-svn: 60631
2008-12-06 22:27:22 +00:00
Fariborz Jahanian
ff83998e31
Improve error reporting of property and setter/getter
...
type mimatches.
llvm-svn: 60630
2008-12-06 21:48:16 +00:00
Fariborz Jahanian
8707e322cc
Check for correct'void' return type for setter methods.
...
llvm-svn: 60629
2008-12-06 21:11:37 +00:00
Anders Carlsson
5df391e5c7
Add diagnostics for bitfields.
...
llvm-svn: 60628
2008-12-06 20:33:04 +00:00
Anders Carlsson
45f4b8c0f2
Fix invalid bit-field.
...
llvm-svn: 60627
2008-12-06 20:32:39 +00:00
Anders Carlsson
233a60d03e
Simplify some diagnostics.
...
llvm-svn: 60626
2008-12-06 20:05:35 +00:00
Fariborz Jahanian
62293f4d97
Changed a 'FIXME' into new comment. Added a test case
...
testing declaration of properties in categories.
llvm-svn: 60625
2008-12-06 19:59:02 +00:00
Ted Kremenek
69d78b9d98
Add bandaid transfer function support for assignments involving ObjCKVCRefExpr.
...
llvm-svn: 60622
2008-12-06 02:39:30 +00:00
Fariborz Jahanian
5a3422f602
Patch to diagnose a variety of misuse of property
...
attributes. Example would be, readonly, assign or
assign, copy, etc.
llvm-svn: 60620
2008-12-06 01:12:43 +00:00
Douglas Gregor
b0846b0f51
Add support for calls to dependent names within templates, e.g.,
...
template<typename T> void f(T x) {
g(x); // g is a dependent name, so don't even bother to look it up
g(); // error: g is not a dependent name
}
Note that when we see "g(", we build a CXXDependentNameExpr. However,
if none of the call arguments are type-dependent, we will force the
resolution of the name "g" and replace the CXXDependentNameExpr with
its result.
GCC actually produces a nice error message when you make this
mistake, and even offers to compile your code with -fpermissive. I'll
do the former next, but I don't plan to do the latter.
llvm-svn: 60618
2008-12-06 00:22:45 +00:00
Douglas Gregor
4619e439b6
Introduce basic support for dependent types, type-dependent
...
expressions, and value-dependent expressions. This permits us to parse
some template definitions.
This is not a complete solution; we're missing type- and
value-dependent computations for most of the expression types, and
we're missing checks for dependent types and type-dependent
expressions throughout Sema.
llvm-svn: 60615
2008-12-05 23:32:09 +00:00
Fariborz Jahanian
9c196795e6
Fixed a comment.
...
llvm-svn: 60611
2008-12-05 22:36:19 +00:00
Fariborz Jahanian
fbbaf6afae
This test checks for duplicate implementation of the same
...
property. It also checks for duplicate use of the same ivar
in two different iproperty implementations. It also caught
an error for a test case used in CodeGen :).
llvm-svn: 60610
2008-12-05 22:32:48 +00:00
Fariborz Jahanian
88909849bb
Fixed a test case. Added a test case showing property setter's
...
type mismatch (related to my last patch).
llvm-svn: 60599
2008-12-05 18:38:31 +00:00
Fariborz Jahanian
7988d7dc3e
(instance/class) Method type checking between class and its implementation.
...
(instance/class) Method type checking between category and its implementation.
And a test case for all.
llvm-svn: 60598
2008-12-05 18:18:52 +00:00
Douglas Gregor
5101c24f60
Representation of template type parameters and non-type template
...
parameters, with some semantic analysis:
- Template parameters are introduced into template parameter scope
- Complain about template parameter shadowing (except in Microsoft mode)
Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.
Next up: dependent types and value-dependent/type-dependent
expressions.
llvm-svn: 60597
2008-12-05 18:15:24 +00:00
Steve Naroff
6d6da255fb
Fixed <rdar://problem/6213808> clang ObjC rewriter: @finally is not always executed
...
llvm-svn: 60593
2008-12-05 17:03:39 +00:00
Anders Carlsson
1aa679227b
Use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. Fixes PR2963
...
llvm-svn: 60591
2008-12-05 16:33:57 +00:00
Anders Carlsson
98463cd44d
This wasn't such a good idea after all as it broke some tests.
...
llvm-svn: 60582
2008-12-05 05:24:13 +00:00
Anders Carlsson
3bc1d7d3d3
Handle __builtin___CFStringMakeConstantString in Expr::Evaluate.
...
llvm-svn: 60581
2008-12-05 05:18:05 +00:00
Anders Carlsson
1e495d9860
Make Sema::CheckForConstantInitializer use Expr::Evaluate. This fixes PR3130.
...
llvm-svn: 60580
2008-12-05 05:09:56 +00:00
Ted Kremenek
bd4551cced
Change the implementation of symbol_iterator to not use a union and rely on any details of SymbolRef's implementation.
...
llvm-svn: 60579
2008-12-05 02:56:39 +00:00
Ted Kremenek
c9e7622a52
Add SymbolRef::print() and have SymbolicRegion::print() use this method instead of calling SymbolRef::getNumber().
...
llvm-svn: 60578
2008-12-05 02:45:20 +00:00
Ted Kremenek
3cb81db1b2
Use trait-based profiling of SymbolRefs, avoiding calling getNumber() (which will soon be removed).
...
llvm-svn: 60577
2008-12-05 02:39:38 +00:00
Ted Kremenek
e2c86c30d0
Remove (unused) RegionExtent and subclasses. Extents are now represented easily using SVals.
...
llvm-svn: 60576
2008-12-05 02:36:00 +00:00
Ted Kremenek
d8242f19f7
Rename SymbolID to SymbolRef. This is a precursor to some overhauling of the representation of symbolic values.
...
llvm-svn: 60575
2008-12-05 02:27:51 +00:00
Zhongxing Xu
fbcf1e2623
Rename: FindContext -> FindDeclVisibleInContext.
...
llvm-svn: 60574
2008-12-05 01:57:57 +00:00
Fariborz Jahanian
521b3a363e
Patch for diagnosing type mismatch between
...
methods in class and its implementation.
This is work in progress.
llvm-svn: 60573
2008-12-05 01:35:25 +00:00
Ted Kremenek
8e942123cb
Remove SymbolDataContentsOf (unused).
...
llvm-svn: 60572
2008-12-05 01:31:31 +00:00
Ted Kremenek
d368de794a
StoreManager::Retrieve and StoreManager::RemoveDeadBindings now take a GRState* argument instead of a Store. This allows them to use the GDM for storing other data.
...
llvm-svn: 60570
2008-12-05 00:47:52 +00:00
Chris Lattner
5b4927048f
-std=c99 defaults blocks to off even on darwin, but -fblocks overrides
...
even it.
llvm-svn: 60568
2008-12-05 00:10:44 +00:00
Steve Naroff
22216db0ec
Finish up support for <rdar://problem/6213955> clang ObjC rewriter: rewriter doesn't appear to support @property and @synthesize.
...
llvm-svn: 60565
2008-12-04 23:50:32 +00:00
Chris Lattner
79413956d4
change getCurFunctionDecl to skip through Block contexts to find
...
the containing block. Introduce a new getCurFunctionOrMethodDecl
method to check to see if we're in a function or objc method.
Minor cleanups to other related places. This fixes rdar://6405429.
llvm-svn: 60564
2008-12-04 23:50:19 +00:00
Chris Lattner
2ca529ce61
instead of forcing blocks on by default, make them default to off, but let
...
specific targets default them to on. Default blocks to on on 10.6 and later.
Add a -fblocks option that allows the user to override the target's default.
Use -fblocks in the various testcases that use blocks.
llvm-svn: 60563
2008-12-04 23:20:07 +00:00
Fariborz Jahanian
5271058c75
Output better diagnostics for continuation class
...
property attribute mis-specification.
llvm-svn: 60562
2008-12-04 22:56:16 +00:00
Chris Lattner
c7c6dd4d97
replace useNeXTRuntimeAsDefault with a generic hook that allows targets
...
to specify their default language options.
llvm-svn: 60561
2008-12-04 22:54:33 +00:00
Ted Kremenek
1aed3ddffa
Remove unneeded assertion.
...
llvm-svn: 60559
2008-12-04 22:47:11 +00:00
Ted Kremenek
bf28bceb10
Remove unneeded assertion. We already know that FE->getName() is an absolute path.
...
llvm-svn: 60558
2008-12-04 22:36:44 +00:00
Sebastian Redl
33a3101d43
Code cleanup in new handling.
...
llvm-svn: 60557
2008-12-04 22:20:51 +00:00
Ted Kremenek
baedbf47f6
Use 'free' to release PerIDCache since it was allocated using calloc().
...
llvm-svn: 60556
2008-12-04 22:09:37 +00:00
Ted Kremenek
561370c23e
Add 'expected-warning' to make test case pass.
...
llvm-svn: 60548
2008-12-04 19:44:23 +00:00
Ted Kremenek
d58e74182e
Add another static analyzer test case involving attribute(nonnull).
...
llvm-svn: 60547
2008-12-04 19:39:12 +00:00
Ted Kremenek
7d71db77d2
Fix bug in attribute(nonnull) processing where not all of the parameter indices in nonnull(...) were actually processed.
...
llvm-svn: 60546
2008-12-04 19:38:33 +00:00
Steve Naroff
f8d556881e
Fix build breakage from my previous commit.
...
Will discuss with Chris...
llvm-svn: 60545
2008-12-04 19:10:03 +00:00
Ted Kremenek
3f0e5c88d9
Add another test case for attribute(nonnull) checking.
...
llvm-svn: 60544
2008-12-04 18:35:53 +00:00
Sebastian Redl
f84512a360
Fix some diagnostics and enhance test cases. Now tests member new and ambiguous overloads.
...
llvm-svn: 60542
2008-12-04 17:24:46 +00:00
Steve Naroff
4588d0f060
Several things...
...
- Implement RewritePropertySetter(). While the routine is simple, there were some tricky changes to RewriteFunctionBodyOrGlobalInitializer(), the main rewriter loop. It also required some additional instance data to distinguish setters from getters, as well as some changes to RewritePropertyGetter().
- Implement FIXME: for pretty printing ObjCPropertyRefExpr's.
- Changed ObjCPropertyRefExpr::getSourceRange() to point to the end of the property name (not the beginning). Also made a minor name change from "Loc"->"IdLoc" (to make it clear the Loc does not point to the ".").
llvm-svn: 60540
2008-12-04 16:24:46 +00:00
Daniel Dunbar
2c4efe68ea
Mention an optimization opportunity pointed out by Chris.
...
llvm-svn: 60535
2008-12-04 09:05:45 +00:00
Ted Kremenek
677779ab36
Revamp RegionStoreManager::RemoveDeadBindings. This method now does a complete mark-and-sweep of the store, removing dead regions and recording the set of live and dead symbols appropriately.
...
llvm-svn: 60523
2008-12-04 02:08:27 +00:00
Ted Kremenek
4a3f1efd25
Revise bogus comment I just committed.
...
llvm-svn: 60522
2008-12-04 02:07:20 +00:00
Ted Kremenek
4cef8c2d58
Add comment to test case for documentation.
...
llvm-svn: 60521
2008-12-04 02:06:27 +00:00
Ted Kremenek
8e8cc81aec
Update comment.
...
llvm-svn: 60520
2008-12-04 02:06:04 +00:00
Zhongxing Xu
96c0fa8b42
Add comments.
...
llvm-svn: 60516
2008-12-04 01:12:41 +00:00
Sebastian Redl
45c2f9d320
Correct CodeGen assumption that LongTy == Int32Ty in a few places. This makes several CodeGenObjC tests pass on 64-bit by fixing assertions. This doesn't mean that the result is actually what the GNU runtime expects, though.
...
llvm-svn: 60515
2008-12-04 00:10:55 +00:00
Sebastian Redl
ba3fdfcbff
Fix some type punning errors in SizeOfAlignOf and Typeid AST nodes. This should satisfy compilers and language lawyers alike.
...
llvm-svn: 60511
2008-12-03 23:17:54 +00:00