Ted Kremenek
75185b5872
Use utility method to create 0-index into ElementRegion.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75865 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 00:00:11 +00:00
Fariborz Jahanian
a8ded8be82
Fixed a stinko which caused an ast-print test failure.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 23:39:31 +00:00
Ted Kremenek
dbfe99ef39
Handle some more fallout with the conversion of using PointerType for
...
Objective-C pointers to using ObjCObjectPointerType.
Now the checking for 'attribute ((nonnull))' in Sema doesn't emit an error when
trying to apply that attribute to a parameter that is an Objective-C pointer
(this is a regression).
To prevent this regression from occuring in the future, the 'nonnull.c' test was
moved to test/SemaObjC and renamed 'nonnull.m'. I also enhanced the tests to
show that function calls involved a NULL Objective-C pointer constant does not
trigger a warning. This is consistent with GCC, but should likely be fixed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75856 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 23:23:54 +00:00
Fariborz Jahanian
7b6248766d
#ifdef'ed out -ast-print of destructors which caused
...
a test failure, until figuring out what caused the failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75855 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 23:22:45 +00:00
Fariborz Jahanian
560de45ccb
Added ASTs to destructor decl AST for default destruction of object's
...
base/members.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75849 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 22:34:08 +00:00
Ted Kremenek
fde2efe96e
Fix <rdar://problem/7062158> by having BasicStoreManager model values for 'static' global variables.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75844 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 22:09:25 +00:00
Ted Kremenek
b3b73642bf
Lexically order files in CMakeLists.txt files.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75832 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 21:08:41 +00:00
Daniel Dunbar
f7d47c04d0
Reapply r75764: [llvm up] Switch to using the new TargetRegistry
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75821 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 20:25:38 +00:00
Steve Naroff
0cdad6c58d
Remove cast from test case (cast was incorrectly added as part of http://llvm.org/viewvc/llvm-project?view=rev&revision=75314 ).
...
Add new warnings that are being produced.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 19:44:23 +00:00
Steve Naroff
c02397509b
Remove default argument, since it isn't being used (suggested by Fariborz).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75815 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 19:34:04 +00:00
Argyrios Kyrtzidis
93b33266db
Revert r75764 "[llvm up] Switch to using the new TargetRegistry" to fix build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75814 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 18:59:48 +00:00
Argyrios Kyrtzidis
5d51ae23e4
Add comments to indicate why RUN lines are below the source code.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 18:59:40 +00:00
Steve Naroff
f6265efe7e
Add a "t".
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75810 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 18:50:21 +00:00
Steve Naroff
de2e22d33a
Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective).
...
This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-).
This patch also adds Type::isObjCBuiltinType().
This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75808 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 18:40:39 +00:00
Dan Gohman
92db284169
Update for raw_fd_ostream API changes. raw_fd_ostream now has a
...
Force flag to control whether the case of opening an existing
file is considered an error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75802 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:32:18 +00:00
Daniel Dunbar
d065393638
Tweak svn:ignore
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 09:45:29 +00:00
Daniel Dunbar
0dcf11a9c5
[llvm up] Switch to using the new TargetRegistry.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75764 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 09:43:46 +00:00
Zhongxing Xu
785d29d9f2
Delete extra whitespaces.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 09:04:01 +00:00
Zhongxing Xu
6ce85ee2a7
rewrite the logic to make it follow the comments more closely.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75750 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 06:21:18 +00:00
Ted Kremenek
5bd2fe365f
Enhance RegionStore's reasoning about Objective-C ivars. More testing to follow.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 06:09:28 +00:00
Zhongxing Xu
d79bf559f5
Use utility method.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 05:09:24 +00:00
Zhongxing Xu
53363b26d2
Add getName() method to Entity.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 04:39:21 +00:00
Ted Kremenek
41fb0df17b
Relax assertion.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75738 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 04:23:32 +00:00
Ted Kremenek
a6275a534d
More test cases revealed that the logic in StoreManager::InvalidateRegion() needs more finesse when handling the invalidation of pointers. Pointers that were invalidated as integers could later cause problems for clients using them as pointers. It is easier for us to model a symbolic value as a pointer rather than modeling a non-symbolic value as a pointer.
...
This patch causes:
- StoreManager::InvalidateRegion() to not used the casted type of a region if
it would cause a pointer type to be invalidated as a non-pointer type.
- Pushes RegionStore::RetrieveElement() further by handling retrievals from
symbolic arrays that have been invalidated. This uses the new SymbolDerived
construct that was recently introduced.
The result is that the failing test in misc-ps-region-store-x86_64.m now passes.
Both misc-ps-region-store-x86_64.m and misc-ps-region-store-i386.m contain a
test case that motivated this change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75730 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 02:31:43 +00:00
Ted Kremenek
fb91c70e24
Introduced the notion of a "derived symbol" using the class SymbolDerived.
...
SymbolDerived allows us to model symbolic values that are related to other
symbols via a region hierarchy. For example, SymbolDerived can be used to model
individual values of a symbolic array.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75728 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 02:27:32 +00:00
Ted Kremenek
aa8bc7e977
Handle cast of 'ObjCObjectRegion' in StoreManager::InvalidateRegion.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75713 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:52:07 +00:00
Fariborz Jahanian
29146add4c
Added a FIXME and prevent crash when listing
...
a dependent type in the ctor initializer-list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75712 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:41:35 +00:00
Ted Kremenek
0c106995d5
Split out 'test2' into an i386 and x86_64 file, illustrating how the
...
test behavior differs between architectures. When this is no longer
the case, these tests will be merged.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:17:22 +00:00
Owen Anderson
a1cf15f468
Update for LLVM API change, and contextify a bunch of related stuff.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75705 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:10:40 +00:00
Ted Kremenek
b4aa4845b0
This test currently only passes for 32-bit archs.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75698 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 22:58:18 +00:00
Fariborz Jahanian
42a5217f14
Fixed a bug in building ctor-initializer AST.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75692 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 22:40:50 +00:00
Eli Friedman
ceb5c5b7f6
Remove -ftraditional option, which gcc doesn't actually support. Make
...
using -traditional and -traditional-cpp with clang an error because
it's unsupported in clang and causes a significant change in the
semantics of the language.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 21:58:17 +00:00
Devang Patel
6dba432c7b
Revert 75648 for now. It is causing test failures.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 21:31:22 +00:00
Ted Kremenek
60fbe8f798
Enhance RegionStoreManager to handle 'Retrieve's from SymbolicRegions. We do this by silently wrapping the region with an ElementRegion. This fixes the failures in misc-ps-region-store.m.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 20:48:22 +00:00
Chris Lattner
03eacc746c
fix fallout of the LLVM codegen switching to formatted_raw_ostream.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75675 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 20:39:15 +00:00
Ted Kremenek
7b679528c1
Tweak pretty-printing of CompoundVal to make it more useful for debugging.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75672 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 20:21:36 +00:00
Fariborz Jahanian
0849d38128
Build AST for default ctor-initializer when constructor has
...
out of line definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75668 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 20:06:22 +00:00
Fariborz Jahanian
9b9f424329
Support data members of array type in default
...
ctor-initializer AST build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75662 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 18:56:31 +00:00
Fariborz Jahanian
639dead9d6
Moved a FIXME to where it was meant to be.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75651 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 18:29:14 +00:00
Steve Naroff
58f9f2c884
Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris).
...
I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75650 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 18:25:06 +00:00
Fariborz Jahanian
d01c915dda
Patch to build AST for ctor's initializer list according to
...
semantics of order of construction [class.init].
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 18:24:21 +00:00
Chris Lattner
991b515cf1
[llvm up] adjust to match mainline.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75647 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 18:18:16 +00:00
Anders Carlsson
3d598a5ab3
Rename RecordLayout.h to ASTRecordLayout.h
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75641 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 17:29:11 +00:00
Daniel Dunbar
a1a5e8a160
Revert r75614 which depend on r75610 (for LLVM), which was reverted.
...
--- Reverse-merging r75614 into '.':
U lib/CodeGen/CGDebugInfo.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75639 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 16:40:28 +00:00
Steve Naroff
ea218b8e8f
Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella.
...
Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75635 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 14:58:18 +00:00
Alisdair Meredith
1a75ee2709
Fix the build
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75627 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 08:10:06 +00:00
Alisdair Meredith
f5c209d23b
Basic support for C++0x unicode types. Support for literals will follow in an incremental patch
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75622 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 06:30:34 +00:00
Chris Lattner
127bf31806
use new name for method.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 06:16:43 +00:00
Argyrios Kyrtzidis
58f6eafe6c
Move the RUN lines on the same file but below the code, as suggested by Sebastian.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75608 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 05:34:59 +00:00
Argyrios Kyrtzidis
ad42f06f99
In Stmt::printPretty(), pass the SourceManager to dump().
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 03:20:38 +00:00