]>
granicus.if.org Git - clang/log
Ted Kremenek [Thu, 25 Mar 2010 03:59:09 +0000 (03:59 +0000)]
Fix '+=' accumulation error when parsing numeric amounts in a format string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99479
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 25 Mar 2010 02:56:08 +0000 (02:56 +0000)]
Properly instantiate and link in friend-class-template declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 25 Mar 2010 02:00:39 +0000 (02:00 +0000)]
Add c-index-test support for printing USRs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 25 Mar 2010 02:00:36 +0000 (02:00 +0000)]
Require that all Clang-based USRs start with the prefix 'c:' for the "USR space".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 25 Mar 2010 01:39:39 +0000 (01:39 +0000)]
Add methods to remove a GDM entry.
Instead of setting the ReturnExpr GDM to NULL, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 25 Mar 2010 00:51:13 +0000 (00:51 +0000)]
More address point map shuffling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99462
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 25 Mar 2010 00:35:49 +0000 (00:35 +0000)]
Shuffle some code around; this will make it easier to use the new layout code for address points.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99461
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Mar 2010 00:20:38 +0000 (00:20 +0000)]
Kill off two more uses of Sema::CheckReferenceInit in favor of the new
initialization code. Exposed a bug where we were not marking an
implicit conversion as an lvalue when we were forming a call to a
conversion function whose return type is a reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99459
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 23:38:29 +0000 (23:38 +0000)]
Switch static_cast from the old reference-initialization code (via
CheckReferenceInit) over to the new initialization code
(InitializationSequence), which is better-tested and doesn't require
us to compute the entire conversion sequence twice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 23:19:27 +0000 (23:19 +0000)]
Check for ret, so that we know we hit the end of the function
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 23:14:04 +0000 (23:14 +0000)]
When returning from a function that has a reference return type, use
EmitReferenceBindingToExpr() rather than assuming we have an
lvalue. This is just the lowest hanging fruit for PR6024, which still
requires a bit of work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 24 Mar 2010 22:43:31 +0000 (22:43 +0000)]
Discussing with dgregor we decided that we should not force the emission of
implicit methods on explicit template instantiation definitions. As a
consequence, we should emit them at every use, even if we see a explicit
template instantiation declaration.
This is already the current behaviour, but it is good to test for that :-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99443
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Mar 2010 22:39:47 +0000 (22:39 +0000)]
Use llvm::SmallString instead of std::string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99442
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Mar 2010 22:39:45 +0000 (22:39 +0000)]
Improve static analyzer diagnostic concerning the use of 'mktemp'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 21:52:55 +0000 (21:52 +0000)]
make the vtable tester a little friendlier, with a clean target and without requiring . to be in your path
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 21:22:47 +0000 (21:22 +0000)]
When pulling apart an initializer that involves a CXXConstructExpr, do
not pick apart a CXXTemporaryObjectExpr because such an object
construction was explicitly written in the source code. Fixes PR6657.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99427
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 21:04:06 +0000 (21:04 +0000)]
Make sure that we have File IDs for all of the unsaved files before we
deserialize diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99426
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 24 Mar 2010 21:00:27 +0000 (21:00 +0000)]
Allow conversion of qualified Class type to unqualified
Class type to match gcc's. Fixes radar
7789113 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 20:45:20 +0000 (20:45 +0000)]
XFAIL the -nostdinc++ test on Windows; it doesn't look like we even have the notion of separate C and C++ paths there
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99422
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 20:42:51 +0000 (20:42 +0000)]
Control warnings about GNU extensions with -Wgnu, which has a subgroup
for GNU designated-initializer syntax (-Wgnu-designator).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99421
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 20:13:48 +0000 (20:13 +0000)]
Implement support for -nostdc++. Fixes PR6446.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99417
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 24 Mar 2010 18:08:23 +0000 (18:08 +0000)]
Improve diagnostics when ivar added to class
extension (radar
6812436 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99408
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 17:31:23 +0000 (17:31 +0000)]
Silently drop dependent friend function template specializations,
since we have absolutely no way to match them when they are declared
nor do we have a way to represent these parsed-but-not-checked friend
declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 16:59:08 +0000 (16:59 +0000)]
Change two class forward declarations to struct forward declarations, silencing a Clang warning
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99405
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 24 Mar 2010 16:57:01 +0000 (16:57 +0000)]
Code gen for multi-dimensional dynamic allocations.
Fixes PR6641.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99404
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 16:42:11 +0000 (16:42 +0000)]
More vtable improvements. We now compute and keep track of all vtable related information which avoids computing the same vtable layout over and over.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99403
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Mar 2010 09:04:37 +0000 (09:04 +0000)]
Walk out of enums when determining effective context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99391
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Mar 2010 08:27:58 +0000 (08:27 +0000)]
Correct that last fixit: if the user wrote
template <> friend void foo(int);
we need to change it to
friend void foo<>(int);
or else the user won't get the template specialization they obviously want.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99390
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Mar 2010 07:46:06 +0000 (07:46 +0000)]
Support friend function specializations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99389
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 07:14:45 +0000 (07:14 +0000)]
When a declaration of a function is missing an exception specification
that was present in a prior declaration, emit a warning rather than a
hard error (which we did before, and still do with mismatched
exception specifications). Moreover, provide a fix-it hint with the
throw() clause that should be added, e.g.,
t.C:10:7: warning: 'operator new' is missing exception specification
'throw(std::bad_alloc)'
void *operator new(unsigned long sz)
^
throw(std::bad_alloc)
As part of this, disable the warning when we're missing an exception
specification on operator new, operator new[], operator delete, or
operator delete[] when exceptions are turned off (-fno-exceptions).
Fixes PR5957.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99388
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 05:32:05 +0000 (05:32 +0000)]
Use getNamedGlobal instead of getGlobalVariable. (Fixes self-host).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99385
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 05:31:31 +0000 (05:31 +0000)]
Make the license header in smmintrin.h match the other SSE headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99384
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 24 Mar 2010 05:22:00 +0000 (05:22 +0000)]
Implement a framework for the delay of arbitrary diagnostics within
templates. So delay access-control diagnostics when (for example) the target
of a friend declaration is a specific specialization of a template.
I was surprised to find that this was required for an access-controlled selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99383
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 05:07:21 +0000 (05:07 +0000)]
When performing name lookup for the allocation or deallocation
operators, make sure that the implicitly-declared global new and
delete operators are always available. Fixes PR5904.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99382
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 03:57:14 +0000 (03:57 +0000)]
More vtable work; preparations for moving over to the new vtable layout code (finally).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99381
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 01:33:17 +0000 (01:33 +0000)]
Each non-local class instantiation is its own local instantiation
scope. Fixes PR6619.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99377
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 00:57:54 +0000 (00:57 +0000)]
Remove old thunks code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99374
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Mar 2010 00:46:35 +0000 (00:46 +0000)]
Make sure to properly track the anonymous namespace that lives inside
each namespace, even when the outer namespace has multiple
definitions. As part of this, collapsed two pointers worth of storage
(original namespace and inner anonymous namespace) into a single
pointer with a distinguishing bit, since the two are mutually
exclusive, saving a pointer per NamespaceDecl. Fixes PR6620.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 00:41:37 +0000 (00:41 +0000)]
Flip the switch and use the new vtable layout code for thunks by default. Add a thunks.cpp test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99367
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 00:39:18 +0000 (00:39 +0000)]
Add CodeGenFunction::GenerateThunk and implement it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 00:35:44 +0000 (00:35 +0000)]
Minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 24 Mar 2010 00:32:03 +0000 (00:32 +0000)]
Remove parts of virt.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Mar 2010 23:47:56 +0000 (23:47 +0000)]
Implement computation of the final overriders for each virtual
function within a class hierarchy (C++ [class.virtual]p2).
We use the final-overrider computation to determine when a particular
class is ill-formed because it has multiple final overriders for a
given virtual function (e.g., because two virtual functions override
the same virtual function in the same virtual base class). Fixes
PR5973.
We also use the final-overrider computation to determine which virtual
member functions are pure when determining whether a class is
abstract or diagnosing the improper use of an abstract class. The
prior approach to determining whether there were any pure virtual
functions in a class didn't cope with virtual base class subobjects
properly, and could not easily be fixed to deal with the oddities of
subobject hiding. Fixes PR6631.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Mar 2010 20:23:06 +0000 (20:23 +0000)]
Add some missing files to xcode project
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 23 Mar 2010 19:55:22 +0000 (19:55 +0000)]
revert 99311. Looks like it broke darwin bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99317
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Mar 2010 19:02:22 +0000 (19:02 +0000)]
Improve diagnostic for @property/ivar type mismatch by including the types of the
ivar and @property respectively.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99312
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 23 Mar 2010 18:56:16 +0000 (18:56 +0000)]
Avoid producing implicit methods when we have a explicit template instantiation
declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Mar 2010 18:43:00 +0000 (18:43 +0000)]
Code gen for compound assignment of complex
types using property syntax to access setter/getters.
(also radar
7351147 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 18:18:41 +0000 (18:18 +0000)]
More work on thunks - don't assert if there's a variable with the same name as the thunk already.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 23 Mar 2010 18:08:50 +0000 (18:08 +0000)]
Patch to implement code gen. use of compound assignent on
properties of complex type. Radar
7351147 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99299
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 17:17:29 +0000 (17:17 +0000)]
More thunks scaffolding.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99294
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 16:36:50 +0000 (16:36 +0000)]
More work on thunks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99287
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 23 Mar 2010 15:26:55 +0000 (15:26 +0000)]
When recovering from a qualified typedef name, don't clear out the
DeclContext because we don't want a NULL DeclContext. Instead, use the
current context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99281
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 15:17:13 +0000 (15:17 +0000)]
Move ThunkInfo as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99280
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 15:13:06 +0000 (15:13 +0000)]
Move ReturnAdjustment and ThisAdjustment out into CGVtable.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99279
91177308 -0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 23 Mar 2010 14:44:19 +0000 (14:44 +0000)]
Ignore a more comprehensive set of gcc-special format attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99277
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 09:13:17 +0000 (09:13 +0000)]
Bind the constructed object value to CXXConstructExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99271
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 08:14:19 +0000 (08:14 +0000)]
update CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99269
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 08:09:29 +0000 (08:09 +0000)]
Clear the return expr GDM after using it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 07:32:14 +0000 (07:32 +0000)]
Add a AggExprVisitor class. It contains lots of boiler
plate code for evaluating expressions of C++ class type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 05:15:24 +0000 (05:15 +0000)]
Use the canonical destructor, which fixes the self-host build. Thanks to Eli for noticing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99260
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 05:13:26 +0000 (05:13 +0000)]
merge line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99259
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Mar 2010 05:09:16 +0000 (05:09 +0000)]
Frontend: Don't free the CompilerInstance or FrontendActions when running under
-disable-free. Among other things, this fixes freeing of the LLVM module on
exit.
- Note that this means we are disable-free'ing of a lot more stuff than we used to -- this should flush out bugs in anything left that is trying to do real work in its destructor. I did a mini-audit but '::~' is not totally uncommon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Mar 2010 05:09:10 +0000 (05:09 +0000)]
PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 23 Mar 2010 05:05:02 +0000 (05:05 +0000)]
Since we now may have basicblocks with the same block is in different function,
change the block counter map from unsigned -> unsigned to
<StackFrameContext*, unsigned> -> unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99255
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 04:59:02 +0000 (04:59 +0000)]
Baby steps towards making thunks be emitted from the new vtable layout code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99254
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 04:44:10 +0000 (04:44 +0000)]
Some renames.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99253
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 04:31:31 +0000 (04:31 +0000)]
Always emit associated thunks when emitting the function itself. Remove getVtableAddressPoint, it's not used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99252
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 04:15:00 +0000 (04:15 +0000)]
Rename MaybeEmitVtable to EmitVTableRelatedData in preparation for making it emit thunks as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99251
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 23 Mar 2010 04:11:45 +0000 (04:11 +0000)]
Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99250
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Mar 2010 01:37:12 +0000 (01:37 +0000)]
For forward-declared static inline functions, delay CFG-based warnings until we
encounter a definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99243
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Mar 2010 01:11:38 +0000 (01:11 +0000)]
Tweak null dereference diagnostics to give clearer diagnostics when
a null dereference results from a field access.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Mar 2010 00:13:23 +0000 (00:13 +0000)]
Only perform CFG-based warnings on 'static inline' functions that
are called (transitively) by regular functions/blocks within a
translation untion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Mar 2010 23:25:52 +0000 (23:25 +0000)]
Set the relevent attributes declared in class extension
and fix a missing diagnostics on assigning to a read-only
property. Fixes radar
7766184 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99230
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 22 Mar 2010 23:12:48 +0000 (23:12 +0000)]
A fixed version of r99174 which also includes a test that we emit vtables when
we see an specialization definition ever if we then see a extern template declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99226
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 22 Mar 2010 22:32:05 +0000 (22:32 +0000)]
Disable the emission of frontend warnings (not errors) under --analyze.
Fixes <rdar://problem/
7405601 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99222
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 22 Mar 2010 22:16:26 +0000 (22:16 +0000)]
Improve the diagnostics for the UndefinedAssignmentChecker when an
uninitialized value is used in the LHS of a compound assignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99221
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Mar 2010 21:28:29 +0000 (21:28 +0000)]
Comment the reasons for the strange little dance we do with the main file name for debug information
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99215
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 21:08:50 +0000 (21:08 +0000)]
(re)implement PR6542, accepting and discarding the __gcc_tdiag__
format attribute specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99213
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 21:05:15 +0000 (21:05 +0000)]
merge some tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 21:02:58 +0000 (21:02 +0000)]
rename test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Mar 2010 21:02:34 +0000 (21:02 +0000)]
Diagnose miuse of property dot-syntax instead of crashing.
(radar
7634653 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99210
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 21:02:14 +0000 (21:02 +0000)]
merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99209
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 21:01:10 +0000 (21:01 +0000)]
rename test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99208
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 20:59:10 +0000 (20:59 +0000)]
revert r98661, gcc_tdiag is not an attribute (PR6542).
Will fix correctly now that I have a testcase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99207
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 20:31:04 +0000 (20:31 +0000)]
move a test to a more appropriate directory
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99200
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 22 Mar 2010 20:06:40 +0000 (20:06 +0000)]
More work on thunks; almost there now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99199
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Mar 2010 19:04:14 +0000 (19:04 +0000)]
Fixes access rues for ivars declared in class
implementations (radar
7547942 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99198
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 18:51:09 +0000 (18:51 +0000)]
hopefully fix this on non-sse2 hosts. Shouldn't an apple-darwin10
triple imply sse2?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99197
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Mar 2010 18:27:27 +0000 (18:27 +0000)]
Test for my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99194
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 22 Mar 2010 18:25:57 +0000 (18:25 +0000)]
More clean up of ivars which are either in class extensions and
implementation or synthesized into an implementation. Also,
fixes a code gen. bug when ivars are itroduced in interleaved
implementations. (related to radar
7547942 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Mon, 22 Mar 2010 18:16:06 +0000 (18:16 +0000)]
Sort calls to add_clang_library()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Mar 2010 18:14:12 +0000 (18:14 +0000)]
fix PR6658: inline isn't a keyword in C89 mode, use __inline__ instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99190
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 22 Mar 2010 18:10:25 +0000 (18:10 +0000)]
revert r99174. It caused PR6677. Will try to debug why tonight.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99188
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 22 Mar 2010 16:30:44 +0000 (16:30 +0000)]
Add less than operators to ThisAdjustment, ReturnAdjustment and ThunkInfo. Sort the thunks before dumping them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 22 Mar 2010 16:10:59 +0000 (16:10 +0000)]
Improve dumping of thunks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99181
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Mar 2010 15:53:50 +0000 (15:53 +0000)]
Use the cursor's ASTContext rather than the ASTContext computed from a
declaration, just in case invalid code makes the latter
incorrect. This may be the cause behind <rdar://problem/
7777070 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 22 Mar 2010 15:47:45 +0000 (15:47 +0000)]
Fix a thinko and a typo in the delayed-diagnostic code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99178
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 22 Mar 2010 15:47:01 +0000 (15:47 +0000)]
We want to add all thunks, not just 'this' adjustment thunks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Mon, 22 Mar 2010 15:44:38 +0000 (15:44 +0000)]
Use DEFINE_SYMBOL property to control dllexport/dllimport
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99176
91177308 -0d34-0410-b5e6-
96231b3b80d8