]> granicus.if.org Git - clang/log
clang
15 years agoUse getDeclName in DefineImplicitOverloadedAssign as well.
Anders Carlsson [Thu, 9 Jul 2009 17:47:25 +0000 (17:47 +0000)]
Use getDeclName in DefineImplicitOverloadedAssign as well.

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

15 years agoAnother little test for C++ [over.over]
Douglas Gregor [Thu, 9 Jul 2009 17:44:05 +0000 (17:44 +0000)]
Another little test for C++ [over.over]

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

15 years agoPass the DeclName to the diagnostic builder so that member names will be quoted corre...
Anders Carlsson [Thu, 9 Jul 2009 17:37:12 +0000 (17:37 +0000)]
Pass the DeclName to the diagnostic builder so that member names will be quoted correctly.

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

15 years agoUpdate checker build.
Ted Kremenek [Thu, 9 Jul 2009 17:20:25 +0000 (17:20 +0000)]
Update checker build.

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

15 years agoAdd test for C++ [over.over.]p1, the contexts in which one can take the address of...
Douglas Gregor [Thu, 9 Jul 2009 17:16:51 +0000 (17:16 +0000)]
Add test for C++ [over.over.]p1, the contexts in which one can take the address of an overloaded function.

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

15 years agoRemove dead code.
Zhongxing Xu [Thu, 9 Jul 2009 09:17:11 +0000 (09:17 +0000)]
Remove dead code.

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

15 years agoStore the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it...
Anders Carlsson [Thu, 9 Jul 2009 00:05:08 +0000 (00:05 +0000)]
Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it when instantiating the expr. Fixes another member pointer bug.

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

15 years agoImplement the simple form of overload resolution used when taking the
Douglas Gregor [Wed, 8 Jul 2009 23:33:52 +0000 (23:33 +0000)]
Implement the simple form of overload resolution used when taking the
address of an overloaded function (which may involve both functions
and function templates).

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

15 years agoFix: <rdar://problem/7034511> ValueManager::makeIntVal(uint64_t X, QualType T) should...
Ted Kremenek [Wed, 8 Jul 2009 22:42:46 +0000 (22:42 +0000)]
Fix: <rdar://problem/7034511> ValueManager::makeIntVal(uint64_t X, QualType T) should return a 'Loc' when 'T' is a pointer

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

15 years agoIt's not allowed to form member pointers to members that have reference type. Add...
Anders Carlsson [Wed, 8 Jul 2009 21:45:58 +0000 (21:45 +0000)]
It's not allowed to form member pointers to members that have reference type. Add a test for this and the rest of [dcl.mptr]p3.

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

15 years agoBump the PCH version number
Douglas Gregor [Wed, 8 Jul 2009 21:07:44 +0000 (21:07 +0000)]
Bump the PCH version number

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

15 years agoImplement template argument deduction when taking the address of a
Douglas Gregor [Wed, 8 Jul 2009 20:55:45 +0000 (20:55 +0000)]
Implement template argument deduction when taking the address of a
function template. Most of the change here is in factoring out the
common bits used for template argument deduction from a function call
and when taking the address of a function template.

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

15 years agoUpdate for IRBuilder API change.
Owen Anderson [Wed, 8 Jul 2009 20:52:20 +0000 (20:52 +0000)]
Update for IRBuilder API change.

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Wed, 8 Jul 2009 19:05:04 +0000 (19:05 +0000)]
Update for LLVM API change.

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

15 years agoImplement code generation of ChooseExpr for aggregate types.
Anders Carlsson [Wed, 8 Jul 2009 18:33:14 +0000 (18:33 +0000)]
Implement code generation of ChooseExpr for aggregate types.

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

15 years agoPatch adds test to my previous patch for assigning to
Fariborz Jahanian [Wed, 8 Jul 2009 16:37:44 +0000 (16:37 +0000)]
Patch adds test to my previous patch for assigning to
gc'able structs in the Next runtime and adds missing
PCH info.

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

15 years agofix PR4513, a build problem with VC++, patch by James Abbatiello!
Chris Lattner [Wed, 8 Jul 2009 16:24:37 +0000 (16:24 +0000)]
fix PR4513, a build problem with VC++, patch by James Abbatiello!

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

15 years agoCorrect FreeBSD target info, fixing PR4514.
Duncan Sands [Wed, 8 Jul 2009 13:55:08 +0000 (13:55 +0000)]
Correct FreeBSD target info, fixing PR4514.
Patch by Roman Divacky.

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

15 years agoFix a corner case with argument-dependent lookup and overloaded function sets.
Douglas Gregor [Wed, 8 Jul 2009 10:57:20 +0000 (10:57 +0000)]
Fix a corner case with argument-dependent lookup and overloaded function sets.

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

15 years agoUpdate the C++ status table to better reflect our support for function overloading
Douglas Gregor [Wed, 8 Jul 2009 10:03:09 +0000 (10:03 +0000)]
Update the C++ status table to better reflect our support for function overloading

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

15 years agoImprove argument-dependent lookup to find associated classes and
Douglas Gregor [Wed, 8 Jul 2009 07:51:57 +0000 (07:51 +0000)]
Improve argument-dependent lookup to find associated classes and
namespaces based on the template arguments of a class template
specialization type.

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

15 years agoInitialize the ConstantArraySizeAsWritten field of PrintingPolicy class.
Argyrios Kyrtzidis [Wed, 8 Jul 2009 02:17:42 +0000 (02:17 +0000)]
Initialize the ConstantArraySizeAsWritten field of PrintingPolicy class.

It contained garbage since the constructor didn't initialize it and caused test/Sema/array-constraint.c to randomly fail.

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Wed, 8 Jul 2009 01:29:18 +0000 (01:29 +0000)]
Update for LLVM API change.

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

15 years agoImplemented memmove_collectable API for Next runtime
Fariborz Jahanian [Wed, 8 Jul 2009 01:18:33 +0000 (01:18 +0000)]
Implemented memmove_collectable API for Next runtime
when struct variables with GC'able members are copied into.
Will provide a test case later.

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

15 years agoreimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.
Chris Lattner [Wed, 8 Jul 2009 01:08:03 +0000 (01:08 +0000)]
reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.
Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.

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

15 years agoThe canonical type of typeof or decltype with a dependent type is itself,
Douglas Gregor [Wed, 8 Jul 2009 00:03:05 +0000 (00:03 +0000)]
The canonical type of typeof or decltype with a dependent type is itself,
not Context.DependentTy. I'll let Anders check in the test case for this one...

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

15 years agoOverload resolution prefers non-templates to templates
Douglas Gregor [Tue, 7 Jul 2009 23:38:56 +0000 (23:38 +0000)]
Overload resolution prefers non-templates to templates

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

15 years agoTemplate argument deduction from a call has improved a bit
Douglas Gregor [Tue, 7 Jul 2009 23:12:18 +0000 (23:12 +0000)]
Template argument deduction from a call has improved a bit

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

15 years agoImprove template argument deduction from a call. In particular,
Douglas Gregor [Tue, 7 Jul 2009 23:09:34 +0000 (23:09 +0000)]
Improve template argument deduction from a call. In particular,
implement C++ [temp.deduct.call]p3b3, which allows a template-id
parameter to match a derived class of the argument, while deducing
template arguments.

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

15 years agoExtra vector element initializers in OpenCL is an error, not a warning.
Nate Begeman [Tue, 7 Jul 2009 21:53:06 +0000 (21:53 +0000)]
Extra vector element initializers in OpenCL is an error, not a warning.

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

15 years agoImplement checking of exception spec compatibility for overriding virtual functions.
Sebastian Redl [Tue, 7 Jul 2009 20:29:57 +0000 (20:29 +0000)]
Implement checking of exception spec compatibility for overriding virtual functions.

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

15 years agoSome (most) type trait expressions require that the argument passed in is a complete...
Anders Carlsson [Tue, 7 Jul 2009 19:06:02 +0000 (19:06 +0000)]
Some (most) type trait expressions require that the argument passed in is a complete type.

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

15 years agoDiagnose, and not crash, when taking address of property expression.
Fariborz Jahanian [Tue, 7 Jul 2009 18:50:52 +0000 (18:50 +0000)]
Diagnose, and not crash, when taking address of property expression.

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

15 years agoConvert the CharInfo table to be statically initialized, instead of dynamically initi...
Chris Lattner [Tue, 7 Jul 2009 17:09:54 +0000 (17:09 +0000)]
Convert the CharInfo table to be statically initialized, instead of dynamically initialized.  Patch by Ryan Flynn!

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

15 years agoTighten up the conditions under which we build an implicit function
Douglas Gregor [Tue, 7 Jul 2009 17:00:05 +0000 (17:00 +0000)]
Tighten up the conditions under which we build an implicit function
declaration for a builtin.

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

15 years agoMake ASTContext explicitly keep track of the declaration for the C
Douglas Gregor [Tue, 7 Jul 2009 16:35:42 +0000 (16:35 +0000)]
Make ASTContext explicitly keep track of the declaration for the C
FILE type, rather than using name lookup to find FILE within the
translation unit. Within precompiled headers, FILE is treated as yet
another "special type" (like __builtin_va_list).

This change should provide a performance improvement (not verified),
since the lookup into the translation unit declaration
forces the (otherwise unneeded) construction of a large hash table.
More importantly, with precompiled headers, the construction
of that table requires deserializing most of the top-level
declarations from the precompiled header, which are then unused.

Fixes PR 4509.

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

15 years agoA few change per Doug's feedback.
Fariborz Jahanian [Tue, 7 Jul 2009 16:24:08 +0000 (16:24 +0000)]
A few change per Doug's feedback.
- Fariborz

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

15 years agoFix comment.
Zhongxing Xu [Tue, 7 Jul 2009 07:14:55 +0000 (07:14 +0000)]
Fix comment.

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

15 years agofix an out-of-date comment.
Chris Lattner [Tue, 7 Jul 2009 05:05:42 +0000 (05:05 +0000)]
fix an out-of-date comment.

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

15 years agopic16 preproc defs.
Sanjiv Gupta [Tue, 7 Jul 2009 04:42:23 +0000 (04:42 +0000)]
pic16 preproc defs.

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

15 years agofix comment.
Zhongxing Xu [Tue, 7 Jul 2009 01:36:53 +0000 (01:36 +0000)]
fix comment.

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

15 years agoRefactor DeclLocResolver/StmtLocResolver into a more functional style by removing...
Argyrios Kyrtzidis [Tue, 7 Jul 2009 00:53:31 +0000 (00:53 +0000)]
Refactor DeclLocResolver/StmtLocResolver into a more functional style by removing the search state
and by having their Visit* methods return the ASTLocation directly.

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

15 years agoIntroduce the notion of "Relocatable" precompiled headers, which are built
Douglas Gregor [Tue, 7 Jul 2009 00:12:59 +0000 (00:12 +0000)]
Introduce the notion of "Relocatable" precompiled headers, which are built
with a particular system root directory and can be used with a different
system root directory when the headers it depends on have been installed.
Relocatable precompiled headers rewrite the file names of the headers used
when generating the PCH file into the corresponding file names of the
headers available when using the PCH file.

Addresses <rdar://problem/7001604>.

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

15 years agoNewCastRegion: Handle casts *from* pointers to incomplete structs to other types.
Ted Kremenek [Mon, 6 Jul 2009 23:47:19 +0000 (23:47 +0000)]
NewCastRegion: Handle casts *from* pointers to incomplete structs to other types.

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

15 years agoFix 80 col violation.
Ted Kremenek [Mon, 6 Jul 2009 22:59:23 +0000 (22:59 +0000)]
Fix 80 col violation.

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

15 years agoRestructure NewCastRegion to use a switch statement that dispatches off the
Ted Kremenek [Mon, 6 Jul 2009 22:56:37 +0000 (22:56 +0000)]
Restructure NewCastRegion to use a switch statement that dispatches off the
region type. This better shows the logic of the method and allows the compiler
to check if we didn't handle a specific region kind.

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

15 years agoFix 80 col violation.
Ted Kremenek [Mon, 6 Jul 2009 22:40:36 +0000 (22:40 +0000)]
Fix 80 col violation.

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

15 years agoNewCastRegion: Handle casts to any Objective-C pointer, not just qualified ids.
Ted Kremenek [Mon, 6 Jul 2009 22:39:40 +0000 (22:39 +0000)]
NewCastRegion: Handle casts to any Objective-C pointer, not just qualified ids.

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

15 years agoImplement FIXME.
Ted Kremenek [Mon, 6 Jul 2009 22:34:50 +0000 (22:34 +0000)]
Implement FIXME.

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

15 years agoUnbreak build by including header.
Ted Kremenek [Mon, 6 Jul 2009 22:26:23 +0000 (22:26 +0000)]
Unbreak build by including header.

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

15 years agoStoreManager::NewCastRegion:
Ted Kremenek [Mon, 6 Jul 2009 22:23:45 +0000 (22:23 +0000)]
StoreManager::NewCastRegion:
- Refactor logic that creates ElementRegions into a help method 'MakeElementRegion'.
- Fix crash due to not handling StringRegions.  Casts of StringRegions now
  result in a new ElementRegion layered on the original StringRegion.

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

15 years agoMake 'BasicStoreManager' + 'NewCastRegion' testable from the command line using ...
Ted Kremenek [Mon, 6 Jul 2009 21:58:46 +0000 (21:58 +0000)]
Make 'BasicStoreManager' + 'NewCastRegion' testable from the command line using '-analyzer-store=basic-new-cast'.

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

15 years agoUpdate CMake files.
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:38:29 +0000 (21:38 +0000)]
Update CMake files.

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

15 years agoUse the "ASTLocation nomenclature" (instead of the ASTNode one) in index-test.cpp.
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:35:26 +0000 (21:35 +0000)]
Use the "ASTLocation nomenclature" (instead of the ASTNode one) in index-test.cpp.

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

15 years agoSome changes to ASTLocation's methods
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:35:20 +0000 (21:35 +0000)]
Some changes to ASTLocation's methods

-Change hasStmt() to isStmt()
-Add isDecl()
-Add getSourceRange()

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

15 years agoAdd some comments to the ASTLocation class.
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:35:09 +0000 (21:35 +0000)]
Add some comments to the ASTLocation class.

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

15 years agoMove the 'ResolveLocationInAST' function from the Frontend library to the Index library.
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:35:02 +0000 (21:35 +0000)]
Move the 'ResolveLocationInAST' function from the Frontend library to the Index library.

Also, cut down its comments; more comments will be added to ASTLocation.

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

15 years agoMove ASTLocation and DeclReferenceMap from the AST library to the Index library.
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:34:47 +0000 (21:34 +0000)]
Move ASTLocation and DeclReferenceMap from the AST library to the Index library.

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

15 years agoRename 'ASTNode' -> 'ASTLocation'.
Argyrios Kyrtzidis [Mon, 6 Jul 2009 21:34:20 +0000 (21:34 +0000)]
Rename 'ASTNode' -> 'ASTLocation'.

ASTLocation is a much better name for its intended purpose which to represent a "point" into the AST.

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

15 years agoNewCastRegion:
Ted Kremenek [Mon, 6 Jul 2009 21:01:16 +0000 (21:01 +0000)]
NewCastRegion:
- Have test for 'CodeTextRegion' dominate other region tests.
- Use 'getAsRecordType' instead of isa<RecordType>

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

15 years agoFix loop so that 'continue' statements actually cause the loop to iterate.
Ted Kremenek [Mon, 6 Jul 2009 20:53:52 +0000 (20:53 +0000)]
Fix loop so that 'continue' statements actually cause the loop to iterate.

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

15 years agoMove the new 'CastRegion' implementation from RegionStoreManager to StoreManager
Ted Kremenek [Mon, 6 Jul 2009 20:21:51 +0000 (20:21 +0000)]
Move the new 'CastRegion' implementation from RegionStoreManager to StoreManager
(its superclass). This will allow us to experiment with using the new CastRegion
with BasicStoreManager, and gradually phase out the old implementation.

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

15 years agoFix a problem with false diagnostics when comparing distinct NULL pointer types,...
Douglas Gregor [Mon, 6 Jul 2009 20:14:23 +0000 (20:14 +0000)]
Fix a problem with false diagnostics when comparing distinct NULL pointer types, from David Majnemer

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

15 years agoUpdate checker build.
Ted Kremenek [Mon, 6 Jul 2009 19:57:59 +0000 (19:57 +0000)]
Update checker build.

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

15 years agoFix PR 4489, a crash in PCH loading that occurs when loading the name
Douglas Gregor [Mon, 6 Jul 2009 18:54:52 +0000 (18:54 +0000)]
Fix PR 4489, a crash in PCH loading that occurs when loading the name
of a top-level declaration loads another top-level declaration of the
same name whose type depends on the first declaration having been
completed. This commit breaks the circular dependency by delaying
loads of top-level declarations triggered by loading a name until we
are no longer recursively loading types or declarations.

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

15 years agoFix <rdar://problem/7033733>. The CF_RETURNS_RETAINED attribute should work if the...
Ted Kremenek [Mon, 6 Jul 2009 18:30:43 +0000 (18:30 +0000)]
Fix <rdar://problem/7033733>.  The CF_RETURNS_RETAINED attribute should work if the return type on an Objective-C method is a CF type reference, not just an Objective-C object reference.

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

15 years agoParsing fix for out-of-line constructors, from Piotr Rak
Douglas Gregor [Mon, 6 Jul 2009 16:40:48 +0000 (16:40 +0000)]
Parsing fix for out-of-line constructors, from Piotr Rak

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

15 years agoFix out-of-source regression testing for makefiles
Douglas Gregor [Mon, 6 Jul 2009 16:35:57 +0000 (16:35 +0000)]
Fix out-of-source regression testing for makefiles

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

15 years agoKeep track of the Expr used to describe the size of an array type,
Douglas Gregor [Mon, 6 Jul 2009 15:59:29 +0000 (15:59 +0000)]
Keep track of the Expr used to describe the size of an array type,
from Enea Zaffanella!

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

15 years agoFix bitfield promotion in the presence of explicit casts, from Abrama Bagnara.
Douglas Gregor [Mon, 6 Jul 2009 15:38:40 +0000 (15:38 +0000)]
Fix bitfield promotion in the presence of explicit casts, from Abrama Bagnara.

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

15 years agoFurther cleanup of region invalidation code. No functionality change.
Zhongxing Xu [Mon, 6 Jul 2009 06:01:24 +0000 (06:01 +0000)]
Further cleanup of region invalidation code. No functionality change.

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

15 years agoAllocaRegion and SymbolicRegion are both boundable.
Zhongxing Xu [Mon, 6 Jul 2009 05:34:56 +0000 (05:34 +0000)]
AllocaRegion and SymbolicRegion are both boundable.

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

15 years agoStart to gradually move region invalidation code into store manager.
Zhongxing Xu [Mon, 6 Jul 2009 03:41:27 +0000 (03:41 +0000)]
Start to gradually move region invalidation code into store manager.
No functionality change.

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

15 years agoHaving tests that depend on previously created files is bad idea. Fix them to be...
Argyrios Kyrtzidis [Mon, 6 Jul 2009 00:03:47 +0000 (00:03 +0000)]
Having tests that depend on previously created files is bad idea. Fix them to be self-sufficient.

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

15 years agoFix for PR4502: add calculation of the integer conversion rank for
Eli Friedman [Sun, 5 Jul 2009 23:44:27 +0000 (23:44 +0000)]
Fix for PR4502: add calculation of the integer conversion rank for
wchar_t.

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

15 years agoMore tweaks to types for OpenBSD. Patch by Jonathan Gray.
Eli Friedman [Sun, 5 Jul 2009 22:31:18 +0000 (22:31 +0000)]
More tweaks to types for OpenBSD.  Patch by Jonathan Gray.

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

15 years agoMake use of the Index library through the index-test tool.
Argyrios Kyrtzidis [Sun, 5 Jul 2009 22:22:35 +0000 (22:22 +0000)]
Make use of the Index library through the index-test tool.

'index-test' is now able to provide additional info for a Decl, through multiple AST files:
-Find declarations
-Find definitions
-Find references

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

15 years agoIntroduce the 'Index' library.
Argyrios Kyrtzidis [Sun, 5 Jul 2009 22:22:19 +0000 (22:22 +0000)]
Introduce the 'Index' library.

Its purpose is to provide the basic infrastructure for cross-translation-unit analysis like indexing, refactoring, etc.

Currently it is very "primitive" and with no type-names support. It can provide functionality like
"show me all references of this function from these translation units".

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

15 years agoIntroduce the DeclReferenceMap class inside the AST library.
Argyrios Kyrtzidis [Sun, 5 Jul 2009 22:22:06 +0000 (22:22 +0000)]
Introduce the DeclReferenceMap class inside the AST library.

DeclReferenceMap (similar to ParentMap) is a helper class for mapping Decls to the AST nodes that reference them.
A client will initialize it by passing an ASTContext to its constructor and later use it to iterate over
the references of a Decl.
References are mapped and retrieved using the primary declaration (Decl::getPrimaryDecl()) of a particular Decl.

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

15 years agoIntroduce the virtual method Decl::getPrimaryDecl().
Argyrios Kyrtzidis [Sun, 5 Jul 2009 22:21:56 +0000 (22:21 +0000)]
Introduce the virtual method Decl::getPrimaryDecl().

When a Decl subclass can have multiple re-declarations in the same declaration context (like FunctionDecl),
getPrimaryDecl() will return a particular Decl that all of them will point to as the "primary" declaration.

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

15 years agoAvoid re-checking the parameters of a function, when trying to resolve a location.
Argyrios Kyrtzidis [Sun, 5 Jul 2009 22:21:46 +0000 (22:21 +0000)]
Avoid re-checking the parameters of a function, when trying to resolve a location.

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

15 years agoMake use of ASTNode for return value of clang::ResolveLocationInAST() and in the...
Argyrios Kyrtzidis [Sun, 5 Jul 2009 22:21:40 +0000 (22:21 +0000)]
Make use of ASTNode for return value of clang::ResolveLocationInAST() and in the index-test tool.

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

15 years agoIntroduce ASTNode class into the AST library.
Argyrios Kyrtzidis [Sun, 5 Jul 2009 22:21:28 +0000 (22:21 +0000)]
Introduce ASTNode class into the AST library.

ASTNode is an immutable pair of a Decl and Stmt. If Stmt is not null, Decl should be its immediate parent.

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

15 years agoDo an early check for function definition.
Argyrios Kyrtzidis [Sun, 5 Jul 2009 22:21:17 +0000 (22:21 +0000)]
Do an early check for function definition.

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

15 years agoPer PR4506, fix the type of size_t on OpenBSD.
Eli Friedman [Sun, 5 Jul 2009 18:47:56 +0000 (18:47 +0000)]
Per PR4506, fix the type of size_t on OpenBSD.

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

15 years agoCompoundLiteralRegion is boundable when it is not in the file scope.
Zhongxing Xu [Sat, 4 Jul 2009 11:43:03 +0000 (11:43 +0000)]
CompoundLiteralRegion is boundable when it is not in the file scope.

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

15 years agoCatch function redeclarations with incompatible exception specifications.
Sebastian Redl [Sat, 4 Jul 2009 11:39:00 +0000 (11:39 +0000)]
Catch function redeclarations with incompatible exception specifications.

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

15 years agoStringRegion is not boundable.
Zhongxing Xu [Sat, 4 Jul 2009 11:31:53 +0000 (11:31 +0000)]
StringRegion is not boundable.

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

15 years agoThis fixes the case where the wrong symbol is emitted leading to linking errors when...
Fariborz Jahanian [Fri, 3 Jul 2009 15:10:14 +0000 (15:10 +0000)]
This fixes the case where the wrong symbol is emitted leading to linking errors when you reference a class before defining it (GNU runtime).
Patch by David Chisnall.

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

15 years agoremove utility methods that are not very useful.
Zhongxing Xu [Fri, 3 Jul 2009 06:11:41 +0000 (06:11 +0000)]
remove utility methods that are not very useful.

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

15 years agoadd test case for r74407.
Zhongxing Xu [Fri, 3 Jul 2009 05:33:23 +0000 (05:33 +0000)]
add test case for r74407.

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

15 years agoUpdate checker build.
Ted Kremenek [Fri, 3 Jul 2009 03:26:09 +0000 (03:26 +0000)]
Update checker build.

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

15 years agoAdd an intermediate typedef for __builtin_va_tag to make it a bit easier
Eli Friedman [Fri, 3 Jul 2009 00:45:06 +0000 (00:45 +0000)]
Add an intermediate typedef for __builtin_va_tag to make it a bit easier
to deal with for AST pretty-printing/rewriting.  Patch by Abramo
Bagnara.

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

15 years agoRemove unused method.
Ted Kremenek [Fri, 3 Jul 2009 00:41:09 +0000 (00:41 +0000)]
Remove unused method.

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

15 years agoBasicStoreManager: Use SymbolManager::canSymbolicate() to determine if a variable...
Ted Kremenek [Fri, 3 Jul 2009 00:36:16 +0000 (00:36 +0000)]
BasicStoreManager: Use SymbolManager::canSymbolicate() to determine if a variable can be symbolicated.

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

15 years agoFix a horrible CFG bug reported in <rdar://problem/7027684>. The wrong successor
Ted Kremenek [Fri, 3 Jul 2009 00:10:50 +0000 (00:10 +0000)]
Fix a horrible CFG bug reported in <rdar://problem/7027684>. The wrong successor
block would get hooked up in some cases when processing empty compound
statements.

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

15 years agoRevert prev commit, we have much bigger problems because 2.3 is missing
Daniel Dunbar [Thu, 2 Jul 2009 23:58:07 +0000 (23:58 +0000)]
Revert prev commit, we have much bigger problems because 2.3 is missing
the subprocess module.

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

15 years agoAvoid @staticmethod to allow use with Python 2.3.
Daniel Dunbar [Thu, 2 Jul 2009 23:56:37 +0000 (23:56 +0000)]
Avoid @staticmethod to allow use with Python 2.3.

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

15 years agoReplace guarded calls in RegionStoreManager to
Ted Kremenek [Thu, 2 Jul 2009 22:16:42 +0000 (22:16 +0000)]
Replace guarded calls in RegionStoreManager to
ValueManager::getRegionValueSymbolVal() with unguarded calls to
ValueManager::getRegionValueSymbolValOrUnknown(). This changes centralizes the
decision of what values to symbolicate in SymbolManager rather than having it
scatter in RegionStoreManager.

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

15 years agoEnhance RegionStore to lazily symbolicate fields and array elements for
Ted Kremenek [Thu, 2 Jul 2009 22:02:15 +0000 (22:02 +0000)]
Enhance RegionStore to lazily symbolicate fields and array elements for
structures passed-by-value as function arguments.

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