]>
granicus.if.org Git - clang/log
Argyrios Kyrtzidis [Thu, 25 Jun 2009 18:22:52 +0000 (18:22 +0000)]
Introduce tools/index-test.
This tool will be the test bed for indexing related operations. It basically reads PCH files passed by the command line and performs various operations.
Currently it can accept a file:line:column which resolves to a declaration/statement and displays some information about them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74198
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 25 Jun 2009 18:22:41 +0000 (18:22 +0000)]
Introduce the ResolveLocationInAST function which takes an ASTContext and a SourceLocation and it resolves it into a <Decl*, Stmt*> pair.
Decl* is the declaration associated with this source location and Stmt* is the statement/expression that the location points to.
If the location does not point to a statement node, Stmt* is null.
ResolveLocationInAST (along with converting a file:line:column triplet to a SourceLocation) will be useful for an IDE client and for clang's test suite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 25 Jun 2009 18:22:30 +0000 (18:22 +0000)]
Handle PCHReader::IgnorePCH, it gets returned for when the file does not exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74196
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 25 Jun 2009 18:22:24 +0000 (18:22 +0000)]
Set the end range location of a FunctionDecl to the right paren.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 25 Jun 2009 18:22:16 +0000 (18:22 +0000)]
Fix column checking for SourceManager::getLocation().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74194
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 25 Jun 2009 17:25:49 +0000 (17:25 +0000)]
Remove declaration for unused and unimplemented static method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74182
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 25 Jun 2009 16:06:43 +0000 (16:06 +0000)]
Extra asserts never hurt anybody, right?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 25 Jun 2009 15:00:34 +0000 (15:00 +0000)]
Decltype needs to have a dependent type if the expr passed to it is type dependent. Fixes PR4444.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 25 Jun 2009 09:03:06 +0000 (09:03 +0000)]
Explicit braces to avoid ambiguous ‘else’.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74171
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Jun 2009 05:52:16 +0000 (05:52 +0000)]
remove RegionKills GDM. Now UnknownVal is bound to regions explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74168
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Jun 2009 05:29:39 +0000 (05:29 +0000)]
Move element region retrieving logic into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Jun 2009 05:07:31 +0000 (05:07 +0000)]
Make sure install Clang headers when building clang-cc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74163
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Jun 2009 05:03:29 +0000 (05:03 +0000)]
Add missing dependencies to the CMake build system
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74162
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Jun 2009 04:50:44 +0000 (04:50 +0000)]
Move all logic for retrieving ElementRegion binding into a separate method.
Revert to setting default value approach for handling struct initialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74160
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 23:06:47 +0000 (23:06 +0000)]
Remove uses of std::ostream from libAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 22:26:16 +0000 (22:26 +0000)]
Remove unneeded #includes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 22:15:30 +0000 (22:15 +0000)]
Remove GRStateManager::GetSValAsScalarOrLoc()/GetSVal().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74128
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 22:10:19 +0000 (22:10 +0000)]
We now support decltype (as far as I know :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74127
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 24 Jun 2009 22:09:44 +0000 (22:09 +0000)]
Backed out my last patch which caused a clang-test breakage. Will
look at it later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74126
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 21:24:56 +0000 (21:24 +0000)]
C++ decltype support (N2343)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74118
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 20:59:53 +0000 (20:59 +0000)]
Type::getDesugaredType needs to handle decltype types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74115
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 24 Jun 2009 19:24:38 +0000 (19:24 +0000)]
Added a missing else part to my previous patche(s).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74108
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 19:20:24 +0000 (19:20 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74107
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 19:19:18 +0000 (19:19 +0000)]
Reference the correct image...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 19:17:54 +0000 (19:17 +0000)]
Add scan-build screenshot for attribute 'nonnull' example.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74104
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 19:12:56 +0000 (19:12 +0000)]
Fix broken HTML tag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74103
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 19:12:07 +0000 (19:12 +0000)]
Remove reference to using 'clang' directly to analyze projects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74102
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 19:08:56 +0000 (19:08 +0000)]
Tighten screenshot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 19:06:50 +0000 (19:06 +0000)]
Add a DecltypeType type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 19:04:37 +0000 (19:04 +0000)]
Replace 'clang --analyze' example for attribute cf_returns_retained with screenshots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Jun 2009 18:50:14 +0000 (18:50 +0000)]
Replace 'clang --analyze' example (in text) with screenshot from scan-build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 17:47:40 +0000 (17:47 +0000)]
Parse the C++0x decltype specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 24 Jun 2009 17:37:55 +0000 (17:37 +0000)]
Update for LLVM API changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Jun 2009 17:12:15 +0000 (17:12 +0000)]
fix the type of wchar_t for windows, PR4417
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74083
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 24 Jun 2009 17:00:18 +0000 (17:00 +0000)]
Fix a clang crash caused by incorrect user code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74080
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Jun 2009 16:50:40 +0000 (16:50 +0000)]
Implement matching of function templates, so that one can declare overloaded function templates. C++ [temp.over.link] paragraphs 4-8.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 02:03:09 +0000 (02:03 +0000)]
Nested classes are now complete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74052
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 02:00:28 +0000 (02:00 +0000)]
Add test for [class.local]p2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74051
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 24 Jun 2009 01:12:41 +0000 (01:12 +0000)]
use a concrete type instead of a trait type to make code more readable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74047
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 24 Jun 2009 00:56:31 +0000 (00:56 +0000)]
RegionStore: revert to the default value approach for array initialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Jun 2009 00:54:41 +0000 (00:54 +0000)]
Make sure that the template parameter lists get from the parser down to ActOnFunctionDeclarator for function template definitions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 00:32:04 +0000 (00:32 +0000)]
class.nested.type is done.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74034
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 00:30:37 +0000 (00:30 +0000)]
Add test for [class.nested.type]p1
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74033
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 00:28:53 +0000 (00:28 +0000)]
Support for [class.local]p4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Jun 2009 00:23:40 +0000 (00:23 +0000)]
When declaring a function template, create a FunctionTemplateDecl node
and associate it with the FunctionDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Jun 2009 00:10:43 +0000 (00:10 +0000)]
[class.local] p1 and p3. Also, add back the xcodeproj file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Jun 2009 23:42:10 +0000 (23:42 +0000)]
Some changes to accomodate Doug's comment for
implicit copy constructor definition determination.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74025
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Jun 2009 23:11:28 +0000 (23:11 +0000)]
Start propagating template parameter lists to the right places to
handle function templates. There's no actual code for function
templates yet, but at least we complain about typedef templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Jun 2009 23:09:58 +0000 (23:09 +0000)]
Fix warning when building w/o asserts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74020
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 23 Jun 2009 22:01:48 +0000 (22:01 +0000)]
Introduce SourceManager::ísBeforeInTranslationUnit() which can compare 2 source locations and determine which one comes before the other, relative to the translation unit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 23 Jun 2009 22:01:39 +0000 (22:01 +0000)]
Move the command line source location parsing from clang-cc.cpp into "include/Frontend/CommandLineSourceLoc.h".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 23 Jun 2009 22:01:29 +0000 (22:01 +0000)]
Update CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74011
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Jun 2009 21:50:16 +0000 (21:50 +0000)]
Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74009
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Jun 2009 21:47:46 +0000 (21:47 +0000)]
Patch fixes an obscure bug when 'used' attribute is applied to
variables in ObjC's Next runtime mode. Next runtime also implicitly applies
'used' attribute on some of its meta-data. This results in two
'llvm.used' arrays to be generated, and one of them is renamed to
'llvm.used1'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74008
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Jun 2009 21:43:56 +0000 (21:43 +0000)]
Eliminate DeclPtrTy() arguments to ActOnDeclarator that are just a very, very weird way to pass "false". No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74007
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Jun 2009 21:37:46 +0000 (21:37 +0000)]
Remove GRStateManager::getRegion/getSelfRegion().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74006
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Jun 2009 20:38:51 +0000 (20:38 +0000)]
Remove GRStateManager::BindLoc() and GRStateManager::Unbind().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73996
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Jun 2009 20:27:53 +0000 (20:27 +0000)]
Remove GRStateManager::BindDecl() and GRStateManager::BindDeclWithInit().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73995
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Jun 2009 20:14:09 +0000 (20:14 +0000)]
Make sure that argument-dependent lookup looks into the global scope
when it should.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73992
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Jun 2009 18:17:08 +0000 (18:17 +0000)]
- Add MemRegion::getMemorySpace()
- Change implementation of MemRegion::hasStackStorage()/hasHeapStorage() to use
'getMemorySpace()'. This avoids a double traversal up the region hierarchy
and is simpler.
- Add MemRegion::hasHeapOrStackStorage() as a slightly more efficient
alternative to 'hasStackStorage() || hasHeapStorage()'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Jun 2009 18:15:28 +0000 (18:15 +0000)]
Fix some TableGen-related dependencies for the Clang CMake build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73976
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Jun 2009 18:05:21 +0000 (18:05 +0000)]
Move 'hasStackStorage()' and 'hasHeapStorage()' from MemRegionManager to MemRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73973
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Jun 2009 17:55:07 +0000 (17:55 +0000)]
API cleanup: move more methods from GRStateManager to GRState.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73968
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Jun 2009 17:14:59 +0000 (17:14 +0000)]
Remove old Xcode project. We can now automatically generate an Xcode project that compiles all of LLVM (not just Clang) using CMake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73960
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Jun 2009 16:54:53 +0000 (16:54 +0000)]
Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73958
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Jun 2009 15:45:29 +0000 (15:45 +0000)]
Add a test illustrating our current inability to properly cope with the point of instantation of a member function of a class template specialization
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73956
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Jun 2009 15:32:13 +0000 (15:32 +0000)]
New test for when the subexpressions within a typeid are potentially evaluated. We seem to be the only ones to get this right.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73955
91177308 -0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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