Anders Carlsson
4d4c50dd8b
Handle the GNU void* and function pointer arithmetic extensions for constant expressions as well.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 04:55:58 +00:00
Chris Lattner
b52ec74a71
always search for "builtin" headers at the end of the search path,
...
and never remap them with -isysroot. This fixes PR3614.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65012 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 04:55:19 +00:00
Chris Lattner
50b587d02f
PR3614: "ignoring nonexistent directory" should print the -isysroot
...
mapped path, not the requested path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65009 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 04:48:57 +00:00
Chris Lattner
b4650c178e
fix another typo gabor noticed
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65006 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 04:44:58 +00:00
Chris Lattner
8bea7c0ee4
fix a typo gabor noticed
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 04:44:27 +00:00
Ted Kremenek
98f1e1c56f
Add test case for 'nil receiver returns undefined struct value' check.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65004 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 04:07:38 +00:00
Ted Kremenek
21fe8370f6
Implemented simple check in <rdar://problem/6600344>: When the receiver of a
...
message expression is nil and the return type is struct then the returned value
is undefined or potentially garbage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 04:06:22 +00:00
Mike Stump
eed9cacc7a
Fit 80col and fix indentation.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65000 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 03:04:26 +00:00
Mike Stump
488e25b980
Fix spacing.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64998 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 02:54:59 +00:00
Mike Stump
bd65cac8de
More codegen for blocks. The type of block literals should be better.
...
The size calculation is improved.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64994 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 01:01:04 +00:00
Douglas Gregor
611a8c49c6
Provide a proper source location when building an implicit dereference. Fixes PR3600
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64993 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 00:52:42 +00:00
Fariborz Jahanian
c1debf3331
Some code simplification. ir gen for gc'able array
...
of objects in objc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64992 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 00:48:05 +00:00
Howard Hinnant
ccb8f089d7
testing (reverted)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64991 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 00:27:58 +00:00
Howard Hinnant
412705b00e
testing
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 00:25:33 +00:00
Fariborz Jahanian
f6123ca578
Couple of helpers for objc's gc attributes.
...
No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64989 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 00:22:47 +00:00
Douglas Gregor
9b76143b09
Make error-message check platform-agnostic
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-19 00:03:13 +00:00
Douglas Gregor
6ec3668a26
Address Chris's comments regarding C++ name mangling.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64984 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 23:53:56 +00:00
Ted Kremenek
d55979238d
retain/release checker: Place the leak diagnostic after the last statement that
...
references the tracked object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64980 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 23:28:26 +00:00
Chris Lattner
67a6b6bf00
fariborz already fixed this.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64975 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 23:00:57 +00:00
Ted Kremenek
81f14a0be0
Remove unused variable.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64974 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:59:38 +00:00
Ted Kremenek
572b2782ca
Remove logic for computing 'display hint'.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64973 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:59:04 +00:00
Chris Lattner
3b6b83b831
minor name changes, no functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64972 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:58:38 +00:00
Ted Kremenek
bb8c5aaa10
More fun with retain checker diagnostics:
...
- Fix some grammar.
- Fix a bug where a "reference count incremented" diagnostic would not be shown
if the previous typestate was "Released" (only happens in GC mode).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64971 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:57:22 +00:00
Chris Lattner
b7d2553edd
fix some subtle bugs handling the mix of cvr qualifiers, addr spaces,
...
and gc attrs. Add an assert to check that we never
get ExtQualType(ExtQualType(T)).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64970 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:53:11 +00:00
Daniel Dunbar
b5da3e94b7
Add anti-FIXME.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64969 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:52:09 +00:00
Chris Lattner
bc5e150b6d
minor spacing changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64968 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:34:38 +00:00
Daniel Dunbar
570f0cf734
i386 ABI: Offset computation in va_arg was incorrect for sizeof(Ty)>4.
...
We are down to only failing gcc.dg/compat/vector-[12] (8 tests total).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64967 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:28:45 +00:00
Chris Lattner
0224680502
fix typo
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64966 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:27:46 +00:00
Douglas Gregor
0c36c925fc
Remove pointless backslash
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:24:55 +00:00
Douglas Gregor
7c53ca6e03
Downgrade the "excess elements in initializer" errors to warnings *in
...
C*. They're required errors in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64964 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:23:55 +00:00
Daniel Dunbar
90dafa1638
x86_64 ABI: Fix thinko in computation of bound for "passed in SSE regs" test.
...
Two more gcc/x86_64 failures down.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64963 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:19:44 +00:00
Ted Kremenek
1f62ef3305
Fix diagnostics bugs when computing ranges for the retain/release checker.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:17:20 +00:00
Chris Lattner
1e4db7c468
rip out __builtin_overload
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:14:55 +00:00
Ted Kremenek
b2b14d772a
Add a few more GC-only test cases for the retain/release checker.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:11:23 +00:00
Ted Kremenek
3f0b656248
HTMLDiagnostics: Always display diagnostics *below* the line in question.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64959 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:10:00 +00:00
Daniel Dunbar
f231346438
x86_64 ABI: "is passed in regs" computation for va_arg was broken for
...
things passed in mixed registers.
This knocks out 8 x86_64 failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64958 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:05:01 +00:00
Douglas Gregor
c2b6a82393
Return true on errors, return true on errors, return true on errors
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64957 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 22:00:45 +00:00
Ted Kremenek
2701900189
retain/release checker: We now emit fancy diagnostics telling users about the
...
semantics of CFMakeCollectable and friends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64956 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 21:57:45 +00:00
Douglas Gregor
48f3bb9f78
Downgrade complaints about calling unavailable functions to a warning
...
(as GCC does), except when we've performed overload resolution and
found an unavailable function: in this case, we actually error.
Merge the checking of unavailable functions with the checking for
deprecated functions. This unifies a bit of code, and makes sure that
we're checking for unavailable functions in the right places. Also,
this check can cause an error. We may, eventually, want an option to
make "unavailable" warnings into errors.
Implement much of the logic needed for C++0x deleted functions, which
are effectively the same as "unavailable" functions (but always cause
an error when referenced). However, we don't have the syntax to
specify deleted functions yet :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64955 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 21:56:37 +00:00
Fariborz Jahanian
4fd83ea566
Some refactoring and simplificaiotn of objc's gc
...
ir gen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64954 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 21:49:28 +00:00
Mike Stump
ca2f3fdeed
Codegen for int (^bp)(int) = 0;
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64951 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 21:44:49 +00:00
Ted Kremenek
ed67b2c61c
Fix comment: analyzer builds are universal binaries.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 21:24:14 +00:00
Daniel Dunbar
7549c5589a
__attribute__((aligned)) was being ignored!
...
This knocks out another 8 gcc/compat/i386 & x86_64 failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64947 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 20:06:09 +00:00
Daniel Dunbar
e00d5c00f3
Add Type::isSpecificBuiltinType as a shortcut.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64946 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 19:59:32 +00:00
Daniel Dunbar
6aee306b1c
Simplify.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64944 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 19:45:21 +00:00
Chris Lattner
443e53c784
final string diagnostic issue (that I know about):
...
we used to not account for escapes in strings with
string concat. Before:
t.m:5:20: warning: field width should have type 'int', but argument has type 'unsigned int'
printf("\n\n" "\n\n%*d", (unsigned) 1, 1);
^ ~~~~~~~~~~~~
after:
t.m:5:23: warning: field width should have type 'int', but argument has type 'unsigned int'
printf("\n\n" "\n\n%*d", (unsigned) 1, 1);
^ ~~~~~~~~~~~~
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64941 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 19:26:42 +00:00
Chris Lattner
719e61573f
Next step toward making string diagnostics correct: handle
...
escapes in the string for subtoken positioning. This gives
us working examples like:
t.m:5:16: warning: field width should have type 'int', but argument has type 'unsigned int'
printf("\n\n%*d", (unsigned) 1, 1);
^ ~~~~~~~~~~~~
where before the caret pointed two spaces to the left.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64940 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 19:21:10 +00:00
Chris Lattner
6dcf63e920
update comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64939 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 18:56:29 +00:00
Ted Kremenek
1c512f5fcb
retain/release checker: Distinguish in the function summaries between
...
retain/releases performed via [... release] and CFRetain(). The former are
no-ops in GC. The checker already handled this, but now we emit nice diagnostics
to the user telling them that these are no-ops.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 18:54:33 +00:00
Chris Lattner
2197c96354
Fix some issues handling sub-token locations that come from macro expansions.
...
We now emit:
t.m:6:15: warning: field width should have type 'int', but argument has type 'unsigned int'
printf(STR, (unsigned) 1, 1);
^ ~~~~~~~~~~~~
t.m:3:18: note: instantiated from:
#define STR "abc%*ddef"
^
which has the correct location in the string literal in the note line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64936 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 18:52:52 +00:00