]>
granicus.if.org Git - clang/log
Ted Kremenek [Fri, 1 May 2009 18:43:00 +0000 (18:43 +0000)]
Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 May 2009 18:34:30 +0000 (18:34 +0000)]
Get rid of the implicit deref call when calling member functions where the base is a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 May 2009 17:37:31 +0000 (17:37 +0000)]
Add function prototype for OSAtomicCompareAndSwap32Barrier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70559
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 May 2009 17:29:33 +0000 (17:29 +0000)]
Fix run line in failing test case (it was missing the '%s' for the
file name, thus causing the test case to hang).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70558
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 May 2009 16:33:20 +0000 (16:33 +0000)]
teach -parse-noop about int128_t and friends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70547
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 May 2009 16:08:09 +0000 (16:08 +0000)]
BugReporter (extensive diagnostics): introduce the notion of a "dead"
location context. This allows us to postpone the decision of whether
or not a context should add a control-flow piece to the diagnostics
when inspecting its subexpressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70545
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 1 May 2009 15:47:09 +0000 (15:47 +0000)]
Finish a thought in CheckVariableDeclaration's comment. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70544
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 1 May 2009 15:45:53 +0000 (15:45 +0000)]
Add testcase that illustrates the problem from r69699 regarding tentative definitions of statics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 May 2009 15:19:33 +0000 (15:19 +0000)]
Remove #if 0'ed code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70542
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 1 May 2009 04:13:51 +0000 (04:13 +0000)]
Add failing static analyzer case (this crashes).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 1 May 2009 02:23:58 +0000 (02:23 +0000)]
PR4013 and PR4105: pointer-like types can only be cast to/from integers
and other pointer-like types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70531
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 May 2009 01:42:13 +0000 (01:42 +0000)]
C/ObjC work well enough with clang for them not to be a gcc strength anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 May 2009 01:40:42 +0000 (01:40 +0000)]
add word
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70527
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 1 May 2009 01:40:17 +0000 (01:40 +0000)]
C/ObjC work well enough to claim support for them now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70526
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 1 May 2009 01:31:57 +0000 (01:31 +0000)]
Don't assert when we think we need copy/dispose, but don't need them.
Radar
6838889
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70525
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 1 May 2009 00:16:04 +0000 (00:16 +0000)]
Don't use indirect memory destinations for inline asm. Fixes
6841383 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70523
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 30 Apr 2009 23:18:11 +0000 (23:18 +0000)]
C++ destructors can have a single unnamed void parameter. Fixes <rdar://problem/
6841210 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70519
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 30 Apr 2009 23:08:58 +0000 (23:08 +0000)]
Remove a warning when this file is compiled optimized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70518
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 30 Apr 2009 22:41:11 +0000 (22:41 +0000)]
Rework the way we handle constructor decls to be less hacky and fix PR3948 completely.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70516
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 30 Apr 2009 21:39:24 +0000 (21:39 +0000)]
Use of super class ivar to synthesize property is back to being error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70514
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Apr 2009 20:00:31 +0000 (20:00 +0000)]
retain/release checker: Hook up attributes 'objc_ownership_retain' and
'objc_ownership_release' to the effects on receivers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70507
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 30 Apr 2009 19:20:55 +0000 (19:20 +0000)]
Make a home for exception specs in the AST. Now Sema can hook them up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70506
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Apr 2009 19:18:03 +0000 (19:18 +0000)]
Allow attributes 'objc_ownership_retain' and 'objc_ownership_release' to be
applied to ObjCMethodDecls, not just parameters. This allows one to specific
side-effects on the receiver of a message expression. No checker support yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70505
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Apr 2009 18:41:06 +0000 (18:41 +0000)]
Hook up Sema support for attributes on Objective-C method declarations that
appear between the return type and the selector. This is a separate code path
from regular attribute processing, as we only want to (a) accept only a specific
set of attributes in this place and (b) want to distinguish to clients the
context in which an attribute was added to an ObjCMethodDecl.
Currently, the attribute 'objc_ownership_returns' is the only attribute that
uses this new feature. Shortly I will add a warning for 'objc_ownership_returns'
to be placed at the end of a method declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70504
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Apr 2009 17:55:29 +0000 (17:55 +0000)]
Add parsing support in an Objective-C method declaration for attributes between
the return type and selector. Haven't hooked this up to Sema yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70501
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 30 Apr 2009 17:53:16 +0000 (17:53 +0000)]
Name the "return-type" DiagGroup and reference it in a few places.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70500
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 30 Apr 2009 17:32:17 +0000 (17:32 +0000)]
Properly compute the alignment of typedefs that make use of the
"aligned" attribute. Previously, we were skipping over these
attributes when we jumped directly to the canonical type. Now,
ASTContext::getTypeInfo walks through typedefs and other
"non-canonical" types manually, looking for "aligned" attributes on
typedefs.
As part of this change, I moved the GNU-specific logic (such as
determining the alignment of void or of a function pointer) out of the
expression evaluator and into ASTContext::getTypeInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 30 Apr 2009 16:31:11 +0000 (16:31 +0000)]
API for message dispatch of methods returning floats
to match gcc's closely.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 30 Apr 2009 16:01:26 +0000 (16:01 +0000)]
Warn about invalid return statements by default.
This fixes <rdar://problem/
6839489 > 10A345: Clang does not warm about mismatched returns (void return from a bool function)
Will implement -Wreturn-type, -Wno-return-type in another commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Apr 2009 15:15:37 +0000 (15:15 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70489
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 30 Apr 2009 07:03:22 +0000 (07:03 +0000)]
Fix for PR4108: be a bit looser with the casts that we accept in
constant initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70483
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 30 Apr 2009 06:36:43 +0000 (06:36 +0000)]
accept and ignore two new warning specifiers. -Wno-discard-qual seems easy
to hook up if someone was interested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 30 Apr 2009 06:22:07 +0000 (06:22 +0000)]
fix i128 to return in 2 64-bit registers (rax/rdx on x86-64)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 30 Apr 2009 06:18:40 +0000 (06:18 +0000)]
only support int128_t on 64-bit and larger targets. 32-bit targets don't
have support for __divti3 and friends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70480
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Apr 2009 05:51:50 +0000 (05:51 +0000)]
Handle case in EvalReturn where we cache out in the ExplodedGraph.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Apr 2009 05:47:23 +0000 (05:47 +0000)]
retain/release checker: Use the ObjCMethodDecl in the @implementation if no
matching ObjCMethodDecl exists in the @interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70474
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Apr 2009 05:41:14 +0000 (05:41 +0000)]
retain/release checker: Resolve method decl in @interface after getting the
ObjCInterfaceDecl, not before.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 30 Apr 2009 02:55:13 +0000 (02:55 +0000)]
int128_t is apparently 128-bit aligned on all 64-bit targets, and
not supported on 32-bit targets, so we can define it to be 128-bit
aligned there too :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70465
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 30 Apr 2009 02:43:43 +0000 (02:43 +0000)]
initial support for __[u]int128_t, which should be basically
compatible with VC++ and GCC. The codegen/mangling angle hasn't
been fully ironed out yet. Note that we accept int128_t even in
32-bit mode, unlike gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70464
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 30 Apr 2009 00:55:13 +0000 (00:55 +0000)]
Remove two unused options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70457
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 30 Apr 2009 00:19:40 +0000 (00:19 +0000)]
Sema checking for incorrect placement of __block. Radar
6441502
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 29 Apr 2009 23:53:23 +0000 (23:53 +0000)]
Use the new code gen optimization enum instead of passing in the optimization
level. This is more expressive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70451
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 29 Apr 2009 23:37:31 +0000 (23:37 +0000)]
Make DISABLE_SMART_POINTERS work, again
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70443
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 29 Apr 2009 23:31:56 +0000 (23:31 +0000)]
Change to warning when property uses an ivar in super class
in an @synthesize diective, as it breaks few projects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 29 Apr 2009 23:19:39 +0000 (23:19 +0000)]
Just because a declaration has the same name as its containing class doesn't mean that it's a constructor. Fixes rdar://problem/
6815988 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 29 Apr 2009 23:06:13 +0000 (23:06 +0000)]
Revert r70424. We don't need it
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70432
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 23:03:22 +0000 (23:03 +0000)]
retain/release checker: When determining whether an analyzed method can return
an owned object, consult its summary instead of inspecting the selector. This
picks up annotations, and is just more general.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 29 Apr 2009 22:47:43 +0000 (22:47 +0000)]
Add PCH version to the -v output
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 29 Apr 2009 22:47:27 +0000 (22:47 +0000)]
Undid setting of the flag for msg_Send for 32bit code gen.
It seems to effect code gen. Add a FIXME instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 22:25:52 +0000 (22:25 +0000)]
Format cleanup. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 29 Apr 2009 22:16:16 +0000 (22:16 +0000)]
Implement semantic analysis for transparent unions. This is largely
based on a patch from Anders Johnsen. CodeGen support is incomplete,
in that we do not properly coerce to the first field's type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 29 Apr 2009 22:11:32 +0000 (22:11 +0000)]
Remove extra line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70418
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 22:05:03 +0000 (22:05 +0000)]
Fix null dereference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70417
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 21:58:13 +0000 (21:58 +0000)]
BugReporter/PathDiagnostics:
- Add an (optional) short description for BugReports for clients that want
to distinguish between long and short descriptions for bugs
- Make the bug report for VLA less obscene for Plist diagnostics by using
the short description
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70415
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 29 Apr 2009 21:45:02 +0000 (21:45 +0000)]
use of an ivar specified on a property @synthesize
and found in super class triggers a diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70414
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 29 Apr 2009 21:40:37 +0000 (21:40 +0000)]
Fixup Sema and CodeGen for block literal attributes when the return
type and argument types are missing, and let return type deduction
happen before we give errors for returning from a noreturn block.
Radar
6441502
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70413
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 21:31:59 +0000 (21:31 +0000)]
Reformat long line. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70412
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 29 Apr 2009 21:02:33 +0000 (21:02 +0000)]
Match addPassesToEmitFile API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70409
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 29 Apr 2009 20:40:05 +0000 (20:40 +0000)]
Export lazy references of .objc_class_name of class names
referenced in a category implementation meta-data
(Next objc 32bit abi).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 29 Apr 2009 20:29:43 +0000 (20:29 +0000)]
Minor simplification; also silences gcc warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70406
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 29 Apr 2009 19:14:43 +0000 (19:14 +0000)]
Type of msgSend message dispatch API is a vararg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70404
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 29 Apr 2009 19:03:13 +0000 (19:03 +0000)]
Sema and CodeGen support for attributes on blocks. Radar
6441502
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 18:50:19 +0000 (18:50 +0000)]
retain/release checker: Hoist code for bug reports above transfer function logic
(those diffs are just code moving) and move the logic for "return of owned
object" leak reporting to EvalReturnStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70399
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 29 Apr 2009 18:32:25 +0000 (18:32 +0000)]
Make sure to pass the same options to the static analyzer as the
compiler.
- Code generation options may still affect the language...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70393
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 29 Apr 2009 18:15:38 +0000 (18:15 +0000)]
accept and ignore two new warning options. PR410[45]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70392
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 29 Apr 2009 17:56:47 +0000 (17:56 +0000)]
PR4103: improve source location information for members of the current
class. This isn't perfect, but it's a big improvement over not having
any location information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70390
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 29 Apr 2009 17:30:04 +0000 (17:30 +0000)]
Have the parser communicate the exception specification to the action.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70389
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 17:17:48 +0000 (17:17 +0000)]
Add version of getMethodSummary() that can be used to query the summary for the
method currently being analyzed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70388
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 17:09:14 +0000 (17:09 +0000)]
Rename getMethodSummary() -> getInstanceMethodSummary().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70387
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 29 Apr 2009 16:37:50 +0000 (16:37 +0000)]
Integrate 3 months of ObjC rewriter fixes (from the Apple/objective-rewrite branch).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70385
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 29 Apr 2009 16:35:53 +0000 (16:35 +0000)]
PR4103: Silence bogus unused expression warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70384
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 16:03:59 +0000 (16:03 +0000)]
Add test case for transfer function logic for OSCompareAndSwap32Barrier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70383
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 16:03:27 +0000 (16:03 +0000)]
Add corner case logic to BasicStoreManager and GRSimpleVals::EvalBinOp to enable
reasoning about OSCompareAndSwap32Barrier/OSCompareAndSwap64Barrier. Essentially
the address of reference to a region (pointer-to-pointer) can be casted to
(int32_t*), and we need to handle the logic to convert the involved locations
back and forth from nonloc::LocAsInteger, nonloc::ConcreteInt, to Loc and
loc::ConcreteInt respectively. This adds some potentially suspect logic to
BasicStoreManager that allows the analyzer to reason about abuses of the C type
system. This should probably be refined, be ported over to RegionStoreManager,
and extended with "path-sensitive type checking" to flag bugs in clearly
incoherent code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70382
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 15:37:24 +0000 (15:37 +0000)]
MemRegion pretty-printing: Convert DeclName to a string to print out the actual
name of the tracked function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70381
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 29 Apr 2009 09:24:35 +0000 (09:24 +0000)]
SymbolicRegions may also be live roots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70380
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 29 Apr 2009 05:59:48 +0000 (05:59 +0000)]
Added comments to test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70374
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 29 Apr 2009 05:48:32 +0000 (05:48 +0000)]
fix PR4021, array and functions decay in the receiver position of an objc message send.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70373
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 29 Apr 2009 05:12:23 +0000 (05:12 +0000)]
Fix PR4092 by improving error recovery in two ways:
1. In a struct field redefinition, don't mark the struct erroneous. The
field is erroneous, but the struct is otherwise well formed.
2. Don't emit diagnostics about functions that are known to be broken already.
Either fix is sufficient to silence the second diagnostic in the example,
but the combination is better :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70371
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 05:04:30 +0000 (05:04 +0000)]
retain/release checker: Refactor getMethodSummary() to not depend on ObjCMessageExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70369
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 29 Apr 2009 04:59:47 +0000 (04:59 +0000)]
implement -Wformat-security properly, which is enabled by default.
This enables one specific class of non-literal format warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 29 Apr 2009 04:49:34 +0000 (04:49 +0000)]
code simplification, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70367
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 29 Apr 2009 04:41:16 +0000 (04:41 +0000)]
add a bunch of individual warnings to -Wformat (which is
on by default).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 29 Apr 2009 04:31:58 +0000 (04:31 +0000)]
Wire up -Wformat=2 and -Wformat-extra-args
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 29 Apr 2009 04:16:52 +0000 (04:16 +0000)]
-Wformat should depend on format-extra-args so that -Wformat implies
the extra argument warnings, and -Wformat -Wno-format-extra-args
turns on -Wformat but not the extra-args warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 29 Apr 2009 04:15:07 +0000 (04:15 +0000)]
tweak warning options to be more like gcc:
1. All all variants of -Wformat*, make them imply -Wformat. GCC warns
if you use -Wformatfoo without -Wformat. We just make one imply the
other.
2. Make -Wformat-nonliteral default to off, like gcc. It is an incredible
nuisance.
3. Accept but currently ignore -Wformat-extra-args.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70362
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 29 Apr 2009 04:12:34 +0000 (04:12 +0000)]
minor code cleanup
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70361
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 29 Apr 2009 02:37:26 +0000 (02:37 +0000)]
Update test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70359
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 29 Apr 2009 02:30:09 +0000 (02:30 +0000)]
As discussed with Ted offline, re-apply r70293.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 29 Apr 2009 01:50:12 +0000 (01:50 +0000)]
XFAIL the test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70356
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 29 Apr 2009 01:00:32 +0000 (01:00 +0000)]
Add incredibly bare bones docs/tools.
- Mirroring LLVM's docs/CommandGuide, a place to put .pod files which
are used to generate man/html/etc documentation for tools provided
as part of clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 29 Apr 2009 00:43:21 +0000 (00:43 +0000)]
Implement sema checking for noreturn.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 00:42:39 +0000 (00:42 +0000)]
retain/release checker: Refactor the guts of getClassMethodSummary to not depend
on ObjCMessageExpr. This will enable us to use it elsewhere. This should not
change any functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70352
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 29 Apr 2009 00:41:31 +0000 (00:41 +0000)]
Add regression test case provided by <rdar://problem/
6833332 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70350
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 28 Apr 2009 22:44:02 +0000 (22:44 +0000)]
Enable PCH by default
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70339
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 28 Apr 2009 22:43:20 +0000 (22:43 +0000)]
Force driver's PTH test to use PTH
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70338
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 28 Apr 2009 22:33:16 +0000 (22:33 +0000)]
In -fdiagnostics-print-source-range-info mode, print a space before the
lines that clang extracts from the source code so that machine parsing can
easily ignore them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70337
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 28 Apr 2009 22:32:26 +0000 (22:32 +0000)]
Implement ownership attribute 'objc_ownership_make_collectable'. This allows one
to add 'CFMakeCollectable' semantics to a method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70336
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 28 Apr 2009 22:19:16 +0000 (22:19 +0000)]
add support for -Wendif-labels, PR4101
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70335
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 28 Apr 2009 22:01:16 +0000 (22:01 +0000)]
Make all PCH-incompatibility warnings into errors, and abort
compilation if the user requested a PCH file but no such PCH file
exists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70332
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 28 Apr 2009 21:53:25 +0000 (21:53 +0000)]
Make the PCH reader use the diagnostics system for its complaints.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70330
91177308 -0d34-0410-b5e6-
96231b3b80d8