]> granicus.if.org Git - clang/log
clang
15 years agoir-gen for nested non-virtual base member access
Fariborz Jahanian [Thu, 30 Jul 2009 00:10:25 +0000 (00:10 +0000)]
ir-gen for nested non-virtual base member access
in current class.

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

15 years agoAdd support for -Wno-long-long.
Eli Friedman [Thu, 30 Jul 2009 00:04:39 +0000 (00:04 +0000)]
Add support for -Wno-long-long.

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

15 years agoAdd support for ObjC message expressions, in the Analyzer:
Argyrios Kyrtzidis [Thu, 30 Jul 2009 00:03:55 +0000 (00:03 +0000)]
Add support for ObjC message expressions, in the Analyzer:

-Accept an ObjC method and find all message expressions that this method may respond to.
-Accept an ObjC message expression and find all methods that may respond to it.

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

15 years agoUpdate CMake.
Argyrios Kyrtzidis [Thu, 30 Jul 2009 00:02:19 +0000 (00:02 +0000)]
Update CMake.

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

15 years agoSupport ObjC methods as Entities.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:46 +0000 (23:41 +0000)]
Support ObjC methods as Entities.

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

15 years agoThere's no point in going through the getAs<TagType> stuff to find the definition...
Douglas Gregor [Wed, 29 Jul 2009 23:41:44 +0000 (23:41 +0000)]
There's no point in going through the getAs<TagType> stuff to find the definition of a tag, since tags rarely have more than one or two declarations

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

15 years agoUse a STL helper template 'pair_value_iterator', by both DeclReferenceMap and Selecto...
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:33 +0000 (23:41 +0000)]
Use a STL helper template 'pair_value_iterator', by both DeclReferenceMap and SelectorMap.

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

15 years agoAdd ObjCMethodDecl::isThisDeclarationADefinition().
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:26 +0000 (23:41 +0000)]
Add ObjCMethodDecl::isThisDeclarationADefinition().

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

15 years agoIndex the selectors and provide the translation units that contain them
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:18 +0000 (23:41 +0000)]
Index the selectors and provide the translation units that contain them
through the IndexProvider.

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

15 years agoAdd TranslationUnit::getSelectorMap().
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:08 +0000 (23:41 +0000)]
Add TranslationUnit::getSelectorMap().

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

15 years agoIntroduce SelectorMap whose purpose is to map selectors to objc methods and message...
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:58 +0000 (23:40 +0000)]
Introduce SelectorMap whose purpose is to map selectors to objc methods and message exprs,
inside a particular ASTContext.

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

15 years agoFind references inside blocks.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:48 +0000 (23:40 +0000)]
Find references inside blocks.

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

15 years agoUse helper class ASTVisitor to fully traverse an AST.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:39 +0000 (23:40 +0000)]
Use helper class ASTVisitor to fully traverse an AST.

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

15 years agoIntroduce the GlobalSelector class in the Indexing library.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:32 +0000 (23:40 +0000)]
Introduce the GlobalSelector class in the Indexing library.

GlobalSelector is an ASTContext-independent way to refer to Objective C selectors.

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

15 years agoUse an IdentifierTable for names used for Entities.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:21 +0000 (23:40 +0000)]
Use an IdentifierTable for names used for Entities.

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

15 years ago-Introduce the idx::Analyzer class used for getting indexing information, like finding
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:14 +0000 (23:40 +0000)]
-Introduce the idx::Analyzer class used for getting indexing information, like finding
references of a declaration across translation units.

-Modify the index-test tool to use it.

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

15 years agoIntroduce TULocation and TULocationHandler classes.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:02 +0000 (23:40 +0000)]
Introduce TULocation and TULocationHandler classes.

TULocation is like ASTLocation but also contains the TranslationUnit* that
the ASTLocation originated from.

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

15 years agoModify the Indexer class so that it can return the TranslationUnit that internal
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:52 +0000 (23:39 +0000)]
Modify the Indexer class so that it can return the TranslationUnit that internal
decls originated from.

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

15 years agoAdd Entity::getInternalDecl() to be used only on Entities that refer to internal
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:42 +0000 (23:39 +0000)]
Add Entity::getInternalDecl() to be used only on Entities that refer to internal
(in translation unit) declarations.

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

15 years agoConstify ASTLocation::print.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:35 +0000 (23:39 +0000)]
Constify ASTLocation::print.

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

15 years agoFix some comments.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:25 +0000 (23:39 +0000)]
Fix some comments.

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

15 years agoAdd getDeclReferenceMap() to the abstract interface of TranslationUnit class.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:18 +0000 (23:39 +0000)]
Add getDeclReferenceMap() to the abstract interface of TranslationUnit class.

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

15 years agoRemove the TranslationUnit usage from clang-wpa.cpp since it's not really
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:09 +0000 (23:39 +0000)]
Remove the TranslationUnit usage from clang-wpa.cpp since it's not really
necessary.

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

15 years agoIntroduce a helper template for the Handler classes and use it instead
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:03 +0000 (23:39 +0000)]
Introduce a helper template for the Handler classes and use it instead
of the iterator of the Indexer class.

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

15 years agoAdd an assert.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:38:51 +0000 (23:38 +0000)]
Add an assert.

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

15 years agoAccept Handler objects in parameters as references.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:38:45 +0000 (23:38 +0000)]
Accept Handler objects in parameters as references.

Reinforces that they shouldn't be null and it's a bit more natural when
they are passed as stack objects.

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

15 years agoRename EntityHandler::HandleEntity to Handle.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:38:35 +0000 (23:38 +0000)]
Rename EntityHandler::HandleEntity to Handle.

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

15 years ago-Make IndexProvider an abstract interface for getting indexing information.
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:38:21 +0000 (23:38 +0000)]
-Make IndexProvider an abstract interface for getting indexing information.
-Introduce Indexer as an IndexProvider implementation.

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

15 years agoMake tag declarations redeclarable. This change has three purposes:
Douglas Gregor [Wed, 29 Jul 2009 23:36:44 +0000 (23:36 +0000)]
Make tag declarations redeclarable. This change has three purposes:

  1) Allow the Index library (and any other interested client) to walk
  the set of declarations for a given tag (enum, union, class,
  whatever). At the moment, this information is not readily available.

  2) Reduce our dependence on TagDecl::TypeForDecl being mapped down
  to a TagType (for which getDecl() will return the tag definition, if
  one exists). This property won't exist for class template partial
  specializations.

  3) Make the canonical declaration of a TagDecl actually canonical,
  e.g., so that it does not change when the tag is defined.

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

15 years agoEliminate an unused-variable warning
Douglas Gregor [Wed, 29 Jul 2009 22:40:58 +0000 (22:40 +0000)]
Eliminate an unused-variable warning

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Wed, 29 Jul 2009 22:16:19 +0000 (22:16 +0000)]
Update for LLVM API change.

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

15 years agoChange uses of:
Ted Kremenek [Wed, 29 Jul 2009 21:53:49 +0000 (21:53 +0000)]
Change uses of:
  Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
  Type::getAsRecordType() -> Type::getAs<RecordType>()
  Type::getAsPointerType() -> Type::getAs<PointerType>()
  Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
  Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
  Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
  Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
  Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
  Type::getAsTagType() -> Type::getAs<TagType>()

And remove Type::getAsReferenceType(), etc.

This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.

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

15 years agoRemove 'StoreManager::OldCastRegion()', TypedViewRegion (which only
Ted Kremenek [Wed, 29 Jul 2009 21:43:22 +0000 (21:43 +0000)]
Remove 'StoreManager::OldCastRegion()', TypedViewRegion (which only
OldCastRegion used), and the associated command line option
'-analyzer-store=old-basic-cast'.

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

15 years agoFixed test.
Fariborz Jahanian [Wed, 29 Jul 2009 21:26:28 +0000 (21:26 +0000)]
Fixed test.

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

15 years agoSome refactoring of member access for
Fariborz Jahanian [Wed, 29 Jul 2009 20:41:46 +0000 (20:41 +0000)]
Some refactoring of member access for
performace sake. Also added a test case.

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

15 years agoRefactor base/member initializers, and construct them correctly in cases
Eli Friedman [Wed, 29 Jul 2009 19:44:27 +0000 (19:44 +0000)]
Refactor base/member initializers, and construct them correctly in cases
with dependent types.  Fixes PR4621 and PR4627.

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

15 years agoCheck accessibility when converting object to the base
Fariborz Jahanian [Wed, 29 Jul 2009 19:40:11 +0000 (19:40 +0000)]
Check accessibility when converting object to the base
class.

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Wed, 29 Jul 2009 18:54:39 +0000 (18:54 +0000)]
Update for LLVM API change.

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

15 years agoNo longer need to keep base class offsets in the offset
Fariborz Jahanian [Wed, 29 Jul 2009 18:50:06 +0000 (18:50 +0000)]
No longer need to keep base class offsets in the offset
table as it has its own place now.

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

15 years agoPatch to provide cast of objects in member access
Fariborz Jahanian [Wed, 29 Jul 2009 18:40:24 +0000 (18:40 +0000)]
Patch to provide cast of objects in member access
excpression, if needed, and remove some ir-gen code
now unnencessary.

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

15 years ago[llvm up]
Douglas Gregor [Wed, 29 Jul 2009 18:26:50 +0000 (18:26 +0000)]
[llvm up]

A template name can refer to a set of overloaded function
templates. Model this in TemplateName, which can now refer to an
OverloadedFunctionDecl that contains function templates. This removes
an unspeakable hack in Sema::isTemplateName.

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

15 years agoAdd an XFAILed test case that currently crashes for RegionStore. This case will
Ted Kremenek [Wed, 29 Jul 2009 18:19:16 +0000 (18:19 +0000)]
Add an XFAILed test case that currently crashes for RegionStore. This case will
be moved to misc-ps.m when it passes.

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

15 years agoAdd another analyzer test case involving an OSAtomic function.
Ted Kremenek [Wed, 29 Jul 2009 18:18:25 +0000 (18:18 +0000)]
Add another analyzer test case involving an OSAtomic function.

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

15 years agoRemove some uses of TypedViewRegion, and use getBaseRegion() in a context where
Ted Kremenek [Wed, 29 Jul 2009 18:17:40 +0000 (18:17 +0000)]
Remove some uses of TypedViewRegion, and use getBaseRegion() in a context where
we don't care about ElementRegions layered on top of a base region.

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

15 years agoMake StoreManager::InvalidateRegion() virtual, move the current implementation
Ted Kremenek [Wed, 29 Jul 2009 18:16:25 +0000 (18:16 +0000)]
Make StoreManager::InvalidateRegion() virtual, move the current implementation
in StoreManager to RegionStoreManager, and create a special, highly reduced
version in BasicStoreManager.

These changes are in preparation for future RegionStore-specific changes to
InvalidateRegion.

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

15 years agoAdd 'MemRegion::getBaseRegion()', a utility method to strip ElementRegions with
Ted Kremenek [Wed, 29 Jul 2009 18:14:27 +0000 (18:14 +0000)]
Add 'MemRegion::getBaseRegion()', a utility method to strip ElementRegions with
index 0.  This will be used for refinements to InvalidateRegion and CastRegion.

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

15 years agocanSymbolicate() should only return true for integer types that are scalars.
Ted Kremenek [Wed, 29 Jul 2009 18:12:48 +0000 (18:12 +0000)]
canSymbolicate() should only return true for integer types that are scalars.

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

15 years agoCheck for identical types in C++ catch expression. Patch by Erik Verbruggen.
Sebastian Redl [Wed, 29 Jul 2009 17:15:45 +0000 (17:15 +0000)]
Check for identical types in C++ catch expression. Patch by Erik Verbruggen.

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

15 years agoDon't use a formatted ostream when writing .ll either.
Daniel Dunbar [Wed, 29 Jul 2009 17:12:55 +0000 (17:12 +0000)]
Don't use a formatted ostream when writing .ll either.

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

15 years agoDon't use a formatted ostream when writing .bc files. I don't really understand
Daniel Dunbar [Wed, 29 Jul 2009 17:10:26 +0000 (17:10 +0000)]
Don't use a formatted ostream when writing .bc files. I don't really understand
this interface design, Chris please check.

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

15 years agoWhen lookup of an identifier preceding a '<' finds a set of overloaded
Douglas Gregor [Wed, 29 Jul 2009 16:56:42 +0000 (16:56 +0000)]
When lookup of an identifier preceding a '<' finds a set of overloaded
functions, only return those overloaded functions that are actually
function templates. Note that there is still a glaring problem with
treating an OverloadedFunctionDecl as a TemplateName.

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

15 years agoscan-build: Don't try to index plist-html output directories
Daniel Dunbar [Wed, 29 Jul 2009 16:21:23 +0000 (16:21 +0000)]
scan-build: Don't try to index plist-html output directories

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

15 years agoRemove an obsolete kludge based on the previous, completely broken handling of functi...
Douglas Gregor [Wed, 29 Jul 2009 16:15:53 +0000 (16:15 +0000)]
Remove an obsolete kludge based on the previous, completely broken handling of function templates

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

15 years agoTest redefinition of class template partial specializations
Douglas Gregor [Wed, 29 Jul 2009 16:13:25 +0000 (16:13 +0000)]
Test redefinition of class template partial specializations

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

15 years agoUse the new statement/expression profiling code to unique dependent
Douglas Gregor [Wed, 29 Jul 2009 16:09:57 +0000 (16:09 +0000)]
Use the new statement/expression profiling code to unique dependent
template arguments, as in template specialization types. This permits
matching out-of-line definitions of members for class templates that
involve non-type template parameters.

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

15 years agoUse the existing API for base offset. Use suitable llvm type
Fariborz Jahanian [Wed, 29 Jul 2009 15:54:56 +0000 (15:54 +0000)]
Use the existing API for base offset. Use suitable llvm type
for offset ir-gen.

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

15 years agoMake the Python TestRunner work for individual tests
Douglas Gregor [Wed, 29 Jul 2009 15:32:08 +0000 (15:32 +0000)]
Make the Python TestRunner work for individual tests

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

15 years agoRemove an ObjC-specific XFAIL (and tweak test).
Steve Naroff [Wed, 29 Jul 2009 15:24:47 +0000 (15:24 +0000)]
Remove an ObjC-specific XFAIL (and tweak test).

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

15 years agoFix <rdar://problem/7100524> regression: "error: incompatible operand types ('void...
Steve Naroff [Wed, 29 Jul 2009 15:09:39 +0000 (15:09 +0000)]
Fix <rdar://problem/7100524> regression: "error: incompatible operand types ('void *' and 'NSString *')".

Remove XFAIL from 'conditional-expr-4.m' test case (which would have caught this).
Also tweaked several aspects of the test to jive with the current type checking.

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

15 years agoIncorporate feedback from Chris (on r76979).
Steve Naroff [Wed, 29 Jul 2009 14:06:03 +0000 (14:06 +0000)]
Incorporate feedback from Chris (on r76979).

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

15 years agoMake functional-style casts emit correct messages, and fix a crash-on-invalid.
Sebastian Redl [Wed, 29 Jul 2009 13:50:23 +0000 (13:50 +0000)]
Make functional-style casts emit correct messages, and fix a crash-on-invalid.

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

15 years agoadd a fixme
Zhongxing Xu [Wed, 29 Jul 2009 08:13:37 +0000 (08:13 +0000)]
add a fixme

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

15 years agodelete an undefined method.
Zhongxing Xu [Wed, 29 Jul 2009 08:00:02 +0000 (08:00 +0000)]
delete an undefined method.

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

15 years agoMultiTestRunner: Reenable --vg option.
Daniel Dunbar [Wed, 29 Jul 2009 02:57:25 +0000 (02:57 +0000)]
MultiTestRunner: Reenable --vg option.
 - Simplified from before and using --error-exitcode so failures show up as
   failures.

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

15 years agoDestroy the ASTConsumer prior to the Context, HTMLPrinter for example wants to
Daniel Dunbar [Wed, 29 Jul 2009 02:40:09 +0000 (02:40 +0000)]
Destroy the ASTConsumer prior to the Context, HTMLPrinter for example wants to
do a significant amount of work in its destructor, which may access the
context. (PR4642).

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

15 years agoBlockScopeInfo::hasPrototype was uninitialized.
Daniel Dunbar [Wed, 29 Jul 2009 01:59:17 +0000 (01:59 +0000)]
BlockScopeInfo::hasPrototype was uninitialized.

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

15 years agoCharLiteralParser::IsMultiChar was sometimes uninitialized.
Daniel Dunbar [Wed, 29 Jul 2009 01:46:05 +0000 (01:46 +0000)]
CharLiteralParser::IsMultiChar was sometimes uninitialized.

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

15 years agoAdd missing '"'
Daniel Dunbar [Wed, 29 Jul 2009 01:10:25 +0000 (01:10 +0000)]
Add missing '"'

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

15 years agoCode refactoring to define getCXXRecordDeclForPointerType
Fariborz Jahanian [Wed, 29 Jul 2009 00:44:13 +0000 (00:44 +0000)]
Code refactoring to define getCXXRecordDeclForPointerType
and use it in several places.

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

15 years agoBe sure to turn on -fblocks.
Mike Stump [Wed, 29 Jul 2009 00:17:20 +0000 (00:17 +0000)]
Be sure to turn on -fblocks.

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

15 years agoSome minor cleanups, thanks Chris.
Mike Stump [Tue, 28 Jul 2009 23:57:15 +0000 (23:57 +0000)]
Some minor cleanups, thanks Chris.

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

15 years agoSome style fixes, thanks Chris.
Mike Stump [Tue, 28 Jul 2009 23:47:15 +0000 (23:47 +0000)]
Some style fixes, thanks Chris.

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

15 years agoAdd support for -Wmissing-noreturn.
Mike Stump [Tue, 28 Jul 2009 23:11:12 +0000 (23:11 +0000)]
Add support for -Wmissing-noreturn.

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

15 years agoRefactor the code that produces a TemplateSpecializationType, so that
Douglas Gregor [Tue, 28 Jul 2009 23:00:59 +0000 (23:00 +0000)]
Refactor the code that produces a TemplateSpecializationType, so that
canonicalization for dependent TemplateSpecializationTypes occurs
within ASTContext::getTemplateSpecializationType. Also, move template
argument canonicalization into ASTContext::getCanonicalTemplateArgument.

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

15 years agoremove extraneous braces
Chris Lattner [Tue, 28 Jul 2009 22:49:34 +0000 (22:49 +0000)]
remove extraneous braces

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

15 years agoAdd noreturn support for blocks.
Mike Stump [Tue, 28 Jul 2009 22:04:01 +0000 (22:04 +0000)]
Add noreturn support for blocks.

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

15 years agoir-gen derived-to-base conversion in implicit casts.
Fariborz Jahanian [Tue, 28 Jul 2009 22:00:58 +0000 (22:00 +0000)]
ir-gen derived-to-base conversion in implicit casts.

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Tue, 28 Jul 2009 21:22:35 +0000 (21:22 +0000)]
Update for LLVM API change.

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

15 years agoRemove the old RecordOrganizer.
Anders Carlsson [Tue, 28 Jul 2009 21:03:34 +0000 (21:03 +0000)]
Remove the old RecordOrganizer.

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

15 years agoFix PR 4631. The compound initializers of unions were not being evaluated, which
Ted Kremenek [Tue, 28 Jul 2009 20:46:55 +0000 (20:46 +0000)]
Fix PR 4631. The compound initializers of unions were not being evaluated, which
could cause false positives if any the subexpressions had side-effects. These
initializers weren't evaluated because the StoreManager would need to handle
them, but that's an orthogonal problem of whether or not the StoreManager can
handle the binding.

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

15 years agoAdd missing break statement.
Ted Kremenek [Tue, 28 Jul 2009 19:34:30 +0000 (19:34 +0000)]
Add missing break statement.

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

15 years agoUpdate comments.
Mike Stump [Tue, 28 Jul 2009 19:31:47 +0000 (19:31 +0000)]
Update comments.

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

15 years agoFix regression in attribute 'nonnull' checking when a transition node
Ted Kremenek [Tue, 28 Jul 2009 19:24:31 +0000 (19:24 +0000)]
Fix regression in attribute 'nonnull' checking when a transition node
was created but not added to the destination NodeSet.  This fixes PR 4630.

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

15 years agoAdd a field for C++ specific data to ASTRecordLayout. Use it to store the non-virtual...
Anders Carlsson [Tue, 28 Jul 2009 19:24:15 +0000 (19:24 +0000)]
Add a field for C++ specific data to ASTRecordLayout. Use it to store the non-virtual size and alignment + base offsets.

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

15 years agoMore cleanup of data member access and then some.
Fariborz Jahanian [Tue, 28 Jul 2009 18:54:57 +0000 (18:54 +0000)]
More cleanup of data member access and then some.

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Tue, 28 Jul 2009 18:33:04 +0000 (18:33 +0000)]
Update for LLVM API change.

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

15 years agofix PR4633: cast to void should silence the 'unused expression' warning.
Chris Lattner [Tue, 28 Jul 2009 18:25:28 +0000 (18:25 +0000)]
fix PR4633: cast to void should silence the 'unused expression' warning.

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

15 years agoadd some fixme's
Chris Lattner [Tue, 28 Jul 2009 18:25:06 +0000 (18:25 +0000)]
add some fixme's

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

15 years agothis test crashes, disable it harder.
Chris Lattner [Tue, 28 Jul 2009 18:22:50 +0000 (18:22 +0000)]
this test crashes, disable it harder.

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

15 years agoSome code cleanup.
Fariborz Jahanian [Tue, 28 Jul 2009 18:09:28 +0000 (18:09 +0000)]
Some code cleanup.

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

15 years agoMore CGRecordLayoutBuilder cleanup.
Anders Carlsson [Tue, 28 Jul 2009 17:56:36 +0000 (17:56 +0000)]
More CGRecordLayoutBuilder cleanup.

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

15 years agoMore work toward data member access ir-gen.
Fariborz Jahanian [Tue, 28 Jul 2009 17:38:28 +0000 (17:38 +0000)]
More work toward data member access ir-gen.

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

15 years agoAdd two more tests.
Anders Carlsson [Tue, 28 Jul 2009 17:14:18 +0000 (17:14 +0000)]
Add two more tests.

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

15 years agoAdd a template test that requires canonical expression comparison
Douglas Gregor [Tue, 28 Jul 2009 16:39:54 +0000 (16:39 +0000)]
Add a template test that requires canonical expression comparison

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

15 years agoFix a typo in a comment
Douglas Gregor [Tue, 28 Jul 2009 16:39:25 +0000 (16:39 +0000)]
Fix a typo in a comment

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

15 years agoProfiling the pointer of a canonical type is sufficient to uniquely identify the...
Douglas Gregor [Tue, 28 Jul 2009 15:32:17 +0000 (15:32 +0000)]
Profiling the pointer of a canonical type is sufficient to uniquely identify the type

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

15 years agoFinish profile support for statements.
Douglas Gregor [Tue, 28 Jul 2009 15:27:13 +0000 (15:27 +0000)]
Finish profile support for statements.

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

15 years agoComplete profile support for C++ and Objective-C expressions
Douglas Gregor [Tue, 28 Jul 2009 14:44:31 +0000 (14:44 +0000)]
Complete profile support for C++ and Objective-C expressions

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

15 years agoBounds checking for address spaces.
John McCall [Tue, 28 Jul 2009 06:52:18 +0000 (06:52 +0000)]
Bounds checking for address spaces.

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

15 years agoCallExpr's SubExprs sometimes were allocated in the wrong place.
Daniel Dunbar [Tue, 28 Jul 2009 06:29:46 +0000 (06:29 +0000)]
CallExpr's SubExprs sometimes were allocated in the wrong place.

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