summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* 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-155-13/+62
| | | | llvm-svn: 125565
* Initialize InlineCall in AnalyzerOptions.Argyrios Kyrtzidis2011-02-151-0/+1
| | | | llvm-svn: 125564
* 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
* Add CMake support to the clang unittests.Jeffrey Yasskin2011-02-155-10/+71
| | | | llvm-svn: 125561
* [analyzer] Reflect changes for tablegen'ing the checkers.Argyrios Kyrtzidis2011-02-154-17/+14
| | | | | | | -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-1515-36/+64
| | | | | | | | | | | | | 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-152-3/+15
| | | | | | | | | 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-154-210/+275
| | | | | | | | | | | | 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-155-20/+24
| | | | | | 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-154-1/+90
| | | | | | | | | 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
* Put "incomplete implementation" warning under a flag.Ted Kremenek2011-02-142-1/+28
| | | | llvm-svn: 125535
* Don't crash on hierarchy static_casts which appear in variable initializers.John McCall2011-02-142-11/+44
| | | | | | PR9221. llvm-svn: 125532
* Change the context correctly when instantiating a static data member definition.John McCall2011-02-142-3/+13
| | | | llvm-svn: 125517
* Add current binary and source directories to the header search listOscar Fuentes2011-02-142-4/+1
| | | | | | for all compiler invocations. llvm-svn: 125514
* Anger the CMake gods by updating 'clang.xcodeproj'.Argyrios Kyrtzidis2011-02-141-0/+386
| | | | llvm-svn: 125512
* 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-148-41/+140
| | | | | | 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-1427-10/+509
| | | | | | | | | | | | | | -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-145-99/+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/+2
| | | | | | | | 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-1414-8/+40
| | | | | | 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-142-15/+12
| | | | | | 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
* Add support for the builtins used in gcc 4.4's <cmath> and <complex>Jeffrey Yasskin2011-02-141-0/+81
| | | | | | | | headers in C++0x mode. Fixes PR9138. Patch by John Bytheway! llvm-svn: 125492
* Handle 'UsingDirective' in CFGRecStmtDeclVisitor.Ted Kremenek2011-02-142-0/+17
| | | | llvm-svn: 125491
* 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-1413-99/+244
| | | | | | | | | | | | | | | | | | | | | | 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
* fix two broken links and some out of date writing, PR9174Chris Lattner2011-02-141-12/+11
| | | | llvm-svn: 125484
* Add missing filePeter Collingbourne2011-02-141-0/+28
| | | | llvm-svn: 125478
* OpenCL: add support for __kernel, kernel keywords and EXTENSION,Peter Collingbourne2011-02-1420-2/+186
| | | | | | FP_CONTRACT pragmas. Patch originally by ARM. llvm-svn: 125475
* Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actionsPeter Collingbourne2011-02-149-16/+64
| | | | llvm-svn: 125474
* Make LexOnOffSwitch a Preprocessor member functionPeter Collingbourne2011-02-145-39/+49
| | | | 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-1322-84/+126
| | | | | | | 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-134-5/+49
| | | | | | destruction in the destructor-aliases logic. Fixes PR 9197. llvm-svn: 125447
* Implement objective-c++'s block pointer type matching involvingFariborz Jahanian2011-02-127-2/+194
| | | | | | | 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-122-4/+19
| | | | llvm-svn: 125443
* When reading the AST, delay loading of the redeclaration chain to avoid ↵Argyrios Kyrtzidis2011-02-125-12/+181
| | | | | | | | | | | 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
* Update static analyzer build to checker-255.Ted Kremenek2011-02-123-2/+15
| | | | llvm-svn: 125432
* Weaken the ObjCSelfInitChecker to only warn when one calls an 'init' method ↵Ted Kremenek2011-02-123-13/+41
| | | | | | 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
* Add test case for <rdar://problem/6888289>.Ted Kremenek2011-02-121-0/+38
| | | | llvm-svn: 125424
OpenPOWER on IntegriCloud