]>
granicus.if.org Git - clang/log
Fariborz Jahanian [Tue, 30 Nov 2010 18:25:34 +0000 (18:25 +0000)]
Add objc_getClass as an objc builtin function
(// rdar://
8592641 ). Also rename LANGUAGEID to
LanguageID.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120437
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 30 Nov 2010 17:58:55 +0000 (17:58 +0000)]
L-value to r-value conversion is not ready for prime-time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 30 Nov 2010 17:35:24 +0000 (17:35 +0000)]
Such function decls,as objc's objc_msgSend, builtins in
a specific language. We are adding such language info. by
extensing Builtins.def and via a language flag added
to LIBBUILTIN/BUILTIN and check for that when deciding
a name is builtin or not. Implements //rdar://
8689273 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120429
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 30 Nov 2010 10:13:06 +0000 (10:13 +0000)]
Introduce an r-value to l-value cast kind. I'm not promising anything
about the reliability of this yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120422
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 30 Nov 2010 10:12:16 +0000 (10:12 +0000)]
Make the dumper safe against null declaration names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120421
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 30 Nov 2010 10:11:54 +0000 (10:11 +0000)]
Update Xcode project: remove Action.cpp, add DumpXML.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 30 Nov 2010 09:08:23 +0000 (09:08 +0000)]
System was renamed Support. Fix the build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120414
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 30 Nov 2010 07:50:28 +0000 (07:50 +0000)]
Take John McCall's suggestion and fix this silly gcc warnings in a way that
Doug isn't likely to rip back out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120409
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 30 Nov 2010 06:40:00 +0000 (06:40 +0000)]
I hate pointless default statements
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120402
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 30 Nov 2010 06:38:09 +0000 (06:38 +0000)]
Harden CGDebugInfo::CreateType() a bit for cases where we couldn't generate type info for its component types
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120401
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 30 Nov 2010 06:17:12 +0000 (06:17 +0000)]
Add missing file from last commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 30 Nov 2010 06:16:57 +0000 (06:16 +0000)]
When using a precompiled preamble with detailed preprocessing records,
trap the serialized preprocessing records (macro definitions, macro
instantiations, macro definitions) from the generation of the
precompiled preamble, then replay those when walking the list of
preprocessed entities. This eliminates a bug where clang_getCursor()
wasn't able to find preprocessed-entity cursors in the preamble.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120396
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 30 Nov 2010 06:04:54 +0000 (06:04 +0000)]
De-C99-ify for loop
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 30 Nov 2010 05:52:55 +0000 (05:52 +0000)]
Teach c-index-test to reparse the source file a few times when testing
clang_getCursor() via -cursor-at=??? and CINDEXTEST_EDITING is set in
the environment. This mirrors how we test code completion and
source-loading in the presence of this environment variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120392
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 30 Nov 2010 05:23:00 +0000 (05:23 +0000)]
When loading a precompiled preamble, use the file ID of the
precompiled preamble as the "main" source file's file ID within the
source manager. This makes compiling with a precompiled preamble
produce the same source locations as when compiling without the
precompiled preamble; prior to this change, we ended up with different
file IDs for source locations within the precompiled preamble
vs. those after the precompiled preamble, even for entities (e.g.,
preprocessing entities) in the same file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120390
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 30 Nov 2010 04:44:33 +0000 (04:44 +0000)]
Fix bug in r120299 spotted by dgregor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120389
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 30 Nov 2010 02:05:44 +0000 (02:05 +0000)]
Fix another case of giving the wrong value kind to a dependent cast to
a non-dependent type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120384
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 30 Nov 2010 01:47:38 +0000 (01:47 +0000)]
Replace \r\n with \n. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120379
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 30 Nov 2010 01:28:32 +0000 (01:28 +0000)]
Add a default clause to avoid this GCC warning:
Type.cpp:1000: warning: control reaches end of non-void function
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120376
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 29 Nov 2010 23:42:03 +0000 (23:42 +0000)]
Revert r120331 since it causes spurious warnings and a possible assertion hit when self-host.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 29 Nov 2010 23:18:09 +0000 (23:18 +0000)]
Incomplete enum types not to be treated as integer type
when checking for integer signed/unsigned-ness. PR8694,
// rdar://
8707031
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120345
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 29 Nov 2010 22:32:08 +0000 (22:32 +0000)]
Emit warnings if we are returning a reference to a local temporary.
The issue was brought to our attention by Matthieu Monrocq.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120331
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 29 Nov 2010 18:19:25 +0000 (18:19 +0000)]
Always use a function's decl context when building default arguments. Fixes http://http://llvm.org/pr8479.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120299
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 29 Nov 2010 18:12:39 +0000 (18:12 +0000)]
Merge System into Support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 29 Nov 2010 18:01:58 +0000 (18:01 +0000)]
Revert r120063, it was wrong.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120296
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 29 Nov 2010 17:45:20 +0000 (17:45 +0000)]
I hate default statements
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120293
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 29 Nov 2010 16:37:40 +0000 (16:37 +0000)]
Add a test for C++ [stmt.label]p1, from Sashan!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120291
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 29 Nov 2010 16:13:56 +0000 (16:13 +0000)]
When performing code completion within ASTUnit, allocate the AugmentedCodeCompleteConsumer on the heap, so it's always cleaned up properly
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120290
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 29 Nov 2010 16:04:58 +0000 (16:04 +0000)]
Teach the ASTImporter how to create CXXMethodDecls. Somehow, this case was missed previously
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120289
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Nov 2010 01:18:56 +0000 (01:18 +0000)]
test/CMakeLists.txt: Implement the target "check-all". For now, it has no dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120280
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Nov 2010 23:06:23 +0000 (23:06 +0000)]
Don't store the maximum alignment, we can trivially compute it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 28 Nov 2010 22:58:38 +0000 (22:58 +0000)]
Revert parts of r120266 that I did not mean to commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 28 Nov 2010 22:53:37 +0000 (22:53 +0000)]
Minor whitespace and comment fixes. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120266
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Nov 2010 19:18:44 +0000 (19:18 +0000)]
More work on laying out virtual bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 28 Nov 2010 18:44:10 +0000 (18:44 +0000)]
tighten up operator= to ensure we don't get multiple owners with the same FD.
wouldn't move ctors be nice? :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120255
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 28 Nov 2010 18:19:13 +0000 (18:19 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120254
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Nov 2010 17:53:32 +0000 (17:53 +0000)]
BuildVirtualCall doesn't need to take a reference to a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120252
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Nov 2010 17:50:09 +0000 (17:50 +0000)]
Make the destructor be the 'vtable anchor' of the CGCXXABI class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120251
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Nov 2010 17:49:03 +0000 (17:49 +0000)]
Move CGCXXABI functions to CGCXXABI.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120250
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Nov 2010 17:46:52 +0000 (17:46 +0000)]
Add a CGCXXABI.cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120249
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Nov 2010 16:40:49 +0000 (16:40 +0000)]
Look through parentheses when deciding whether an expr is a temporary object. Fixes PR8683.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120247
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 28 Nov 2010 07:20:14 +0000 (07:20 +0000)]
Add GCC 4.4.5 for Gentoo, and order them in a more sensible way. This allows
Gentoo systems with multiple versions to pick up the newest one first. This is
especially important with Gentoo because some of the older versions are left on
systems in strange states.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 28 Nov 2010 01:08:36 +0000 (01:08 +0000)]
Add missing else.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120231
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Fri, 26 Nov 2010 18:37:14 +0000 (18:37 +0000)]
Forgot a file in r120182
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Fri, 26 Nov 2010 16:28:07 +0000 (16:28 +0000)]
Allow access to non-static members without an object in sizeof expressions, in C++0x. Patch by Jakub Wieczorek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120182
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 26 Nov 2010 10:57:22 +0000 (10:57 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120180
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 09:14:07 +0000 (09:14 +0000)]
Do not use StripCasts() in this context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120178
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 09:07:38 +0000 (09:07 +0000)]
Should not use StripCasts() in this context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 08:52:48 +0000 (08:52 +0000)]
Rename CXXObjectRegion to CXXTempObjectRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 08:42:27 +0000 (08:42 +0000)]
fix a bug introduced in r120173.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 08:21:53 +0000 (08:21 +0000)]
Regionstore: support derived-to-base cast by creating a CXXBaseObjectRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 26 Nov 2010 07:15:40 +0000 (07:15 +0000)]
Add a fixme.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120172
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 25 Nov 2010 18:51:59 +0000 (18:51 +0000)]
Add C++ header path for openSUSE 11.4.
Patch by İsmail Dönmez.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 25 Nov 2010 18:29:30 +0000 (18:29 +0000)]
Hide a bunch of symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 25 Nov 2010 17:32:32 +0000 (17:32 +0000)]
OpaquePtrs are POD-like.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120148
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Nov 2010 06:35:14 +0000 (06:35 +0000)]
For CFGAutomaticObjDtor, the type may be reference type, e.g., const A &c = A();
Also apply some new coding style.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120144
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Nov 2010 03:18:57 +0000 (03:18 +0000)]
handle CXXFunctionalCastExpr in visitLValue and Environment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120143
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Nov 2010 02:52:17 +0000 (02:52 +0000)]
Improve comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120142
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Nov 2010 02:07:24 +0000 (02:07 +0000)]
Add dump method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120141
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 25 Nov 2010 01:59:35 +0000 (01:59 +0000)]
Begin work on actually laying out virtual bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120140
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 25 Nov 2010 01:52:05 +0000 (01:52 +0000)]
Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 25 Nov 2010 01:51:53 +0000 (01:51 +0000)]
Move isNearlyEmpty out into the ASTContext so it can be called from CodeGen as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 25 Nov 2010 01:15:00 +0000 (01:15 +0000)]
Basic: add log2{,f,l}, round{,f,l} builtins
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 25 Nov 2010 00:35:20 +0000 (00:35 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120135
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 23:20:19 +0000 (23:20 +0000)]
Remove the PrimaryBaseInfo class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 23:12:57 +0000 (23:12 +0000)]
Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 23:04:03 +0000 (23:04 +0000)]
Move code off the primary base info iterator. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 22:55:48 +0000 (22:55 +0000)]
Use the newly added function in ASTRecordLayoutBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 22:55:29 +0000 (22:55 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120130
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 22:50:27 +0000 (22:50 +0000)]
Add CXXRecordDecl::getIndirectPrimaryBases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120129
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 21:53:50 +0000 (21:53 +0000)]
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120118
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 21:05:09 +0000 (21:05 +0000)]
Fix a (probably very old) regression where we weren't using the typedef name for anonymous tag types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120113
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 20:22:04 +0000 (20:22 +0000)]
Revert r120110. We don't want to call ConvertType from within getCGRecordLayout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120112
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 20:05:21 +0000 (20:05 +0000)]
Use ConvertType instead of ConvertTagDeclType, since ConvertType will assign a name to the type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120110
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 19:57:04 +0000 (19:57 +0000)]
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120109
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 19:52:29 +0000 (19:52 +0000)]
Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120108
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 19:51:04 +0000 (19:51 +0000)]
Make CodeGenTypes::getCGRecordLayout compute the layout lazily if it doesn't exist. This matches ASTContext::getASTRecordLayout and is less confusing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120107
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Nov 2010 19:37:16 +0000 (19:37 +0000)]
CGRecordLayout types are always struct types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 24 Nov 2010 13:48:50 +0000 (13:48 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120094
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 24 Nov 2010 13:08:51 +0000 (13:08 +0000)]
Let StackFrameContext represent if the call expr is evaluated as lvalue.
This is required for supporting const reference to temporary objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120093
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Nov 2010 11:53:13 +0000 (11:53 +0000)]
Appease versions of GCC which don't correctly support injected class
names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120091
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Nov 2010 11:30:07 +0000 (11:30 +0000)]
This is probably an important file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120089
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Nov 2010 11:21:45 +0000 (11:21 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 24 Nov 2010 08:53:20 +0000 (08:53 +0000)]
Use StackFrameContext directly in CallEnter program point. Then we don't need
to remake the stackframe everytime in GRExprEngine::ProcessCallEnter().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 24 Nov 2010 06:33:02 +0000 (06:33 +0000)]
print asLValue attribute of CFGStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120086
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Nov 2010 05:12:34 +0000 (05:12 +0000)]
Switch a lot of call-sites over to using the new value-kind calculations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120084
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Wed, 24 Nov 2010 03:33:10 +0000 (03:33 +0000)]
Improve comments in Clang static analyzer, based on kremenek's
explanation on how things work there. Reviewed by kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120081
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Wed, 24 Nov 2010 03:28:53 +0000 (03:28 +0000)]
Refactor AddStmtChoice to make it easier to use; also add comments on how the class works. Reviewed by kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120080
91177308 -0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Wed, 24 Nov 2010 03:07:43 +0000 (03:07 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Wed, 24 Nov 2010 01:47:11 +0000 (01:47 +0000)]
Add an assert() to catch errors using EvalLoad(). Reviewed by kremenek.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120073
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Nov 2010 00:54:37 +0000 (00:54 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 24 Nov 2010 00:32:51 +0000 (00:32 +0000)]
Unbreak clang-interpreter. (Should there be some automated testing for this?)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120069
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 22:32:37 +0000 (22:32 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120066
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 23 Nov 2010 22:03:51 +0000 (22:03 +0000)]
Redeclarations of using declarations are not okay in function scopes.
Not sure what I was thinking before.
Fixes PR8668.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120063
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 21:53:56 +0000 (21:53 +0000)]
if we succeed in opening a directory but expected a file, ensure we don't
leak a filedescriptor if a client ever starts returning one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 21:53:15 +0000 (21:53 +0000)]
hopefully resolve the windows buildbot issue (retch)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120061
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 21:17:56 +0000 (21:17 +0000)]
change the 'is directory' indicator to be a null-or-not
pointer that is passed down through the APIs, and make
FileSystemStatCache::get be the one that filters out
directory lookups that hit files. This also paves the
way to have stat queries be able to return opened files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120060
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Nov 2010 20:50:22 +0000 (20:50 +0000)]
pull "is directory" handling into FileManager::getStatValue
which simplifies clients and is important for future directions.
Add a FD member to FileEntry which isn't used but will be shortly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120056
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 23 Nov 2010 20:48:44 +0000 (20:48 +0000)]
A few tweaks to the value-kind computation:
- Default argument expressions pick up the value kind of the incoming
expression, not the value kind of the parameter it initializes.
- When building a template argument for substitution, A::x is an rvalue
if x is an instance method.
- Anonymous struct/union paths pick up value kind the same way that
normal member accesses do; extract out a common code path for this.
Enable the value-kind assertion, now that it passes self-host.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120055
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 23 Nov 2010 20:45:58 +0000 (20:45 +0000)]
Remove static_casts from SemaDeclAttr.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120053
91177308 -0d34-0410-b5e6-
96231b3b80d8