Commit Graph

27022 Commits

Author SHA1 Message Date
Sebastian Redl 002a3c506a Forgot a file in r120182
llvm-svn: 120184
2010-11-26 18:37:14 +00:00
Sebastian Redl 346203105f Allow access to non-static members without an object in sizeof expressions, in C++0x. Patch by Jakub Wieczorek.
llvm-svn: 120182
2010-11-26 16:28:07 +00:00
John McCall 29ac8e2ecd For internal consistency's sake, compute the value kind of a dependent cast
based on the known properties of the casted-to type.  Fixes a crash on spirit.

llvm-svn: 120180
2010-11-26 10:57:22 +00:00
Zhongxing Xu e1e8565cd9 Do not use StripCasts() in this context.
llvm-svn: 120178
2010-11-26 09:14:07 +00:00
Zhongxing Xu 5afc4d80c7 Should not use StripCasts() in this context.
llvm-svn: 120177
2010-11-26 09:07:38 +00:00
Zhongxing Xu 032071688b Rename CXXObjectRegion to CXXTempObjectRegion.
llvm-svn: 120176
2010-11-26 08:52:48 +00:00
Zhongxing Xu 3b2666ab19 fix a bug introduced in r120173.
llvm-svn: 120175
2010-11-26 08:42:27 +00:00
Zhongxing Xu ec0b8e32ee Regionstore: support derived-to-base cast by creating a CXXBaseObjectRegion.
llvm-svn: 120173
2010-11-26 08:21:53 +00:00
Zhongxing Xu e23ab6fae2 Add a fixme.
llvm-svn: 120172
2010-11-26 07:15:40 +00:00
Rafael Espindola 596402a87c Add C++ header path for openSUSE 11.4.
Patch by İsmail Dönmez.

llvm-svn: 120154
2010-11-25 18:51:59 +00:00
Benjamin Kramer 90b5b68535 Hide a bunch of symbols.
llvm-svn: 120153
2010-11-25 18:29:30 +00:00
Benjamin Kramer faec0b3c74 OpaquePtrs are POD-like.
llvm-svn: 120148
2010-11-25 17:32:32 +00:00
Zhongxing Xu 16278859e8 For CFGAutomaticObjDtor, the type may be reference type, e.g., const A &c = A();
Also apply some new coding style.

llvm-svn: 120144
2010-11-25 06:35:14 +00:00
Zhongxing Xu 33f13595c9 handle CXXFunctionalCastExpr in visitLValue and Environment.
llvm-svn: 120143
2010-11-25 03:18:57 +00:00
Zhongxing Xu 7514633c26 Improve comments.
llvm-svn: 120142
2010-11-25 02:52:17 +00:00
Zhongxing Xu be83a3aeca Add dump method.
llvm-svn: 120141
2010-11-25 02:07:24 +00:00
Anders Carlsson 1f95ee3016 Begin work on actually laying out virtual bases.
llvm-svn: 120140
2010-11-25 01:59:35 +00:00
Anders Carlsson 61ad508bce Update Xcode project.
llvm-svn: 120138
2010-11-25 01:52:05 +00:00
Anders Carlsson 60a6263ee8 Move isNearlyEmpty out into the ASTContext so it can be called from CodeGen as well.
llvm-svn: 120137
2010-11-25 01:51:53 +00:00
Peter Collingbourne 640cdae167 Basic: add log2{,f,l}, round{,f,l} builtins
llvm-svn: 120136
2010-11-25 01:15:00 +00:00
Nick Lewycky ef4f456866 Tie DefineVTablesUsed() in with recursive function instantiation so that we emit
a useful template instantiation stack. Fixes PR8640.

This also causes a slight change to where the "instantianted from" note shows up
in truly esoteric cases (see the change to test/SemaCXX/destructor.cpp), but
that isn't directly the fault of this patch.

llvm-svn: 120135
2010-11-25 00:35:20 +00:00
Anders Carlsson 19bda8af16 Remove the PrimaryBaseInfo class.
llvm-svn: 120134
2010-11-24 23:20:19 +00:00
Anders Carlsson 7f95cd1817 Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.
llvm-svn: 120133
2010-11-24 23:12:57 +00:00
Anders Carlsson cadbc463e2 Move code off the primary base info iterator. No functionality change.
llvm-svn: 120132
2010-11-24 23:04:03 +00:00
Anders Carlsson 5adde29d86 Use the newly added function in ASTRecordLayoutBuilder.
llvm-svn: 120131
2010-11-24 22:55:48 +00:00
Anders Carlsson abb3b21b3b Fix typo.
llvm-svn: 120130
2010-11-24 22:55:29 +00:00
Anders Carlsson 4131f00a1f Add CXXRecordDecl::getIndirectPrimaryBases.
llvm-svn: 120129
2010-11-24 22:50:27 +00:00
Anders Carlsson 72b1968d92 Simplify code.
llvm-svn: 120118
2010-11-24 21:53:50 +00:00
Anders Carlsson 0c75b49dc1 Fix a (probably very old) regression where we weren't using the typedef name for anonymous tag types.
llvm-svn: 120113
2010-11-24 21:05:09 +00:00
Anders Carlsson 0e4dfebe63 Revert r120110. We don't want to call ConvertType from within getCGRecordLayout.
llvm-svn: 120112
2010-11-24 20:22:04 +00:00
Anders Carlsson 449bbc5bde Use ConvertType instead of ConvertTagDeclType, since ConvertType will assign a name to the type.
llvm-svn: 120110
2010-11-24 20:05:21 +00:00
Anders Carlsson 6277615cbb Simplify code.
llvm-svn: 120109
2010-11-24 19:57:04 +00:00
Anders Carlsson c5bcaa373b Fix build.
llvm-svn: 120108
2010-11-24 19:52:29 +00:00
Anders Carlsson 63e0f2050f Make CodeGenTypes::getCGRecordLayout compute the layout lazily if it doesn't exist. This matches ASTContext::getASTRecordLayout and is less confusing.
llvm-svn: 120107
2010-11-24 19:51:04 +00:00
Anders Carlsson 36e2fa8209 CGRecordLayout types are always struct types.
llvm-svn: 120106
2010-11-24 19:37:16 +00:00
Zhongxing Xu 8be65a792f When getting CXXThisRegion from CXXMethodDecl, use the qualifiers. This is
to be consistent with the type of 'this' expr in the method.
此行及以下内容将会被忽略--

M    test/Analysis/method-call.cpp
M    include/clang/Checker/PathSensitive/GRExprEngine.h
M    lib/Checker/GRCXXExprEngine.cpp

llvm-svn: 120094
2010-11-24 13:48:50 +00:00
Zhongxing Xu a1a9ba11b7 Let StackFrameContext represent if the call expr is evaluated as lvalue.
This is required for supporting const reference to temporary objects.

llvm-svn: 120093
2010-11-24 13:08:51 +00:00
John McCall f6d24ae091 Appease versions of GCC which don't correctly support injected class
names.

llvm-svn: 120091
2010-11-24 11:53:13 +00:00
John McCall 2a80a9e3d3 This is probably an important file.
llvm-svn: 120089
2010-11-24 11:30:07 +00:00
John McCall 9b66c4bbbe Add -cc1 -ast-dump-xml, an excessively detailed XML dump of the internals
of the ASTs.  Only available in assertions builds.  No stability guarantee.

This is intended solely as a debugging tool.  I'm not sure if the goals
are sufficiently aligned with the XML printer to allow a common
implementation.

Currently just falls back on the StmtDumper to display statements,
which means it doesn't produce valid XML in those cases.

llvm-svn: 120088
2010-11-24 11:21:45 +00:00
Zhongxing Xu cb29802198 Use StackFrameContext directly in CallEnter program point. Then we don't need
to remake the stackframe everytime in GRExprEngine::ProcessCallEnter().

llvm-svn: 120087
2010-11-24 08:53:20 +00:00
Zhongxing Xu 9b6e6b087f print asLValue attribute of CFGStmt.
llvm-svn: 120086
2010-11-24 06:33:02 +00:00
John McCall 086a464e24 Switch a lot of call-sites over to using the new value-kind calculations.
llvm-svn: 120084
2010-11-24 05:12:34 +00:00
Zhanyong Wan e2ea8bf945 Improve comments in Clang static analyzer, based on kremenek's
explanation on how things work there.  Reviewed by kremenek.

llvm-svn: 120081
2010-11-24 03:33:10 +00:00
Zhanyong Wan b5d11c127a Refactor AddStmtChoice to make it easier to use; also add comments on how the class works. Reviewed by kremenek.
llvm-svn: 120080
2010-11-24 03:28:53 +00:00
Francois Pichet 31ee8bfb0e Fix 2 problems with Chris Lattner's FileManager redesign on Windows.
- FileEntry::operator= is needed on Win32.
- There was an error in the S_ISDIR() macro.

llvm-svn: 120079
2010-11-24 03:07:43 +00:00
Zhanyong Wan 8e82c6372a Add an assert() to catch errors using EvalLoad(). Reviewed by kremenek.
llvm-svn: 120073
2010-11-24 01:47:11 +00:00
Ted Kremenek b3b56c6bcd Adjust method calls to reflect name changes in
ImmutableSet/ImmtuableMap/ImmutableList APIs.

Along the way, clean up some method names in
the static analyzer so that they are more
descriptive and/or start with lowercase letters.

llvm-svn: 120071
2010-11-24 00:54:37 +00:00
Eli Friedman 9e7baae0c6 Unbreak clang-interpreter. (Should there be some automated testing for this?)
llvm-svn: 120069
2010-11-24 00:32:51 +00:00
Chris Lattner 5ea7d07d2a The final result of all this refactoring: instead of doing stat immediately
followed by an open for every source file we open, probe the file system with
'open' and then do an fstat when it succeeds.  open+fstat is faster than
stat+open because the kernel only has to perform the string->inode mapping
once.  Presumably it gets faster the deeper in your filesystem a lookup
happens.

For -Eonly on cocoa.h, this reduces system time from 0.042s to 0.039s on
my machine, a 7.7% speedup.

llvm-svn: 120066
2010-11-23 22:32:37 +00:00