Commit Graph

6 Commits

Author SHA1 Message Date
Fariborz Jahanian f4aa279ce8 Handle nonnull attribute with optional argument number on
functions with arguments of transparent unions type.
// rdar://9584012

llvm-svn: 133941
2011-06-27 21:12:03 +00:00
Ted Kremenek d4adebbbd6 Handle some more fallout with the conversion of using PointerType for
Objective-C pointers to using ObjCObjectPointerType.

Now the checking for 'attribute ((nonnull))' in Sema doesn't emit an error when
trying to apply that attribute to a parameter that is an Objective-C pointer
(this is a regression).

To prevent this regression from occuring in the future, the 'nonnull.c' test was
moved to test/SemaObjC and renamed 'nonnull.m'. I also enhanced the tests to
show that function calls involved a NULL Objective-C pointer constant does not
trigger a warning. This is consistent with GCC, but should likely be fixed.

llvm-svn: 75856
2009-07-15 23:23:54 +00:00
Chris Lattner ae5342094a merge two tests.
llvm-svn: 72392
2009-05-25 18:20:11 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Ted Kremenek c4f6d90ba1 Tidy up sema processing of attribute "nonull":
- warn about nonnull being applied to functions with no pointer arguments
- continue processing argument list in the attribute when we encounter a non-pointer parameter being marked as nonnull
- when no argument list is specified, only mark pointers as nonnull.  This fixes PR 2732 and radar 6188814.

llvm-svn: 55610
2008-09-01 19:57:52 +00:00
Ted Kremenek 5224e6a81d Add test case for nonnull attribute.
Fix indexing bug.

llvm-svn: 53882
2008-07-21 22:09:15 +00:00