]> granicus.if.org Git - clang/log
clang
14 years agoMore address point map shuffling.
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

14 years agoShuffle some code around; this will make it easier to use the new layout code for...
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

14 years agoKill off two more uses of Sema::CheckReferenceInit in favor of the new
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

14 years agoSwitch static_cast from the old reference-initialization code (via
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

14 years agoCheck for ret, so that we know we hit the end of the function
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

14 years agoWhen returning from a function that has a reference return type, use
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

14 years agoDiscussing with dgregor we decided that we should not force the emission of
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

14 years agoUse llvm::SmallString instead of std::string.
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

14 years agoImprove static analyzer diagnostic concerning the use of 'mktemp'
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

14 years agomake the vtable tester a little friendlier, with a clean target and without requiring...
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

14 years agoWhen pulling apart an initializer that involves a CXXConstructExpr, do
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

14 years agoMake sure that we have File IDs for all of the unsaved files before we
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

14 years agoAllow conversion of qualified Class type to unqualified
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

14 years agoXFAIL the -nostdinc++ test on Windows; it doesn't look like we even have the notion...
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

14 years agoControl warnings about GNU extensions with -Wgnu, which has a subgroup
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

14 years agoImplement support for -nostdc++. Fixes PR6446.
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

14 years agoImprove diagnostics when ivar added to class
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

14 years agoSilently drop dependent friend function template specializations,
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

14 years agoChange two class forward declarations to struct forward declarations, silencing a...
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

14 years agoCode gen for multi-dimensional dynamic allocations.
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

14 years agoMore vtable improvements. We now compute and keep track of all vtable related informa...
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

14 years agoWalk out of enums when determining effective context.
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

14 years agoCorrect that last fixit: if the user wrote
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

14 years agoSupport friend function specializations.
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

14 years agoWhen a declaration of a function is missing an exception specification
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

14 years agoUse getNamedGlobal instead of getGlobalVariable. (Fixes self-host).
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

14 years agoMake the license header in smmintrin.h match the other SSE headers.
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

14 years agoImplement a framework for the delay of arbitrary diagnostics within
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

14 years agoWhen performing name lookup for the allocation or deallocation
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

14 years agoMore vtable work; preparations for moving over to the new vtable layout code (finally).
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

14 years agoEach non-local class instantiation is its own local instantiation
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

14 years agoRemove old thunks code.
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

14 years agoMake sure to properly track the anonymous namespace that lives inside
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

14 years agoFlip the switch and use the new vtable layout code for thunks by default. Add a thunk...
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

14 years agoAdd CodeGenFunction::GenerateThunk and implement it.
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

14 years agoMinor cleanup.
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

14 years agoRemove parts of virt.cpp
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

14 years agoImplement computation of the final overriders for each virtual
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

14 years agoAdd some missing files to xcode project
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

14 years agorevert 99311. Looks like it broke darwin bootstrap.
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

14 years agoImprove diagnostic for @property/ivar type mismatch by including the types of the
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

14 years agoAvoid producing implicit methods when we have a explicit template instantiation
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

14 years agoCode gen for compound assignment of complex
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

14 years agoMore work on thunks - don't assert if there's a variable with the same name as the...
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

14 years agoPatch to implement code gen. use of compound assignent on
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

14 years agoMore thunks scaffolding.
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

14 years agoMore work on thunks.
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

14 years agoWhen recovering from a qualified typedef name, don't clear out the
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

14 years agoMove ThunkInfo as well.
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

14 years agoMove ReturnAdjustment and ThisAdjustment out into CGVtable.h
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

14 years agoIgnore a more comprehensive set of gcc-special format attributes.
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

14 years agoBind the constructed object value to CXXConstructExpr.
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

14 years agoupdate CMakeLists.txt
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

14 years agoClear the return expr GDM after using it.
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

14 years agoAdd a AggExprVisitor class. It contains lots of boiler
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

14 years agoUse the canonical destructor, which fixes the self-host build. Thanks to Eli for...
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

14 years agomerge line.
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

14 years agoFrontend: Don't free the CompilerInstance or FrontendActions when running under
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

14 years agoPPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile...
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

14 years agoSince we now may have basicblocks with the same block is in different function,
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

14 years agoBaby steps towards making thunks be emitted from the new vtable layout code.
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

14 years agoSome renames.
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

14 years agoAlways emit associated thunks when emitting the function itself. Remove getVtableAddr...
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

14 years agoRename MaybeEmitVtable to EmitVTableRelatedData in preparation for making it emit...
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

14 years agoRename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo...
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

14 years agoFor forward-declared static inline functions, delay CFG-based warnings until we
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

14 years agoTweak null dereference diagnostics to give clearer diagnostics when
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

14 years agoOnly perform CFG-based warnings on 'static inline' functions that
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

14 years agoSet the relevent attributes declared in class extension
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

14 years agoA fixed version of r99174 which also includes a test that we emit vtables when
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

14 years agoDisable the emission of frontend warnings (not errors) under --analyze.
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

14 years agoImprove the diagnostics for the UndefinedAssignmentChecker when an
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

14 years agoComment the reasons for the strange little dance we do with the main file name for...
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

14 years ago(re)implement PR6542, accepting and discarding the __gcc_tdiag__
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

14 years agomerge some tests.
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

14 years agorename test
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

14 years agoDiagnose miuse of property dot-syntax instead of crashing.
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

14 years agomerge two tests.
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

14 years agorename test.
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

14 years agorevert r98661, gcc_tdiag is not an attribute (PR6542).
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

14 years agomove a test to a more appropriate directory
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

14 years agoMore work on thunks; almost there now.
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

14 years agoFixes access rues for ivars declared in class
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

14 years agohopefully fix this on non-sse2 hosts. Shouldn't an apple-darwin10
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

14 years agoTest for my last patch.
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

14 years agoMore clean up of ivars which are either in class extensions and
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

14 years agoSort calls to add_clang_library()
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

14 years agofix PR6658: inline isn't a keyword in C89 mode, use __inline__ instead.
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

14 years agorevert r99174. It caused PR6677. Will try to debug why tonight.
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

14 years agoAdd less than operators to ThisAdjustment, ReturnAdjustment and ThunkInfo. Sort the...
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

14 years agoImprove dumping of thunks.
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

14 years agoUse the cursor's ASTContext rather than the ASTContext computed from a
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

14 years agoFix a thinko and a typo in the delayed-diagnostic code.
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

14 years agoWe want to add all thunks, not just 'this' adjustment thunks.
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

14 years agoUse DEFINE_SYMBOL property to control dllexport/dllimport
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

14 years agoIntroduce the notion of a single "delayed" diagnostic into the
Douglas Gregor [Mon, 22 Mar 2010 15:10:57 +0000 (15:10 +0000)]
Introduce the notion of a single "delayed" diagnostic into the
Diagnostic subsystem, which is used in the rare case where we find a
serious problem (i.e., an inconsistency in the file system) while
we're busy formatting another diagnostic. In this case, the delayed
diagnostic will be emitted after we're done with the other
diagnostic. This is only to be used for fatal conditions detected at
very inconvenient times, where we can neither stop the current
diagnostic in flight nor can we suppress the second error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99175 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen handling a TSK_ExplicitInstantiationDefinition after a
Rafael Espindola [Mon, 22 Mar 2010 14:43:41 +0000 (14:43 +0000)]
When handling a TSK_ExplicitInstantiationDefinition after a
TSK_ExplicitInstantiationDeclaration make sure we call
MaybeMarkVirtualMembersReferenced with a method attached to the definition.

Remove the hack that forced vtable emition with declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99174 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago-Wshadow should only warn about parameter declarations when we're
John McCall [Mon, 22 Mar 2010 09:20:08 +0000 (09:20 +0000)]
-Wshadow should only warn about parameter declarations when we're
entering a function or block definition, not on every single declaration.
Unfortunately we don't have previous-lookup results around when it's time
to make this decision, so we have to redo the lookup.  The alternative is
to use delayed diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99172 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd very limited support for GCC's '-B' flag. This allows us to support unusual
Chandler Carruth [Mon, 22 Mar 2010 01:52:07 +0000 (01:52 +0000)]
Add very limited support for GCC's '-B' flag. This allows us to support unusual
toolchain configurations and is a small step toward FreeBSD support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99159 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR6618.
Rafael Espindola [Sun, 21 Mar 2010 22:56:43 +0000 (22:56 +0000)]
Fix PR6618.

If a struct has an invalid field, mark it as invalid. Also avoid producing
errors about incomplete types that are invalid.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99150 91177308-0d34-0410-b5e6-96231b3b80d8