summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add helper method to convert from a RegionStoreRefBindings to a Store.Ted Kremenek2012-12-071-8/+13
| | | | llvm-svn: 169622
* Hexagon TC: forward appropriate args to assemblerMatthew Curtis2012-12-071-0/+4
| | | | llvm-svn: 169611
* Driver/ToolChains.cpp: Add the name CentOS5 32bit gcc44 (aka ↵NAKAMURA Takumi2012-12-071-0/+1
| | | | | | | | i386-redhat-linux6E). Thanks to Bruce Stephens. llvm-svn: 169610
* Clang-format: extracted FormatTokenSource from UnwrappedLineParser.Alexander Kornienko2012-12-073-61/+76
| | | | | | | | | | | | | | Summary: FormatTokenLexer is here, FormatTokenBuffer is on the way. This will allow to re-parse unwrapped lines when needed. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D186 llvm-svn: 169605
* Hexagon TC: add cc1 defaults for hexagon-gccMatthew Curtis2012-12-071-3/+2
| | | | | | compatibility llvm-svn: 169599
* Small tweaks to clang-format.Daniel Jasper2012-12-071-3/+7
| | | | | | | Now not joining keywords with '::' and not putting a space between a pointer pointer. llvm-svn: 169594
* Cache queries to lookupPrivateMethod() within ↵Ted Kremenek2012-12-071-1/+29
| | | | | | | | | ObjCMethodCall::getRuntimeDefinition(). The same queries can happen thousands of times. This reduces the analysis time on one heavy Objective-C file by 2.4%. llvm-svn: 169589
* Fix the required args count for variadic blocks.John McCall2012-12-076-19/+61
| | | | | | | | | | | | | | | | | We were emitting calls to blocks as if all arguments were required --- i.e. with signature (A,B,C,D,...) rather than (A,B,...). This patch fixes that and accounts for the implicit block-context argument as a required argument. In addition, this patch changes the function type under which we call unprototyped functions on platforms like x86-64 that guarantee compatibility of variadic functions with unprototyped function types; previously we would always call such functions under the LLVM type T (...)*, but now we will call them under the type T (A,B,C,D,...)*. This last change should have no material effect except for making the type conventions more explicit; it was a side-effect of the most convenient implementation. llvm-svn: 169588
* Further reduce analysis time by 0.2% on a heavy Objective-C example by ↵Ted Kremenek2012-12-071-8/+9
| | | | | | avoiding over-eager canonicalization of clusters. llvm-svn: 169586
* Unbreak the GCC (4.4 & other bot) builds from r169571.David Blaikie2012-12-071-2/+4
| | | | llvm-svn: 169581
* Per [dcl.fct.def.default]p1, don't allow variadic special members to be ↵Richard Smith2012-12-071-0/+4
| | | | | | defaulted. llvm-svn: 169574
* Change RegionStore to always use ImmutableMapRef for processing cluster ↵Ted Kremenek2012-12-071-224/+250
| | | | | | | | | | | | | | bindings. This reduces analysis time by 1.2% on one test case (Objective-C), but also cleans up some of the code conceptually as well. We can possible just make RegionBindingsRef -> RegionBindings, but I wanted to stage things. After this, we should revisit Jordan's optimization of not canonicalizing the immutable AVL trees for the cluster bindings as well. llvm-svn: 169571
* Revert r169557. It seems that the test is too restrictedLogan Chien2012-12-061-1/+0
| | | | | | and will break the build on buildbot. llvm-svn: 169562
* Add i686-linux-android for gcc toolchain detection.Logan Chien2012-12-061-0/+1
| | | | | | | | | * Look for i686-linux-android under <sysroot>/lib/gcc. * This patch also slightly enhance the test suite for Android GCC toolchain detection. llvm-svn: 169557
* Revert "[analyzer] Aggressively cut back on the canonicalization in ↵Ted Kremenek2012-12-061-37/+31
| | | | | | | | RegionStore." Jordan and I discussed this, and we are going to do this another way. llvm-svn: 169538
* Add a bit on FunctionDecl/ObjCMethodDecl to indicate if there was a bodyArgyrios Kyrtzidis2012-12-064-2/+14
| | | | | | that was skipped by the parser. llvm-svn: 169531
* [analyzer] Remove isa<> followed by dyn_cast<>.Jordan Rose2012-12-061-7/+6
| | | | llvm-svn: 169530
* [analyzer] Remove unused fields from ExprEngine.Jordan Rose2012-12-062-17/+10
| | | | | | | 'currStmt', 'CleanedState', and 'EntryNode' were being set, but only ever used locally. llvm-svn: 169529
* [analyzer] Remove checks that predate the linearized CFG.Jordan Rose2012-12-061-10/+1
| | | | llvm-svn: 169528
* [analyzer] Simplify RetainCountChecker's handling of dead symbols.Jordan Rose2012-12-061-29/+24
| | | | | | | | | Previously we made three passes over the set of dead symbols, and removed them from the state /twice/. Now we combine the autorelease pass and the symbol death pass, and only have to remove the bindings for the symbols that leaked. llvm-svn: 169527
* [analyzer] Use a smarter algorithm to find the last block in an inlined call.Jordan Rose2012-12-061-18/+3
| | | | | | | | | Previously we would search for the last statement, then back up to the entrance of the block that contained that statement. Now, while we're scanning for the statement, we just keep track of which blocks are being exited (in reverse order). llvm-svn: 169526
* [analyzer] Use optimized assumeDual for branches.Jordan Rose2012-12-061-6/+12
| | | | | | | This doesn't seem to make much of a difference in practice, but it does have the potential to avoid a trip through the constraint manager. llvm-svn: 169524
* [analyzer] Aggressively cut back on the canonicalization in RegionStore.Jordan Rose2012-12-061-31/+37
| | | | | | | | | | | | Whenever we touch a single bindings cluster multiple times, we can delay canonicalizing it until the final access. This has some interesting implications, in particular that we shouldn't remove an /empty/ cluster from the top-level map until canonicalization. This is good for a 2% speedup or so on the test case in <rdar://problem/12810842> llvm-svn: 169523
* [analyzer] Remove bindExprAndLocation, which does extra work for no gain.Jordan Rose2012-12-063-90/+7
| | | | | | | | This feature was probably intended to improve diagnostics, but was currently only used when dumping the Environment. It shows what location a given value was loaded from, e.g. when evaluating an LValueToRValue cast. llvm-svn: 169522
* Clang-format: IndentCaseLabels option, proper namespace handlingAlexander Kornienko2012-12-063-15/+34
| | | | | | | | | | | | | | Summary: + tests arranged in groups, as their number is already quite large. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D185 llvm-svn: 169520
* Clang-format: detect unbalanced braces.Alexander Kornienko2012-12-061-2/+3
| | | | | | | | | | | | Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits, silvas Differential Revision: http://llvm-reviews.chandlerc.com/D176 llvm-svn: 169518
* Hexagon TC: Add/improve support for small dataMatthew Curtis2012-12-061-6/+40
| | | | | | threshold, pic, pie llvm-svn: 169517
* Hexagon TC: Reimplement Link::ConstructJob to callMatthew Curtis2012-12-063-47/+218
| | | | | | | | linker directly Rather than calling gcc. llvm-svn: 169512
* Sema: Don't emit a warning when __func__ is used in a lambda outside of a ↵Benjamin Kramer2012-12-061-2/+8
| | | | | | | | function. Fixes PR14518. llvm-svn: 169510
* Implements multiple parents in the parent map.Manuel Klimek2012-12-061-23/+48
| | | | | | | Previously we would match the last visited parent, which in the case of template instantiations was the last instantiated template. llvm-svn: 169508
* Hexagon TC: Move getHexagonTargetCPU from Tools.cpp toMatthew Curtis2012-12-063-52/+44
| | | | | | | | | | | | ToolChains.cpp This is in anticipation of forthcoming library path changes. Also ... - Fixes some inconsistencies in how the arch is passed to tools. - Add test cases for various forms of arch flags llvm-svn: 169505
* Improve clang-format's handling of unary operators.Daniel Jasper2012-12-061-0/+12
| | | | llvm-svn: 169500
* Hexagon TC: Update toolchain to add appropriate includeMatthew Curtis2012-12-064-26/+94
| | | | | | | | | | paths - Inherit from Linux rather than ToolChain - Override AddClangSystemIncludeArgs and AddClangCXXStdlibIncludeArgs to properly set include paths. llvm-svn: 169495
* Rework the bitfield access IR generation to address PR13619 andChandler Carruth2012-12-065-518/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | generally support the C++11 memory model requirements for bitfield accesses by relying more heavily on LLVM's memory model. The primary change this introduces is to move from a manually aligned and strided access pattern across the bits of the bitfield to a much simpler lump access of all bits in the bitfield followed by math to extract the bits relevant for the particular field. This simplifies the code significantly, but relies on LLVM to intelligently lowering these integers. I have tested LLVM's lowering both synthetically and in benchmarks. The lowering appears to be functional, and there are no really significant performance regressions. Different code patterns accessing bitfields will vary in how this impacts them. The only real regressions I'm seeing are a few patterns where the LLVM code generation for loads that feed directly into a mask operation don't take advantage of the x86 ability to do a smaller load and a cheap zero-extension. This doesn't regress any benchmark in the nightly test suite on my box past the noise threshold, but my box is quite noisy. I'll be watching the LNT numbers, and will look into further improvements to the LLVM lowering as needed. llvm-svn: 169489
* "<<" alignment for clang-format.Daniel Jasper2012-12-061-7/+41
| | | | | | | Also, small fix for handling the first token correctly. Review: http://llvm-reviews.chandlerc.com/D177 llvm-svn: 169488
* Use the BlockDecl captures list to infer the direct captures for a ↵Ted Kremenek2012-12-061-4/+7
| | | | | | | | | BlockDataRegion. Fixes <rdar://problem/12415065>. We still need to do a recursive walk to determine all static/global variables referenced by a block, which is needed for region invalidation. llvm-svn: 169481
* Only provide explicit getCapturedRegion() and getOriginalRegion() from ↵Ted Kremenek2012-12-064-4/+4
| | | | | | | | referenced_vars_iterator. This is a nice conceptual cleanup. llvm-svn: 169480
* Pull logic to map from VarDecl* to captured region using a helper function. ↵Ted Kremenek2012-12-061-17/+24
| | | | | | WIP. llvm-svn: 169479
* Use 'getOriginalRegion()' rather than going through the logic to recreate it.Ted Kremenek2012-12-061-3/+1
| | | | llvm-svn: 169478
* Fix http://stackoverflow.com/questions/13521163Richard Smith2012-12-061-13/+4
| | | | | | | | | | | Don't require that, during template deduction, a template specialization type as a function parameter has at least as many template arguments as one used in a function argument (not even if the argument has been resolved to an exact type); the additional parameters might be provided by default template arguments in the template. We don't need this check, since we now implement [temp.deduct.call]p4 with an additional check after deduction. llvm-svn: 169475
* Don't use dyn_cast on a Type* which might not be canonical. Fixes an ↵Richard Smith2012-12-061-1/+2
| | | | | | extremely obscure record layout bug. llvm-svn: 169467
* More C++ testing of declarations embedded inFariborz Jahanian2012-12-061-1/+1
| | | | | | | | <declaration> tag of Comment XML and fixing DeclPrint of templates along the way - wip. //rdar://12378714 llvm-svn: 169453
* [driver, ms-inline asm] -fms-compatibility enables -fms-extensions, so this ↵Chad Rosier2012-12-051-1/+1
| | | | | | | | | should enable the AsmBlocks language extension as well. rdar://12808010 llvm-svn: 169448
* [driver, ms-inline asm] Have -fms-extensions enable the AsmBlocks languageChad Rosier2012-12-051-1/+1
| | | | | | | | option. MS-style inline asm can now be enabled by either -fasm-blocks or -fms-extensions. rdar://12808010 llvm-svn: 169445
* In DeclPrint add printing of '= default'Fariborz Jahanian2012-12-051-0/+2
| | | | | | in constructors. llvm-svn: 169440
* In DeclPrint add printing of 'explicit'Fariborz Jahanian2012-12-051-1/+4
| | | | | | constructors. llvm-svn: 169435
* [driver, ms-inline asm] MS-Style inline assembly is controlled by theChad Rosier2012-12-053-4/+6
| | | | | | | -fasm-blocks flag, not the -fms-extensions flag. rdar://12808010 llvm-svn: 169422
* Testing C++ declarations embedded inFariborz Jahanian2012-12-051-0/+2
| | | | | | | | | <declaration> tag of Comment XML. Added DeclPrint support for constructors and fix tests accordingly. This is wip. // rdar://12378714 llvm-svn: 169412
* Format strings: offer a cast to 'unichar' for %C in Objective-C contexts.Jordan Rose2012-12-052-27/+72
| | | | | | | | | | | | | | | | | | | For most cases where a conversion specifier doesn't match an argument, we usually guess that the conversion specifier is wrong. However, if the argument is an integer type and the specifier is %C, it's likely the user really did mean to print the integer as a character. (This is more common than %c because there is no way to specify a unichar literal -- you have to write an integer literal, such as '0x2603', and then cast it to unichar.) This does not change the behavior of %S, since there are fewer cases where printing a literal Unicode *string* is necessary, but this could easily be changed in the future. <rdar://problem/11982013> llvm-svn: 169400
* Format strings: add more expression types that don't need parens to cast.Jordan Rose2012-12-051-0/+12
| | | | | | | No functionality change (the test change is a comment only, and the new functionality can't be tested using the current test). llvm-svn: 169399
OpenPOWER on IntegriCloud