| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
doing an overflow check.
llvm-svn: 108943
|
| |
|
|
| |
llvm-svn: 108937
|
| |
|
|
| |
llvm-svn: 108936
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which generates more efficient and more obviously conformant
code. We now test for overflow of the multiply then force
the result to -1 if so. On X86, this generates nice code
like this:
__Z4testl: ## @_Z4testl
## BB#0: ## %entry
subl $12, %esp
movl $4, %eax
mull 16(%esp)
testl %edx, %edx
movl $-1, %ecx
cmovel %eax, %ecx
movl %ecx, (%esp)
call __Znam
addl $12, %esp
ret
llvm-svn: 108927
|
| |
|
|
| |
llvm-svn: 108916
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
causing clang to compile this code into something that correctly throws a
length error, fixing a potential integer overflow security attack:
void *test(long N) {
return new int[N];
}
int main() {
test(1L << 62);
}
We do this even when exceptions are disabled, because it is better for the
code to abort than for the attack to succeed.
This is heavily based on a patch that Fariborz wrote.
llvm-svn: 108915
|
| |
|
|
|
|
|
|
|
| |
which is the part of the file that contains all of the initial
comments, includes, and preprocessor directives that occur before any
of the actual code. Added a new -print-preamble cc1 action that is
only used for testing.
llvm-svn: 108913
|
| |
|
|
| |
llvm-svn: 108907
|
| |
|
|
|
|
| |
ObjC ABI version 2 this time.
llvm-svn: 108847
|
| |
|
|
|
|
| |
standard's minimum requirements.
llvm-svn: 108837
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
implementation detail (InsertPos
leaks though) and add methods to its interface for adding/finding specializations.
Simplifies its users a bit and we no longer need to replace specializations in the folding set with
their redeclarations. We just return the most recent redeclarations.
As a bonus, it fixes http://llvm.org/PR7670.
llvm-svn: 108832
|
| |
|
|
| |
llvm-svn: 108806
|
| |
|
|
| |
llvm-svn: 108766
|
| |
|
|
|
|
| |
protocols (Radar 8191774).
llvm-svn: 108758
|
| |
|
|
|
|
|
|
| |
positional arguments, since
these don't actually consume an argument.
llvm-svn: 108757
|
| |
|
|
|
|
|
|
| |
reparses an already-parsed translation unit. At the moment it's just a
convenience function, but we hope to use it for performance
optimizations.
llvm-svn: 108756
|
| |
|
|
| |
llvm-svn: 108754
|
| |
|
|
| |
llvm-svn: 108750
|
| |
|
|
|
|
| |
<rdar://problem/8204052>.
llvm-svn: 108742
|
| |
|
|
| |
llvm-svn: 108741
|
| |
|
|
| |
llvm-svn: 108713
|
| |
|
|
|
|
| |
-mmacosx-version-min works inside a -Xarch_ flag.
llvm-svn: 108712
|
| |
|
|
|
|
| |
and a minor cleanup.
llvm-svn: 108707
|
| |
|
|
|
|
| |
there is no file named "file", keep the @file option unchanged.
llvm-svn: 108697
|
| |
|
|
|
|
| |
the exponent, everyone else two.
llvm-svn: 108693
|
| |
|
|
|
|
|
| |
A ParmVarDecl instantiated from a FunctionProtoType may have Record as DeclContext,
in which case isStaticDataMember() will erroneously return true.
llvm-svn: 108692
|
| |
|
|
|
|
|
| |
with @file.", it doesn't correctly handle cases where arguments starting with
'@' are passed to other command line arguments.
llvm-svn: 108686
|
| |
|
|
| |
llvm-svn: 108672
|
| |
|
|
| |
llvm-svn: 108671
|
| |
|
|
| |
llvm-svn: 108669
|
| |
|
|
|
|
| |
fixed return types.
llvm-svn: 108657
|
| |
|
|
|
|
|
| |
linkage specification. Not sure if this is the ideal fix, but I'm reasonably
sure it's correct vs. gcc.
llvm-svn: 108656
|
| |
|
|
|
|
| |
is a very reasonable position on life!
llvm-svn: 108651
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
their call expressions synthetically have the "deduced" types based on their
first argument. We only insert conversions in the AST for arguments whose
values require conversion to match the value type expected. This keeps PR7600
closed by maintaining the return type, but avoids assertions due to unexpected
implicit casts making the type unsigned (test case added from Daniel).
The magic is moved into the codegen for the atomic builtin which inserts the
casts as needed at the IR level to raise the type to an integer suitable for
the LLVM intrinsic. This shouldn't cause any real change in functionality, but
now we can make the builtin be more truly polymorphic.
llvm-svn: 108638
|
| |
|
|
|
|
| |
try to evaluate the initializer as a constant.
llvm-svn: 108632
|
| |
|
|
|
|
|
| |
incomplete union (PR5692) and incomplete enum, and fixes obscure
accepts-invalid on cast to incomplete struct.
llvm-svn: 108630
|
| |
|
|
|
|
|
| |
allow invalid token pastes (when in -fms-extensions mode)
with -Wno-invalid-token-paste
llvm-svn: 108624
|
| |
|
|
| |
llvm-svn: 108623
|
| |
|
|
| |
llvm-svn: 108622
|
| |
|
|
|
|
| |
removing a bogus assertion.
llvm-svn: 108602
|
| |
|
|
| |
llvm-svn: 108600
|
| |
|
|
|
|
|
| |
part of the new property synthesis by default.
wip.
llvm-svn: 108599
|
| |
|
|
|
|
| |
multiple reasons. Rethrow with _objc_exception_throw instead. Fixes PR7656.
llvm-svn: 108595
|
| |
|
|
|
|
| |
an APFloat with different "float semantics" than the compared float literal.
llvm-svn: 108590
|
| |
|
|
|
|
| |
message send expressions who call methods that return references.
llvm-svn: 108559
|
| |
|
|
|
|
| |
of mine.
llvm-svn: 108552
|
| |
|
|
|
|
|
|
|
|
| |
it into the default path-sensitive analysis options.
- Added checks for static local variables, self assigned parameters, and truncating/extending self assignments
- Removed command line option (now default with --analyze)
- Updated test cases to pass with idempotent operation warnings
llvm-svn: 108550
|
| |
|
|
| |
llvm-svn: 108542
|
| |
|
|
| |
llvm-svn: 108541
|
| |
|
|
|
|
|
|
|
| |
expression such as the "foo" in "this->blah.foo<1, 2>", and we can't
look into the type of "this->blah" (e.g., because it is dependent),
look into the local scope of a template of the same name. Fixes
<rdar://problem/8198511>.
llvm-svn: 108531
|