summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* If size was equal to 0, either NULL or a pointer suitable to be passed to Zhongxing Xu2011-09-011-5/+2
| | | | | | | | free() is returned by realloc(). Most code expect NULL. And we only need to transfer one final ProgramState. llvm-svn: 138937
* Fix "multi-line comment" compiler error.Argyrios Kyrtzidis2011-09-011-8/+8
| | | | llvm-svn: 138936
* When defining the implicit move assignment operator, don't performDouglas Gregor2011-09-011-3/+9
| | | | | | | | semantic analysis when taking the address of an xvalue. Instead, just build the unary operator directly, since it's safe to do so (from the IRgen and AST perspectives) for any glvalue. Fixes PR10822. llvm-svn: 138935
* Support importing of ObjC categories from modules.Argyrios Kyrtzidis2011-09-014-1/+192
| | | | | | | | | | | | The initial incentive was to fix a crash when PCH chaining categories to an interface, but the fix was done in the "modules way" that I hear is popular with the kids these days. Each module stores the local chain of categories and we combine them when the interface is loaded. We also warn if non-dependent modules introduce duplicate named categories. llvm-svn: 138926
* Create a CaretDiagnostic class to hold the logic for emittingChandler Carruth2011-08-311-263/+331
| | | | | | | | | | | | | | (unsurprisingly) caret diagnostics. This is designed to bring some organization to the monstrous EmitCaretDiagnostic function, and allow factoring it more easily and with less mindless parameter passing. Currently this just lifts the existing function into a method, and splits off the obviously invariant arguments to be class members. No functionality is changed, and there are still lots of warts to let existing code continue functioning as-is. Definitely WIP, more cleanups to follow. llvm-svn: 138921
* Sink all of the include stack printing logic into its member function.Chandler Carruth2011-08-311-18/+39
| | | | llvm-svn: 138920
* objective-c: this patch (re)introduces objective-c's default propertyFariborz Jahanian2011-08-318-154/+17
| | | | | | | | | | synthesis. This new feature is currently placed under -fobjc-default-synthesize-properties option and is off by default pending further testing. It will become the default feature soon. // rdar://8843851 llvm-svn: 138913
* Switch the "no module found" default-fatal warning to a default-fatal error.Douglas Gregor2011-08-311-1/+1
| | | | llvm-svn: 138909
* Don't assert when diagnosing a missing cast of an unknown-anytypeJohn McCall2011-08-312-3/+9
| | | | | | | | message send to an unknown method. rdar://problem/9416370, redux. llvm-svn: 138893
* [driver] If no -miphoneos-version-min is specified on the command line *and*Chad Rosier2011-08-311-35/+31
| | | | | | | IPHONEOS_DEPLOYMENT_TARGET if undefined, set -miphoneos-version-min based on isysroot. llvm-svn: 138892
* Make sure to initialize field. Hopefully this will fix some test failures ↵Eli Friedman2011-08-311-0/+1
| | | | | | on Windows. llvm-svn: 138880
* [analyzer] Fix varargs helper to only use POD types even for named ↵Jordy Rose2011-08-311-4/+4
| | | | | | arguments. Thanks, Joerg. llvm-svn: 138875
* Switch __import__ over to __import_module__, so we don't conflict withDouglas Gregor2011-08-312-7/+8
| | | | | | | | existing practice with Python extension modules. Not that Python extension modules should be using a double-underscored identifier anyway, but... llvm-svn: 138870
* objective-c - This patch buffers method implementations Fariborz Jahanian2011-08-312-39/+83
| | | | | | | | | | | | | and does the Sema on their body after the entire class/category @implementation is seen. This change allows messaging of forward private methods, as well as, access to synthesized ivars of properties with foward synthesize declarations; among others. In effect, this patch removes several restrictions placed on objective-c due to in-place semantics processing of methods. This is part of // rdar://8843851. llvm-svn: 138865
* Serialize the new bits in CXXRecordDecl::DefinitionData.Sebastian Redl2011-08-312-4/+8
| | | | llvm-svn: 138855
* Improve the diagnostic text for -Wmissing-noreturn to include the nameChandler Carruth2011-08-312-5/+10
| | | | | | | | | | | | | | of the function in question when applicable (that is, not for blocks). Patch by Joerg Sonnenberger with some stylistic tweaks by me. When discussing this weth Joerg, streaming the decl directly into the diagnostic didn't work because we have a pointer-to-const, and the overload doesn't accept such. In order to make my style tweaks to the patch, I first changed the overload to accept a pointer-to-const, and then changed the diagnostic printing layer to also use a pointer-to-const, cleaning up a gross line of code along the way. llvm-svn: 138854
* Change err_pp_file_not_found back to an Error; when it's a Warning, we ↵Eli Friedman2011-08-303-10/+6
| | | | | | | | suppress it in system headers. And it is not a good idea to suppress it in system headers. (This was originally changed in r134996 to implement -MG.) Fixes <rdar://10041960>. And also brings down the number of warnings without a flag by one :) llvm-svn: 138842
* Allow C99 hexfloats in C++0x mode. This change resolves the standardsDouglas Gregor2011-08-302-4/+26
| | | | | | | | | collision between C99 hexfloats and C++0x user-defined literals by giving C99 hexfloats precedence. Also, warning about user-defined literals that conflict with hexfloats and those that have names that are reserved by the implementation. Fixes <rdar://problem/9940194>. llvm-svn: 138839
* Fix PR10694: Boolean conversions can be from pointers, and those conversionsJeffrey Yasskin2011-08-301-0/+5
| | | | | | aren't considered narrowing conversions. llvm-svn: 138838
* When writing out the entries in a lookup table for a DeclContext, makeDouglas Gregor2011-08-301-1/+24
| | | | | | | | sure that all of the CXXConversionDecls go into the same bucket. Otherwise, name lookup might not find them all. Fixes <rdar://problem/10041960>. llvm-svn: 138824
* Declare and define implicit move constructor and assignment operator.Sebastian Redl2011-08-309-86/+1232
| | | | | | | | | This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. llvm-svn: 138821
* Remove a few mutating ObjCCategoryDecl methods.Argyrios Kyrtzidis2011-08-304-30/+33
| | | | | | | | | | | Remove -setClassInterface -setNextClassCategory -insertNextClassCategory and combine them in the Create function. llvm-svn: 138817
* In ASTWriter::WriteDeclContextVisibleBlock, don't write empty lookups.Argyrios Kyrtzidis2011-08-301-2/+4
| | | | | | | Empty lookups can occur in the DeclContext map when we are chaining PCHs, where the empty lookup indicates that we already looked in ExternalASTSource. llvm-svn: 138816
* Remove a couple of unnecessary objc method lookups.Argyrios Kyrtzidis2011-08-301-7/+7
| | | | llvm-svn: 138815
* objc - fixes a regression in declaring c decls nested inFariborz Jahanian2011-08-301-0/+3
| | | | | | | objective-c containers due to recent changes to objc decl contexts. // rdar://10041908 llvm-svn: 138803
* Remove obsolete ObjCInferRelatedReturnType from LangOptions...the correct ↵Jordy Rose2011-08-302-3/+0
| | | | | | option is ObjCInferRelatedResultType. llvm-svn: 138793
* The size of struct UnwindException varies by platform with noJohn McCall2011-08-302-3/+31
| | | | | | | apparent general rule. Just special-case it as appropriate. PR10789. llvm-svn: 138792
* Be sure to emit lvalue-to-rvalue casts for loads from x-values.John McCall2011-08-302-28/+22
| | | | | | | Doing this happens to disrupt the pattern that ARC was looking for for move optimizations, so we need to fix that simultaneously. llvm-svn: 138789
* Fix a typo when determining whether to strip cv-qualifiers during template ↵Douglas Gregor2011-08-301-1/+1
| | | | | | argument deduction llvm-svn: 138787
* Update the comment on the default-argument conversion fix; thanks toJohn McCall2011-08-291-6/+10
| | | | | | Johannes Schaub for talking me around to sense. llvm-svn: 138784
* Do not warn about [super finalize] in arc mode.Nico Weber2011-08-291-1/+3
| | | | llvm-svn: 138776
* Clang/PNaCl: Improve test coverage for PNaClTargetInfo (type aligns), fixes ↵Ivan Krasin2011-08-291-0/+2
| | | | | | | | | | nits: - wrong alignment for double (it was 4, but 8 is desired), - added checks for _REENTRANT define, - fixed the issue that defines were not tested (because the check for inside #ifdef). llvm-svn: 138775
* Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var ↵Caitlin Sadowski2011-08-291-4/+120
| | | | | | annotations. We identify situations where we are accessing (reading or writing) guarded variables, and report an error if the appropriate locks are not held. llvm-svn: 138774
* Fix a rewriter bug caused by recent changes in objc's Fariborz Jahanian2011-08-291-26/+65
| | | | | | group decls. llvm-svn: 138772
* Add missing function _mm_ucomige_sd to emmintrin.h. PR10803.Eli Friedman2011-08-291-0/+6
| | | | llvm-svn: 138769
* [analyzer] MacOSKeychainAPIChecker: Simplify getSymbolForRegion by using ↵Anna Zaks2011-08-291-7/+3
| | | | | | existing API. Thanks Jordy. llvm-svn: 138765
* Fix: Bug 10798 - [analyzer] Crash when analyzing ICU. (A slight improvement ↵Anna Zaks2011-08-291-1/+1
| | | | | | on the previous commit.) llvm-svn: 138762
* Fix bug 10797: Crash: "cast<Ty>() argument of incompatible type!" assert ↵Anna Zaks2011-08-291-2/+4
| | | | | | | | when analyzing ICU. Patch by Jean-Daniel Dupas. Thanks for spotting and fixing! llvm-svn: 138757
* Some minor updates to the Linux search path handling for Slackware. Patch ↵Eli Friedman2011-08-292-1/+12
| | | | | | by Will Dietz. PR10692. llvm-svn: 138753
* Minor clean up of objc's decl context stuff.Fariborz Jahanian2011-08-293-6/+4
| | | | | | No change in functionality. llvm-svn: 138742
* Add and document __has_feature values for the remaining C++0xDouglas Gregor2011-08-291-0/+11
| | | | | | | features, so clients can check for the availability of these features even before we get around to implementing them. llvm-svn: 138741
* Thread safety: various minor bugfixes, with test casesCaitlin Sadowski2011-08-291-13/+34
| | | | | | This patch is by DeLesley Hutchins. llvm-svn: 138738
* Print 'int' instead of 'const int' in the narrowing conversion error, since theJeffrey Yasskin2011-08-291-3/+3
| | | | | | | | | qualification of a type doesn't affect whether a conversion is a narrowing conversion. This doesn't work in template cases because SubstTemplateTypeParmType gets in the way. llvm-svn: 138735
* Warn on missing [super finalize] calls.Nico Weber2011-08-287-2/+22
| | | | | | This matches gcc's logic. Second half of PR10661. llvm-svn: 138730
* [analyzer] Introduce a new callback for checkers, printState, to be used for ↵Jordy Rose2011-08-284-76/+87
| | | | | | | | | | debug-printing the contents of a ProgramState. Unlike the other callbacks, this one is a simple virtual method, since it is only to be used for debugging. This new callback replaces the old ProgramState::Printer interface, and allows us to move the printing of refcount bindings from CFRefCount to RetainReleaseChecker. llvm-svn: 138728
* [analyzer] Remove the ProgramState argument from ExprEngine::evalBind; we ↵Jordy Rose2011-08-282-10/+5
| | | | | | were ignoring it anyway. No functionality change. llvm-svn: 138720
* [analyzer] Eliminate almost all uses of TransferFuncs from ExprEngine.Jordy Rose2011-08-283-103/+27
| | | | llvm-svn: 138719
* [analyzer] Migrate argument invalidation from CFRefCount to ExprEngine.Jordy Rose2011-08-285-232/+124
| | | | | | | | This is a common path for function and C++ method calls, Objective-C messages and property accesses, and C++ construct-exprs. As support, add message receiver accessors to ObjCMessage and CallOrObjCMessage. llvm-svn: 138718
* [analyzer] Change the check::RegionChanges callback to include the regions ↵Jordy Rose2011-08-278-115/+99
| | | | | | | | | | explicitly requested for invalidation. Also, allow CallOrObjCMessage to wrap a CXXConstructExpr as well. Finally, this allows us to remove the clunky whitelisting system from CFRefCount/RetainReleaseChecker. Slight regression due to CXXNewExprs not yet being handled in post-statement callbacks (PR forthcoming). llvm-svn: 138716
* Disable the l-value to r-value conversion on C++ class types passedJohn McCall2011-08-271-3/+9
| | | | | | | | | | | to varargs functions in unevaluated contexts. AFAICT, there is no standards justification for this, but it matches what other compilers do and therefore preserves compatibility with certain template metaprogramming idioms. Should fix self-host. llvm-svn: 138715
OpenPOWER on IntegriCloud