summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix a CodeGen bug where we would skip zero-initialization forEli Friedman2012-08-252-4/+11
| | | | | | array new with a non-trivial constructor. Pointed out in PR13380. llvm-svn: 162643
* Remove spurious string literal for bool argument.Richard Smith2012-08-251-1/+1
| | | | llvm-svn: 162642
* _HAS_CHAR16_T_LANGUAGE_SUPPORT is not predefined MSVC macro.Francois Pichet2012-08-251-4/+0
| | | | llvm-svn: 162641
* Change --with-analyzer to --use-analyzer, per sage feedback from Jordan.Ted Kremenek2012-08-251-5/+5
| | | | llvm-svn: 162640
* Fix the CC-matching logic for instance methods in the MS ABI.John McCall2012-08-252-2/+77
| | | | | | Patch by Timur Iskhodzhanov! llvm-svn: 162639
* Fix the mangling of function pointers in the MS ABI.John McCall2012-08-253-2/+82
| | | | | | Patch by Timur Iskhodzhanov! llvm-svn: 162638
* [analyzer] Use the common evalBind infrastructure for initializers.Jordan Rose2012-08-256-33/+52
| | | | | | | | | | | | | | | | | | | This allows checkers (like the MallocChecker) to process the effects of the bind. Previously, using a memory-allocating function (like strdup()) in an initializer would result in a leak warning. This does bend the expectations of checkBind a bit; since there is no assignment expression, the statement being used is the initializer value. In most cases this shouldn't matter because we'll use a PostInitializer program point (rather than PostStmt) for any checker-generated nodes, though we /will/ generate a PostStore node referencing the internal statement. (In theory this could have funny effects if someone actually does an assignment within an initializer; in practice, that seems like it would be very rare.) <rdar://problem/12171711> llvm-svn: 162637
* Stub out a release notes section on -fcatch-undefined-behavior.Richard Smith2012-08-251-0/+7
| | | | llvm-svn: 162636
* Update the user's manual for some of the new -fcatch-undefined-behavior ↵Richard Smith2012-08-251-5/+17
| | | | | | features. llvm-svn: 162635
* -fcatch-undefined-behavior: add the -ftrapv checks to the set of things caughtRichard Smith2012-08-255-18/+104
| | | | | | | | | | | | | | | | by this mode, and also check for signed left shift overflow. The rules for the latter are a little subtle: * neither C89 nor C++98 specify the behavior of a signed left shift at all * in C99 and C11, shifting a 1 bit into the sign bit has undefined behavior * in C++11, with core issue 1457, shifting a 1 bit *out* of the sign bit has undefined behavior As of this change, we use the C99 rules for all C language variants, and the C++11 rules for all C++ language variants. Once we have individual -fcatch-undefined-behavior= flags, this should be revisited. llvm-svn: 162634
* Added SBDebugger's log callbacks to Python-landFilipe Cabecinhas2012-08-256-39/+99
| | | | | | | | | | | | | | | | | | | - Tweaked a parameter name in SBDebugger.h so my typemap will catch it; - Added a SBDebugger.Create(bool, callback, baton) to the swig interface; - Added SBDebugger.SetLoggingCallback to the swig interface; - Added a callback utility function for log callbacks; - Guard against Py_None on both callback utility functions; - Added a FIXME to the SBDebugger API test; - Added a __del__() stub for SBDebugger. We need to be able to get both the log callback and baton from an SBDebugger if we want to protect against memory leaks (or make the user responsible for holding another reference to the callback). Additionally, it's impossible to revert from a callback-backed log mechanism to a file-backed log mechanism. llvm-svn: 162633
* [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.Chad Rosier2012-08-2523-133/+115
| | | | | | No functional change intended. llvm-svn: 162632
* ASTTests: Suppress TestCXXConstructorDecl11 on msvc for now. It seems ↵NAKAMURA Takumi2012-08-251-1/+2
| | | | | | incompatible. llvm-svn: 162631
* Remove RequireCompleteType call which was made redundant by r162586.Richard Smith2012-08-241-7/+0
| | | | llvm-svn: 162630
* [ms-inline asm] Update the AST Reader/Writer for MS-style inline asms.Chad Rosier2012-08-245-0/+14
| | | | llvm-svn: 162629
* objective-C: Do not warn if align attribute on methodFariborz Jahanian2012-08-242-5/+58
| | | | | | | declaration is not provided. It is only necessary on the method implementation. // rdar://11593375 llvm-svn: 162628
* loop-convert, a C++11 for loop modernizerSam Panzer2012-08-2428-1/+3323
| | | | | | | | | | | | | | | | | | A new Clang-based tool which converts for loops to use the range-based syntax new to C++11. Three kinds of loops can be converted: - Loops over statically allocated arrays - Loops over containers, using iterators - Loops over array-like containers, using operator[] and at() Each transformation is assigned a confidence level by the tool. The minimum require confidence level to actually apply the transformation can be specified on the command line, but the default level should be fine for most code. Like other tools based on RefactoringTool, it is easiest to use this tool with a compilation database. llvm-svn: 162627
* Fix integer unsigned behavior in clang due to signed left shift overflow.Richard Smith2012-08-242-3/+4
| | | | llvm-svn: 162626
* Fix a few issues related to -with-analyzer reported by Jordan. Let'sTed Kremenek2012-08-241-5/+5
| | | | | | have the option with two '--' to be consistent with other options. llvm-svn: 162625
* Reverted to correct commit this time.Sam Panzer2012-08-2411-46/+297
| | | | llvm-svn: 162624
* Fix integer undefined behavior due to signed left shift overflow in LLVM.Richard Smith2012-08-2419-56/+59
| | | | | | Reviewed offline by chandlerc. llvm-svn: 162623
* Add missing mayLoad flags to a large class of AVX *_Int instructions.Jakob Stoklund Olesen2012-08-241-1/+2
| | | | llvm-svn: 162622
* Rework how scan-build picks the version of clang to use for static analysis.Ted Kremenek2012-08-241-40/+61
| | | | | | | | | | | Unless the user specifies, the clang used for static analysis is the one found relative to scan-build. If the user specifies -with-analyzer, they can pick either to use the clang bundled with Xcode (via xcrun) or they can specify a path to clang. llvm-svn: 162620
* Reformat help text for scan-build, and remove -constraintsTed Kremenek2012-08-241-58/+84
| | | | | | | and -store from help text because they are no longer relevant to users. llvm-svn: 162619
* Reverted incorect partial commit of loop migrator. git-svn strikes againSam Panzer2012-08-2438-3580/+47
| | | | llvm-svn: 162618
* Add the "expr" command to the gdb command equivalents.Jim Ingham2012-08-241-0/+58
| | | | llvm-svn: 162617
* When computing the effective context for access control,John McCall2012-08-243-6/+27
| | | | | | | | make sure we walk up the DC chain for the current context, rather than allowing ourselves to get switched over to the canonical DC chain. Fixes PR13642. llvm-svn: 162616
* Missed tLEApcrelJT.Jakob Stoklund Olesen2012-08-241-0/+1
| | | | | | | ARMConstantIslandPass expects this instruction to stay in the same basic block as the jump table branch. llvm-svn: 162615
* Infer instruction properties from single-instruction patterns.Jakob Stoklund Olesen2012-08-243-0/+45
| | | | | | | | | | | | | | | | | | | | | Previously, instructions without a primary patterns wouldn't get their properties inferred. Now, we use all single-instruction patterns for inference, including 'def : Pat<>' instances. This causes a lot of instruction flags to change. - Many instructions no longer have the UnmodeledSideEffects flag because their flags are now inferred from a pattern. - Instructions with intrinsics will get a mayStore flag if they already have UnmodeledSideEffects and a mayLoad flag if they already have mayStore. This is because intrinsics properties are linear. - Instructions with atomic_load patterns get a mayStore flag because atomic loads can't be reordered. The correct workaround is to create pseudo-instructions instead of using normal loads. PR13693. llvm-svn: 162614
* Wrap throw in _LIBCPP_NO_EXCEPTIONS in debug.cpp. Calls abort if can't ↵Howard Hinnant2012-08-241-0/+20
| | | | | | throw an exception. Fixes http://llvm.org/bugs/show_bug.cgi?id=13082. llvm-svn: 162613
* Slight refactoringSam Panzer2012-08-246-80/+188
| | | | llvm-svn: 162612
* Fixes according to code review commentsSam Panzer2012-08-248-250/+258
| | | | llvm-svn: 162611
* For Loop ConversionSam Panzer2012-08-2428-1/+3167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Loop Converter Skeleton - array-step-1 Added a check to loop increments - array-step-2b Added a check on the loop's condition expression - array-step-2c Finished array matcher - array-step-2 Retrieved matched nodes - array-step-3 Analysis for array loop indices - array-step-4 Added checking for naming and variable scope Added confidence level and count-only command line args Added aliased variable elision Added support for iterator-based loops Added support for single-iterator loops which call end() repeatedly Added support for converting array-like containers llvm-svn: 162610
* New matcher for MaterializeTemporaryExprSam Panzer2012-08-242-0/+57
| | | | llvm-svn: 162609
* Have basic_istream seekg, putback and unget first clear eofbit. Fixes ↵Howard Hinnant2012-08-241-0/+3
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=13089. llvm-svn: 162608
* Add Hyeon-bin Jeong to CREDITS.TXTHoward Hinnant2012-08-241-0/+4
| | | | llvm-svn: 162604
* Explicitly mark LEApcrel pseudos with hasSideEffects.Jakob Stoklund Olesen2012-08-242-0/+4
| | | | | | | | | | It's not clear that they should be marked as such, but tbb formation fails if t2LEApcrelJT is hoisted of of a loop. This doesn't change the flags on these instructions, UnmodeledSideEffects was already inferred from the missing pattern. llvm-svn: 162603
* [ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a Chad Rosier2012-08-249-17/+30
| | | | | | | | | CodeGen option to a LangOpt option. In turn, hoist the guard into the parser so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This should restore the behavior of clang to that prior to r158325. <rdar://problem/12163681> llvm-svn: 162602
* Hyeon-Bin Jeong: 1. sync() should reset it’s external buffer pointers. Howard Hinnant2012-08-241-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining characters should be discarded once sync() called. If don’t, garbage characters can be inserted to the front of external buffer in underflow(). Because underflow() copies remaining characters in external buffer to it’s front. This results wrong characters insertion when seekpos() or seekoff() is called. this line should be inserted in sync() just before return: __extbufnext_ = __extbufend_ = __extbuf_; 2. sync() should use length() rather than out() to calculate offset. Reversing iterators and calling out() to calculate offset from behind is working fine in stateless character encoding. However, in stateful encoding, escape sequences could differ in length. As a result, out() could return wrong length. For example, if we have internal buffer converted from this external sequence: (capital letters mean escape sequence) … a a a a B b b b b out() produces this sequence. b b b b A a a a a Because out() inserts escape sequence A rather than B, result sequence doesn't match to external sequence. A and B could have different lengths, result offset could be wrong value too. length() method in codecvt is right for calculating offset, but it counts offset from the beginning of buffer. So it requires another state member variable to hold state before conversion. Fixes http://llvm.org/bugs/show_bug.cgi?id=13667 llvm-svn: 162601
* Providing an additional Python command exampleEnrico Granata2012-08-241-0/+33
| | | | llvm-svn: 162600
* Stop inferring isVariadic from instruction patterns.Jakob Stoklund Olesen2012-08-241-1/+5
| | | | | | | | | | | | | | | | | | Instructions are now only marked as variadic if they use variable_ops in their ins list. A variadic SDNode is typically used for call nodes that have the call arguments as operands. A variadic MachineInstr can actually encode a variable number of operands, for example ARM's stm/ldm instructions. A call instruction does not have to be variadic. The call argument registers are added as implicit operands. This change remove the MCID::Variadic flags from most call and return instructions, allowing us to better verify their operands. llvm-svn: 162599
* [analyzer] Ted fixed the plist-html issue, so the assert can go away.Anna Zaks2012-08-241-3/+1
| | | | llvm-svn: 162598
* [analyzer] More fixups/rewording based on Jordan's feedback.Anna Zaks2012-08-242-3/+3
| | | | llvm-svn: 162597
* Fix call instruction operands in ARMFastISel.Jakob Stoklund Olesen2012-08-241-34/+16
| | | | | | | | | The ARM BL and BLX instructions don't have predicate operands, but the thumb variants tBL and tBLX do. The argument registers should be added as implicit uses. llvm-svn: 162593
* Mark X86::RET and RETI instructions as variadic.Jakob Stoklund Olesen2012-08-241-2/+5
| | | | | | | There is special magic happening when returning floating point values on the x87 stack. The RET instructions get extra f80 operands. llvm-svn: 162592
* Avoid including explicit uses when counting SDNode imp-uses.Jakob Stoklund Olesen2012-08-241-3/+6
| | | | | | | It is legal to have a register node as an explicit operand, it shouldn't be counted as an implicit use. llvm-svn: 162591
* Remove unnecessary calls to c_str.Benjamin Kramer2012-08-241-3/+3
| | | | llvm-svn: 162590
* Disable Mips' delay slot filler when optimization level is O0.Akira Hatanaka2012-08-242-7/+15
| | | | llvm-svn: 162589
* Fix analyzer tests.Ted Kremenek2012-08-2488-107/+107
| | | | llvm-svn: 162588
* Revert "Go ahead and show experimental checkers in the scan-build "-h" output."Ted Kremenek2012-08-241-0/+9
| | | | llvm-svn: 162587
OpenPOWER on IntegriCloud