summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* objective-c - Make warning on unimplemented protocols pointFariborz Jahanian2011-08-271-6/+6
| | | | | | | to class implementation where it is supposed to be implemented. // rdar://10009982. llvm-svn: 138714
* [analyzer] Rename current PathDiagnosticClient::HandlePathDiagnostic() to ↵Ted Kremenek2011-08-274-6/+13
| | | | | | HandlePathDiagnosticImpl(), and slot in new HandlePathDiagnostic() for potentially handling concurrent access to PathDiagnosticClients (in the future). llvm-svn: 138713
* [analyzer] Pull body of loop in AnalysisConsumer::HandleDeclContext() into ↵Ted Kremenek2011-08-271-45/+52
| | | | | | its own method. No real functionality change. llvm-svn: 138712
* objective-c: Treat top-level objective-c declarationsFariborz Jahanian2011-08-2714-141/+109
| | | | | | | | | | , such as list of forward @class decls, in a DeclGroup node. Deal with its consequence throught clang. This is in preparation for more Sema work ahead. // rdar://8843851. Feel free to reverse if it breaks something important and I am unavailable. llvm-svn: 138709
* Remove unused variables noticed by GCC.Benjamin Kramer2011-08-272-6/+0
| | | | llvm-svn: 138707
* Take an entirely different approach to handling the "parsing" ofDouglas Gregor2011-08-271-7/+3
| | | | | | | | | __import__ within the preprocessor, since the prior one foolishly assumed that Preprocessor::Lex() was re-entrant. We now handle __import__ at the top level (only), after macro expansion. This should fix the buildbot failures. llvm-svn: 138704
* The lvalue-to-rvalue on structs in C++ is actually partJohn McCall2011-08-272-17/+42
| | | | | | | of default argument promotion and needs to happen unconditionally. This is particularly semantically important in C++0x. llvm-svn: 138691
* Twinify.Benjamin Kramer2011-08-271-21/+15
| | | | llvm-svn: 138689
* In C++0x mode, suggest nullptr as the initializer for an uninitializedDouglas Gregor2011-08-271-1/+3
| | | | | | pointer variable. Patch by David Blaikie! llvm-svn: 138687
* Improve caret location for the GNU old-style field designator warning, from ↵Douglas Gregor2011-08-271-1/+1
| | | | | | David Blaikie llvm-svn: 138684
* Remove the -import-module option. It's no longer usefulDouglas Gregor2011-08-271-15/+0
| | | | llvm-svn: 138681
* Try to unbreak the build on systems where uint64_t isn't something that ↵Douglas Gregor2011-08-261-1/+1
| | | | | | StringRef::getAsInteger can handle as its second argument llvm-svn: 138680
* Introduce support for a simple module import declaration, whichDouglas Gregor2011-08-266-37/+154
| | | | | | | | | | | | | | | | | | | | | | loads the named module. The syntax itself is intentionally hideous and will be replaced at some later point with something more palatable. For now, we're focusing on the semantics: - Module imports are handled first by the preprocessor (to get macro definitions) and then the same tokens are also handled by the parser (to get declarations). If both happen (as in normal compilation), the second one is redundant, because we currently have no way to hide macros or declarations when loading a module. Chris gets credit for this mad-but-workable scheme. - The Preprocessor now holds on to a reference to a module loader, which is responsible for loading named modules. CompilerInstance is the only important module loader: it now knows how to create and wire up an AST reader on demand to actually perform the module load. - We search for modules in the include path, using the module name with the suffix ".pcm" (precompiled module) for the file name. This is a temporary hack; we hope to improve the situation in the future. llvm-svn: 138679
* [arcmt] Add a test case for r138671 and improve the loop.Argyrios Kyrtzidis2011-08-261-4/+1
| | | | llvm-svn: 138674
* [arcmt] Fix horrible bug where migrating files if there is a space in the pathsArgyrios Kyrtzidis2011-08-261-12/+15
| | | | | | of the migrated files. rdar://10022801 llvm-svn: 138671
* Cleanup r138662 per Ben and David's suggestions, thanks.Chad Rosier2011-08-261-14/+7
| | | | llvm-svn: 138670
* Teach the ASTReader how to avoid cycles when loading declarations thatDouglas Gregor2011-08-261-5/+7
| | | | | | are lexically within a particular DeclContext. Test forthcoming. llvm-svn: 138668
* Make sure the std::string isn't deallocated prior to use. Many thanks to EliChad Rosier2011-08-261-5/+5
| | | | | | for catching this. llvm-svn: 138666
* [driver] When generating temporary files allow a prefix to be added. In manyChad Rosier2011-08-262-7/+19
| | | | | | | | cases we want the prefix to be the original file name less the suffix. For an input such as test.c to named temporary would be something like test-3O4Clq.o Part of <rdar://problem/8314451> llvm-svn: 138662
* When we're deserializing declarations lexically stored in a RecordDeclDouglas Gregor2011-08-261-8/+16
| | | | | | | | | | | after having already deserialized the fields, clear out the fields first. This makes sure that we keep all of the declarations in the lexical context (including those implicitly added by later type-checking) within the same list. A test case for this behavior is coming as part of another commit; testing for this problem in isolation is a nightmare. llvm-svn: 138661
* objc-arc: Mention property's attribute by name whenFariborz Jahanian2011-08-261-1/+3
| | | | | | | finding life-time conflict with its declared ivar. // rdar://10007230 llvm-svn: 138659
* Slight optimization enabled by the previous assert: John McCall2011-08-262-3/+4
| | | | | | emit all gl-value arguments as reference bindings. llvm-svn: 138655
* [analyzer] Remove a couple of unnecessary returns after llvm_unreachables.Jordy Rose2011-08-261-2/+0
| | | | llvm-svn: 138649
* Don't assert on taking the address of a non-type template parameter. Fixes ↵Eli Friedman2011-08-261-1/+1
| | | | | | PR10766. llvm-svn: 138648
* Make sure we don't crash printing builtin candidates for overloads of ↵Eli Friedman2011-08-261-4/+5
| | | | | | deleted operators. Fixes PR10757. llvm-svn: 138645
* Assert that a call argument is a gl-value iff the parameter is a reference type.John McCall2011-08-261-0/+3
| | | | llvm-svn: 138639
* In -Wno-error=non-pod-varargs, initialize a temporary withJohn McCall2011-08-261-2/+11
| | | | | | | the crazy comma expression so that we get an r-value in the varargs position. llvm-svn: 138638
* [driver] Remove a few more options when clang invokes cc1plus for i386 kexts.Chad Rosier2011-08-261-93/+111
| | | | | | <rdar://problem/10027287> llvm-svn: 138637
OpenPOWER on IntegriCloud