| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
the call argument is a string literal. Fixes
<rdar://problem/8413477>.
llvm-svn: 113580
|
|
|
|
| |
llvm-svn: 113444
|
|
|
|
| |
llvm-svn: 113132
|
|
|
|
|
|
|
|
| |
initializers, so the result of the evaluation doesn't leak through
inconsistently. Also, don't evaluate references to variables with
initializers with side-effects.
llvm-svn: 113128
|
|
|
|
|
|
| |
well-intentioned but completely unused code.
llvm-svn: 112868
|
|
|
|
|
|
| |
some issues being sorted out.
llvm-svn: 112493
|
|
|
|
|
|
|
|
|
|
| |
The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.
llvm-svn: 112458
|
|
|
|
|
|
| |
to the new constants.
llvm-svn: 112047
|
|
|
|
|
|
| |
no functionality change.
llvm-svn: 111207
|
|
|
|
| |
llvm-svn: 111080
|
|
|
|
| |
llvm-svn: 110996
|
|
|
|
|
|
|
| |
just means "not a function type", not "not a function type or void". This
changes behavior slightly, but generally in a way which accepts more code.
llvm-svn: 110303
|
|
|
|
| |
llvm-svn: 109440
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reinterpret_casts (possibly indirectly via C-style/functional casts)
on values, e.g.,
int i;
reinterpret_cast<short&>(i);
The IR generated for this is essentially the same as for
*reinterpret_cast<short*>(&i).
Fixes PR6437, PR7593, and PR7344.
llvm-svn: 108294
|
|
|
|
|
|
| |
suppressing copies of objects with trivial copy constructors.
llvm-svn: 107857
|
|
|
|
|
|
| |
breaking bootstrap on Linux.
llvm-svn: 107837
|
|
|
|
|
|
| |
newly-narrowed scope. No functionality change.
llvm-svn: 107828
|
|
|
|
|
|
| |
Fixes rdar://problem/8154689
llvm-svn: 107755
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
vector is filled with the given constant; we were just initializing the
first element.
llvm-svn: 105824
|
|
|
|
|
|
|
|
| |
initializer, don't fold paramters. Their initializers are just default
arguments which can be overridden. This fixes some spectacular regressions due
to more things making it into the constant folding.
llvm-svn: 103904
|
|
|
|
| |
llvm-svn: 103780
|
|
|
|
|
|
|
|
|
| |
of constant-evaluation. Formerly you could control whether it accepted
local l-values or not; now it always evaluates local l-values in the core
routines, but filters them out where consumed by the top-level routines.
This will make it much easier to cache evaluability.
llvm-svn: 103444
|
|
|
|
|
|
|
|
|
|
|
| |
return floats
but whose operand isn't a float: specifically, __real__ and __imag__. Instead
of filtering these out, just implement them.
Fixes <rdar://problem/7958272>.
llvm-svn: 103307
|
|
|
|
| |
llvm-svn: 103298
|
|
|
|
|
|
| |
Eli Friedman.
llvm-svn: 103297
|
|
|
|
|
|
| |
and return a bool.
llvm-svn: 103296
|
|
|
|
| |
llvm-svn: 103268
|
|
|
|
|
|
| |
variables with a comparison of a function pointer with 0.
llvm-svn: 103253
|
|
|
|
|
|
| |
the right type. It turns out that the code was already doing this.
llvm-svn: 103238
|
|
|
|
|
|
| |
like a good idea at the time.
llvm-svn: 103237
|
|
|
|
|
|
|
|
| |
IEEE-754, e.g.,
NAN != NAN ? 1 : 0 should return 1. Also fix the case for complex.
llvm-svn: 102598
|
|
|
|
|
|
|
|
| |
classes, since we only warn (not error) on offsetof() for non-POD
types. We store the base path within the OffsetOfExpr itself, then
evaluate the offsets within the constant evaluator.
llvm-svn: 102571
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Amadini.
This change introduces a new expression node type, OffsetOfExpr, that
describes __builtin_offsetof. Previously, __builtin_offsetof was
implemented using a unary operator whose subexpression involved
various synthesized array-subscript and member-reference expressions,
which was ugly and made it very hard to instantiate as a
template. OffsetOfExpr represents the AST more faithfully, with proper
type source information and a more compact representation.
OffsetOfExpr also has support for dependent __builtin_offsetof
expressions; it can be value-dependent, but will never be
type-dependent (like sizeof or alignof). This commit introduces
template instantiation for __builtin_offsetof as well.
There are two major caveats to this patch:
1) CodeGen cannot handle the case where __builtin_offsetof is not a
constant expression, so it produces an error. So, to avoid
regressing in C, we retain the old UnaryOperator-based
__builtin_offsetof implementation in C while using the shiny new
OffsetOfExpr implementation in C++. The old implementation can go
away once we have proper CodeGen support for this case, which we
expect won't cause much trouble in C++.
2) __builtin_offsetof doesn't work well with non-POD class types,
particularly when the designated field is found within a base
class. I will address this in a subsequent patch.
Fixes PR5880 and a bunch of assertions when building Boost.Python
tests.
llvm-svn: 102542
|
|
|
|
|
|
|
|
| |
thing. Audit all uses of Type::isStructure(), changing those calls to
isStructureOrClassType() as needed (which is alsmost
everywhere). Fixes the remaining failure in Boost.Utility/Swap.
llvm-svn: 102386
|
|
|
|
| |
llvm-svn: 101912
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this caused us to codegen dead globals like this:
struct foo { int a; int b; };
static struct foo fooarray[] = {
{1, 2},
{4},
};
llvm-svn: 101150
|
|
|
|
|
|
|
|
| |
expression computation in the wrong bit-width, and end up generating a totally
bogus array reference (_g0+8589934546).
- This showed up on Prolangs/cdecl.
llvm-svn: 99042
|
|
|
|
|
|
|
|
| |
evaluation of __builtin_nan*. Most of the work to make this work is in LLVM.
Fixes <rdar://problem/7696712> and part of PR 5255.
llvm-svn: 97383
|
|
|
|
| |
llvm-svn: 96054
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
side-effect of always folding the expression to the default argument of the parameter. For example:
void f(int a = 10) {
return a;
}
would always return 10, regardless of the passed in argument.
This fixes another 600 test failures. We're now down to only 137 failures!
llvm-svn: 95262
|
|
|
|
|
|
| |
definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.
llvm-svn: 94999
|
|
|
|
|
|
|
| |
now that the "InBytes" part of the name is implied by the return type, rename
it to getDeclAlign().
llvm-svn: 94681
|
|
|
|
|
|
| |
constant Objective-C strings.
llvm-svn: 94274
|
|
|
|
| |
llvm-svn: 93942
|
|
|
|
|
|
| |
the LValue-related methods of APValue out of line to avoid header file leaching.
llvm-svn: 93512
|
|
|
|
|
|
|
|
|
|
| |
"ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits
ones as appropriate.
Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType,
fromQuantity(), and getQuantity() for clarity.
llvm-svn: 93153
|
|
|
|
|
|
|
| |
try to evaluate an expression as a constant boolean condition. This has
the same intended semantics as used in folding conditional operators.
llvm-svn: 92805
|
|
|
|
|
|
| |
any side-effects.
llvm-svn: 92453
|
|
|
|
|
|
| |
it doesn't know how to fold, like derived-to-base casts.
llvm-svn: 92173
|