Commit Graph

122200 Commits

Author SHA1 Message Date
Chad Rosier f0687634c3 Use a temporary variable, rather then a series of redundant calls.
llvm-svn: 150538
2012-02-15 00:36:26 +00:00
Pete Cooper c21ebf5c41 Stop custom lowering forr x86 DEC64m from happening if the load in the lowered sequence has more than 1 user
llvm-svn: 150537
2012-02-15 00:33:37 +00:00
Chad Rosier dccc4794e6 Use a temporary variable, rather then a series of redundant calls.
llvm-svn: 150536
2012-02-15 00:23:55 +00:00
Anna Zaks a432feaf26 [analyzer] Add the Malloc checker to the list of tested checkers.
llvm-svn: 150535
2012-02-15 00:19:07 +00:00
Anna Zaks 5a6213d22b [analyzer] Malloc Checker: Add another false positive as a todo test.
llvm-svn: 150534
2012-02-15 00:11:28 +00:00
Anna Zaks ac06814d2f [analyzer] Malloc Checker: add support for reallocf, which always frees
the passed in pointer on failure.

llvm-svn: 150533
2012-02-15 00:11:25 +00:00
Anna Zaks d51574850e [analyzer] Malloc Checker: add support for valloc + minor code
hardening.

llvm-svn: 150532
2012-02-15 00:11:22 +00:00
Jakob Stoklund Olesen c4cf13f791 Fix global live range splitting regmask accuracy.
Pretend that regmask interference ends at the 'dead' slot, even when
there is other interference ending at the 'reg' slot of the same
instruction.

llvm-svn: 150531
2012-02-14 23:53:23 +00:00
Jakob Stoklund Olesen b0c0d340f8 Fix details in local live range splitting with regmasks.
Perform all comparisons at instruction granularity, and make sure
register masks on uses count in both gaps.

llvm-svn: 150530
2012-02-14 23:51:27 +00:00
Jakob Stoklund Olesen e7d3f441b5 Handle regmasks in findRegisterDefOperandIdx().
Only accept register masks when looking for an 'overlapping' def. When
Overlap is not set, the function searches for a proper definition of
Reg.

This means MI->modifiesRegister() considers register masks, but
MI->definesRegister() doesn't.

llvm-svn: 150529
2012-02-14 23:49:37 +00:00
Jakob Stoklund Olesen fab5201e22 Use the proper clobber check in handleLiveInRegister().
When a physreg is live in to a basic block, look for any instruction in
the block that clobbers the physreg.

The instruction doesn't have to properly redefine the register, any
overlapping clobber is OK.

This slightly changes live ranges when compiling with register masks.

llvm-svn: 150528
2012-02-14 23:46:24 +00:00
Jakob Stoklund Olesen 20d25a7f40 Dump live intervals in numerical order.
The old DenseMap hashed order was very confusing.

llvm-svn: 150527
2012-02-14 23:46:21 +00:00
Richard Smith 9bd64f90e2 Extend all-std-headers.cpp to include C++11 headers when building in C++11 mode.
Conditionally include headers which older STL implementations don't provide.

llvm-svn: 150526
2012-02-14 23:06:14 +00:00
Lang Hames e64294ef84 Don't create a new copy of reserved regs - we already have one handy.
llvm-svn: 150525
2012-02-14 23:06:12 +00:00
Richard Smith 1cb2af0b3a Advertize support for constexpr.
llvm-svn: 150524
2012-02-14 22:56:17 +00:00
Sean Callanan a7b443a6bf Only allow expressions to use the JIT if memory
can be allocated in the process.

llvm-svn: 150523
2012-02-14 22:50:38 +00:00
Richard Smith b9a7efd791 I hereby declare that all remaining constexpr issues are bugs, not unimplemented
features. :)

llvm-svn: 150522
2012-02-14 22:39:23 +00:00
Richard Smith ab44d9b321 constexpr: evaluation support for nullptr comparisons.
llvm-svn: 150521
2012-02-14 22:35:28 +00:00
Chad Rosier 5b9c3974d2 Remove unnecessary assignment to temporary, ResultReg.
llvm-svn: 150520
2012-02-14 22:29:48 +00:00
Douglas Gregor adb376ec33 Implement C++ core issue 974, which permits default arguments for
lambda expressions. Because these issue was pulled back from Ready
status at the Kona meeting, we still emit an ExtWarn when using
default arguments for lambda expressions.

llvm-svn: 150519
2012-02-14 22:28:59 +00:00
Richard Smith 4a941e25f2 If a constexpr function template specialization is referenced, and then the
template is defined, and then the specialization is referenced again, don't
forget to instantiate the template on the second reference. Use the source
location of the first reference as the point of instantiation, though.

llvm-svn: 150518
2012-02-14 22:25:15 +00:00
Argyrios Kyrtzidis 7e747957cd [libclang] Indexing: only index implicit template instantiations via an opt-in indexing option.
llvm-svn: 150517
2012-02-14 22:23:11 +00:00
Dmitri Gribenko 33e5adea86 Silence the new -Wempty-body warning. It appeared because the next statement
after the `for(...) ;' has more indentation than for itself.

llvm-svn: 150516
2012-02-14 22:17:14 +00:00
Dmitri Gribenko 800ddf3dda Generalize -Wempty-body: warn when statement body is empty (closes: PR11329)
* if, switch, range-based for: warn if semicolon is on the same line.
* for, while: warn if semicolon is on the same line and either next
statement is compound statement or next statement has more
indentation.

Replacing the semicolon with {} or moving the semicolon to the next
line will always silence the warning.

Tests from SemaCXX/if-empty-body.cpp merged into SemaCXX/warn-empty-body.cpp.

llvm-svn: 150515
2012-02-14 22:14:32 +00:00
Johnny Chen 973cf9e8ae Remove the functionality of using 'frame variable -w' to set a watchpoint now that 'watchpoint set variable/expression'
is working.  Also update the relevant test cases.

llvm-svn: 150514
2012-02-14 22:00:40 +00:00
Anna Zaks 3d34834bb0 [analyzer] Make Malloc Checker optimistic in presence of inlining.
(In response of Ted's review of r150112.)

This moves the logic which checked if a symbol escapes through a
parameter to invalidateRegionCallback (instead of post CallExpr visit.)

To accommodate the change, added a CallOrObjCMessage parameter to
checkRegionChanges callback.

llvm-svn: 150513
2012-02-14 21:55:24 +00:00
Aaron Ballman 78f815d3a4 Using the new external-linkage warning recently added instead of disabling all return type warnings.
llvm-svn: 150512
2012-02-14 21:44:03 +00:00
Ted Kremenek 76978f9d6c Remove recusive expression visitation in ExprEngine::VisitIncrementDecrementOperator().
llvm-svn: 150511
2012-02-14 21:38:30 +00:00
Richard Smith 98a0a49fbf Pending clear answer from WG21 on whether core issue 903 is intended to apply to
C++11 or just C++17, restrict the set of null pointer constants in C++11 mode
back to those which were considered null in C++98.

llvm-svn: 150510
2012-02-14 21:38:30 +00:00
Ted Kremenek 89dbd3ba40 Remove recursive visitation in ExprEngine for UO_Not, UO_Minus, UO_LNot.
llvm-svn: 150509
2012-02-14 21:31:00 +00:00
Aaron Ballman b960a51079 Fixing warning due to the new "UTD return type in extern 'C'".
Patch by Matt Johnson

llvm-svn: 150508
2012-02-14 21:29:32 +00:00
Bill Wendling 06df7725fc Add code to the target lowering object file module to handle module flags.
The MachO back-end needs to emit the garbage collection flags specified in the
module flags. This is a WIP, so the front-end hasn't been modified to emit these
flags just yet. Documentation and front-end switching to occur soon.

llvm-svn: 150507
2012-02-14 21:28:13 +00:00
Ted Kremenek 8c8578c0b8 Remove recursive visitation in ExprEngine for UO_Deref, UO_AddrOf, and UO_Extension.
llvm-svn: 150506
2012-02-14 21:27:05 +00:00
Ted Kremenek c14557fb6a Remove ExprEngine recursive visitation of unary UO_Imag operation.
llvm-svn: 150505
2012-02-14 21:27:02 +00:00
Ted Kremenek b5d87d8843 Further remove some recursive visitiation in ExprEngine that is no longer needed because the CFG is fully linearized.
llvm-svn: 150504
2012-02-14 21:26:59 +00:00
Douglas Gregor 621003e7b9 Check the return type of lambda expressions.
llvm-svn: 150503
2012-02-14 21:20:44 +00:00
Richard Smith 1bfe068e71 PR11650: Implement resolution of core issue 1301. Value initialization can't be
used to construct an object of union type with a deleted default constructor
(plus fixes for some related value-initialization corner cases).

llvm-svn: 150502
2012-02-14 21:14:13 +00:00
Johnny Chen b2cde923cf Remove @expectedFailure decorators as the bug has been fixed.
llvm-svn: 150501
2012-02-14 20:04:26 +00:00
John McCall 5ed3caf2e3 Warn about non-int main() results in GNU C mode instead of erroring.
Based on a patch by Vasiliy Korchagin!

llvm-svn: 150500
2012-02-14 19:50:52 +00:00
Timur Iskhodzhanov d2a9075de0 [ASan] Define an internal implementation of strchr to make stack OOB tests pass on Windows
llvm-svn: 150499
2012-02-14 19:33:04 +00:00
Fariborz Jahanian bce36774f0 more objective-c translator for modern abi.
metadata for protocol definitions used on
class qualifiers.

llvm-svn: 150498
2012-02-14 19:31:35 +00:00
Douglas Gregor 3e308b1fba Implement support for lambda capture pack expansions, e.g.,
[&values...] { print(values...); }

llvm-svn: 150497
2012-02-14 19:27:52 +00:00
Lang Hames 1ce837af7e Update MachineVerifier to check the new physreg live-in rules.
llvm-svn: 150496
2012-02-14 19:17:48 +00:00
Kaelyn Uhrain 0a16a8e531 Use several weighted factors to determine typo candidate viablity.
Replace the simple Levenshtein edit distance for typo correction
candidates--and the hacky way adding namespace qualifiers would affect
the edit distance--with a synthetic "edit distance" comprised of several
factors and their relative weights. This also allows the typo correction
callback object to convey more information about the viability of a
correction candidate than simply viable or not viable.

llvm-svn: 150495
2012-02-14 18:56:48 +00:00
Lang Hames 595111f221 Tighten physical register invariants: Allocatable physical registers can
only be live in to a block if it is the function entry point or a landing pad.

llvm-svn: 150494
2012-02-14 18:51:53 +00:00
Douglas Gregor ae64101e49 Simplify and robustify lambda PCH test
llvm-svn: 150493
2012-02-14 18:47:12 +00:00
Enrico Granata 6baf70aaab (no commit message)
llvm-svn: 150492
2012-02-14 18:01:27 +00:00
Douglas Gregor 99ae806aff Implement AST (de-)serialization for lambda expressions.
llvm-svn: 150491
2012-02-14 17:54:36 +00:00
Fariborz Jahanian b1ba885b49 more modern objc translator. Focusing on metadata for methods.
llvm-svn: 150490
2012-02-14 17:19:02 +00:00
Howard Hinnant e586ac735d Provide a move(const T&) overload for C++03 mode to enable moving from rvalues. This is to support proxy references. Fixes r10858112.
llvm-svn: 150488
2012-02-14 16:03:09 +00:00