summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Only pop the expression evaluation context corresponding to a lambdaDouglas Gregor2012-02-212-5/+15
| | | | | | | | | expression after we've finished the function body of the corresponding function call operator. Otherwise, ActOnFinishFunctionBody() will see the (unfinished) evaluation context of the lambda expression itself. Fixes PR12031. llvm-svn: 151082
* Don't assume that a valid expression for the first part of a for-statementRichard Smith2012-02-212-2/+12
| | | | | | is non-null when diagnosing a broken attempt to write a for-range-statement. llvm-svn: 151081
* When calling a non variadic format function(vprintf, vscanf, NSLogv, …), ↵Jean-Daniel Dupas2012-02-214-18/+104
| | | | | | warn if the format string argument is a parameter that is not itself declared as a format string with compatible format. llvm-svn: 151080
* Improve our handling of lambda expressions that occur within defaultDouglas Gregor2012-02-219-19/+85
| | | | | | | | | | | | | | | | | | | arguments. There are two aspects to this: - Make sure that when marking the declarations referenced in a default argument, we don't try to mark local variables, both because it's a waste of time and because the semantics are wrong: we're not in a place where we could capture these variables again even if it did make sense. - When a lambda expression occurs in a default argument of a function template, make sure that the corresponding closure type is considered dependent, so that it will get properly instantiated. The second bit is a bit of a hack; to fix it properly, we may have to rearchitect our handling of default arguments, parsing them only after creating the function definition. However, I'd like to separate that work from the lambdas work. llvm-svn: 151076
* Allow linux builds to take advantage of libunwind to get unwind.h ifJeffrey Yasskin2012-02-211-3/+13
| | | | | | that's installed. llvm-svn: 151058
* Also mark Type's dump() as 'used' to make it available in libclang.Argyrios Kyrtzidis2012-02-211-1/+1
| | | | llvm-svn: 151037
* Remove comma from end of enum to silence build warning.Craig Topper2012-02-211-1/+1
| | | | llvm-svn: 151036
* Mark a few 'dump' methods as 'used' to make sure they are included in libclangArgyrios Kyrtzidis2012-02-212-4/+5
| | | | | | and useable while debugging. llvm-svn: 151033
* Implement non-internal linkage for lambda closure types that need aDouglas Gregor2012-02-216-31/+151
| | | | | | | | | stable mangling, since these lambdas can end up in multiple translation units. Sema is responsible for deciding when this is the case, because it's already responsible for choosing the mangling number. llvm-svn: 151029
* Add a test case for r150976.Nico Weber2012-02-211-0/+41
| | | | llvm-svn: 151027
* Implement name mangling for lambda expressions that occur within theDouglas Gregor2012-02-217-24/+119
| | | | | | initializers of data members (both static and non-static). llvm-svn: 151017
* Adding a test case for the working-directory fixAaron Ballman2012-02-211-0/+4
| | | | llvm-svn: 151014
* Have ScanReachableSymbols reported reachable regions. Fixes a false ↵Ted Kremenek2012-02-213-1/+27
| | | | | | positive with nested array literals. <rdar://problem/10686586> llvm-svn: 151012
* Implement name mangling for lambda expressions that occur within theDouglas Gregor2012-02-2115-82/+285
| | | | | | | | | | | | | | | | default arguments of function parameters. This simple-sounding task is complicated greatly by two issues: (1) Default arguments aren't actually a real context, so we need to maintain extra state within lambda expressions to track when a lambda was actually in a default argument. (2) At the time that we parse a default argument, the FunctionDecl doesn't exist yet, so lambda closure types end up in the enclosing context. It's not clear that we ever want to change that, so instead we introduce the notion of the "effective" context of a declaration for the purposes of name mangling. llvm-svn: 151011
* Emit the exact size for the invariant intrinsics.Nick Lewycky2012-02-212-9/+12
| | | | llvm-svn: 151010
* [analyzer] + a couple more malloc tests.Anna Zaks2012-02-211-0/+17
| | | | llvm-svn: 151008
* [analyzer] Make KeyChainAPI checker inlining-aware.Anna Zaks2012-02-212-3/+73
| | | | llvm-svn: 151007
* Make RequireLiteralType work correctly with incomplete array types. PR12037.Eli Friedman2012-02-202-2/+25
| | | | llvm-svn: 151005
* [PCH] Recover gracefully if the ASTReader detects that a file is differentArgyrios Kyrtzidis2012-02-203-8/+54
| | | | | | | | | | | | | | | | | | | from the one stored in the PCH/AST, while trying to load a SLocEntry. We verify that all files of the PCH did not change before loading it but this is not enough because: - The AST may have been 1) kept around, 2) to do queries on it. - We may have 1) verified the PCH and 2) started parsing. Between 1) and 2) files may change and we are going to have crashes because the rest of clang cannot deal with the ASTReader failing to read a SLocEntry. Handle this by recovering gracefully in such a case, by initializing the SLocEntry with the info from the PCH/AST as well as reporting failure by the ASTReader. rdar://10888929 llvm-svn: 151004
* Fix a constexpr FIXME: When implicitly instantiating the primary template for anRichard Smith2012-02-203-16/+15
| | | | | | | explicit specialization of a function template, mark the instantiation as constexpr if the specialization is, rather than requiring them to match. llvm-svn: 151001
* Formatting.Eric Christopher2012-02-201-6/+6
| | | | llvm-svn: 150996
* Make PreprocessorOptions::DetailedRecordIncludesNestedMacroExpansions false ↵Argyrios Kyrtzidis2012-02-201-1/+1
| | | | | | | | by default. Recording nested macro expansions is not useful, plus it fixes rdar://10893630 llvm-svn: 150995
* objc IRGen: force CSE of load of ivar offsets by settingFariborz Jahanian2012-02-202-1/+35
| | | | | | | the 'invariant.load' metadata tag onto those loads. // rdar://10840980 llvm-svn: 150994
* [analyzer] Make Malloc aware of inter-procedural execution + basicAnna Zaks2012-02-202-2/+61
| | | | | | tests. llvm-svn: 150993
* [analyzer] Testing: These checkers are not experimental anymore.Anna Zaks2012-02-201-1/+1
| | | | llvm-svn: 150989
* [analyzer] Turn on by default the Malloc Checker and a couple of CStringAnna Zaks2012-02-2010-25/+29
| | | | | | | | | | | | checks: - unix.Malloc - Checks for memory leaks, double free, use-after-free. - unix.cstring.NullArg - Checks for null pointers passed as arguments to CString functions + evaluates CString functions. - unix.cstring.BadSizeArg - Checks for common anti-patterns in strncat size argument. llvm-svn: 150988
* Make sure that we set up the right declaration contexts when creatingDouglas Gregor2012-02-202-2/+5
| | | | | | | | | and introducing the lambda closure type and its function call operator. Previously, we assumed that the lambda closure type would land directly in the current context, and not some parent context (as occurs with linkage specifications). Thanks to Richard for the test case. llvm-svn: 150987
* modern objc translator. Finish off first cut of theFariborz Jahanian2012-02-2010-20/+234
| | | | | | | modern meta-data translation by commenting out private ivar declarations in user source. Also, added several tests. llvm-svn: 150985
* When we resolve the type of an 'auto' variable, clear out the linkageDouglas Gregor2012-02-202-1/+5
| | | | | | | of that variable; it will need to be recomputed with the resolved type. llvm-svn: 150984
* Make test case less sensitive to metadata numbering.Chad Rosier2012-02-201-1/+1
| | | | llvm-svn: 150983
* Basic support for name mangling of C++11 lambda expressions. BecauseDouglas Gregor2012-02-2017-29/+206
| | | | | | | | | | | | | | | name mangling in the Itanium C++ ABI for lambda expressions is so dependent on context, we encode the number used to encode each lambda as part of the lambda closure type, and maintain this value within Sema. Note that there are a several pieces still missing: - We still get the linkage of lambda expressions wrong - We aren't properly numbering or mangling lambda expressions that occur in default function arguments or in data member initializers. - We aren't (de-)serializing the lambda numbering tables llvm-svn: 150982
* Remove the type retaining from the clang frontend. This is nowEric Christopher2012-02-204-11/+14
| | | | | | | | | | handled by the caching and rauw. Also fix one cache that wasn't being added to highlighted by this patch. Update all testcases accordingly. This should fix the deall failure. llvm-svn: 150977
* Make forward declarations for objective-c types use the newEric Christopher2012-02-201-17/+14
| | | | | | | temporary forward declaration nodes. Fixes a problem building Chrome. llvm-svn: 150976
* [clang.py] Format and add documention for TypeGregory Szorc2012-02-202-11/+14
| | | | llvm-svn: 150972
* [clang.py] Add tests for Type.is_volatile_qualified and ↵Gregory Szorc2012-02-201-2/+45
| | | | | | Type.is_restrict_qualified llvm-svn: 150971
* [clang.py] Implement Type.argument_types()Gregory Szorc2012-02-202-107/+183
| | | | llvm-svn: 150970
* [clang.py] Implement Type.__eq__ and Type.__ne__Gregory Szorc2012-02-202-0/+38
| | | | llvm-svn: 150969
* Deserialize the direct-initialization range of a "new" expressionDouglas Gregor2012-02-202-7/+29
| | | | | | | properly. Previously, we deserialized it but failed to set the corresponding member in CXXNewExpr. Fixes <rdar://problem/10893600>. llvm-svn: 150963
* Fixing the working-directory option so that it stores the proper directory.Aaron Ballman2012-02-201-5/+7
| | | | llvm-svn: 150960
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-2040-113/+127
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
* Add 3dNOW intrinsic header to x86intrin.h, conditioned on __3dNOW__ toChandler Carruth2012-02-203-1/+163
| | | | | | | | | | | | | | | | match the behavior of GCC. Also add a test for these intrinsics, which apparently have *zero* tests. =[ Not surprisingly, Clang crashed when compiling these. Fix the bug in CodeGen where we failed to bitcast the argument type to x86mmx prior to calling the LLVM intrinsic. This fixes an assert on the new 3dnow-builtins.c test. This is one issue impacting the efforts to get Clang to emulate the Microsoft intrinsics headers -- 3dnow intrinsics are implictitly made available there. llvm-svn: 150948
* ObjCMessageExpr: Don't leave SelLocsKind uninitialized when the send is ↵Benjamin Kramer2012-02-201-1/+1
| | | | | | | | implicit. Fixes PR11929. Found by valgrind. llvm-svn: 150943
* Set the location of the template keyword when allocating a new ↵Benjamin Kramer2012-02-191-0/+1
| | | | | | | | TemplateIdAnnotation. Found by valgrind. llvm-svn: 150940
* Make the regular expressions in this test more narrow to ensure we'reChandler Carruth2012-02-191-6/+5
| | | | | | | actually matching the write substrings, and stop looking for a leading '/' to try and finish fixing darwin and other hosts. llvm-svn: 150938
* objective-c modern translator: comment out private ivarsFariborz Jahanian2012-02-191-1/+18
| | | | | | declared in class extension and implementation. llvm-svn: 150937
* [clang.py] Implement Type.is_function_variadicGregory Szorc2012-02-192-18/+55
| | | | llvm-svn: 150936
* Emit a warning when list-initializing a std::initializer_list member.Sebastian Redl2012-02-193-1/+19
| | | | llvm-svn: 150933
* Harden test against for operator new(unsigned int).Benjamin Kramer2012-02-191-1/+1
| | | | llvm-svn: 150932
* Make heap-allocation of std::initializer_list 'work'.Sebastian Redl2012-02-196-10/+30
| | | | llvm-svn: 150931
* Make std::initializer_list member initializers 'work'.Sebastian Redl2012-02-192-31/+68
| | | | llvm-svn: 150930
OpenPOWER on IntegriCloud