- Feb 18, 2012
-
-
Eric Christopher authored
emit less than complete types on purpose on occasion and so our caches aren't useful for this kind of lazy emitting. llvm-svn: 150856
-
Chad Rosier authored
llvm-svn: 150855
-
Ted Kremenek authored
Have conjured symbols depend on LocationContext, to add context sensitivity for functions called more than once. llvm-svn: 150849
-
- Feb 17, 2012
-
-
Anna Zaks authored
it aware of CString APIs that return the input parameter. Malloc Checker needs to know how the 'strcpy' function is evaluated. Introduce the dependency on CStringChecker for that. CStringChecker knows all about these APIs. Addresses radar://10864450 llvm-svn: 150846
-
Anna Zaks authored
(Ex: It was not treating __inline_strcpy as strcpy. Will add tests that rely on this later on.) llvm-svn: 150845
-
Fariborz Jahanian authored
until the end when all their ivars are known then. llvm-svn: 150844
-
Fariborz Jahanian authored
and some cleanup. llvm-svn: 150839
-
Richard Smith authored
llvm-svn: 150838
-
Fariborz Jahanian authored
patch. llvm-svn: 150825
-
David Chisnall authored
order to not be broken (by Solaris standards). llvm-svn: 150822
-
Douglas Gregor authored
functionality change. llvm-svn: 150817
-
Sebastian Redl authored
Don't know what I was thinking there. Fixes PR12023. llvm-svn: 150804
-
Sebastian Redl authored
We now generate temporary arrays to back std::initializer_list objects initialized with braces. The initializer_list is then made to point at the array. We support both ptr+size and start+end forms, although the latter is untested. Array lifetime is correct for temporary std::initializer_lists (e.g. call arguments) and local variables. It is untested for new expressions and member initializers. Things left to do: Massively increase the amount of testing. I need to write tests for start+end init lists, temporary objects created as a side effect of initializing init list objects, new expressions, member initialization, creation of temporary objects (e.g. std::vector) for initializer lists, and probably more. Get lifetime "right" for member initializers and new expressions. Not that either are very useful. Implement list-initialization of array new expressions. llvm-svn: 150803
-
Richard Smith authored
variable ends, if the variable has a trivial destructor and no mutable subobjects then emit an llvm.invariant.start call for it. globalopt knows to make the variable const when evaluating this. llvm-svn: 150798
-
Eric Christopher authored
Fixes lots of gdb testsuite failures. llvm-svn: 150797
-
Richard Smith authored
as constants. Refactor and simplify all the separate checks for whether a type can be emitted as a constant. llvm-svn: 150793
-
Richard Smith authored
1) It has a const-qualified type, and 2) It has no mutable members, and 3) It has no dynamic initialization, and 4) It has trivial destruction. Remove the unnecessary requirement that the type be POD. This allows us to mark all constexpr objects with no mutable members as 'constant'. llvm-svn: 150792
-
Douglas Gregor authored
we're capturing it by value in a non-mutable lambda. llvm-svn: 150791
-
Douglas Gregor authored
designators in the parser. In the worst case, this disambiguation requires tentative parsing just past the closing ']', but for most cases we'll be able to tell by looking ahead just one token (without going into the heavyweight tentative parsing machinery). llvm-svn: 150790
-
Richard Smith authored
can be represented by an LValue, and use that to simplify the code a little. llvm-svn: 150789
-
John McCall authored
optional argument passed through the variadic ellipsis) potentially affects how we need to lower it. Propagate this information down to the various getFunctionInfo(...) overloads on CodeGenTypes. Furthermore, rename those overloads to clarify their distinct purposes, and make sure we're calling the right one in the right place. This has a nice side-effect of making it easier to construct a function type, since the 'variadic' bit is no longer separable. This shouldn't really change anything for our existing platforms, with one minor exception --- we should now call variadic ObjC methods with the ... in the "right place" (see the test case), which I guess matters for anyone running GNUStep on MIPS. Mostly it's just a substantial clean-up. llvm-svn: 150788
-
John McCall authored
in the AST accessor and micro-optimize it very slightly. llvm-svn: 150787
-
Douglas Gregor authored
conversion to function pointer. Rather than having IRgen synthesize the body of this function, we instead introduce a static member function "__invoke" with the same signature as the lambda's operator() in the AST. Sema then generates a body for the conversion to function pointer which simply returns the address of __invoke. This approach makes it easier to evaluate a call to the conversion function as a constant, makes the linkage of the __invoke function follow the normal rules for member functions, and may make life easier down the road if we ever want to constexpr'ify some of lambdas. Note that IR generation is responsible for filling in the body of __invoke (Sema just adds a dummy body), because the body can't generally be expressed in C++. Eli, please review! llvm-svn: 150783
-
Richard Smith authored
loop and switch statements, by teaching Scope that a function scope never has a continue/break parent for the purposes of control flow. Remove the hack in block and lambda expressions which worked around this by pretending that such expressions were continue/break scopes. Remove Scope::ControlParent, since it's unused. In passing, teach default statements to recover properly from a missing ';', and add a fixit for same to both default and case labels (the latter already recovered correctly). llvm-svn: 150776
-
Richard Smith authored
zero-initialize class types with virtual bases when constant-evaluating an initializer. llvm-svn: 150770
-
Fariborz Jahanian authored
llvm-svn: 150767
-
- Feb 16, 2012
-
-
Eric Christopher authored
"Add a completed/incomplete type difference. This allows us to have partial types for contexts and forward decls while allowing us to complete types later on for debug purposes. This piggy-backs on the metadata replacement and rauw changes for temporary nodes and takes advantage of the incremental support I added in earlier. This allows us to, if we decide, to limit adding methods and variables to structures in order to limit the amount of debug information output into a .o file. The caching is a bit complicated though so any thoughts on untangling that are welcome." with a fix: - Remove all RAUW during type construction by adding stub versions of types that we later complete. and some TODOs: - Add an RAUW cache for forward declared types so that we can replace them at the end of compilation. - Remove the code that updates on completed types because we no longer need to have that happen. We emit incomplete types on purpose and only want to know when we want to complete them. llvm-svn: 150752
-
Eli Friedman authored
llvm-svn: 150738
-
Kaelyn Uhrain authored
Don't try to typo-correct a method redeclaration to declarations not in the current record as it could lead to infinite recursion if CorrectTypo finds more than one correction candidate in a parent record. llvm-svn: 150735
-
Anna Zaks authored
- Rename the category "Logic Error" -> "Memory Error". - Shorten all the messages. llvm-svn: 150733
-
Anna Zaks authored
of failing realloc. + Minor cleanups. llvm-svn: 150732
-
Matt Beaumont-Gay authored
llvm-svn: 150731
-
Fariborz Jahanian authored
llvm-svn: 150728
-
Douglas Gregor authored
trailing return type but not a '()'. Recover by inserting the parentheses. Thanks to Xeo on IRC for the example. llvm-svn: 150727
-
Fariborz Jahanian authored
llvm-svn: 150726
-
Douglas Gregor authored
even if they are not within a function scope. Teach template instantiation to treat them as such, and make sure that we have a local instantiation scope when instantiating default arguments and static data members. llvm-svn: 150725
-
Ted Kremenek authored
Add checker visitation hooks in ExprEngine::Visit() for common no-op expressions. To be used later. llvm-svn: 150723
-
Ted Kremenek authored
Revert "Move ExplodedNode reclaimation out of ExprEngine and into CoreEngine. Also have it based on adding predecessors/successors, not node allocation. No measurable performance change." llvm-svn: 150722
-
Richard Smith authored
restriction and add some tests. llvm-svn: 150721
-
Ted Kremenek authored
Move ExplodedNode reclaimation out of ExprEngine and into CoreEngine. Also have it based on adding predecessors/successors, not node allocation. No measurable performance change. llvm-svn: 150720
-