]>
granicus.if.org Git - clang/log
Zhongxing Xu [Thu, 19 Feb 2009 08:37:16 +0000 (08:37 +0000)]
Convert the offset to signed before making an ElementRegion with it. It seems
that this problem arises from time to time. We should find a fundamental
solution for it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65035
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Feb 2009 07:22:21 +0000 (07:22 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65033
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Feb 2009 07:15:39 +0000 (07:15 +0000)]
Don't emit K&R unprototyped function definitions as varargs.
- <rdar://problem/
6584606 > clang/x86-64 - too many reg saves
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65032
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Feb 2009 07:11:26 +0000 (07:11 +0000)]
Add Type::getAsFunctionNoProto
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65031
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Feb 2009 07:05:16 +0000 (07:05 +0000)]
only do one DenseMap lookup instead of two (one to find out if there is
already an entry and one to insert).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Feb 2009 07:02:09 +0000 (07:02 +0000)]
minor simplification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65029
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Feb 2009 07:00:44 +0000 (07:00 +0000)]
use early exit to reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Feb 2009 06:49:30 +0000 (06:49 +0000)]
standardise on bastardised american spelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Feb 2009 06:48:28 +0000 (06:48 +0000)]
fix a bug introduced in my previous patch: moving clang headers to the
"after" group instead of the system group makes it so #include <limits.h>
picks up the *system* limits.h file before clang's. This causes a failure
on linux and is definitely not what we want.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65026
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Feb 2009 06:41:35 +0000 (06:41 +0000)]
disable copying and assignment of AttributeList
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65025
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Feb 2009 06:41:13 +0000 (06:41 +0000)]
fix warning in no-assert mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65024
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 19 Feb 2009 06:30:50 +0000 (06:30 +0000)]
Emit the correct diagnostics when we constant fold an array size to a negative value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65023
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Feb 2009 06:25:12 +0000 (06:25 +0000)]
don't new[] an empty array when an AttributeList has
zero expression arguments. This eliminates 2579 1-byte
mallocs when parsing Cocoa.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 19 Feb 2009 06:19:15 +0000 (06:19 +0000)]
Make sure to check the value of the constant expression, as suggested by Daniel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 19 Feb 2009 05:36:41 +0000 (05:36 +0000)]
Emission of global variable initialializer was broken in rare
situation where a tentative decl was emitted *after* the actual
initialization. This occurs in some rare situations with static decls.
- PR3613.
- I'm not particularly happy with this fix, but I don't see a simpler
or more elegant solution yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65018
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Feb 2009 04:58:30 +0000 (04:58 +0000)]
scan-build now searches for the clang binary in the subdirectory 'cbin'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 19 Feb 2009 04:55:58 +0000 (04:55 +0000)]
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
Chris Lattner [Thu, 19 Feb 2009 04:55:19 +0000 (04:55 +0000)]
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
Chris Lattner [Thu, 19 Feb 2009 04:48:57 +0000 (04:48 +0000)]
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
Chris Lattner [Thu, 19 Feb 2009 04:44:58 +0000 (04:44 +0000)]
fix another typo gabor noticed
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65006
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 19 Feb 2009 04:44:27 +0000 (04:44 +0000)]
fix a typo gabor noticed
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65005
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Feb 2009 04:07:38 +0000 (04:07 +0000)]
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
Ted Kremenek [Thu, 19 Feb 2009 04:06:22 +0000 (04:06 +0000)]
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
Mike Stump [Thu, 19 Feb 2009 03:04:26 +0000 (03:04 +0000)]
Fit 80col and fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 19 Feb 2009 02:54:59 +0000 (02:54 +0000)]
Fix spacing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 19 Feb 2009 01:01:04 +0000 (01:01 +0000)]
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
Douglas Gregor [Thu, 19 Feb 2009 00:52:42 +0000 (00:52 +0000)]
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
Fariborz Jahanian [Thu, 19 Feb 2009 00:48:05 +0000 (00:48 +0000)]
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
Howard Hinnant [Thu, 19 Feb 2009 00:27:58 +0000 (00:27 +0000)]
testing (reverted)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64991
91177308 -0d34-0410-b5e6-
96231b3b80d8
Howard Hinnant [Thu, 19 Feb 2009 00:25:33 +0000 (00:25 +0000)]
testing
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64990
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 19 Feb 2009 00:22:47 +0000 (00:22 +0000)]
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
Douglas Gregor [Thu, 19 Feb 2009 00:03:13 +0000 (00:03 +0000)]
Make error-message check platform-agnostic
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64985
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Feb 2009 23:53:56 +0000 (23:53 +0000)]
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
Ted Kremenek [Wed, 18 Feb 2009 23:28:26 +0000 (23:28 +0000)]
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
Chris Lattner [Wed, 18 Feb 2009 23:00:57 +0000 (23:00 +0000)]
fariborz already fixed this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64975
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Feb 2009 22:59:38 +0000 (22:59 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64974
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Feb 2009 22:59:04 +0000 (22:59 +0000)]
Remove logic for computing 'display hint'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64973
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 22:58:38 +0000 (22:58 +0000)]
minor name changes, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64972
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Feb 2009 22:57:22 +0000 (22:57 +0000)]
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
Chris Lattner [Wed, 18 Feb 2009 22:53:11 +0000 (22:53 +0000)]
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
Daniel Dunbar [Wed, 18 Feb 2009 22:52:09 +0000 (22:52 +0000)]
Add anti-FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64969
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 22:34:38 +0000 (22:34 +0000)]
minor spacing changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64968
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Feb 2009 22:28:45 +0000 (22:28 +0000)]
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
Chris Lattner [Wed, 18 Feb 2009 22:27:46 +0000 (22:27 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Feb 2009 22:24:55 +0000 (22:24 +0000)]
Remove pointless backslash
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64965
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Feb 2009 22:23:55 +0000 (22:23 +0000)]
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
Daniel Dunbar [Wed, 18 Feb 2009 22:19:44 +0000 (22:19 +0000)]
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
Ted Kremenek [Wed, 18 Feb 2009 22:17:20 +0000 (22:17 +0000)]
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
Chris Lattner [Wed, 18 Feb 2009 22:14:55 +0000 (22:14 +0000)]
rip out __builtin_overload
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Feb 2009 22:11:23 +0000 (22:11 +0000)]
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
Ted Kremenek [Wed, 18 Feb 2009 22:10:00 +0000 (22:10 +0000)]
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
Daniel Dunbar [Wed, 18 Feb 2009 22:05:01 +0000 (22:05 +0000)]
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
Douglas Gregor [Wed, 18 Feb 2009 22:00:45 +0000 (22:00 +0000)]
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
Ted Kremenek [Wed, 18 Feb 2009 21:57:45 +0000 (21:57 +0000)]
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
Douglas Gregor [Wed, 18 Feb 2009 21:56:37 +0000 (21:56 +0000)]
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
Fariborz Jahanian [Wed, 18 Feb 2009 21:49:28 +0000 (21:49 +0000)]
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
Mike Stump [Wed, 18 Feb 2009 21:44:49 +0000 (21:44 +0000)]
Codegen for int (^bp)(int) = 0;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64951
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Feb 2009 21:24:14 +0000 (21:24 +0000)]
Fix comment: analyzer builds are universal binaries.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64950
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Feb 2009 20:06:09 +0000 (20:06 +0000)]
__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
Daniel Dunbar [Wed, 18 Feb 2009 19:59:32 +0000 (19:59 +0000)]
Add Type::isSpecificBuiltinType as a shortcut.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64946
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Feb 2009 19:45:21 +0000 (19:45 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64944
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 19:26:42 +0000 (19:26 +0000)]
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
Chris Lattner [Wed, 18 Feb 2009 19:21:10 +0000 (19:21 +0000)]
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
Chris Lattner [Wed, 18 Feb 2009 18:56:29 +0000 (18:56 +0000)]
update comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64939
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Feb 2009 18:54:33 +0000 (18:54 +0000)]
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
Chris Lattner [Wed, 18 Feb 2009 18:52:52 +0000 (18:52 +0000)]
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
Fariborz Jahanian [Wed, 18 Feb 2009 18:52:41 +0000 (18:52 +0000)]
Start generating gc'able code using the new
objc gc type attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64935
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 18:50:45 +0000 (18:50 +0000)]
tidy up
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64934
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 18:40:20 +0000 (18:40 +0000)]
only get the spelling of a token to get its length if
it needs cleaning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64932
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 18:34:12 +0000 (18:34 +0000)]
use the full spelling of a string literal token so that trigraphs
and escaped newlines don't throw off the offset computation.
On this testcase:
printf("abc\
def"
"%*d", (unsigned) 1, 1);
Before:
t.m:5:5: warning: field width should have type 'int', but argument has type 'unsigned int'
def"
^
after:
t.m:6:12: warning: field width should have type 'int', but argument has type 'unsigned int'
"%*d", (unsigned) 1, 1);
^ ~~~~~~~~~~~~
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64930
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 18:25:31 +0000 (18:25 +0000)]
add c testcase for string literal diagnostic improvement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64929
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 18:22:50 +0000 (18:22 +0000)]
don't print codegen time unless -ftime-report was passed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64928
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 18 Feb 2009 18:14:41 +0000 (18:14 +0000)]
Make warn-weak-field.m test pass again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64927
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 18 Feb 2009 17:52:36 +0000 (17:52 +0000)]
Cleanup objc's gc attributes code no longer needed.
This make warn-weak-field.m to fail (subject of
a followup patch).
attr-objc-gc.m no passes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64925
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 17:49:48 +0000 (17:49 +0000)]
Start improving diagnostics that relate to subcharacters of string literals.
First step, handle diagnostics in StringLiteral's that are due to token pasting.
For example, we now handle:
id str2 = @"foo"
"bar"
@"baz"
" b\0larg"; // expected-warning {{literal contains NUL character}}
Correctly:
test/SemaObjC/exprs.m:17:15: warning: CFString literal contains NUL character
" b\0larg"; // expected-warning {{literal contains NUL character}}
~~~^~~~~~~
There are several other related issues still to be done.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64924
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Feb 2009 17:45:20 +0000 (17:45 +0000)]
Update Parser::ParseTypeName to return a TypeResult, which also tells
us whether there was an error in trying to parse a type-name (type-id
in C++). This allows propagation of errors further in the compiler,
suppressing more bogus error messages.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64922
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Feb 2009 17:42:44 +0000 (17:42 +0000)]
Revise comment. Comparing pointer values in 'Range' wasn't the performance issue I thought it was, but it is still worth ordering Range objects by their APSInt values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64921
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Feb 2009 17:23:05 +0000 (17:23 +0000)]
Add an unavailable __tg_promote function to attract incorrect uses of type-generic macros, rom Howard Hinnant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64919
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 07:09:44 +0000 (07:09 +0000)]
nothing says "ted was here" like a random url dropped in a header :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64903
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Feb 2009 07:07:28 +0000 (07:07 +0000)]
Allow "overloadable" functions in C to be declared as variadic without
any named parameters, e.g., this is accepted in C:
void f(...) __attribute__((overloadable));
although this would be rejected:
void f(...);
To do this, moved the checking of the "ellipsis without any named
arguments" condition from the parser into Sema (where it belongs anyway).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64902
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 06:53:08 +0000 (06:53 +0000)]
teach child iterators to walk into the child string of an ObjCStringLiteral,
so it shows up in -ast-dump.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64901
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 06:48:40 +0000 (06:48 +0000)]
fix the ownership issues and location tracking in
Sema::ParseObjCStringLiteral.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64900
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 06:48:23 +0000 (06:48 +0000)]
add iterators for string token locations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64899
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 06:40:38 +0000 (06:40 +0000)]
privatize all of the string literal memory allocation/creation
stuff behind a private static function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64898
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Feb 2009 06:34:51 +0000 (06:34 +0000)]
Don't allow calls to functions marked "unavailable". There's more work
to do in this area, since there are other places that reference
FunctionDecls.
Don't allow "overloadable" functions (in C) to be declared without a
prototype.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64897
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 06:13:04 +0000 (06:13 +0000)]
add some comments describing what is happening here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64896
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 06:06:56 +0000 (06:06 +0000)]
simplify the code used to compute the type of an objc string. This makes
it faster in the common case when NSConstantString is around.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64895
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 06:01:06 +0000 (06:01 +0000)]
rename CheckBuiltinCFStringArgument -> CheckObjCString
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64894
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 05:56:09 +0000 (05:56 +0000)]
simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64893
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 05:49:11 +0000 (05:49 +0000)]
change the StringLiteral AST node to track all of the SourceLocations of
the various PPTokens that are pasted together to make it. In the course
of working on this, I discovered ParseObjCStringLiteral which needs some
work. I'll tackle it next.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64892
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Feb 2009 05:22:01 +0000 (05:22 +0000)]
Fix performance bug in RangeConstraintManager (that I introduced):
When comparing if one Range is "less" than another, compare the actual APSInt
numeric values instead of their pointer addresses. This ensures that the
ImmutableSet in RangeSet always has a consistent ordering between Ranges. This
is critical for generating the same digest/hash for the contents of the sets.
This was a serious performance bug because it would often cause state caching
to be disabled along complicated paths.
Along the way:
- Put Range and RangeSet in the "anonymous namespace" and mark them hidden
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64890
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 18 Feb 2009 05:09:49 +0000 (05:09 +0000)]
Representation of objc gc's attribute using ExtQualType.
Note that one test attr-objc-gc.m fails. I will fix this
after removing these attributes from the Decl nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64889
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Feb 2009 05:01:43 +0000 (05:01 +0000)]
ccc: Forward -ftime-report to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64887
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 04:41:38 +0000 (04:41 +0000)]
pass -verify in exprs.m, merge const-id.m into message.m
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64886
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 04:38:20 +0000 (04:38 +0000)]
fix rdar://
6597252 : two exactly identical pointer types are always
compatible, even if they are weird implicit objc pointer types like
Class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64885
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 04:28:32 +0000 (04:28 +0000)]
rename some variables, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64884
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Feb 2009 04:02:00 +0000 (04:02 +0000)]
Optimize dyld startup time by specifying a trivial export map
(only export main) on the mac.
This improves DYLD_PRINT_STATISTICS from:
total time: 6.0 milliseconds (100.0%)
total images loaded: 5 (4 from dyld shared cache, 3 needed no fixups)
total segments mapped: 0, into 0 pages with 0 pages pre-fetched
total images loading time: 0.0 milliseconds (1.4%)
total rebase fixups: 0
total rebase fixups time: 0.0 milliseconds (0.0%)
total binding fixups: 7,928
total binding symbol lookups: 4,087, average images searched per symbol: 1.9
total binding fixups time: 4.7 milliseconds (79.2%)
total bindings lazily fixed up: 170 of 4,372
total init time time: 1.1 milliseconds (19.2%)
total images with weak exports: 2
to:
total time: 1.4 milliseconds (100.0%)
total images loaded: 5 (4 from dyld shared cache, 4 needed no fixups)
total segments mapped: 0, into 0 pages with 0 pages pre-fetched
total images loading time: 0.0 milliseconds (5.7%)
total rebase fixups: 0
total rebase fixups time: 0.0 milliseconds (0.2%)
total binding fixups: 1,079
total binding symbol lookups: 75, average images searched per symbol: 1.0
total binding fixups time: 0.5 milliseconds (33.9%)
total bindings lazily fixed up: 14 of 216
total init time time: 0.8 milliseconds (60.0%)
total images with weak exports: 1
This reduces the time to -fsyntax-only cocoa.h with PTH from 0.192s to 0.184 (4.3%)
rdar://
6505315
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64882
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Feb 2009 03:48:14 +0000 (03:48 +0000)]
Hooked up the necessary machinery to allow the retain/release checker reference
back to the summary used when evaluating the statement associated with a
simulation node. This is now being used to help improve the checker's
diagnostics. To get things started, the checker now emits a path diagnostic
indicating that 'autorelease' is a no-op in GC mode.
Some of these changes are exposing further grossness in the interface between
BugReporter and the ExplodedGraph::Trim facilities. These really need to be
cleaned up one day.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64881
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Feb 2009 03:44:19 +0000 (03:44 +0000)]
x86_64 ABI: Two bug fixes.
1. Return of _Complex long double used wrong type.
2. va_arg of types passed in two SSE registers didn't account for
extra space in register save area.
Down to 18 failures on gcc/compat/x86_64. Combined 32/64 results are:
--
=== gcc Summary ===
# of expected passes 1292
# of unexpected failures 34
# of unsupported tests 2
--
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64880
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 18 Feb 2009 03:09:29 +0000 (03:09 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64879
91177308 -0d34-0410-b5e6-
96231b3b80d8