summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* MemRegions:Ted Kremenek2009-06-235-10/+22
| | | | | | | | - Embed a reference to MemRegionManager objects in MemSpaceRegion objects - Use this embedded reference for MemRegion objects to access ASTContext objects without external help - Use this access to ASTContext to simplify 'isBoundable' (no ASTContext& argument required) llvm-svn: 73935
* __APPLE_CC__ should only be set when building for darwin targets.Chris Lattner2009-06-232-1/+1
| | | | llvm-svn: 73934
* Don't use operator overload '<' for SourceLocation, it has not semantic meaning.Argyrios Kyrtzidis2009-06-231-1/+1
| | | | llvm-svn: 73932
* In SourceManager::createFileID missed setting ContentCache's FirstFID in ↵Argyrios Kyrtzidis2009-06-231-1/+4
| | | | | | another place. llvm-svn: 73931
* Add a comment.Argyrios Kyrtzidis2009-06-231-1/+2
| | | | llvm-svn: 73930
* MemRegionManager: Migrate logic for getAllocaRegion() over to using ↵Ted Kremenek2009-06-231-16/+4
| | | | | | trait-based MemRegion creation. llvm-svn: 73927
* MemRegionManager: Migrate getObjCObjectRegion() and getTypedViewRegion() to useTed Kremenek2009-06-231-30/+3
| | | | | | the new trait-based construction of MemRegion objects. llvm-svn: 73926
* patch to mark use of implicit copy constructors.Fariborz Jahanian2009-06-224-11/+73
| | | | llvm-svn: 73922
* Migrate factory methods for FieldRegion and ObjCIVarRegion creation to use theTed Kremenek2009-06-221-28/+2
| | | | | | new generalized region-construction code. llvm-svn: 73921
* Robustify a bunch of C++-related declaration actions.Douglas Gregor2009-06-221-2/+32
| | | | llvm-svn: 73918
* Refactor some of the logic in MemRegionManager for constructing regions usingTed Kremenek2009-06-221-70/+15
| | | | | | | | member template functions and traits. The idea is to allow MemRegionManager to construct subclasses of MemRegion that aren't declared in MemRegion.h (e.g., checker-specific regions). llvm-svn: 73917
* Implement implicit instantiation of the member functions of a class templateDouglas Gregor2009-06-226-9/+72
| | | | | | | specialization. At present, all implicit instantiations occur at the end of the translation unit. llvm-svn: 73915
* Rework the way we track which declarations are "used" duringDouglas Gregor2009-06-2211-29/+147
| | | | | | | | | | | | | | | | | | | | | compilation, and (hopefully) introduce RAII objects for changing the "potentially evaluated" state at all of the necessary places within Sema and Parser. Other changes: - Set the unevaluated/potentially-evaluated context appropriately during template instantiation. - We now recognize three different states while parsing or instantiating expressions: unevaluated, potentially evaluated, and potentially potentially evaluated (for C++'s typeid). - When we're in a potentially potentially-evaluated context, queue up MarkDeclarationReferenced calls in a stack. For C++ typeid expressions that are potentially evaluated, we will play back these MarkDeclarationReferenced calls when we exit the corresponding potentially potentially-evaluated context. - Non-type template arguments are now parsed as constant expressions, so they are not potentially-evaluated. llvm-svn: 73899
* Changes made per Doug's comments.Fariborz Jahanian2009-06-222-8/+12
| | | | llvm-svn: 73897
* Remove ImplicitMustBeDefined, use universal 'Used' flagFariborz Jahanian2009-06-223-11/+12
| | | | | | instead. Do the implicit default ctor checking in MarkDeclarationReferenced. llvm-svn: 73888
* Addressing Doug's suggestions:Argyrios Kyrtzidis2009-06-221-1/+1
| | | | | | | -Added comment for FunctionDecl::EndRangeLoc -Removed a redundant check from FunctionDecl::setBody llvm-svn: 73886
* Allow CodeTextRegion to be cast to 'void *'.Zhongxing Xu2009-06-221-1/+3
| | | | llvm-svn: 73880
* Renamed Protocol as TheProtocol so people can use clang header forFariborz Jahanian2009-06-211-1/+1
| | | | | | building obj-c++ clients. "Protocol" is a class name in Cocoa.h llvm-svn: 73854
* Return UnknownVal for pointer arithmetic on struct fields.Zhongxing Xu2009-06-211-1/+6
| | | | llvm-svn: 73851
* Made improvements in c++'s object model patch on Doug's review.Fariborz Jahanian2009-06-201-9/+10
| | | | llvm-svn: 73833
* Slight modification to column checking inside SourceManager::getLocation().Argyrios Kyrtzidis2009-06-201-6/+6
| | | | llvm-svn: 73826
* Add the license part to the new source files.Argyrios Kyrtzidis2009-06-201-0/+13
| | | | llvm-svn: 73825
* Introduce SourceManager::getLocation() to get a source location out of a ↵Argyrios Kyrtzidis2009-06-201-1/+41
| | | | | | "file:line:column" triplet. llvm-svn: 73823
* Serialize FunctionDecl's EndRangeLoc out to the PCH file.Argyrios Kyrtzidis2009-06-202-0/+2
| | | | llvm-svn: 73822
* Introduce Decl::getSourceRange() which, like Stmt::getSourceRange(), ↵Argyrios Kyrtzidis2009-06-201-0/+16
| | | | | | | | | | | represents the range that the declaration covers. Add initial support for NamespaceDecl, VarDecl, and FunctionDecl: -NamespaceDecl range is from name to '}' -VarDecl is from name to possible init expression -FunctionDecl is from name to last parameter name or to end of its function body. llvm-svn: 73821
* Introduce the ASTUnit class.Argyrios Kyrtzidis2009-06-201-0/+146
| | | | | | ASTUnit is a helper class to allow easy loading of an ASTContext from a PCH file. No users for now. llvm-svn: 73819
* Parsing and AST support for using declarations, from John Thompson!Douglas Gregor2009-06-209-10/+149
| | | | llvm-svn: 73812
* Added writing and reading of the ConstQualAdded flag ofFariborz Jahanian2009-06-202-0/+2
| | | | | | BlockDeclRefExpr to PCH. llvm-svn: 73800
* Keep track of when declarations are "used" according to C andDouglas Gregor2009-06-1913-28/+174
| | | | | | | | | | | | C++. This logic is required to trigger implicit instantiation of function templates and member functions of class templates, which will be implemented separately. This commit includes support for -Wunused-parameter, printing warnings for named parameters that are not used within a function/Objective-C method/block. Fixes <rdar://problem/6505209>. llvm-svn: 73797
* Use QualType to represent block's implicit return type asFariborz Jahanian2009-06-193-11/+21
| | | | | | to not lose its 'const/volatile' qualifier. llvm-svn: 73795
* Patch for implementation of C++'s object model. This isFariborz Jahanian2009-06-194-4/+108
| | | | | | work in progress. llvm-svn: 73782
* Remove more GetSVal/GetLValue methods in GRExprEngine/GRState, insteadTed Kremenek2009-06-191-110/+106
| | | | | | | preferring to use their replacements in GRState. This further unifies the code paths for such logic and leads to some code reduction. llvm-svn: 73771
* Fix bug in the new PCHReader constructor. PP and Context should be ↵Argyrios Kyrtzidis2009-06-191-1/+1
| | | | | | initialized to 0. llvm-svn: 73762
* A further step of r73690: associate the cast-to type with the created symbol,Zhongxing Xu2009-06-192-5/+8
| | | | | | | because the type of the symbol is used to create the default range. We need the sign to be consistent. llvm-svn: 73756
* If the SymbolicRegion was cast to another type, use that type to create the Zhongxing Xu2009-06-191-3/+9
| | | | | | ElementRegion. llvm-svn: 73754
* Make changes to PCHReader to allow reading a PCH file without having a ↵Argyrios Kyrtzidis2009-06-191-341/+458
| | | | | | | | | | pre-initialized Preprocessor. -Introduce 'PCHReaderListener' which is an abstract interface for getting various information from the PCHReader. -If PCHReader is constructed without a Preprocessor, it can still load the file and invoke the callbacks of PCHReaderListener. -If PCHReader is constructed with an initialized Preprocessor, PCHValidator is used as a PCHReaderListener to validate the contents of the PCH file against the given Preprocessor. llvm-svn: 73741
* Move clients over from using GRStateManager::BindXXX and friends toTed Kremenek2009-06-1810-65/+48
| | | | | | GRState->bindXXX and friends (and constify some arguments along the way). llvm-svn: 73740
* Remove GRStateManager& field from SimpleConstraintManager.Ted Kremenek2009-06-184-26/+12
| | | | llvm-svn: 73735
* libAnalysis:Ted Kremenek2009-06-187-372/+286
| | | | | | | | | - Remove the 'isFeasible' flag from all uses of 'Assume'. - Remove the 'Assume' methods from GRStateManager. Now the only way to create a new GRState with an assumption is to use the new 'assume' methods in GRState. llvm-svn: 73731
* Some cleanups suggested by ChrisDouglas Gregor2009-06-183-20/+20
| | | | llvm-svn: 73713
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-1830-236/+241
| | | | llvm-svn: 73702
* Add some missing CMake dependenciesDouglas Gregor2009-06-182-0/+4
| | | | llvm-svn: 73700
* When casting region, if we do not create an element region, record the cast-to Zhongxing Xu2009-06-182-8/+21
| | | | | | | | | type. When retrieving the region value, if we are going to create a symbol value, use the cast-to type if possible. llvm-svn: 73690
* Fix a crash that can occur when a #pragma handler eats to the end of theChris Lattner2009-06-181-1/+1
| | | | | | | | line, and when the pragma is at the end of a file. In this case, the last token consumed could pop the lexer, invalidating CurPPLexer. Thanks to Peter Thoman for pointing it out. llvm-svn: 73689
* Remove GRStateRef.Ted Kremenek2009-06-182-9/+8
| | | | llvm-svn: 73670
* Remove more dependencies on GRStateRef. As a consequence, we can nowTed Kremenek2009-06-183-117/+105
| | | | | | | pretty-print a GRState object anywhere it is referenced (instead of needing a GRStateRef of a GRStateManager handy). llvm-svn: 73669
* Remove another dependency on GRStateRef.Ted Kremenek2009-06-181-10/+7
| | | | llvm-svn: 73667
* Diagnose class members that shadow a template parameter. FixesDouglas Gregor2009-06-173-2/+13
| | | | | | | | | | <rdar://problem/6952203>. To do this, we actually remove a not-quite-correct optimization in the C++ name lookup routines. We'll revisit this optimization for the general case once more C++ is working. llvm-svn: 73659
* Fix some erroneous comments due to trigger-happy copy&paste.Argyrios Kyrtzidis2009-06-171-5/+2
| | | | | | No functionality change. llvm-svn: 73657
* Factor out some common code into ↵Argyrios Kyrtzidis2009-06-174-27/+34
| | | | | | Sema::EnterDeclaratorContext/ExitDeclaratorContext. llvm-svn: 73655
OpenPOWER on IntegriCloud