decl attributes out of the various places they can hide. This makes
us correctly reject things like this:
t.c:2:22: error: mode attribute only supported for integer and floating-point types
int **__attribute((mode(HI)))* i32;
^
because you can't make a pointer be HImode.
llvm-svn: 52876
integers which have the same width and different signedness work
correctly. (The testcase in PR2501 uses a comparison between long and
unsigned int).
llvm-svn: 52853
used to mutate the attribute list for declspecs when the type was
converted, breaking the case where one declspec was shared by multiple
declarators.
This fixes rdar://6032532.
llvm-svn: 52769
Tracked objects now have their type information tracked with them.
Enhanced summaries for ObjC methods to include the type information of the receiver.
Used the enhanced summaries to support the idiom that NSWindow owns itself (it sends a release message to itself upon close).
Added some comments.
Did some cleanups with the checker logic using operator overloading (reduced redundant code which I was concerned about being the source of bugs).
llvm-svn: 52741
Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place.
Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass.
llvm-svn: 52694
1) Check if a dead store appears as a subexpression. For such cases, we emit
a verbose diagnostic so that users aren't confused. This addresses:
<rdar://problem/5968508> checker gives misleading report for dead store in loop
2) Don't emit a dead store warning when assigning a null value to a pointer.
This is a common form of defensive programming. We may wish to make
this an option to the the checker one day.
This addresses the feature request in the following email:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-June/001978.html
llvm-svn: 52555
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag. Places which need some further attention are marked
with FIXMEs.
Patch by Cédric Venet.
llvm-svn: 52264
isn't guaranteed to exist. This fixes a crash with conflicting typedefs
coming from stdin.
This also fixes the crash in PR2406, but doesn't completely fix the
issue; it appears there's something strange about the physical location
for the definition of int64_t in stdlib.h.
llvm-svn: 52209
pointer cast hack currently in isIntegerConstantExpr
(in lib/AST/Expr.cpp). Also removes an odd test that even gcc doesn't accept.
The reason the pointer cast hack is relevant here is that it makes Sema
end up misinterpreting the relevant expression as a null pointer constant.
The reason for this patch is that I plan to remove the pointer cast hack
sometime soon because it causes strange issues, especially in its
current form; see my recent email to cfe-dev
"[PATCH] add constant expression evaluation to the AST and fix PR2413".
llvm-svn: 52120
type; this isn't explicitly stated in the standard, but it doesn't
really make sense for them to have an effect here. Fixes the included
testcase, sent to me by Steve Naroff.
llvm-svn: 52113
be any regressions from this on my machine, but please let me know if
you run into issues. (The idea here is that it's better to run all
tests on all platforms if at all possible.)
llvm-svn: 52083
reported on cfe-dev by Cédric Venet.
Note that I seriously doubt that this perticular construct is useful,
though: it's a pointer in an alternate address space pointing into
unqualified address space.
llvm-svn: 52076
- Changed Sema::ObjCActOnStartOfMethodDef() to more accurately type "self" in factory methods.
- Changed Sema::ActOnInstanceMessage() to use the new type to restrict the lookup.
llvm-svn: 52005
In addition to fixing the crasher, this commit fixes further improves property lookup (by searching protocols of qualified interfaces..."NSObject <prot>").
llvm-svn: 52001