summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* In -fapple-kext mode, global object construction code Fariborz Jahanian2011-02-151-5/+6
| | | | | | ends up in the text segment. // rdar://8825235. llvm-svn: 125585
* Emit in-class member function definitions that are markedDouglas Gregor2011-02-151-0/+12
| | | | | | "used". Fixes <rdar://problem/8684363>. llvm-svn: 125579
* Allow resolving headers from a PCH even after headers+PCH were moved to ↵Argyrios Kyrtzidis2011-02-155-12/+90
| | | | | | | | | | | another path. Store in PCH the directory that the PCH was originally created in. If a header file is not found at the path that we expect it to be and the PCH file was moved from its original location, try to resolve the file by assuming that header+PCH were moved together and the header is in the same place relative to the PCH. llvm-svn: 125576
* Refactoring of code to issue warning on implementedFariborz Jahanian2011-02-151-31/+28
| | | | | | deprecated class and methods in objective-c. llvm-svn: 125573
* Add missing CMake dependencyDouglas Gregor2011-02-151-1/+1
| | | | llvm-svn: 125566
* Fix the clang-wpa example.Argyrios Kyrtzidis2011-02-153-3/+2
| | | | llvm-svn: 125565
* Assorted cleanup:John McCall2011-02-158-131/+168
| | | | | | | | | - Have CGM precompute a number of commonly-used types - Have CGF copy that during initialization instead of recomputing them - Use TBAA info when initializing a parameter variable - Refactor the scalar ++/-- code llvm-svn: 125562
* [analyzer] Reflect changes for tablegen'ing the checkers.Argyrios Kyrtzidis2011-02-153-13/+12
| | | | | | | -Update tablegen files for checkers, use the tablegen class name for the checker class name. -Update ClangSACheckersProvider to not look into hidden checker packages. llvm-svn: 125560
* [analyzer] Use the new registration mechanism on some of the internal ↵Argyrios Kyrtzidis2011-02-1511-23/+51
| | | | | | | | | | | | | checks. These are: StackAddrLeakChecker ObjCAtSyncChecker UnixAPIChecker MacOSXAPIChecker The rest have/create implicit dependencies between checkers and need to be handled differently. llvm-svn: 125559
* Return a declaration to the parser when creating a field in C++ so thatJohn McCall2011-02-151-3/+1
| | | | | | | | | the parser will complete the declarator with a valid decl and thus trigger delayed diagnostics for it. It certainly looks like we were intentionally returning null here, but I couldn't find any good reason for it, and there wasn't a comment, so farewell to all that. llvm-svn: 125556
* Perform zero-initialization of virtual base classes when emitting John McCall2011-02-153-195/+247
| | | | | | | | | | | | a zero constant for a complete class. rdar://problem/8424975 To make this happen, track the field indexes for virtual bases in the complete object. I'm curious whether we might be better off making CGRecordLayoutBuilder *much* more reliant on ASTRecordLayout; we're currently duplicating an awful lot of the ABI layout logic. llvm-svn: 125555
* Fix memory leak in CFGBuilder resulting from tracking scope information ↵Ted Kremenek2011-02-151-7/+10
| | | | | | using SmallVectors. llvm-svn: 125550
* Convert RecordLayout::Alignment to CharUnits from bit units. No change inKen Dyck2011-02-154-14/+18
| | | | | | functionality intended. llvm-svn: 125549
* IdempotentOperationChecker: don't repeatedly recompute block reachability.Ted Kremenek2011-02-151-2/+3
| | | | llvm-svn: 125548
* Warn if method for a deprecated method is implemented.Fariborz Jahanian2011-02-151-1/+40
| | | | | | | | | Warn if class for a deprecated class is implemented. Warn if category for a deprecated class is implemented. All under control of -Wdeprecated-implementations. // rdar://8973810. llvm-svn: 125545
* update for ConstantVector API change.Chris Lattner2011-02-154-29/+26
| | | | llvm-svn: 125538
* Don't crash on hierarchy static_casts which appear in variable initializers.John McCall2011-02-141-11/+29
| | | | | | PR9221. llvm-svn: 125532
* Change the context correctly when instantiating a static data member definition.John McCall2011-02-141-3/+3
| | | | llvm-svn: 125517
* Add current binary and source directories to the header search listOscar Fuentes2011-02-141-4/+0
| | | | | | for all compiler invocations. llvm-svn: 125514
* Remove left-over #include.Argyrios Kyrtzidis2011-02-141-2/+0
| | | | llvm-svn: 125507
* Provide overload diagnostics when explicit casts involving class types fail.John McCall2011-02-141-15/+97
| | | | | | PR8626. llvm-svn: 125506
* revert my ConstantVector patch, it seems to have made the llvm-gccChris Lattner2011-02-144-26/+29
| | | | | | builders unhappy. llvm-svn: 125505
* [analyzer] Overhauling of the checker registration mechanism.Argyrios Kyrtzidis2011-02-1418-6/+349
| | | | | | | | | | | | | | -Checkers will be defined in the tablegen file 'Checkers.td'. -Apart from checkers, we can define checker "packages" that will contain a collection of checkers. -Checkers can be enabled with -analyzer-checker=<name> and disabled with -analyzer-disable-checker=<name> e.g: Enable checkers from 'cocoa' and 'corefoundation' packages except the self-initialization checker: -analyzer-checker=cocoa -analyzer-checker=corefoundation -analyzer-disable-checker=cocoa.SelfInit -Introduces CheckerManager and CheckerProvider. CheckerProviders get the set of checker names to enable/disable and register them with the CheckerManager which will be the entry point for all checker-related functionality. Currently only the self-initialization checker takes advantage of the new mechanism. llvm-svn: 125503
* [analyzer] Remove ManagerRegistry which is not used. In the future we may ↵Argyrios Kyrtzidis2011-02-144-41/+8
| | | | | | | | load analyzer plugins dynamically but registration through static constructors should be avoided. llvm-svn: 125502
* [analyzer] Move include/clang/StaticAnalyzer/AnalysisConsumer.h -> ↵Argyrios Kyrtzidis2011-02-143-2/+41
| | | | | | | | lib/StaticAnalyzer/Frontend/AnalysisConsumer.h since FrontendActions.cpp is the only user. llvm-svn: 125501
* [analyzer] Move Checkers/FrontendActions.cpp -> Frontend/FrontendActions.cppArgyrios Kyrtzidis2011-02-143-1/+1
| | | | llvm-svn: 125500
* [analyzer] Introduce libclangStaticAnalyzerFrontend and move ↵Argyrios Kyrtzidis2011-02-147-5/+32
| | | | | | Checkers/AnalysisConsumer.cpp into Frontend lib. llvm-svn: 125499
* Remove dead code in IdempotentOperationChecker.Ted Kremenek2011-02-141-46/+0
| | | | llvm-svn: 125497
* Fix edge case where we don't cull warnings in IdempotentOperationsChecker ↵Ted Kremenek2011-02-141-1/+6
| | | | | | due to incomplete analysis of loops. llvm-svn: 125495
* Use 'BitVector' instead of SmallPtrSet<CFGBlock*> in ↵Ted Kremenek2011-02-141-53/+68
| | | | | | IdempotentOperationsChecker. No real functionality change. llvm-svn: 125494
* update for ConstantVector::get API change.Chris Lattner2011-02-144-29/+26
| | | | llvm-svn: 125488
* When parsing an out-of-line member function declaration, we must delayJohn McCall2011-02-148-49/+79
| | | | | | | | | | | | | | | | | | | | | | access-control diagnostics which arise from the portion of the declarator following the scope specifier, just in case access is granted by friending the individual method. This can also happen with in-line member function declarations of class templates due to templated-scope friend declarations. We were really playing fast-and-loose before with this sort of thing, and it turned out to work because *most* friend functions are in file scope. Making us delay regardless of context exposed several bugs with how we were manipulating delay. I ended up needing a concept of a context that's independent of the declarations in which it appears, and then I actually had to make some things save contexts correctly, but delay should be much cleaner now. I also encapsulated all the delayed-diagnostics machinery in a single subobject of Sema; this is a pattern we might want to consider rolling out to other components of Sema. llvm-svn: 125485
* OpenCL: add support for __kernel, kernel keywords and EXTENSION,Peter Collingbourne2011-02-149-1/+118
| | | | | | FP_CONTRACT pragmas. Patch originally by ARM. llvm-svn: 125475
* Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actionsPeter Collingbourne2011-02-146-16/+42
| | | | llvm-svn: 125474
* Make LexOnOffSwitch a Preprocessor member functionPeter Collingbourne2011-02-141-35/+35
| | | | llvm-svn: 125473
* Use hasSameType in one more, hopefully, last place.Fariborz Jahanian2011-02-131-2/+2
| | | | llvm-svn: 125468
* Some refactoring and using more modern APIs forFariborz Jahanian2011-02-131-57/+56
| | | | | | | implementation of co/contra-variance objc++ block pointers. // rdar://8979379. llvm-svn: 125467
* Give some convenient idiomatic accessors to Stmt::child_range andJohn McCall2011-02-1316-55/+32
| | | | | | | Stmt::const_child_range, then make a bunch of places use them instead of the individual iterator accessors. llvm-svn: 125450
* Look through array types when deciding whether a field requires non-trivialJohn McCall2011-02-132-5/+15
| | | | | | destruction in the destructor-aliases logic. Fixes PR 9197. llvm-svn: 125447
* Implement objective-c++'s block pointer type matching involvingFariborz Jahanian2011-02-122-1/+94
| | | | | | | types which are contravariance in argument types and covariance in return types. // rdar://8979379. llvm-svn: 125445
* Teach the IdempotentOperations checker to ignore property setters.Ted Kremenek2011-02-121-2/+9
| | | | llvm-svn: 125443
* When reading the AST, delay loading of the redeclaration chain to avoid ↵Argyrios Kyrtzidis2011-02-123-12/+67
| | | | | | | | | | | deeply nested calls. Temporarily set the first (canonical) declaration as the previous one, which is the one that matters, and mark the real previous DeclID to be loaded & attached later on. Fixes rdar://8956193. llvm-svn: 125434
* Weaken the ObjCSelfInitChecker to only warn when one calls an 'init' method ↵Ted Kremenek2011-02-121-7/+22
| | | | | | within an 'init' method. This is a temporary stop gap to avoid false positives while we investigate how to make it smarter. llvm-svn: 125427
* static analyzer: Also invalidate instance variables of a receiver in a ↵Ted Kremenek2011-02-121-0/+12
| | | | | | | | message expression, just as we do with parameters. Fixes <rdar://problem/8725041>. llvm-svn: 125422
* Don't emit a dead store for '++' operations unless it occurs with a return ↵Ted Kremenek2011-02-122-6/+14
| | | | | | | | statement. We've never seen any other cases that were real bugs. Fixes <rdar://problem/6962292>. llvm-svn: 125419
* Add CMake dependencies so that LLVM_USED_LIBS order doesn't matter.Jeffrey Yasskin2011-02-117-4/+21
| | | | | | | I also sorted the tools/driver dependencies since their order no longer matters. llvm-svn: 125417
* Don't report dead stores on unreachable code paths. Fixes ↵Ted Kremenek2011-02-113-9/+71
| | | | | | <rdar://problem/8405222>. llvm-svn: 125415
* Uses llvm::sys::path instead of hand-rolled algorithm in FileManager.Zhanyong Wan2011-02-111-32/+11
| | | | | | Reviewed by dgregor. llvm-svn: 125407
* Reject forbidden storage class specifiers in OpenCL. Patch by George Russell!Peter Collingbourne2011-02-113-10/+28
| | | | llvm-svn: 125399
* Remove RegionStoreManager::evalBinOp(), which is now handled by the SValBuilder.Ted Kremenek2011-02-111-119/+0
| | | | llvm-svn: 125396
OpenPOWER on IntegriCloud