]> granicus.if.org Git - clang/log
clang
15 years agoExplicit braces to avoid ambiguous ‘else’.
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

15 years agoremove RegionKills GDM. Now UnknownVal is bound to regions explicitly.
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

15 years agoMove element region retrieving logic into a separate function.
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

15 years agoMake sure install Clang headers when building clang-cc
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

15 years agoAdd missing dependencies to the CMake build system
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

15 years agoMove all logic for retrieving ElementRegion binding into a separate method.
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

15 years agoRemove uses of std::ostream from libAnalysis.
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

15 years agoRemove unneeded #includes.
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

15 years agoRemove GRStateManager::GetSValAsScalarOrLoc()/GetSVal().
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

15 years agoWe now support decltype (as far as I know :)
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

15 years agoBacked out my last patch which caused a clang-test breakage. Will
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

15 years agoC++ decltype support (N2343)
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

15 years agoType::getDesugaredType needs to handle decltype types.
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

15 years agoAdded a missing else part to my previous patche(s).
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

15 years agoFix typo.
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

15 years agoReference the correct image...
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

15 years agoAdd scan-build screenshot for attribute 'nonnull' example.
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

15 years agoFix broken HTML tag.
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

15 years agoRemove reference to using 'clang' directly to analyze projects.
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

15 years agoTighten screenshot.
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

15 years agoAdd a DecltypeType type.
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

15 years agoReplace 'clang --analyze' example for attribute cf_returns_retained with screenshots.
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

15 years agoReplace 'clang --analyze' example (in text) with screenshot from scan-build.
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

15 years agoParse the C++0x decltype specifier.
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

15 years agoUpdate for LLVM API changes.
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

15 years agofix the type of wchar_t for windows, PR4417
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

15 years agoFix a clang crash caused by incorrect user code.
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

15 years agoImplement matching of function templates, so that one can declare overloaded function...
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

15 years agoNested classes are now complete.
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

15 years agoAdd test for [class.local]p2.
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

15 years agouse a concrete type instead of a trait type to make code more readable.
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

15 years agoRegionStore: revert to the default value approach for array initialization.
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

15 years agoMake sure that the template parameter lists get from the parser down to ActOnFunction...
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

15 years agoclass.nested.type is done.
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

15 years agoAdd test for [class.nested.type]p1
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

15 years agoSupport for [class.local]p4.
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

15 years agoWhen declaring a function template, create a FunctionTemplateDecl node
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

15 years ago[class.local] p1 and p3. Also, add back the xcodeproj file.
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

15 years agoSome changes to accomodate Doug's comment for
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

15 years agoStart propagating template parameter lists to the right places to
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

15 years agoFix warning when building w/o asserts.
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

15 years agoIntroduce SourceManager::ísBeforeInTranslationUnit() which can compare 2 source locat...
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

15 years agoMove the command line source location parsing from clang-cc.cpp into "include/Fronten...
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

15 years agoUpdate CMakeLists.txt
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

15 years agoFix build.
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

15 years agoPatch fixes an obscure bug when 'used' attribute is applied to
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

15 years agoEliminate DeclPtrTy() arguments to ActOnDeclarator that are just a very, very weird...
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

15 years agoRemove GRStateManager::getRegion/getSelfRegion().
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

15 years agoRemove GRStateManager::BindLoc() and GRStateManager::Unbind().
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

15 years agoRemove GRStateManager::BindDecl() and GRStateManager::BindDeclWithInit().
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

15 years agoMake sure that argument-dependent lookup looks into the global scope
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

15 years ago- Add MemRegion::getMemorySpace()
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

15 years agoFix some TableGen-related dependencies for the Clang CMake build
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

15 years agoMove 'hasStackStorage()' and 'hasHeapStorage()' from MemRegionManager to MemRegion.
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

15 years agoAPI cleanup: move more methods from GRStateManager to GRState.
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

15 years agoRemove old Xcode project. We can now automatically generate an Xcode project that...
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

15 years agoUpdate CMake file.
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

15 years agoAdd a test illustrating our current inability to properly cope with the point of...
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

15 years agoNew test for when the subexpressions within a typeid are potentially evaluated. We...
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

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