| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
reason this is limited to C++, and it's certainly not limited to temporaries.
llvm-svn: 120996
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.
In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.
This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.
Ted Kremenek kindly contributed the analyzer workarounds in this patch.
llvm-svn: 120890
|
|
|
|
|
|
|
|
| |
ObjCPropertyRefExpr
into the latter.
llvm-svn: 120643
|
|
|
|
| |
llvm-svn: 120084
|
|
|
|
|
|
|
|
|
|
| |
expands to nothing"
and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro.
Thanks to Abramo Bagnara for the hint!
llvm-svn: 119887
|
|
|
|
|
|
|
|
|
| |
if (condition)
CALL(0); // empty macro but don't warn for empty body.
Fixes rdar://8436021.
llvm-svn: 119838
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
manually managing them
using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these
objects; digging deeper into the code, it was clear that our management of these objects was a mess. The ownership rules were murky at best, and not always followed. Worse, there are plenty of error paths where we could screw up.
This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList
objects and then blows them away all at once. While conceptually simple, most of the changes in
this patch just have to do with migrating over to the new interface. Most of the changes have resulted in some nice simplifications.
This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser
object. This is easily tunable. If we desire to have more bound the lifetime of AttributeList
objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its
underlying allocator as we enter/leave key methods in the Parser. This means that we get
simple memory management while still having the ability to finely control memory use if necessary.
Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic
in many large files with attributes.
This fixes the leak reported in: <rdar://problem/8650003>
llvm-svn: 118675
|
|
|
|
|
|
|
|
| |
calling it.
Also avoids IRGen crashes due to accepting invalid code.
llvm-svn: 117943
|
|
|
|
|
|
| |
ambiguous context.
llvm-svn: 116567
|
|
|
|
|
|
| |
to white-list conversions required by system headers. rdar://problem/8232669
llvm-svn: 116029
|
|
|
|
|
|
|
|
|
|
|
| |
a helper function (AdjustAPSInt) and use that
for adjusting the high bounds of case ranges
before APSInt comparisons. Fixes
http://llvm.org/bugs/show_bug.cgi?id=8135
Some minor refacorings while I am here.
llvm-svn: 115355
|
|
|
|
|
|
| |
rdar://8483139.
llvm-svn: 114954
|
|
|
|
| |
llvm-svn: 114315
|
|
|
|
| |
llvm-svn: 114314
|
|
|
|
|
|
| |
warning to handle multiple enumerators with one warning.
llvm-svn: 114093
|
|
|
|
|
|
|
|
| |
from a macro.
Fixes <rdar://problem/8436021>.
llvm-svn: 114049
|
|
|
|
| |
llvm-svn: 113476
|
|
|
|
| |
llvm-svn: 113467
|
|
|
|
|
|
|
|
|
|
| |
switch(enum) where
covered by individual case statements. Flow-based analyses may wish to consult this information,
and recording this in the AST allows us to obviate reconstructing this information later when
we build the CFG.
llvm-svn: 113447
|
|
|
|
|
|
|
|
|
| |
should probably be removed if it has no purpose, but I just #if'd it out
in case it's usefulIdempotentOperationChecker::isTruncationExtensionAssignment
should probably be removed if it has no purpose, but I just #if'd it out
in case it's useful
llvm-svn: 112949
|
|
|
|
| |
llvm-svn: 112945
|
|
|
|
|
|
|
| |
Clients of Sema don't need to know (for example) the list of diagnostics we
support.
llvm-svn: 112093
|
|
|
|
|
|
| |
to the new constants.
llvm-svn: 112047
|
|
|
|
| |
llvm-svn: 112038
|
|
|
|
|
|
|
| |
#include Sema.h while keeping all the AST declarations opaque. That may
not be reasonably attainable, though.
llvm-svn: 111907
|
|
|
|
|
|
|
| |
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result
llvm-svn: 111903
|
|
|
|
| |
llvm-svn: 111863
|
|
|
|
| |
llvm-svn: 111733
|
|
|
|
| |
llvm-svn: 110965
|
|
|
|
|
|
|
| |
does not implement 'countByEnumeratingWithState' API.
Implements radar 7634669.
llvm-svn: 110964
|
|
|
|
| |
llvm-svn: 110945
|
|
|
|
|
|
| |
types. Fixes PR7865.
llvm-svn: 110832
|
|
|
|
|
|
|
|
|
|
| |
a switch or goto somewhere in the function. Indirect gotos trigger the
jump-checker regardless, because the conditions there are slightly more
elaborate and it's too marginal a case to be worth optimizing.
Turns off the jump-checker in a lot of cases in C++. rdar://problem/7702918
llvm-svn: 109962
|
|
|
|
| |
llvm-svn: 109440
|
|
|
|
|
|
| |
since we aren't going to be calling them ever.
llvm-svn: 109377
|
|
|
|
|
|
| |
that we don't warn when there isn't going to be any computation anyway.
llvm-svn: 108442
|
|
|
|
|
|
| |
suppressing copies of objects with trivial copy constructors.
llvm-svn: 107857
|
|
|
|
|
|
| |
breaking bootstrap on Linux.
llvm-svn: 107837
|
|
|
|
|
|
|
|
|
| |
CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as
appropriate. Fixes PR7556, and provides a slide codegen improvement
when copy-initializing a POD class type from a value-initialized
temporary. Previously, we weren't eliding the copy.
llvm-svn: 107827
|
|
|
|
|
|
|
|
|
|
|
| |
type to an integral or enumeration type in the size of an array new
expression, e.g.,
new int[ConvertibleToInt(10)];
This is a GNU and C++0x extension.
llvm-svn: 107229
|
|
|
|
|
|
|
|
| |
have integral or enumeration type, so that we still check the contents
of the switch body. My previous patch made this worse; now we're back
to where we were previously.
llvm-svn: 107223
|
|
|
|
|
|
|
|
| |
enumeration type out into a separate, reusable routine. The only
functionality change here is that we recover a little more
aggressively from ill-formed switch conditions.
llvm-svn: 107222
|
|
|
|
|
|
| |
than the enumeration type itself takes. Fixes PR7477.
llvm-svn: 107163
|
|
|
|
|
|
|
|
|
| |
types, updating callers of both isFloatingType() and
isRealFloatingType() accordingly. Caught at least one issue where we
allowed one to declare a vector of vectors (!), along with cleaning up
the standard-conversion logic for C++.
llvm-svn: 106595
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if/while/switch/for statements to ensure that walking the children of
these statements actually works. Previously, we stored the condition
variable as a VarDecl. However, StmtIterator isn't able to walk from a
VarDecl to a set of statements, and would (in some circumstances) walk
beyond the end of the list of statements, cause Bad Behavior.
In this change, we've gone back to representing the condition
variables as DeclStmts. While not as memory-efficient as VarDecls, it
greatly simplifies iteration over the children.
Fixes the remainder of <rdar://problem/8104754>.
llvm-svn: 106504
|
|
|
|
|
|
|
|
|
|
| |
in C++ that involve both integral and enumeration types. Convert all
of the callers to Type::isIntegralType() that are meant to work with
both integral and enumeration types over to
Type::isIntegralOrEnumerationType(), to prepare to eliminate
enumeration types as integral types.
llvm-svn: 106071
|
|
|
|
|
|
| |
explicit casts. Fixes PR7359.
llvm-svn: 105871
|
|
|
|
|
|
|
|
| |
If a switch condition is constant, warn if there's no case for it.
Constant switch conditions do come up in reasonable template code.
llvm-svn: 104010
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.
Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.
By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.
llvm-svn: 103870
|
|
|
|
|
|
|
|
|
| |
return statements. We perform NRVO only when all of the return
statements in the function return the same variable. Fixes some link
failures in Boost.Interprocess (which is relying on NRVO), and
probably improves performance for some C++ applications.
llvm-svn: 103867
|