Граф коммитов

4466 Коммитов

Автор SHA1 Сообщение Дата
Ted Kremenek 4eebad22cd Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53992 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 18:15:01 +00:00
Ted Kremenek f071e18373 Don't issue a missing +dealloc warning for classes that just contain SEL ivars.
This fixes PR 2592: http://llvm.org/bugs/show_bug.cgi?id=2592


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53987 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 17:45:56 +00:00
Daniel Dunbar 25460259a6 Fix comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53986 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 17:38:50 +00:00
Ted Kremenek 08e4b669da Rename test case file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53984 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 17:02:18 +00:00
Ted Kremenek b0f36323d9 Issue dead store warnings for preincrements involved in a subexpression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53983 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 17:01:17 +00:00
Ted Kremenek 940260996d Ignore -MT and -MF.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53977 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 03:52:21 +00:00
Ted Kremenek 1683360500 "This patch adds paths for Fedora 9 in clang.cpp and support for two preprocessor options in ccc."
Patch by Zhongxing Xu!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53976 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 03:49:15 +00:00
Daniel Dunbar 4efde8d2c1 Fix EmitCaseStmtRange to ignore empty ranges
- Also cleaned up emission slightly 
 - Inspection of the code revealed several other bugs, however. Case
   ranges are not properly wired and can result in switch cases being
   dropped or even infinite loops. See: <rdar://problem/6098585>

Completes: <rdar://problem/6094119>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53975 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 01:18:41 +00:00
Daniel Dunbar cd8f646eca Add Expr::getIntegerConstantExprValue helper method
- For getting an APSInt from a known integer constant Expr.
 - TODO: Many users of Expr::isIntegerConstantExpr in codegen should
   probably be using this instead...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53974 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24 01:08:37 +00:00
Ted Kremenek 624b9365b1 Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53969 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 23:39:06 +00:00
Ted Kremenek 8b00b6e80d Added dead stores test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53966 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 23:18:43 +00:00
Ted Kremenek fd8fc4ee5c Modified HTMLDiagnostics to also perform syntax highlighting for errors in header files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53965 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 23:18:15 +00:00
Ted Kremenek 1c61b472b2 Don't flag dead stores when the result of a preincrement/predecrement is used in an enclosing expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53964 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 22:19:56 +00:00
Ted Kremenek 5a56ac30d0 Added UnaryOperator::isPrefix().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53963 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 22:18:43 +00:00
Ted Kremenek a32980435a Use typedef range_iterator instead of SourceRange* in PathDiagnosticPiece.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53962 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 21:51:42 +00:00
Ted Kremenek 2cfac226b0 Further refine dead store checking to distinguish between dead stores and dead increments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53960 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 21:16:38 +00:00
Ted Kremenek cc87ba2b95 Properly skip IBOutlets when checking for unused ivars.
Refine the error message of unused ivars.
Added test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53957 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 18:21:36 +00:00
Ted Kremenek 8f50b9c02a Initialize instance variable DeclAccess in ctor for ObjCIvarDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53956 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 18:12:25 +00:00
Ted Kremenek b8db21d4df When constructing an ObjCIvarDecl object in Sema, provide its visibility up front instead of setting it afterwards.
This change also fixes a subtle bug where the access control of an ivar would be initialized to garbage if we didn't have an explicit visibility specifier (e.g., @private).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53955 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 18:04:17 +00:00
Ted Kremenek f079570fca Updated comment for class ObjCIvarDecl: it turns out the default access control
is protected, not private.

Added ObjCIvarDecl::getCanonicalAccessControl() to report the visible access
control of an ivar, whereas getAccessControl() returns the access control
relating to how the ivar was actually declared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53954 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 17:44:44 +00:00
Ted Kremenek 6678f7f8a3 Ivar access mode ObjCIvarDecl::None == ObjCIvarDecl::Protected, not private.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53953 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 17:14:39 +00:00
Ted Kremenek 69e16bd402 Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53952 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 17:13:09 +00:00
Chris Lattner 9a847f598c don't depend on the result of CreateNeg to be a binop
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53948 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 06:53:34 +00:00
Chris Lattner 6bc52112db Fix rdar://6094010 various asserts happening with wide strings in inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53947 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 06:46:56 +00:00
Chris Lattner f31627f676 Fix a codegen crash on:
int foo(void) {
  float x[2];
  return x;
}

rdar://6093986


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53946 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 06:31:27 +00:00
Ted Kremenek 395aaf20d6 Add prototype implementation of unused ivar check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53942 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 00:45:26 +00:00
Ted Kremenek 8ec6cb9ca3 Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53936 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 22:45:52 +00:00
Argyrios Kyrtzidis ea7e97e14f Fix compilation error on GCC 4.3.0 ('memcpy' was not declared in this scope).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53934 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 21:56:45 +00:00
Daniel Dunbar 8ee6a63ba1 Add note to check what __alignof__ a function type should be.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53928 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 19:44:18 +00:00
Anders Carlsson 8b7c9fb2ef Always define __SIZE_TYPE__ as long unsigned int.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53922 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 17:16:13 +00:00
Ted Kremenek b3270e8ace Update VS project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53921 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 17:13:59 +00:00
Ted Kremenek 6e1eb87c04 Use llvm::utostr_32 instead of ostringstream.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53914 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 16:56:21 +00:00
Ted Kremenek a6eef8edfb Update VS project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53913 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 16:47:06 +00:00
Ted Kremenek 207cb0668f Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53910 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 16:22:19 +00:00
Ted Kremenek 78d46242e3 Moved registration of basic path-sensitive checks from GRSimpleVals.cpp to GRExprEngineInternalChecks.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 16:21:24 +00:00
Ted Kremenek e3ae82accd Rename file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53906 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 14:41:47 +00:00
Daniel Dunbar 9140845f95 Prevent codegen crash on sizeof(<function type>), a gcc extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53899 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 01:35:47 +00:00
Daniel Dunbar 0c980d1997 Add svn:ignore for cscope.{out,files} in top level clang dir
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53897 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 01:03:06 +00:00
Ted Kremenek 584def7364 Added path-sensitive checking for null pointer values passed to function arguments marked nonnull.
This implements <rdar://problem/6069935>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53891 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 00:46:16 +00:00
Daniel Dunbar 1caae95901 Implement bzero, memset, memmove builtins.
This subsumes Nico Weber's patch and implements bzero in terms
of llvm.memset to match llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53888 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-22 00:26:45 +00:00
Daniel Dunbar 4493f79fce Implement nans, prefetch, and trap builtins.
This closes <rdar://problem/6080720>, support for __builtin_constant_p
has been filed separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53885 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 22:59:13 +00:00
Chris Lattner 7caeabd868 minor cleanup to the actions interface to pass around SmallVectorImpl instead
of a specific smallvector size.

Fix protocol lists to pass down proper location info, so we get diagnostics
like this:

t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
                                  ^

instead of this:

t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
                                           ^


Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53883 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 22:17:28 +00:00
Ted Kremenek 465172f304 Add test case for nonnull attribute.
Fix indexing bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53882 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 22:09:15 +00:00
Ted Kremenek eb2b2a3f18 Added sema support for the nonnull attribute. Will add test cases soon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53881 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 21:53:04 +00:00
Daniel Dunbar 14ecaefc28 Kill an unused variable warning
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53878 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 21:43:28 +00:00
Chris Lattner 9d0aaa11cd unindent this function by using an early exit, not functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53877 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 21:33:21 +00:00
Chris Lattner 780f329cb0 move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>,
simplifying code along the way and fixing a problem and memory leak or two.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53876 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 21:32:27 +00:00
Daniel Dunbar dbddbe4da4 Add svn:ignore property for test Output directories
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53867 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 18:45:49 +00:00
Daniel Dunbar a933c3c052 Add __builtin_powi[fl] support
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53866 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 18:44:41 +00:00
Daniel Dunbar 4fbc2b0d87 Fix a test RUN line to not generate '=-' in test directory
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53865 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-21 18:42:27 +00:00