summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* A tiny bit more lambda IRGen.Eli Friedman2012-02-091-0/+1
| | | | llvm-svn: 150140
* Implement capture-by-copy for arrays in lambdas.Douglas Gregor2012-02-091-7/+66
| | | | llvm-svn: 150138
* [PCH] Avoid using Decl::setAttrs() and Decl::setLexicalDeclContext() from ↵Argyrios Kyrtzidis2012-02-092-15/+24
| | | | | | | | | the ASTReaderDecl directly; they internally call Decl::getASTContext() which may crash if a declaration context parent is still deserializing. llvm-svn: 150137
* Don't complain about the lack of a constructor for a lambda expression. They ↵Douglas Gregor2012-02-092-2/+3
| | | | | | are constructed in different ways llvm-svn: 150136
* When we create a non-static data member in the closure object for aDouglas Gregor2012-02-091-0/+1
| | | | | | capture, make sure we actually add the field. llvm-svn: 150135
* Factor the logic for capturing variables in a lambda into its ownDouglas Gregor2012-02-091-82/+88
| | | | | | function; it's going to get longer soon. No functionality change. llvm-svn: 150132
* Along the error path for lambdas, mark the lambda class as invalid and ↵Douglas Gregor2012-02-091-0/+10
| | | | | | finalize it llvm-svn: 150130
* Adding support for warning when a non-C compatible user-defined type is ↵Aaron Ballman2012-02-091-0/+11
| | | | | | | | returned from an extern "C" function. Fixes bug 6143 llvm-svn: 150128
* Various interrelated cleanups for lambdas:Douglas Gregor2012-02-093-11/+41
| | | | | | | | | | | | | | - Complete the lambda class when we finish the lambda expression (previously, it was left in the "being completed" state) - Actually return the LambdaExpr object and bind to the resulting temporary when needed. - Detect when cleanups are needed while capturing a variable into a lambda (e.g., due to default arguments in the copy constructor), and make sure those cleanups apply for the whole of the lambda expression. llvm-svn: 150123
* [analyzer] MallocChecker: implement pessimistic version of the checker,Anna Zaks2012-02-081-29/+62
| | | | | | | | | | | | which allows values to escape through unknown calls. Assumes all calls but the malloc family are unknown. Also, catch a use-after-free when a pointer is passed to a function after a call to free (previously, you had to explicitly dereference the pointer value). llvm-svn: 150112
* [analyzer] Split the MallocChecker into two versions - pessimistic andAnna Zaks2012-02-082-4/+22
| | | | | | | | | | | | optimistic. TODO: actually implement the pessimistic version of the checker. Ex: it needs to assume that any function that takes a pointer might free it. The optimistic version relies on annotations to tell us which functions can free the pointer. llvm-svn: 150111
* Remove explicit delete of PathDiagnosticMacroPiece, as it is now reference ↵Ted Kremenek2012-02-081-5/+2
| | | | | | counted. llvm-svn: 150110
* last piece of metadata to complete modern metadata forFariborz Jahanian2012-02-081-3/+47
| | | | | | protocol definitions. llvm-svn: 150106
* Factor C++11 lambda expressions implementation into a separateDouglas Gregor2012-02-083-330/+347
| | | | | | file. No functionality change. llvm-svn: 150089
* When computing the type of a local variable reference within a lambda,Douglas Gregor2012-02-081-1/+11
| | | | | | | | only add 'const' for variables captured by copy in potentially evaluated expressions of non-mutable lambdas. (The "by copy" part was missing). llvm-svn: 150088
* When completing a lambda expression, make sure to check and attach theDouglas Gregor2012-02-084-18/+25
| | | | | | body of the lambda to the function call operator. llvm-svn: 150087
* [analyzer] MallocChecker: convert from using evalCall toAnna Zaks2012-02-081-36/+33
| | | | | | | | | post visit of CallExpr. In general, we should avoid using evalCall as it leads to interference with other checkers. llvm-svn: 150086
* More rewriting of objective-c moderin abi metadata.Fariborz Jahanian2012-02-081-17/+60
| | | | | | All protocol related metadata is close to completion. llvm-svn: 150084
* Fixing hex floating literal support so that it handles 0x.2p2 properly.Aaron Ballman2012-02-081-6/+11
| | | | llvm-svn: 150072
* CodeGen: Move EHPersonality from CGException.h into the cpp file, it has no ↵Benjamin Kramer2012-02-083-80/+43
| | | | | | | | other users. While at it make it value-initializable to get rid of static ctors. llvm-svn: 150070
* Implement DR1458: Taking the address of an object of incomplete class type isRichard Smith2012-02-081-0/+12
| | | | | | | not a constant expression, because we can't tell whether the complete class type will have an overloaded operator&. llvm-svn: 150066
* Remove vperm2f* and vperm2i builtins. Same effect can be achieved with ↵Craig Topper2012-02-082-4/+28
| | | | | | builtin_shufflevector. llvm-svn: 150064
* Implement the agreed resolution to DR1457: a signed left shift of a 1 bit intoRichard Smith2012-02-082-10/+4
| | | | | | | | | | the sign bit doesn't have undefined behavior, but a signed left shift of a 1 bit out of the sign bit still does. As promised to Howard :) The suppression of the potential constant expression checking in system headers is also removed, since the problem it was working around is gone. llvm-svn: 150059
* A little bit of lambda IRGen.Eli Friedman2012-02-082-0/+12
| | | | llvm-svn: 150058
* Remove vpermilp* builtins. Same effect can be achieved with ↵Craig Topper2012-02-081-4/+16
| | | | | | builtin_shufflevector. llvm-svn: 150056
* Change PathDiagnosticPieces to be reference counted (simplifying their ↵Ted Kremenek2012-02-085-101/+83
| | | | | | management), and introduce 'PathPieces' as a common container for PathDiagnosticPieces. llvm-svn: 150054
* Refactor pieces of PathDiagnostic into its own data structure. No ↵Ted Kremenek2012-02-081-2/+4
| | | | | | functionality change. llvm-svn: 150053
* Make sure template argument deduction is consistently performed in an ↵Eli Friedman2012-02-081-9/+14
| | | | | | unevaluated context. llvm-svn: 150049
* Constify the getClassName routine and variables that come out of it,Eric Christopher2012-02-082-5/+8
| | | | | | | | and then use it for forward decl names. Part of rdar://10209967 and rdar://10400981 llvm-svn: 150040
* Do not return records with non trivial destructors or copy constructors inAkira Hatanaka2012-02-081-1/+1
| | | | | | registers. llvm-svn: 150035
* [libclang] For CXXOperatorCallExprs, give a valid source location to the ↵Argyrios Kyrtzidis2012-02-081-7/+12
| | | | | | | | | | DeclRefExpr that is referencing the member function, so we can index the referenced function. Fixes rdar://10762375&10324915 & http://llvm.org/PR11192 llvm-svn: 150033
* modern objc rewriter: mode metadata stuff. wip.Fariborz Jahanian2012-02-081-127/+40
| | | | llvm-svn: 150030
* Only complain about __strong __strong id, not __strong SomeStrongTypedefJohn McCall2012-02-081-13/+61
| | | | | | or __strong __typeof__(some.strong.thing). llvm-svn: 150029
* Revise the SplitQualType interface to make it its own thing instead ofJohn McCall2012-02-087-53/+54
| | | | | | | | | | | | | | a typedef of std::pair. This slightly improves type-safety, but mostly makes code using it clearer to read as well as making it possible to add methods to the type. Add such a method for efficiently single-step desugaring a split type. Add a method to single-step desugaring a locally-unqualified type. Implement both the SplitQualType and QualType methods in terms of that. Also, fix a typo ("ObjCGLifetime"). llvm-svn: 150028
* Use the new forward declaration scheme for records. Also add moreEric Christopher2012-02-081-18/+22
| | | | | | | | caching of results after we create them. Fixes rdar://10809898 llvm-svn: 150025
* Remove tabs.Devang Patel2012-02-081-18/+18
| | | | llvm-svn: 150021
* If a struct needs to be laid out, and it has notSean Callanan2012-02-081-0/+4
| | | | | | | | been completed yet, then complete it if possible. This fixes some assertion failures encountered by LLDB. llvm-svn: 150020
* modern objc abi rewriter: mode protocol metadataFariborz Jahanian2012-02-071-10/+59
| | | | | | for modern objc abi. llvm-svn: 150011
* Fix indentation and an 80-column violation.Chad Rosier2012-02-071-5/+7
| | | | llvm-svn: 150010
* non-literal strftime format string is not unsafe.Jean-Daniel Dupas2012-02-071-0/+5
| | | | llvm-svn: 150009
* Revert my patches which removed Diagnostic.h includes by moving some ↵Benjamin Kramer2012-02-0728-106/+6
| | | | | | | | | | | | | | | | | | operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. llvm-svn: 150006
* objc rewriter: modern metadata for protocol decls. wip.Fariborz Jahanian2012-02-071-8/+88
| | | | llvm-svn: 150002
* In r149662, setDiagnosticMapping was modified to not allow warnings mapped to Chad Rosier2012-02-071-0/+35
| | | | | | | | MAP_ERROR to be remapped to MAP_WARNING. These new APIs are being added to allow the diagnostic mapping's "no Werror" bit to be set, and potentially downgrade anything already mapped to be a warning. llvm-svn: 150001
* Make use of const-correct ParseCommandLineOptionsDavid Blaikie2012-02-072-4/+3
| | | | llvm-svn: 150000
* Implements support of format_arg attribute on C++ member.Jean-Daniel Dupas2012-02-071-19/+14
| | | | llvm-svn: 149998
* Remove tabs.Devang Patel2012-02-071-5/+5
| | | | llvm-svn: 149996
* Emit debug info for properites that are not backed by an ivar.Devang Patel2012-02-071-19/+21
| | | | llvm-svn: 149995
* objc rewriter: start supporting modern objective-c abiFariborz Jahanian2012-02-074-7/+6110
| | | | | | in objective-c rewriter. wip. llvm-svn: 149989
* Make parsing of objc @implementations more robust.Argyrios Kyrtzidis2012-02-076-92/+112
| | | | | | | | | | | | | | | | | | | Parsing of @implementations was based on modifying global state from the parser; the logic for late parsing of methods was spread in multiple places making it difficult to have a robust error recovery. -it was difficult to ensure that we don't neglect parsing the lexed methods. -it was difficult to setup the original objc container context for parsing the lexed methods after completing ParseObjCAtImplementationDeclaration and returning to top level context. Enhance parsing of @implementations by centralizing it in Parser::ParseObjCAtImplementationDeclaration(). ParseObjCAtImplementationDeclaration now returns only after an @implementation is fully parsed; all the data and logic for late parsing of methods is now in one place. This allows us to provide code-completion for late parsed methods with mis-matched braces. rdar://10775381 llvm-svn: 149987
* Hex literals without a significand no longer crash the lexer. Fixes bug 7910Aaron Ballman2012-02-071-0/+6
| | | | | | Patch by Eitan Adler llvm-svn: 149984
OpenPOWER on IntegriCloud