]> granicus.if.org Git - clang/log
clang
15 years agoslight code simplifications.
Chris Lattner [Fri, 20 Feb 2009 00:55:03 +0000 (00:55 +0000)]
slight code simplifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65094 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDeox and Capitolize.
Mike Stump [Fri, 20 Feb 2009 00:45:51 +0000 (00:45 +0000)]
Deox and Capitolize.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65093 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomap source ranges through macro expansions. Before:
Chris Lattner [Fri, 20 Feb 2009 00:25:28 +0000 (00:25 +0000)]
map source ranges through macro expansions.  Before:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
 MAX(P, F);
 ^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B)    ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
                                                                             ^

(no ranges on the second diagnostics)

After:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
 MAX(P, F);
 ^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B)    ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
                                                                         ~~~ ^ ~~~

(ranges!)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65090 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix spacing.
Mike Stump [Fri, 20 Feb 2009 00:19:45 +0000 (00:19 +0000)]
Fix spacing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65089 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorefactor, pass ranges down instead of the whole
Chris Lattner [Fri, 20 Feb 2009 00:18:51 +0000 (00:18 +0000)]
refactor, pass ranges down instead of the whole
DiagnosticInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65088 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test case for <rdar://problem/6562655>.
Ted Kremenek [Fri, 20 Feb 2009 00:10:09 +0000 (00:10 +0000)]
Add test case for <rdar://problem/6562655>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65085 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix crash from <rdar://problem/6562655>: 'init' method only return a receiver alias...
Ted Kremenek [Fri, 20 Feb 2009 00:05:35 +0000 (00:05 +0000)]
Fix crash from <rdar://problem/6562655>: 'init' method only return a receiver alias if the return type is a location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65084 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoreplace a dirty hack with a clean solution. Too bad we can't
Chris Lattner [Thu, 19 Feb 2009 23:53:20 +0000 (23:53 +0000)]
replace a dirty hack with a clean solution.  Too bad we can't
use Blocks for our callbacks ;-)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65083 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoretain/release checker: Generate an intermediate simulation node for "leak"
Ted Kremenek [Thu, 19 Feb 2009 23:47:02 +0000 (23:47 +0000)]
retain/release checker: Generate an intermediate simulation node for "leak"
transitions and then generate a subsequent node that removes the dead symbol
bindings. This should drastically improve caching in the simulation graph when
retain-counted objects are being tracked.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65082 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a long standard problem with clang retaining "too much" sugar
Chris Lattner [Thu, 19 Feb 2009 23:45:49 +0000 (23:45 +0000)]
Fix a long standard problem with clang retaining "too much" sugar
information about types.  We often print diagnostics where we say
"foo_t" is bad, but the user doesn't know how foo_t is declared
(because it is a typedef).  Fix this by expanding sugar when present
in a diagnostic (and not one of a few special cases, like vectors).

Before:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)')
 MAX(P, F);
 ^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B)    ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
                                                                             ^

After:
t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
 MAX(P, F);
 ^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B)    ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
                                                                             ^

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65081 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded a new method to GRStmtNodeBuilder to build nodes using an arbitrary
Ted Kremenek [Thu, 19 Feb 2009 23:45:28 +0000 (23:45 +0000)]
Added a new method to GRStmtNodeBuilder to build nodes using an arbitrary
PostStmt program point. This allows clients to pass in PostStmtCustom program
points.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65080 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoProgramPoint::Profile now specially handles PostStmtCustom (hashes on tag and data...
Ted Kremenek [Thu, 19 Feb 2009 23:43:16 +0000 (23:43 +0000)]
ProgramPoint::Profile now specially handles PostStmtCustom (hashes on tag and data) so that clients don't need a unique address for the pair itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65079 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agopretty printing vector types should print the element type, not just the attribute.
Chris Lattner [Thu, 19 Feb 2009 23:42:29 +0000 (23:42 +0000)]
pretty printing vector types should print the element type, not just the attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65078 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore objc's gc ir-gen stuff.
Fariborz Jahanian [Thu, 19 Feb 2009 23:36:06 +0000 (23:36 +0000)]
More objc's gc ir-gen stuff.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65077 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGetTypeForDeclarator can return null on error now, handle this.
Chris Lattner [Thu, 19 Feb 2009 23:13:55 +0000 (23:13 +0000)]
GetTypeForDeclarator can return null on error now, handle this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65076 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoccc: Give nicer error when spawning a subprocess fails.
Daniel Dunbar [Thu, 19 Feb 2009 22:59:57 +0000 (22:59 +0000)]
ccc: Give nicer error when spawning a subprocess fails.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65075 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExtend Evaluate() to fold (int) <pointer type>.
Daniel Dunbar [Thu, 19 Feb 2009 22:24:01 +0000 (22:24 +0000)]
Extend Evaluate() to fold (int) <pointer type>.
 - PR3463, PR3398, <rdar://problem/6553401> crash on relocatable
   symbol addresses as constants in static locals.

 - There are many more scenarious we could handle (like arithmetic on
   such an int) but this is the main use case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65074 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify, no functionality change.
Daniel Dunbar [Thu, 19 Feb 2009 22:16:29 +0000 (22:16 +0000)]
Simplify, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65073 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix another PTH warning that should not be a note.
Ted Kremenek [Thu, 19 Feb 2009 22:14:49 +0000 (22:14 +0000)]
Fix another PTH warning that should not be a note.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65072 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake PTH warnings actual warnings instead of 'notes'.
Ted Kremenek [Thu, 19 Feb 2009 22:13:40 +0000 (22:13 +0000)]
Make PTH warnings actual warnings instead of 'notes'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65071 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd enough checking to ensure that non-constant block literals don't
Mike Stump [Thu, 19 Feb 2009 22:01:56 +0000 (22:01 +0000)]
Add enough checking to ensure that non-constant block literals don't
appear to be constant.  I'll probably redo this and throw it all away
later once we have codegen for BlockDeclRefExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65070 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoccc: Also look for .gch files when seeing if we should auto load a
Daniel Dunbar [Thu, 19 Feb 2009 22:01:23 +0000 (22:01 +0000)]
ccc: Also look for .gch files when seeing if we should auto load a
token-cache for clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65069 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove IRgen constant emission assumption that LValue APValue results
Daniel Dunbar [Thu, 19 Feb 2009 21:44:24 +0000 (21:44 +0000)]
Remove IRgen constant emission assumption that LValue APValue results
only occur for pointer types; they are also possible for integer types
now.
 - No intended functionality change, IntExprEvaluate doesn't return
   LValue results yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65066 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange IntExprEvaluator to operate on an APValue not an APSInt.
Daniel Dunbar [Thu, 19 Feb 2009 20:17:33 +0000 (20:17 +0000)]
Change IntExprEvaluator to operate on an APValue not an APSInt.
 - Prep for handling lvalues, no intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65063 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoArguments to unordered comparison builtins may need implicit casts.
Daniel Dunbar [Thu, 19 Feb 2009 19:28:43 +0000 (19:28 +0000)]
Arguments to unordered comparison builtins may need implicit casts.
 - <rdar://problem/6094103> sema fails to promote type arguments to __builtin_isgreater (and friends)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65059 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd irgen support for the noinline attribute.
Anders Carlsson [Thu, 19 Feb 2009 19:22:11 +0000 (19:22 +0000)]
Add irgen support for the noinline attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65056 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd sema support for the noinline attribute.
Anders Carlsson [Thu, 19 Feb 2009 19:16:48 +0000 (19:16 +0000)]
Add sema support for the noinline attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65055 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate checker build.
Ted Kremenek [Thu, 19 Feb 2009 19:08:21 +0000 (19:08 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65054 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd another IntExprEvaluator::Success overload to suck up remained of
Daniel Dunbar [Thu, 19 Feb 2009 18:37:50 +0000 (18:37 +0000)]
Add another IntExprEvaluator::Success overload to suck up remained of
manual setting of the Result.

 - Idiom now enforces that result will always have correct width and
   type; this exposed three new bugs:

    o Enum constant decl value can have different width than type
      (PR3173).

    o EvaluateInteger should not run an IntExprEvaluator over
      non-integral expressions.

    o FloatExprEvaluate was not handling casts correctly (it was
      evaluating the cast in the IntExprEvaluator!).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65053 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix PR3609, emit:
Chris Lattner [Thu, 19 Feb 2009 18:29:56 +0000 (18:29 +0000)]
fix PR3609, emit:

t.c:1:10: error: missing terminating '>' character
#include <stdio.h
         ^

instead of:

t.c:1:10: error: missing terminating " character
#include <stdio.h
         ^

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65052 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGenerate the conservative objc gc's API for now.
Fariborz Jahanian [Thu, 19 Feb 2009 18:29:24 +0000 (18:29 +0000)]
Generate the conservative objc gc's API for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65051 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate test case to include a leak that occurs at the place of allocation.
Ted Kremenek [Thu, 19 Feb 2009 18:20:28 +0000 (18:20 +0000)]
Update test case to include a leak that occurs at the place of allocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65048 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoretain/release checker: Fix crasher when the leak site is the same expression that...
Ted Kremenek [Thu, 19 Feb 2009 18:18:48 +0000 (18:18 +0000)]
retain/release checker: Fix crasher when the leak site is the same expression that allocates an object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65047 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR3619 by properly considering size modifiers and type quals when
Chris Lattner [Thu, 19 Feb 2009 17:31:02 +0000 (17:31 +0000)]
Fix PR3619 by properly considering size modifiers and type quals when
uniquing array types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65046 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoonly track integer and pointer values for now.
Zhongxing Xu [Thu, 19 Feb 2009 09:56:08 +0000 (09:56 +0000)]
only track integer and pointer values for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65041 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix typo
Gabor Greif [Thu, 19 Feb 2009 09:27:40 +0000 (09:27 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65040 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd IntExprEvaluator::Success method.
Daniel Dunbar [Thu, 19 Feb 2009 09:06:44 +0000 (09:06 +0000)]
Add IntExprEvaluator::Success method.
 - Handles assignment to Result with appropriate type.

 - Simplifies & encapsulates most direct handling of the Result value;
   prep for allowing IntExprEvaluator to deal with LValue APValues.

 - No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65038 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix test case
Zhongxing Xu [Thu, 19 Feb 2009 08:45:23 +0000 (08:45 +0000)]
fix test case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65037 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd test case.
Zhongxing Xu [Thu, 19 Feb 2009 08:42:43 +0000 (08:42 +0000)]
add test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65036 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert the offset to signed before making an ElementRegion with it. It seems
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

15 years agoUpdate checker build.
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

15 years agoDon't emit K&R unprototyped function definitions as varargs.
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

15 years agoAdd Type::getAsFunctionNoProto
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

15 years agoonly do one DenseMap lookup instead of two (one to find out if there is
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

15 years agominor simplification.
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

15 years agouse early exit to reduce indentation.
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

15 years agostandardise on bastardised american spelling.
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

15 years agofix a bug introduced in my previous patch: moving clang headers to the
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

15 years agodisable copying and assignment of AttributeList
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

15 years agofix warning in no-assert mode.
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

15 years agoEmit the correct diagnostics when we constant fold an array size to a negative value.
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

15 years agodon't new[] an empty array when an AttributeList has
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

15 years agoMake sure to check the value of the constant expression, as suggested by Daniel.
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

15 years agoEmission of global variable initialializer was broken in rare
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

15 years agoscan-build now searches for the clang binary in the subdirectory 'cbin'.
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

15 years agoHandle the GNU void* and function pointer arithmetic extensions for constant expressi...
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

15 years agoalways search for "builtin" headers at the end of the search path,
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

15 years agoPR3614: "ignoring nonexistent directory" should print the -isysroot
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

15 years agofix another typo gabor noticed
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

15 years agofix a typo gabor noticed
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

15 years agoAdd test case for 'nil receiver returns undefined struct value' check.
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

15 years agoImplemented simple check in <rdar://problem/6600344>: When the receiver of a
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

15 years agoFit 80col and fix indentation.
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

15 years agoFix spacing.
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

15 years agoMore codegen for blocks. The type of block literals should be better.
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

15 years agoProvide a proper source location when building an implicit dereference. Fixes PR3600
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

15 years agoSome code simplification. ir gen for gc'able array
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

15 years agotesting (reverted)
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

15 years agotesting
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

15 years agoCouple of helpers for objc's gc attributes.
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

15 years agoMake error-message check platform-agnostic
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

15 years agoAddress Chris's comments regarding C++ name mangling.
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

15 years agoretain/release checker: Place the leak diagnostic after the last statement that
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

15 years agofariborz already fixed this.
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

15 years agoRemove unused variable.
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

15 years agoRemove logic for computing 'display hint'.
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

15 years agominor name changes, no functionality change.
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

15 years agoMore fun with retain checker diagnostics:
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

15 years agofix some subtle bugs handling the mix of cvr qualifiers, addr spaces,
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

15 years agoAdd anti-FIXME.
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

15 years agominor spacing changes.
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

15 years agoi386 ABI: Offset computation in va_arg was incorrect for sizeof(Ty)>4.
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

15 years agofix typo
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

15 years agoRemove pointless backslash
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

15 years agoDowngrade the "excess elements in initializer" errors to warnings *in
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

15 years agox86_64 ABI: Fix thinko in computation of bound for "passed in SSE regs" test.
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

15 years agoFix diagnostics bugs when computing ranges for the retain/release checker.
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

15 years agorip out __builtin_overload
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

15 years agoAdd a few more GC-only test cases for the retain/release checker.
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

15 years agoHTMLDiagnostics: Always display diagnostics *below* the line in question.
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

15 years agox86_64 ABI: "is passed in regs" computation for va_arg was broken for
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

15 years agoReturn true on errors, return true on errors, return true on errors
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

15 years agoretain/release checker: We now emit fancy diagnostics telling users about the
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

15 years agoDowngrade complaints about calling unavailable functions to a warning
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

15 years agoSome refactoring and simplificaiotn of objc's gc
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

15 years agoCodegen for int (^bp)(int) = 0;
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

15 years agoFix comment: analyzer builds are universal binaries.
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

15 years ago__attribute__((aligned)) was being ignored!
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

15 years agoAdd Type::isSpecificBuiltinType as a shortcut.
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

15 years agoSimplify.
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