Fariborz Jahanian
9a207ee4dc
Patch to allow over-riding of readonly property to
...
a writable property in one of its category.
llvm-svn: 60035
2008-11-25 17:56:43 +00:00
Anders Carlsson
28a423f42e
Remove more #ifdeffed code
...
llvm-svn: 60033
2008-11-25 17:16:39 +00:00
Anders Carlsson
9f77f60620
Remove the #ifdeffed out code.
...
llvm-svn: 60032
2008-11-25 17:10:10 +00:00
Nuno Lopes
6cdcbd1f95
add note about running the test suite with valgrind
...
llvm-svn: 60029
2008-11-25 15:46:06 +00:00
Nuno Lopes
a1232e5d7f
remove unused var
...
llvm-svn: 60018
2008-11-25 12:23:46 +00:00
Douglas Gregor
3ff3cf5f21
Test another error message, make sure to verify C++ new and delete tests
...
llvm-svn: 60007
2008-11-25 04:08:05 +00:00
Douglas Gregor
2afd0be069
Simple parsing of exception specifications, with no semantic analysis yet
...
llvm-svn: 60005
2008-11-25 03:22:00 +00:00
Zhongxing Xu
f39268ae8c
Add documentation for test.
...
llvm-svn: 60002
2008-11-25 01:45:11 +00:00
Daniel Dunbar
5c4cc09498
Comment fix.
...
llvm-svn: 59997
2008-11-25 00:20:22 +00:00
Zhongxing Xu
2939a50b67
Add no-warning to test case.
...
llvm-svn: 59995
2008-11-24 23:45:56 +00:00
Fariborz Jahanian
8fc3741b76
Patch to remove bogus waring when a property declaration
...
is imported from a protocol into the implementation.
llvm-svn: 59988
2008-11-24 22:16:00 +00:00
Sebastian Redl
198a5838df
Remove an empty if and add a reminder for when we implement C++ try-catch.
...
llvm-svn: 59987
2008-11-24 21:45:59 +00:00
Ted Kremenek
3ca000af83
Display the function we are analyzing before running LiveVariables.
...
llvm-svn: 59983
2008-11-24 20:53:32 +00:00
Ted Kremenek
e03879b8ad
Fix CFG bug where the 'increment' block for a 'for' statement would not be
...
properly reversed once constructed.
This fixes PR 3125:
http://llvm.org/bugs/show_bug.cgi?id=3125
llvm-svn: 59982
2008-11-24 20:50:24 +00:00
Sebastian Redl
849b1e6ac7
Remove some bad characters from comment.
...
llvm-svn: 59979
2008-11-24 20:06:50 +00:00
Sebastian Redl
f7cb84d771
Fix the fix of revision 59974. Now array-struct.c passes too.
...
llvm-svn: 59975
2008-11-24 19:39:40 +00:00
Sebastian Redl
81c1e1306c
Fix crash of array bounds checking under 64-bit.
...
There might be other, similar bugs lurking there.
llvm-svn: 59974
2008-11-24 19:35:33 +00:00
Ted Kremenek
01c414c070
Remove FIXME comment.
...
llvm-svn: 59973
2008-11-24 19:27:06 +00:00
Zhongxing Xu
9165ed69af
Add support for AllocaRegion extent with GDM.
...
One design problem that is emerging is the signed-ness problem during static
analysis. Many unsigned value have to be converted into signed value because
it partipates in operations with signed values.
On the other hand, we cannot blindly make all values occuring in static analysis
signed, because we do have cases where unsignedness is required, for example,
integer overflow detection.
llvm-svn: 59957
2008-11-24 09:44:56 +00:00
Zhongxing Xu
1dffa8cd73
Add utility methods.
...
llvm-svn: 59956
2008-11-24 09:38:21 +00:00
Zhongxing Xu
f1b4ff28a7
Fix 80-col violation.
...
llvm-svn: 59954
2008-11-24 07:38:01 +00:00
Zhongxing Xu
6587c75488
Cleanup code with utility method.
...
llvm-svn: 59951
2008-11-24 07:02:06 +00:00
Chris Lattner
1e5665e6be
Change a whole lot of diagnostics to take QualType's directly
...
instead of converting them to strings first. This also fixes a
bunch of minor inconsistencies in the diagnostics emitted by clang
and adds a bunch of FIXME's to DiagnosticKinds.def.
llvm-svn: 59948
2008-11-24 06:25:27 +00:00
Chris Lattner
f3d3faeca6
Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of
...
uses of getName() with uses of getDeclName(). This upgrades a bunch of
diags to take DeclNames instead of std::strings.
This also tweaks a couple of diagnostics to be cleaner and changes
CheckInitializerTypes/PerformInitializationByConstructor to pass
around DeclarationNames instead of std::strings.
llvm-svn: 59947
2008-11-24 05:29:24 +00:00
Anders Carlsson
a7c5eb72a0
Reimplement Expr::isConstantExpr in terms of Expr::Evaluate. This fixes PR2832.
...
llvm-svn: 59946
2008-11-24 05:23:59 +00:00
Anders Carlsson
4fb8a9c6b6
__builtin_constant_p takes an argument that can have any type.
...
llvm-svn: 59944
2008-11-24 05:23:12 +00:00
Zhongxing Xu
f556cd6cb9
Strings are NULL terminated. So the region size should plus one.
...
llvm-svn: 59943
2008-11-24 05:16:01 +00:00
Anders Carlsson
87da2b5dce
Forgot the newline :)
...
llvm-svn: 59942
2008-11-24 05:13:45 +00:00
Anders Carlsson
3abcb58a35
Add test case for bug that's been fixed.
...
llvm-svn: 59941
2008-11-24 05:11:21 +00:00
Anders Carlsson
a42ee44aab
The address of a variable is only constant if the variable has global storage.
...
llvm-svn: 59939
2008-11-24 04:41:22 +00:00
Anders Carlsson
4c76e93507
Fix bug in the constant evaluator. Fixes PR3115.
...
llvm-svn: 59938
2008-11-24 04:21:33 +00:00
Chris Lattner
1cbaacc4a0
Migrate some stuff from NamedDecl::getName() to
...
NamedDecl::getNameAsString() to make it more explicit.
llvm-svn: 59937
2008-11-24 04:00:27 +00:00
Chris Lattner
86d7d91366
Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
...
assert if the name is not an identifier. Update callers to do the right
thing and avoid this method in unsafe cases. This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.
llvm-svn: 59936
2008-11-24 03:54:41 +00:00
Chris Lattner
9b1f2792ba
simplify this code.
...
llvm-svn: 59935
2008-11-24 03:52:59 +00:00
Chris Lattner
e4b95698df
Rename Selector::getName() to Selector::getAsString(), and add
...
a new NamedDecl::getAsString() method.
Change uses of Selector::getName() to just pass in a Selector
where possible (e.g. to diagnostics) instead of going through
an std::string.
This also adds new formatters for objcinstance and objcclass
as described in the dox.
llvm-svn: 59933
2008-11-24 03:33:13 +00:00
Zhongxing Xu
8361d4c51b
Add a comment about the signedness.
...
llvm-svn: 59932
2008-11-24 02:30:48 +00:00
Zhongxing Xu
bf900755d0
Add test case for out-of-bound memory access checking.
...
llvm-svn: 59931
2008-11-24 02:19:49 +00:00
Zhongxing Xu
a61731dd0d
Add getSize() support for StringRegion.
...
llvm-svn: 59930
2008-11-24 02:18:56 +00:00
Chris Lattner
4fc69799f5
Rewrite FindDiagnostics to be more strict about the formatting of the
...
expected-foo strings. Now the only allowed characters between
expected-error and {{ is whitespace.
llvm-svn: 59925
2008-11-24 01:28:17 +00:00
Chris Lattner
f3ab014308
clean up -verify mode output. If the expected-error string is
...
mangled, report it using the diagnostics machinery instead of printf.
llvm-svn: 59924
2008-11-23 23:38:26 +00:00
Chris Lattner
12f7c5a36a
convert some more warnings to NOTEs.
...
llvm-svn: 59923
2008-11-23 23:26:13 +00:00
Chris Lattner
d068503565
remove warn_previous_declaration
...
llvm-svn: 59922
2008-11-23 23:20:13 +00:00
Chris Lattner
03c4041cb5
make the 'to match this' diagnostic a note.
...
llvm-svn: 59921
2008-11-23 23:17:07 +00:00
Chris Lattner
0369c57ac6
Make all the 'redefinition' diagnostics more consistent, and make the
...
"previously defined here" diagnostics all notes.
llvm-svn: 59920
2008-11-23 23:12:31 +00:00
Chris Lattner
e6447ef989
make some objc redefinition warnings more consistent: call definitions
...
"definitions", not declarations. Point out the location of the
original definition.
llvm-svn: 59919
2008-11-23 22:46:27 +00:00
Chris Lattner
88dcd2a1ab
Tweak duplicate category diagnostic to work like the duplicate protocol diagnostic.
...
Also, point out where the previous decl was. This unxfails two tests.
llvm-svn: 59918
2008-11-23 22:38:38 +00:00
Chris Lattner
e3d20d9545
Convert IdentifierInfo's to be printed the same as DeclarationNames
...
with implicit quotes around them. This has a bunch of follow-on
effects and requires tweaking to a whole lot of code. This causes
a regression in two tests (xfailed) by causing it to emit things like:
Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')
instead of:
Line 10: duplicate interface declaration for category 'MyClass1(Category1)'
I will fix this in a follow-up commit.
As part of this, I had to start switching stuff to use ->getDeclName() instead
of Decl::getName() for consistency. This is good, but I was planning to do this
as an independent patch. There will be several follow-on patches
to clean up some of the mess, but this patch is already too big.
llvm-svn: 59917
2008-11-23 21:45:46 +00:00
Chris Lattner
f7e69d5a77
add support for inserting a DeclarationName into a diagnostic directly
...
without calling getAsString(). This implicitly puts quotes around the
name, so diagnostics need to be tweaked to accommodate this.
llvm-svn: 59916
2008-11-23 20:28:15 +00:00
Chris Lattner
d125393d24
inserting a qualtype adds quotes implicitly
...
llvm-svn: 59915
2008-11-23 20:27:13 +00:00
Chris Lattner
63ecc509e3
Genericize the qualtype formating callback to support any diag argument.
...
No functionality change.
llvm-svn: 59908
2008-11-23 09:21:17 +00:00