]> granicus.if.org Git - clang/log
clang
15 years agoMove all factory methods from SVal to ValueManager. API cleanup!
Zhongxing Xu [Tue, 23 Jun 2009 09:02:15 +0000 (09:02 +0000)]
Move all factory methods from SVal to ValueManager. API cleanup!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73954 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSplit ValueManager method definitions into its own source file.
Zhongxing Xu [Tue, 23 Jun 2009 06:22:22 +0000 (06:22 +0000)]
Split ValueManager method definitions into its own source file.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73952 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoValueManager::makeNonLoc -> ValueManager::makeIntVal
Zhongxing Xu [Tue, 23 Jun 2009 06:13:19 +0000 (06:13 +0000)]
ValueManager::makeNonLoc -> ValueManager::makeIntVal
Clean up code with ValueManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73951 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf the init list is fewer than the struct fields, bind the rest fields to 0
Zhongxing Xu [Tue, 23 Jun 2009 05:43:16 +0000 (05:43 +0000)]
If the init list is fewer than the struct fields, bind the rest fields to 0
explicitly. Make 0 value with the field type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73949 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInstead of setting the default value of the array region, bind the rest of the
Zhongxing Xu [Tue, 23 Jun 2009 05:23:38 +0000 (05:23 +0000)]
Instead of setting the default value of the array region, bind the rest of the
array elements to 0 explicitly. Create 0 values with the element type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73946 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix our check for "random whitespace between a \ and newline" to work
Chris Lattner [Tue, 23 Jun 2009 05:15:06 +0000 (05:15 +0000)]
Fix our check for "random whitespace between a \ and newline" to work
with dos style newlines.  I have a trivial test for this:

// RUN: clang-cc %s -verify
#define test(x, y) \
   x ## y

but I don't know how to get svn to not change newlines and testrunner
doesn't work with dos style newlines either, so "not worth it". :)

rdar://6994000

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73945 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMemRegionManager: Migrate logic for getCodeTextRegion() over to using
Zhongxing Xu [Tue, 23 Jun 2009 03:50:30 +0000 (03:50 +0000)]
MemRegionManager: Migrate logic for getCodeTextRegion() over to using
trait-based MemRegion creation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73941 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove duplicated methods.
Zhongxing Xu [Tue, 23 Jun 2009 02:51:21 +0000 (02:51 +0000)]
Remove duplicated methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73940 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a fixme.
Zhongxing Xu [Tue, 23 Jun 2009 02:08:56 +0000 (02:08 +0000)]
add a fixme.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73939 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix PR4423.
Chris Lattner [Tue, 23 Jun 2009 01:38:41 +0000 (01:38 +0000)]
fix PR4423.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73938 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCheck in a new template argument list builder that should work better for variadic...
Anders Carlsson [Tue, 23 Jun 2009 01:26:57 +0000 (01:26 +0000)]
Check in a new template argument list builder that should work better for variadic templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73937 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoswitch Warnings.cpp to use the diagnostics machinery to print diagnostics, not *fprintf*!
Chris Lattner [Tue, 23 Jun 2009 01:20:39 +0000 (01:20 +0000)]
switch Warnings.cpp to use the diagnostics machinery to print diagnostics, not *fprintf*!
Among other things, this makes the warning about unknown warning options mappable.
For example:

$ clang t.c -Werror -Wfoo
error: unknown warning option '-Wfoo' [-Wunknown-warning-option]

For another thing, they are properly color coded now too :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73936 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMemRegions:
Ted Kremenek [Tue, 23 Jun 2009 00:46:41 +0000 (00:46 +0000)]
MemRegions:
- 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)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73935 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago__APPLE_CC__ should only be set when building for darwin targets.
Chris Lattner [Tue, 23 Jun 2009 00:43:21 +0000 (00:43 +0000)]
__APPLE_CC__ should only be set when building for darwin targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73934 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove operator '<=' overload for SourceLocation.
Argyrios Kyrtzidis [Tue, 23 Jun 2009 00:42:21 +0000 (00:42 +0000)]
Remove operator '<=' overload for SourceLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73933 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't use operator overload '<' for SourceLocation, it has not semantic meaning.
Argyrios Kyrtzidis [Tue, 23 Jun 2009 00:42:15 +0000 (00:42 +0000)]
Don't use operator overload '<' for SourceLocation, it has not semantic meaning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73932 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIn SourceManager::createFileID missed setting ContentCache's FirstFID in another...
Argyrios Kyrtzidis [Tue, 23 Jun 2009 00:42:06 +0000 (00:42 +0000)]
In SourceManager::createFileID missed setting ContentCache's FirstFID in another place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73931 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a comment.
Argyrios Kyrtzidis [Tue, 23 Jun 2009 00:42:00 +0000 (00:42 +0000)]
Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73930 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMemRegionManager: Migrate logic for getAllocaRegion() over to using trait-based MemRe...
Ted Kremenek [Tue, 23 Jun 2009 00:15:41 +0000 (00:15 +0000)]
MemRegionManager: Migrate logic for getAllocaRegion() over to using trait-based MemRegion creation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73927 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMemRegionManager: Migrate getObjCObjectRegion() and getTypedViewRegion() to use
Ted Kremenek [Tue, 23 Jun 2009 00:04:09 +0000 (00:04 +0000)]
MemRegionManager: Migrate getObjCObjectRegion() and getTypedViewRegion() to use
the new trait-based construction of MemRegion objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73926 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome semantic tests for implicit instantiations
Douglas Gregor [Mon, 22 Jun 2009 23:57:29 +0000 (23:57 +0000)]
Some semantic tests for implicit instantiations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73924 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agopatch to mark use of implicit copy constructors.
Fariborz Jahanian [Mon, 22 Jun 2009 23:34:40 +0000 (23:34 +0000)]
patch to mark use of implicit copy constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73922 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMigrate factory methods for FieldRegion and ObjCIVarRegion creation to use the
Ted Kremenek [Mon, 22 Jun 2009 23:34:21 +0000 (23:34 +0000)]
Migrate factory methods for FieldRegion and ObjCIVarRegion creation to use the
new generalized region-construction code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73921 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRobustify a bunch of C++-related declaration actions.
Douglas Gregor [Mon, 22 Jun 2009 23:20:33 +0000 (23:20 +0000)]
Robustify a bunch of C++-related declaration actions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73918 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRefactor some of the logic in MemRegionManager for constructing regions using
Ted Kremenek [Mon, 22 Jun 2009 23:13:13 +0000 (23:13 +0000)]
Refactor some of the logic in MemRegionManager for constructing regions using
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73917 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement implicit instantiation of the member functions of a class template
Douglas Gregor [Mon, 22 Jun 2009 23:06:13 +0000 (23:06 +0000)]
Implement implicit instantiation of the member functions of a class template
specialization. At present, all implicit instantiations occur at the
end of the translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73915 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a warning group for unavailable decls that mirrors the one for
Chris Lattner [Mon, 22 Jun 2009 23:04:45 +0000 (23:04 +0000)]
add a warning group for unavailable decls that mirrors the one for
deprecated decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73914 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRework the way we track which declarations are "used" during
Douglas Gregor [Mon, 22 Jun 2009 20:57:11 +0000 (20:57 +0000)]
Rework the way we track which declarations are "used" during
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73899 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChanges made per Doug's comments.
Fariborz Jahanian [Mon, 22 Jun 2009 20:37:23 +0000 (20:37 +0000)]
Changes made per Doug's comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73897 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove ImplicitMustBeDefined, use universal 'Used' flag
Fariborz Jahanian [Mon, 22 Jun 2009 17:30:33 +0000 (17:30 +0000)]
Remove ImplicitMustBeDefined, use universal 'Used' flag
instead. Do the implicit default ctor checking in MarkDeclarationReferenced.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73888 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAddressing Doug's suggestions:
Argyrios Kyrtzidis [Mon, 22 Jun 2009 17:13:31 +0000 (17:13 +0000)]
Addressing Doug's suggestions:

-Added comment for FunctionDecl::EndRangeLoc
-Removed a redundant check from FunctionDecl::setBody

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73886 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixed text of a diagnostics.
Fariborz Jahanian [Mon, 22 Jun 2009 16:33:37 +0000 (16:33 +0000)]
Fixed text of a diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73885 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow CodeTextRegion to be cast to 'void *'.
Zhongxing Xu [Mon, 22 Jun 2009 08:36:10 +0000 (08:36 +0000)]
Allow CodeTextRegion to be cast to 'void *'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73880 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRenamed Protocol as TheProtocol so people can use clang header for
Fariborz Jahanian [Sun, 21 Jun 2009 18:26:03 +0000 (18:26 +0000)]
Renamed Protocol as TheProtocol so people can use clang header for
building obj-c++ clients. "Protocol" is a class name in Cocoa.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73854 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReturn UnknownVal for pointer arithmetic on struct fields.
Zhongxing Xu [Sun, 21 Jun 2009 13:24:24 +0000 (13:24 +0000)]
Return UnknownVal for pointer arithmetic on struct fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73851 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMade improvements in c++'s object model patch on Doug's review.
Fariborz Jahanian [Sat, 20 Jun 2009 20:23:38 +0000 (20:23 +0000)]
Made improvements in c++'s object model patch on Doug's review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73833 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSlight modification to column checking inside SourceManager::getLocation().
Argyrios Kyrtzidis [Sat, 20 Jun 2009 08:40:15 +0000 (08:40 +0000)]
Slight modification to column checking inside SourceManager::getLocation().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73826 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd the license part to the new source files.
Argyrios Kyrtzidis [Sat, 20 Jun 2009 08:27:14 +0000 (08:27 +0000)]
Add the license part to the new source files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73825 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce SourceManager::getLocation() to get a source location out of a "file:line...
Argyrios Kyrtzidis [Sat, 20 Jun 2009 08:09:57 +0000 (08:09 +0000)]
Introduce SourceManager::getLocation() to get a source location out of a "file:line:column" triplet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73823 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSerialize FunctionDecl's EndRangeLoc out to the PCH file.
Argyrios Kyrtzidis [Sat, 20 Jun 2009 08:09:34 +0000 (08:09 +0000)]
Serialize FunctionDecl's EndRangeLoc out to the PCH file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73822 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce Decl::getSourceRange() which, like Stmt::getSourceRange(), represents the...
Argyrios Kyrtzidis [Sat, 20 Jun 2009 08:09:14 +0000 (08:09 +0000)]
Introduce Decl::getSourceRange() which, like Stmt::getSourceRange(), 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73821 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd operator '<=' for comparing SourceLocations.
Argyrios Kyrtzidis [Sat, 20 Jun 2009 08:08:38 +0000 (08:08 +0000)]
Add operator '<=' for comparing SourceLocations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73820 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce the ASTUnit class.
Argyrios Kyrtzidis [Sat, 20 Jun 2009 08:08:23 +0000 (08:08 +0000)]
Introduce the ASTUnit class.

ASTUnit is a helper class to allow easy loading of an ASTContext from a PCH file. No users for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73819 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoParsing and AST support for using declarations, from John Thompson!
Douglas Gregor [Sat, 20 Jun 2009 00:51:54 +0000 (00:51 +0000)]
Parsing and AST support for using declarations, from John Thompson!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73812 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd -fblocks
Douglas Gregor [Sat, 20 Jun 2009 00:29:46 +0000 (00:29 +0000)]
Add -fblocks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73804 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded writing and reading of the ConstQualAdded flag of
Fariborz Jahanian [Sat, 20 Jun 2009 00:02:26 +0000 (00:02 +0000)]
Added writing and reading of the ConstQualAdded flag of
BlockDeclRefExpr to PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73800 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoKeep track of when declarations are "used" according to C and
Douglas Gregor [Fri, 19 Jun 2009 23:52:42 +0000 (23:52 +0000)]
Keep track of when declarations are "used" according to C and
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse QualType to represent block's implicit return type as
Fariborz Jahanian [Fri, 19 Jun 2009 23:37:08 +0000 (23:37 +0000)]
Use QualType to represent block's implicit return type as
to not lose its 'const/volatile' qualifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73795 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPatch for implementation of C++'s object model. This is
Fariborz Jahanian [Fri, 19 Jun 2009 19:55:27 +0000 (19:55 +0000)]
Patch for implementation of C++'s object model. This is
work in progress.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73782 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove more GetSVal/GetLValue methods in GRExprEngine/GRState, instead
Ted Kremenek [Fri, 19 Jun 2009 17:10:32 +0000 (17:10 +0000)]
Remove more GetSVal/GetLValue methods in GRExprEngine/GRState, instead
preferring to use their replacements in GRState. This further unifies the code
paths for such logic and leads to some code reduction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73771 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix bug in the new PCHReader constructor. PP and Context should be initialized to 0.
Argyrios Kyrtzidis [Fri, 19 Jun 2009 07:55:35 +0000 (07:55 +0000)]
Fix bug in the new PCHReader constructor. PP and Context should be initialized to 0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73762 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTiny correction on the command-line source location parser.
Argyrios Kyrtzidis [Fri, 19 Jun 2009 06:32:46 +0000 (06:32 +0000)]
Tiny correction on the command-line source location parser.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73758 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoA further step of r73690: associate the cast-to type with the created symbol,
Zhongxing Xu [Fri, 19 Jun 2009 06:00:32 +0000 (06:00 +0000)]
A further step of r73690: associate the cast-to type with the created symbol,
because the type of the symbol is used to create the default range. We need the
sign to be consistent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73756 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf the SymbolicRegion was cast to another type, use that type to create the
Zhongxing Xu [Fri, 19 Jun 2009 04:51:14 +0000 (04:51 +0000)]
If the SymbolicRegion was cast to another type, use that type to create the
ElementRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73754 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake changes to PCHReader to allow reading a PCH file without having a pre-initialize...
Argyrios Kyrtzidis [Fri, 19 Jun 2009 00:03:23 +0000 (00:03 +0000)]
Make changes to PCHReader to allow reading a PCH file without having a 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73741 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove clients over from using GRStateManager::BindXXX and friends to
Ted Kremenek [Thu, 18 Jun 2009 23:58:37 +0000 (23:58 +0000)]
Move clients over from using GRStateManager::BindXXX and friends to
GRState->bindXXX and friends (and constify some arguments along the way).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73740 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove GRStateManager& field from SimpleConstraintManager.
Ted Kremenek [Thu, 18 Jun 2009 23:20:05 +0000 (23:20 +0000)]
Remove GRStateManager& field from SimpleConstraintManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73735 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agolibAnalysis:
Ted Kremenek [Thu, 18 Jun 2009 22:57:13 +0000 (22:57 +0000)]
libAnalysis:
- 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73731 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome cleanups suggested by Chris
Douglas Gregor [Thu, 18 Jun 2009 18:45:36 +0000 (18:45 +0000)]
Some cleanups suggested by Chris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73713 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.
Douglas Gregor [Thu, 18 Jun 2009 16:11:24 +0000 (16:11 +0000)]
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some missing CMake dependencies
Douglas Gregor [Thu, 18 Jun 2009 15:05:47 +0000 (15:05 +0000)]
Add some missing CMake dependencies

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73700 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoModify test case comments.
Zhongxing Xu [Thu, 18 Jun 2009 06:49:35 +0000 (06:49 +0000)]
Modify test case comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73691 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen casting region, if we do not create an element region, record the cast-to
Zhongxing Xu [Thu, 18 Jun 2009 06:29:10 +0000 (06:29 +0000)]
When casting region, if we do not create an element region, record the cast-to
type.

When retrieving the region value, if we are going to create a symbol value, use
the cast-to type if possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73690 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a crash that can occur when a #pragma handler eats to the end of the
Chris Lattner [Thu, 18 Jun 2009 05:55:53 +0000 (05:55 +0000)]
Fix a crash that can occur when a #pragma handler eats to the end of the
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73689 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore GRStateRef removal fix.
Zhongxing Xu [Thu, 18 Jun 2009 03:42:19 +0000 (03:42 +0000)]
More GRStateRef removal fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73674 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a target triple to a couple of tests which depend on it. Reported
Eli Friedman [Thu, 18 Jun 2009 02:04:19 +0000 (02:04 +0000)]
Add a target triple to a couple of tests which depend on it.  Reported
by Mark Cianciosa on cfe-dev.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73672 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove GRStateRef.
Ted Kremenek [Thu, 18 Jun 2009 01:33:24 +0000 (01:33 +0000)]
Remove GRStateRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73670 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove more dependencies on GRStateRef. As a consequence, we can now
Ted Kremenek [Thu, 18 Jun 2009 01:23:53 +0000 (01:23 +0000)]
Remove more dependencies on GRStateRef.  As a consequence, we can now
pretty-print a GRState object anywhere it is referenced (instead of
needing a GRStateRef of a GRStateManager handy).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73669 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove another dependency on GRStateRef.
Ted Kremenek [Thu, 18 Jun 2009 00:49:02 +0000 (00:49 +0000)]
Remove another dependency on GRStateRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73667 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDiagnose class members that shadow a template parameter. Fixes
Douglas Gregor [Wed, 17 Jun 2009 23:37:01 +0000 (23:37 +0000)]
Diagnose class members that shadow a template parameter. Fixes
<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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73659 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix regression testing in Xcode, again
Douglas Gregor [Wed, 17 Jun 2009 23:35:04 +0000 (23:35 +0000)]
Fix regression testing in Xcode, again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73658 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some erroneous comments due to trigger-happy copy&paste.
Argyrios Kyrtzidis [Wed, 17 Jun 2009 23:19:02 +0000 (23:19 +0000)]
Fix some erroneous comments due to trigger-happy copy&paste.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73657 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor out some common code into Sema::EnterDeclaratorContext/ExitDeclaratorContext.
Argyrios Kyrtzidis [Wed, 17 Jun 2009 23:15:40 +0000 (23:15 +0000)]
Factor out some common code into Sema::EnterDeclaratorContext/ExitDeclaratorContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73655 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement correct name lookup inside an initializer of a C++ class static data member.
Argyrios Kyrtzidis [Wed, 17 Jun 2009 22:50:06 +0000 (22:50 +0000)]
Implement correct name lookup inside an initializer of a C++ class static data member.

Fixes "test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp" test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73652 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.
Argyrios Kyrtzidis [Wed, 17 Jun 2009 22:49:50 +0000 (22:49 +0000)]
Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73651 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved deadcode related to addition of constructor
Fariborz Jahanian [Wed, 17 Jun 2009 22:44:31 +0000 (22:44 +0000)]
Removed deadcode related to addition of constructor
decls to a class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73650 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFirst step toward fixing <rdar://problem/6613046> refactor clang objc type representa...
Steve Naroff [Wed, 17 Jun 2009 22:40:22 +0000 (22:40 +0000)]
First step toward fixing <rdar://problem/6613046> refactor clang objc type representation.

Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).

This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types).

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73649 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove more uses of GRStateRef.
Ted Kremenek [Wed, 17 Jun 2009 22:28:13 +0000 (22:28 +0000)]
Remove more uses of GRStateRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73648 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClass 'Environment' no longer should subclass llvm::FoldingSetNode.
Ted Kremenek [Wed, 17 Jun 2009 22:06:03 +0000 (22:06 +0000)]
Class 'Environment' no longer should subclass llvm::FoldingSetNode.
Environment hasn't been uniqued in a FoldingSet for some time, so this
was just wasting a pointer in GRState.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73645 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStart moving in the direction of removing GRStateRef. Now each
Ted Kremenek [Wed, 17 Jun 2009 22:02:04 +0000 (22:02 +0000)]
Start moving in the direction of removing GRStateRef.  Now each
GRState object has a direct reference to its GRStateManager, making
the functionality of GRStateRef redunandant.  This will lead to some
nice API cleanup and code shrinking across libAnalysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73644 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSupport dependent extended vector types and template instantiation
Douglas Gregor [Wed, 17 Jun 2009 21:51:59 +0000 (21:51 +0000)]
Support dependent extended vector types and template instantiation
thereof. Patch by Anders Johnsen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73641 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTesting improvements:
Daniel Dunbar [Wed, 17 Jun 2009 21:33:37 +0000 (21:33 +0000)]
Testing improvements:
 - Make python test runner force COLUMNS=0 to increase determinism.

 - Substitute clang-cc as we do for clang.

 - Improved detection of Ctrl-C.

 - Honor CLANG and CLANGCC environment variables.

 - Add proper command line arguments to TestRunner.py (see --help)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73640 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSearch path for 64-bit Ubuntu Linux, from Anders Johnsen
Douglas Gregor [Wed, 17 Jun 2009 21:18:36 +0000 (21:18 +0000)]
Search path for 64-bit Ubuntu Linux, from Anders Johnsen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73637 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded missing @endcode.
Fariborz Jahanian [Wed, 17 Jun 2009 20:24:52 +0000 (20:24 +0000)]
Added missing @endcode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73629 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDiagnose the use of attributes on namespace aliases, from Anis Ahmad
Douglas Gregor [Wed, 17 Jun 2009 19:49:00 +0000 (19:49 +0000)]
Diagnose the use of attributes on namespace aliases, from Anis Ahmad

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73626 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake sure that .td and .def files get into the list of headers in a CMake build,...
Douglas Gregor [Wed, 17 Jun 2009 18:31:02 +0000 (18:31 +0000)]
Make sure that .td and .def files get into the list of headers in a CMake build, for use in Xcode and Visual Studio

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73623 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agolink in targets
Chris Lattner [Wed, 17 Jun 2009 17:25:50 +0000 (17:25 +0000)]
link in targets

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73619 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove old #includes
Chris Lattner [Wed, 17 Jun 2009 17:23:16 +0000 (17:23 +0000)]
Remove old #includes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73618 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse env properly in test/Driver/analyze.c
Douglas Gregor [Wed, 17 Jun 2009 15:41:17 +0000 (15:41 +0000)]
Use env properly in test/Driver/analyze.c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73609 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate clang for the add ->add/fadd split. Likewise for sub and mul.
Chris Lattner [Wed, 17 Jun 2009 06:36:24 +0000 (06:36 +0000)]
Update clang for the add ->add/fadd split.  Likewise for sub and mul.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73604 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove all non-const getters from TemplateArgumentList.
Anders Carlsson [Wed, 17 Jun 2009 00:35:01 +0000 (00:35 +0000)]
Remove all non-const getters from TemplateArgumentList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73589 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPlace -Wreadonly-setter-attrs under -Wmost option group.
Fariborz Jahanian [Wed, 17 Jun 2009 00:06:21 +0000 (00:06 +0000)]
Place -Wreadonly-setter-attrs under -Wmost option group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73585 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf any tests fail, the test runner returns a status code of 1
Douglas Gregor [Tue, 16 Jun 2009 23:40:23 +0000 (23:40 +0000)]
If any tests fail, the test runner returns a status code of 1

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73584 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake these driver tests do the right thing even when MACOSX_DEPLOYMENT_TARGET is...
Douglas Gregor [Tue, 16 Jun 2009 23:37:56 +0000 (23:37 +0000)]
Make these driver tests do the right thing even when MACOSX_DEPLOYMENT_TARGET is set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73583 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStub out printing of the thread model with -v.
Daniel Dunbar [Tue, 16 Jun 2009 23:32:58 +0000 (23:32 +0000)]
Stub out printing of the thread model with -v.
 - Turns out libstdcxx greps for this in configure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73582 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFake support for -print-multi-*
Daniel Dunbar [Tue, 16 Jun 2009 23:25:22 +0000 (23:25 +0000)]
Fake support for -print-multi-*
 - I think we will eventually need to support this for realz, and some build
   processes seem to depend on these options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73581 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSince integral template arguments can't have dependent types we don't need an extra...
Anders Carlsson [Tue, 16 Jun 2009 23:08:29 +0000 (23:08 +0000)]
Since integral template arguments can't have dependent types we don't need an extra pass to set the right APSInt bit width/signedness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73580 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd utility method GRStateRef::makeWithStore().
Ted Kremenek [Tue, 16 Jun 2009 22:55:21 +0000 (22:55 +0000)]
Add utility method GRStateRef::makeWithStore().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73576 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake DeduceNonTypeTemplateArgument take an APSInt instead of an APInt.
Anders Carlsson [Tue, 16 Jun 2009 22:44:31 +0000 (22:44 +0000)]
Make DeduceNonTypeTemplateArgument take an APSInt instead of an APInt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73574 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRegionStoreManager:
Ted Kremenek [Tue, 16 Jun 2009 22:36:44 +0000 (22:36 +0000)]
RegionStoreManager:
- Add "sections" to RegionStoreManager.cpp to delineate functionality.
- Add new function "CreateFieldsOnlyRegionStoreManager" that uses the new
  RegionStoreFeatures class to use a reduced set of features from
  RegionStoreManager (in this case, only field-sensitivity). This isn't
  completely hooked up yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73572 91177308-0d34-0410-b5e6-96231b3b80d8