| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
llvm-svn: 133264
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
separate aggregate temporary and then memcpy it over to the
destination. This fixes a regression I introduced with r133235, where
the compound literal on the RHS of an assignment makes use of the
structure on the LHS of the assignment.
I'm deeply suspicious of AggExprEmitter::VisitBinAssign()'s
optimization where it emits the RHS of an aggregate assignment
directly into the LHS lvalue without checking whether there is any
aliasing between the LHS/RHS. However, I'm not in a position to
revisit this now.
Big thanks to Eli for finding the regression!
llvm-svn: 133261
|
| |
|
|
| |
llvm-svn: 133257
|
| |
|
|
|
|
| |
static initializer check, as required by the Itanium ABI.
llvm-svn: 133250
|
| |
|
|
| |
llvm-svn: 133246
|
| |
|
|
|
|
|
|
|
|
|
|
| |
they should still be officially __strong for the purposes of errors,
block capture, etc. Make a new bit on variables, isARCPseudoStrong(),
and set this for 'self' and these enumeration-loop variables. Change
the code that was looking for the old patterns to look for this bit,
and change IR generation to find this bit and treat the resulting
variable as __unsafe_unretained for the purposes of init/destroy in
the two places it can come up.
llvm-svn: 133243
|
| |
|
|
|
|
|
| |
[temp.deduct.call]p4 to the deduction performed for 'auto', finishing
the fix for PR9233.
llvm-svn: 133239
|
| |
|
|
|
|
|
| |
argument type for C++ [temp.deduct.call]p4 out of
Sema::FinishTemplateArgumentDeduction(). No functionality change.
llvm-svn: 133237
|
| |
|
|
|
|
|
|
|
| |
storage specifier is different from the storage specifier on the
template. If that storage specifier is the same, then we only warn.
Thanks to John for the prodding.
llvm-svn: 133236
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
C++, which means:
- binding the temporary as needed in Sema, so that we generate the
appropriate call to the destructor, and
- emitting the compound literal into the appropriate location for
the aggregate, rather than trying to emit it as a temporary and
memcpy() it.
Fixes PR10138 / <rdar://problem/9615901>.
llvm-svn: 133235
|
| |
|
|
|
|
|
| |
specifier on an explicit specialization to a warning, since neither
EDG nor GCC diagnose this code as ill-formed.
llvm-svn: 133232
|
| |
|
|
|
|
|
|
|
| |
register constraint. Note that we're not checking if the register itself
is valid for the constraint.
Fixes rdar://9382985
llvm-svn: 133226
|
| |
|
|
|
|
| |
Part of rdar://9197685
llvm-svn: 133225
|
| |
|
|
|
|
|
|
| |
constraints.
rdar://9618597
llvm-svn: 133222
|
| |
|
|
|
|
|
| |
operators, don't make an initializer or sub-operation for zero-width
bitfields.
llvm-svn: 133221
|
| |
|
|
|
|
| |
through an ellipsis. Fixes <rdar://problem/9623945>.
llvm-svn: 133219
|
| |
|
|
| |
llvm-svn: 133218
|
| |
|
|
| |
llvm-svn: 133215
|
| |
|
|
| |
llvm-svn: 133214
|
| |
|
|
|
|
|
|
|
| |
situations
because the Angled directories and the System directories were not being uniqued
together, breaking #include_next. I'll see about a testcase, but it will be insane.
llvm-svn: 133212
|
| |
|
|
| |
llvm-svn: 133211
|
| |
|
|
|
|
|
| |
(even though it is incomplete type) because gcc
says so. // rdar://9622422
llvm-svn: 133208
|
| |
|
|
|
|
|
|
| |
The warning will fire on cases such as:
int x = 1 + NULL;
llvm-svn: 133196
|
| |
|
|
|
|
| |
getLVForNamespaceScopeDecl(). // rdar://9609649
llvm-svn: 133182
|
| |
|
|
| |
llvm-svn: 133181
|
| |
|
|
|
|
| |
constants. Fixes PR10145.
llvm-svn: 133179
|
| |
|
|
|
|
|
|
|
| |
__builtin_ versions of these functions as well as the normal function
versions, so that it works on platforms where memset/memcpy/memmove
are macros that map down to the builtins (e.g., Darwin). Fixes
<rdar://problem/9372688>.
llvm-svn: 133173
|
| |
|
|
|
|
| |
null at any time. // rdar://9612030
llvm-svn: 133168
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
checks that the deduced argument type for a function call matches the
actual argument type provided. The only place we've found where the
consistency checking should actually cause template argument deduction
failure is due to qualifier differences that don't fall into the realm
of qualification conversions (which are *not* checked when we
initially perform deduction). However, we're performing the full
checking as specified in the standard to ensure that no other cases
exist.
Fixes PR9233 / <rdar://problem/9039590>.
llvm-svn: 133163
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are somewhat special in that they wrap any other FrontendAction,
running various ARC transformations or checks prior to the standard
action's run. To implement them easily, this extends FrontendAction to
have a WrapperFrontendAction utility class which forwards all calls by
default to an inner action setup at construction time. This is then
subclassed to override the specific behavior needed by the different
ARCMT tools.
Finally, FrontendTool is taught how to create these wrapper actions from
the existing flags and options structures.
The result is that clangFrontend no longer depends on clangARCMigrate.
This is very important, as clangARCMigrate *heavily* depends on
clangFrontend. Fundamentally ARCMigrate is at the same layer as
a library like Rewrite, sitting firmly on top of the Frontend, but tied
together with the FrontendTool when building the clang binary itself.
llvm-svn: 133161
|
| |
|
|
|
|
|
| |
declaration of global var is __private_extern__.
// rdar://9609649
llvm-svn: 133157
|
| |
|
|
|
|
|
| |
AFAIK, RHEL5 (and its clones) provides g++44 as the package "gcc44-c++".
By default, g++-4.1.1 is available, though, its libstdc++ would not be suitable to clang++.
llvm-svn: 133156
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and the programmer intended to write 'sizeof(*p)'. There are several
elements to the new version:
1) The actual expressions are compared in order to more accurately flag
the case where the pattern that works for an array has been used, or
a '*' has been omitted.
2) Only do a loose type-based check for record types. This prevents us
from warning when we happen to be copying around chunks of data the
size of a pointer and the pointer types for the sizeof and
source/dest match.
3) Move all the diagnostics behind the runtime diagnostic filter. Not
sure this is really important for this particular diagnostic, but
almost everything else in SemaChecking.cpp does so.
4) Make the wording of the diagnostic more precise and informative. At
least to my eyes.
5) Provide highlighting for the two expressions which had the unexpected
similarity.
6) Place this diagnostic under a flag: -Wsizeof-pointer-memaccess
This uses the Stmt::Profile system for computing #1. Because of the
potential cost, this is guarded by the warning flag. I'd be interested
in feedback on how bad this is in practice; I would expect it to be
quite cheap in practice. Ideas for a cheaper / better way to do this are
also welcome.
The diagnostic wording could likely use some further wordsmithing.
Suggestions welcome here. The goals I had were to: clarify that its the
interaction of 'memset' and 'sizeof' and give more reasonable
suggestions for a resolution.
An open question is whether these diagnostics should have the note
attached for silencing by casting the dest/source pointer to void*.
llvm-svn: 133155
|
| |
|
|
|
|
| |
literal has an embedded null character, and where both arguments are the same buffer. Also use nested ifs rather than early returns; in this case early returns will lose any assumptions we've made earlier in the function.
llvm-svn: 133154
|
| |
|
|
|
|
|
|
|
|
|
|
| |
a ConstStmtVisitor. This also required adding some const iteration
support for designated initializers and making some of the getters on
the designators const.
It also made the formatting of StmtProfile.cpp rather awkward. I'm happy
to adjust any of the formatting if folks have suggestions. I've at least
fitted it all within 80 columns.
llvm-svn: 133152
|
| |
|
|
|
|
|
|
| |
I will not commit without building first.
I will not commit without building first.
I will not commit without building first...
llvm-svn: 133150
|
| |
|
|
|
|
| |
SValBuilder::getComparisonType() to just referencing IntTy.
llvm-svn: 133149
|
| |
|
|
| |
llvm-svn: 133144
|
| |
|
|
| |
llvm-svn: 133140
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
argument types for mem{set,cpy,move}. Character pointers, much like void
pointers, often point to generic "memory", so trying to check whether
they match the type of the argument to 'sizeof' (or other checks) is
unproductive and often results in false positives.
Nico, please review; does this miss any of the bugs you were trying to
find with this warning? The array test case you had should be caught by
the array-specific sizeof warning I think.
llvm-svn: 133136
|
| |
|
|
|
|
| |
complaining about mismatches in the global method pool.
llvm-svn: 133123
|
| |
|
|
|
|
|
|
|
|
| |
be more consistent in how parenthesized ranges which hit macros are
handled. Also makes the code significantly shorter, and the diagnostics
when macros are present a bit more useful.
Pair programmed w/ Matthew.
llvm-svn: 133122
|
| |
|
|
| |
llvm-svn: 133120
|
| |
|
|
|
|
| |
them only on Darwin tool chains.
llvm-svn: 133112
|
| |
|
|
| |
llvm-svn: 133110
|
| |
|
|
|
|
| |
for this.
llvm-svn: 133104
|
| |
|
|
|
|
|
|
|
|
| |
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
|
| |
|
|
|
|
| |
include a specific variable.
llvm-svn: 133102
|
| |
|
|
| |
llvm-svn: 133095
|
| |
|
|
|
|
| |
Depends on LLVM r133093.
llvm-svn: 133094
|