]> granicus.if.org Git - clang/log
clang
15 years agochange another PointerIntPair into a PointerUnion.
Chris Lattner [Sun, 29 Mar 2009 06:43:22 +0000 (06:43 +0000)]
change another PointerIntPair into a PointerUnion.

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

15 years agoswitch DeclBase::DeclCtx to the new happy and type-safe
Chris Lattner [Sun, 29 Mar 2009 06:06:59 +0000 (06:06 +0000)]
switch DeclBase::DeclCtx to the new happy and type-safe
llvm::PointerUnion class.

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

15 years agoMake the ActionResult optimization work for non-void*'s and switch DeclPtrTy to use it.
Chris Lattner [Sun, 29 Mar 2009 05:08:48 +0000 (05:08 +0000)]
Make the ActionResult optimization work for non-void*'s and switch DeclPtrTy to use it.

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

15 years agogenericize the ActionResult optimization for holding the "ininvalid" bit
Chris Lattner [Sun, 29 Mar 2009 05:04:26 +0000 (05:04 +0000)]
genericize the ActionResult optimization for holding the "ininvalid" bit
in the low bit position a little bit (haha).

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

15 years agovarious cleanups
Chris Lattner [Sun, 29 Mar 2009 05:01:10 +0000 (05:01 +0000)]
various cleanups

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

15 years agoadjust to llvm mainline changes.
Chris Lattner [Sun, 29 Mar 2009 04:32:54 +0000 (04:32 +0000)]
adjust to llvm mainline changes.

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

15 years agotighten this up, the decl *must* be a declcontext, no need for the dynamic check.
Chris Lattner [Sun, 29 Mar 2009 04:30:19 +0000 (04:30 +0000)]
tighten this up, the decl *must* be a declcontext, no need for the dynamic check.

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

15 years agoadd fixme
Chris Lattner [Sun, 29 Mar 2009 01:03:29 +0000 (01:03 +0000)]
add fixme

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

15 years agoUpdate checker build.
Ted Kremenek [Sun, 29 Mar 2009 00:43:39 +0000 (00:43 +0000)]
Update checker build.

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

15 years agoadd getNumLowBitsAvailable for OpaquePtr and QualType.
Chris Lattner [Sun, 29 Mar 2009 00:41:20 +0000 (00:41 +0000)]
add getNumLowBitsAvailable for OpaquePtr and QualType.

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

15 years agofollow llvm mainline, where PointerLikeTypeInfo got renamed
Chris Lattner [Sun, 29 Mar 2009 00:39:47 +0000 (00:39 +0000)]
follow llvm mainline, where PointerLikeTypeInfo got renamed
to PointerLikeTypeTraits.

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

15 years agoscan-build: Also look for clang-cc in ../libexec
Ted Kremenek [Sun, 29 Mar 2009 00:31:32 +0000 (00:31 +0000)]
scan-build: Also look for clang-cc in ../libexec

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

15 years agoInitial implementation of ARM ABI. Mostly untested. Note that I'm not
Eli Friedman [Sun, 29 Mar 2009 00:15:25 +0000 (00:15 +0000)]
Initial implementation of ARM ABI.  Mostly untested.  Note that I'm not
really intending to take ownership of this; I wrote this mostly because
I was curious about how the ARM ABI works.  It should be a decent start,
though.

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

15 years agoQualType can go in SmallPtrSet now, simplify code that used to have
Chris Lattner [Sun, 29 Mar 2009 00:04:01 +0000 (00:04 +0000)]
QualType can go in SmallPtrSet now, simplify code that used to have
to work around this.

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

15 years agoimplement the PointerLikeTypeInfo trait for QualType, allowing
Chris Lattner [Sun, 29 Mar 2009 00:03:08 +0000 (00:03 +0000)]
implement the PointerLikeTypeInfo trait for QualType, allowing
it to be stuck into a SmallPtrSet.

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

15 years agoMore improvements to namespace aliases. We now support everything except aliases...
Anders Carlsson [Sat, 28 Mar 2009 23:53:49 +0000 (23:53 +0000)]
More improvements to namespace aliases. We now support everything except aliases in using directives.

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

15 years agoHandle the case where the namespace decl is an alias.
Anders Carlsson [Sat, 28 Mar 2009 23:50:18 +0000 (23:50 +0000)]
Handle the case where the namespace decl is an alias.

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

15 years agoFix lookup bug
Anders Carlsson [Sat, 28 Mar 2009 23:49:35 +0000 (23:49 +0000)]
Fix lookup bug

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

15 years agoLet getIdentifierNamespaceForKind know about aliases and have it treat them just...
Anders Carlsson [Sat, 28 Mar 2009 23:02:53 +0000 (23:02 +0000)]
Let getIdentifierNamespaceForKind know about aliases and have it treat them just like namespace decls.

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

15 years agoCreate AST nodes for namespace aliases.
Anders Carlsson [Sat, 28 Mar 2009 22:58:02 +0000 (22:58 +0000)]
Create AST nodes for namespace aliases.

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

15 years agoParse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionali...
Anders Carlsson [Sat, 28 Mar 2009 22:53:22 +0000 (22:53 +0000)]
Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change.

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

15 years agoFix regression in pointer comparison with NULL (e.g., 0 != ptr). This fixes
Ted Kremenek [Sat, 28 Mar 2009 19:59:33 +0000 (19:59 +0000)]
Fix regression in pointer comparison with NULL (e.g., 0 != ptr). This fixes
<rdar://problem/6732151>.

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

15 years agoIntroduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
Chris Lattner [Sat, 28 Mar 2009 19:18:32 +0000 (19:18 +0000)]
Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
pointer.  Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.

Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>.  Change the
entire parser/sema interface to use DeclPtrTy instead of DeclTy*.  This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.

We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.

The one outstanding known problem with this patch is that we lose the
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy.  I will rectify
this with a subsequent patch.

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

15 years agosort alphabetically
Chris Lattner [Sat, 28 Mar 2009 19:10:22 +0000 (19:10 +0000)]
sort alphabetically

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

15 years agoAdjust control-flow endpoints for '&&' and '||'.
Ted Kremenek [Sat, 28 Mar 2009 17:33:57 +0000 (17:33 +0000)]
Adjust control-flow endpoints for '&&' and '||'.

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

15 years agoAdd comparison operators for PathDiagosticLocation.
Ted Kremenek [Sat, 28 Mar 2009 17:33:08 +0000 (17:33 +0000)]
Add comparison operators for PathDiagosticLocation.

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

15 years agoAdd comparison operators for SourceRange.
Ted Kremenek [Sat, 28 Mar 2009 17:32:39 +0000 (17:32 +0000)]
Add comparison operators for SourceRange.

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

15 years agoCMake: remove TranslationUnit.cpp from build (file has been removed).
Cedric Venet [Sat, 28 Mar 2009 12:41:49 +0000 (12:41 +0000)]
CMake: remove TranslationUnit.cpp from build (file has been removed).

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

15 years agomove file to proper place.
Chris Lattner [Sat, 28 Mar 2009 08:04:44 +0000 (08:04 +0000)]
move file to proper place.

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

15 years agoAs Eli pointed out, it is possible that a namespace lookup is ambiguous!
Anders Carlsson [Sat, 28 Mar 2009 07:51:31 +0000 (07:51 +0000)]
As Eli pointed out, it is possible that a namespace lookup is ambiguous!

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

15 years agoadd accessors.
Chris Lattner [Sat, 28 Mar 2009 07:00:38 +0000 (07:00 +0000)]
add accessors.

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

15 years agosome random cleanups
Chris Lattner [Sat, 28 Mar 2009 06:53:40 +0000 (06:53 +0000)]
some random cleanups

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

15 years agoeliminate unneeded iterator wrappers.
Chris Lattner [Sat, 28 Mar 2009 06:47:16 +0000 (06:47 +0000)]
eliminate unneeded iterator wrappers.

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

15 years agochange NamespaceDecl to hold its 'NextNamespace' pointer itself
Chris Lattner [Sat, 28 Mar 2009 06:44:59 +0000 (06:44 +0000)]
change NamespaceDecl to hold its 'NextNamespace' pointer itself
instead of in NextDeclarator.  This temporarily increases memory
usage, but simplifies and decouples things.

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

15 years agoCheck that the alias points to a valid namespace.
Anders Carlsson [Sat, 28 Mar 2009 06:42:02 +0000 (06:42 +0000)]
Check that the alias points to a valid namespace.

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

15 years agoProperly escape special characters in <string>'s in plist file.
Ted Kremenek [Sat, 28 Mar 2009 06:40:54 +0000 (06:40 +0000)]
Properly escape special characters in <string>'s in plist file.

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

15 years agorename some methods.
Chris Lattner [Sat, 28 Mar 2009 06:33:19 +0000 (06:33 +0000)]
rename some methods.

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

15 years agoCleanups for DeclGroup.
Chris Lattner [Sat, 28 Mar 2009 06:26:18 +0000 (06:26 +0000)]
Cleanups for DeclGroup.

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

15 years agoCheck that the namespace alias doesn't conflict with a previous declaration in this...
Anders Carlsson [Sat, 28 Mar 2009 06:23:46 +0000 (06:23 +0000)]
Check that the namespace alias doesn't conflict with a previous declaration in this scope.

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

15 years agotidy whitespace.
Chris Lattner [Sat, 28 Mar 2009 06:13:37 +0000 (06:13 +0000)]
tidy whitespace.

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

15 years agorename NextDeclInScope to NextDeclInContext, since the pointer
Chris Lattner [Sat, 28 Mar 2009 06:04:26 +0000 (06:04 +0000)]
rename NextDeclInScope to NextDeclInContext, since the pointer
points within contexts not scopes.

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

15 years agosimplify getNextDeclInScope
Chris Lattner [Sat, 28 Mar 2009 05:59:45 +0000 (05:59 +0000)]
simplify getNextDeclInScope

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

15 years agoreduce indentation, no functionality change.
Chris Lattner [Sat, 28 Mar 2009 05:44:17 +0000 (05:44 +0000)]
reduce indentation, no functionality change.

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

15 years agoAdd an ActOnNamespaceAliasDef action and have the parser call it.
Anders Carlsson [Sat, 28 Mar 2009 05:27:17 +0000 (05:27 +0000)]
Add an ActOnNamespaceAliasDef action and have the parser call it.

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

15 years agoremove TranslationUnit.
Chris Lattner [Sat, 28 Mar 2009 04:31:31 +0000 (04:31 +0000)]
remove TranslationUnit.

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

15 years agopush more ASTContext goodness out through interfaces that use
Chris Lattner [Sat, 28 Mar 2009 04:27:18 +0000 (04:27 +0000)]
push more ASTContext goodness out through interfaces that use
 TranslationUnit

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

15 years agoRevert Sebastian's rvalue patch (r67870) since it caused test failures in
Anders Carlsson [Sat, 28 Mar 2009 04:17:27 +0000 (04:17 +0000)]
Revert Sebastian's rvalue patch (r67870) since it caused test failures in

SemaCXX//overload-member-call.cpp
SemaCXX//overloaded-operator.cpp
SemaTemplate//instantiate-method.cpp

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

15 years agoremove TranslationUnit from ParseAST.
Chris Lattner [Sat, 28 Mar 2009 04:13:34 +0000 (04:13 +0000)]
remove TranslationUnit from ParseAST.

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

15 years agochange HandleTranslationUnit to take an ASTContext instead of TranslationUnit
Chris Lattner [Sat, 28 Mar 2009 04:11:33 +0000 (04:11 +0000)]
change HandleTranslationUnit to take an ASTContext instead of TranslationUnit

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

15 years agoText PathDiagnosticBuilder::getEnclosingStmt() about '?'
Ted Kremenek [Sat, 28 Mar 2009 04:08:14 +0000 (04:08 +0000)]
Text PathDiagnosticBuilder::getEnclosingStmt() about '?'

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

15 years agoParse namespace aliases.
Anders Carlsson [Sat, 28 Mar 2009 04:07:16 +0000 (04:07 +0000)]
Parse namespace aliases.

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

15 years agoremove dead ivar.
Chris Lattner [Sat, 28 Mar 2009 04:05:05 +0000 (04:05 +0000)]
remove dead ivar.

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

15 years agosimplify away some dead ownership stuff, TranslationUnit is now
Chris Lattner [Sat, 28 Mar 2009 04:00:23 +0000 (04:00 +0000)]
simplify away some dead ownership stuff, TranslationUnit is now
just a wrapper around ASTContext.

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

15 years agohoist TranslationUnit some more.
Chris Lattner [Sat, 28 Mar 2009 03:56:54 +0000 (03:56 +0000)]
hoist TranslationUnit some more.

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

15 years agoeliminate some wrappers.
Chris Lattner [Sat, 28 Mar 2009 03:53:02 +0000 (03:53 +0000)]
eliminate some wrappers.

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

15 years agoeliminate ReadASTBitcodeFile
Chris Lattner [Sat, 28 Mar 2009 03:49:26 +0000 (03:49 +0000)]
eliminate ReadASTBitcodeFile

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

15 years agomove serialization logic from TranslationUnit to ASTContext.
Chris Lattner [Sat, 28 Mar 2009 03:45:20 +0000 (03:45 +0000)]
move serialization logic from TranslationUnit to ASTContext.

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

15 years agoTeach PathDiagnosticBuilder::getEnclosingStmtLocation() about while/if/do/for,
Ted Kremenek [Sat, 28 Mar 2009 03:37:59 +0000 (03:37 +0000)]
Teach PathDiagnosticBuilder::getEnclosingStmtLocation() about while/if/do/for,
etc., so that the "body" is always considered a top-level statement for edge
transitions (even if it is an expression).

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

15 years agodon't poke at TranslationUnit directly
Chris Lattner [Sat, 28 Mar 2009 03:29:40 +0000 (03:29 +0000)]
don't poke at TranslationUnit directly

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

15 years agoTrivial cleanup.
Eli Friedman [Sat, 28 Mar 2009 03:27:06 +0000 (03:27 +0000)]
Trivial cleanup.

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

15 years agoMove where block-related variables are initialized so that block
Eli Friedman [Sat, 28 Mar 2009 03:24:54 +0000 (03:24 +0000)]
Move where block-related variables are initialized so that block
types don't get generated when blocks aren't used.

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

15 years agoFix silly mistake in test.
Eli Friedman [Sat, 28 Mar 2009 03:14:28 +0000 (03:14 +0000)]
Fix silly mistake in test.

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

15 years agoMinor cleanup.
Eli Friedman [Sat, 28 Mar 2009 03:10:45 +0000 (03:10 +0000)]
Minor cleanup.

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

15 years agoMisc small fixes/cleanups/comment changes.
Eli Friedman [Sat, 28 Mar 2009 02:45:41 +0000 (02:45 +0000)]
Misc small fixes/cleanups/comment changes.

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

15 years agoeliminate ASTConsumer::InitializeTU, all clients are
Chris Lattner [Sat, 28 Mar 2009 02:18:25 +0000 (02:18 +0000)]
eliminate ASTConsumer::InitializeTU, all clients are
happy with just ASTContext, they don't need a TU.

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

15 years agorevert mike's patch which broke test/CodeGen/no-common.c.
Chris Lattner [Sat, 28 Mar 2009 02:12:08 +0000 (02:12 +0000)]
revert mike's patch which broke test/CodeGen/no-common.c.

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

15 years agoremove TranslationUnit::OwnsDecls, which is only set, never read.
Chris Lattner [Sat, 28 Mar 2009 01:44:40 +0000 (01:44 +0000)]
remove TranslationUnit::OwnsDecls, which is only set, never read.

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

15 years agosimplify ParseAST by sucking -disable-free handling logic up into
Chris Lattner [Sat, 28 Mar 2009 01:37:17 +0000 (01:37 +0000)]
simplify ParseAST by sucking -disable-free handling logic up into
clang.cpp

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

15 years agoChange compound assignment operators to keep track of both the promoted
Eli Friedman [Sat, 28 Mar 2009 01:22:36 +0000 (01:22 +0000)]
Change compound assignment operators to keep track of both the promoted
LHS type and the computation result type; this encodes information into
the AST which is otherwise non-obvious.  Fix Sema to always come up with the
right answer for both of these types.  Fix IRGen and the analyzer to
account for these changes.  This fixes PR2601.  The approach is inspired
by PR2601 comment 2.

Note that this changes real *= complex in CodeGen from a silent
miscompilation to an explicit error.

I'm not really sure that the analyzer changes are correct, or how to
test them... someone more familiar with the analyzer should check those
changes.

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

15 years agoImplement access checking for protected base classes.
Anders Carlsson [Sat, 28 Mar 2009 01:09:05 +0000 (01:09 +0000)]
Implement access checking for protected base classes.

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

15 years agomove StatListener out to top level.
Chris Lattner [Sat, 28 Mar 2009 00:55:35 +0000 (00:55 +0000)]
move StatListener out to top level.

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

15 years agoMake our diagnostics about the obsolete GNU designated-initializer
Douglas Gregor [Sat, 28 Mar 2009 00:41:23 +0000 (00:41 +0000)]
Make our diagnostics about the obsolete GNU designated-initializer
syntax into extension warnings, and provide code-modification hints
showing how to fix the problem.

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

15 years agovarious cleanups, no functionality change
Chris Lattner [Sat, 28 Mar 2009 00:16:20 +0000 (00:16 +0000)]
various cleanups, no functionality change

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

15 years agoBetter way to free NestedNameSpecifiers. Thanks, Chris
Douglas Gregor [Fri, 27 Mar 2009 23:54:10 +0000 (23:54 +0000)]
Better way to free NestedNameSpecifiers. Thanks, Chris

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

15 years agoFix <rdar://problem/6724396>, where we were silently dropping
Douglas Gregor [Fri, 27 Mar 2009 23:40:29 +0000 (23:40 +0000)]
Fix <rdar://problem/6724396>, where we were silently dropping
GNU-style array designators, causing us to emit broken initializers.

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

15 years agoPerform a very, very ugly song-and-dance number to free the
Douglas Gregor [Fri, 27 Mar 2009 23:25:45 +0000 (23:25 +0000)]
Perform a very, very ugly song-and-dance number to free the
NestedNameSpecifiers without causing problems for the FoldingSet that
contains them.

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

15 years agoDo not emit debug information for variables while generating optimized code. The...
Devang Patel [Fri, 27 Mar 2009 23:16:32 +0000 (23:16 +0000)]
Do not emit debug information for variables while generating optimized code.  The llvm optimizer and code generator are not yet ready to support optimized code debugging.

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

15 years agoInitial implementation of parsing, semantic analysis, and template
Douglas Gregor [Fri, 27 Mar 2009 23:10:48 +0000 (23:10 +0000)]
Initial implementation of parsing, semantic analysis, and template
instantiation for C++ typename-specifiers such as

  typename T::type

The parsing of typename-specifiers is relatively easy thanks to
annotation tokens. When we see the "typename", we parse the
typename-specifier and produce a typename annotation token. There are
only a few places where we need to handle this. We currently parse the
typename-specifier form that terminates in an identifier, but not the
simple-template-id form, e.g.,

  typename T::template apply<U, V>

Parsing of nested-name-specifiers has a similar problem, since at this
point we don't have any representation of a class template
specialization whose template-name is unknown.

Semantic analysis is only partially complete, with some support for
template instantiation that works for simple examples.

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

15 years agoAdd missing header file change.
Ted Kremenek [Fri, 27 Mar 2009 22:00:38 +0000 (22:00 +0000)]
Add missing header file change.

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

15 years agoBetter overload resolution for rvalue references.
Sebastian Redl [Fri, 27 Mar 2009 21:36:42 +0000 (21:36 +0000)]
Better overload resolution for rvalue references.

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

15 years agoBugReporter: For control-flow edges from 'if', 'for', 'do', 'while' to
Ted Kremenek [Fri, 27 Mar 2009 21:16:25 +0000 (21:16 +0000)]
BugReporter: For control-flow edges from 'if', 'for', 'do', 'while' to
successor, using 'getEnclosingStmt()' to have the end location be the top-level
Stmt* enclosing the target Expr*.

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

15 years agoFinish off semantic analysis for regparm, and remove the warning. Also
Eli Friedman [Fri, 27 Mar 2009 21:06:47 +0000 (21:06 +0000)]
Finish off semantic analysis for regparm, and remove the warning.  Also
remove a redundant error in CodeGen.

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

15 years agoFix test failures caused by reading memory after freeing it. My fix is
Eli Friedman [Fri, 27 Mar 2009 20:56:17 +0000 (20:56 +0000)]
Fix test failures caused by reading memory after freeing it.  My fix is
rather nasty, but I can't think of a better fix off the top of my head.

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

15 years agoBugReporter: PathDiagnosticBuilder::ExecutionContinues now returns a
Ted Kremenek [Fri, 27 Mar 2009 20:55:39 +0000 (20:55 +0000)]
BugReporter: PathDiagnosticBuilder::ExecutionContinues now returns a
PathDiagnosticLocation.

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

15 years agominor cleanups: make getIdentifierNamespace() be a single load
Chris Lattner [Fri, 27 Mar 2009 20:18:19 +0000 (20:18 +0000)]
minor cleanups: make getIdentifierNamespace() be a single load
instead of a load + large inlined switch.

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

15 years agoFixup -fcommon and -fno-common to be more gcc compatible.
Mike Stump [Fri, 27 Mar 2009 20:15:22 +0000 (20:15 +0000)]
Fixup -fcommon and -fno-common to be more gcc compatible.

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

15 years agoreduce # const_casts, no functionality change.
Chris Lattner [Fri, 27 Mar 2009 19:19:59 +0000 (19:19 +0000)]
reduce # const_casts, no functionality change.

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

15 years agoIt is OK to cast to a private base class if the current member belongs to the class...
Anders Carlsson [Fri, 27 Mar 2009 19:01:12 +0000 (19:01 +0000)]
It is OK to cast to a private base class if the current member belongs to the class that the private base class is a base of:

class A {};
class B : private A {
  void f(B *b) { A* a = b; }
};

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

15 years agoAdd a Class field to the base path element structure. This holds the record decl...
Anders Carlsson [Fri, 27 Mar 2009 18:54:29 +0000 (18:54 +0000)]
Add a Class field to the base path element structure. This holds the record decl of the class taht the base is a base of.

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

15 years agochange Decl::DeclCtx to use a PointerIntPair instead of hand bitmangling.
Chris Lattner [Fri, 27 Mar 2009 18:46:15 +0000 (18:46 +0000)]
change Decl::DeclCtx to use a PointerIntPair instead of hand bitmangling.

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

15 years agoBesides the warning, issue unsupported diagnostics in
Fariborz Jahanian [Fri, 27 Mar 2009 18:38:55 +0000 (18:38 +0000)]
Besides the warning, issue unsupported diagnostics in
ir gen. No intended change in functionality.

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

15 years agopush line markers through -E mode.
Chris Lattner [Fri, 27 Mar 2009 17:13:49 +0000 (17:13 +0000)]
push line markers through -E mode.

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

15 years agoUpdate "Getting Started" with more current information about 'clang-cc' and 'clang'.
Ted Kremenek [Fri, 27 Mar 2009 16:32:57 +0000 (16:32 +0000)]
Update "Getting Started" with more current information about 'clang-cc' and 'clang'.

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

15 years agoanalyzer plist: For PathDiagnosticControlFlowPieces, now output an array of
Ted Kremenek [Fri, 27 Mar 2009 15:53:20 +0000 (15:53 +0000)]
analyzer plist: For PathDiagnosticControlFlowPieces, now output an array of
start-end points, where start and end are source ranges.

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

15 years agoEmit aggregate "location" for PathDiagnostic to plist. This fixes <rdar://problem...
Ted Kremenek [Fri, 27 Mar 2009 15:31:11 +0000 (15:31 +0000)]
Emit aggregate "location" for PathDiagnostic to plist.  This fixes <rdar://problem/6729558>.

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

15 years agoMove declaration of 'PathDiagnostic' to the end of PathDiagnostic.h and add PathDiagn...
Ted Kremenek [Fri, 27 Mar 2009 15:24:36 +0000 (15:24 +0000)]
Move declaration of 'PathDiagnostic' to the end of PathDiagnostic.h and add PathDiagnostic::getLocation().

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

15 years agoDriver: Pass -f[no-]pascal-strings on to clang, even if it has been
Daniel Dunbar [Fri, 27 Mar 2009 15:22:28 +0000 (15:22 +0000)]
Driver: Pass -f[no-]pascal-strings on to clang, even if it has been
turned into -m[no-]pascal-strings by the tool chain.
 - This still has issue that derived arguments don't propogate "used"
   information correctly so spurious "argument unused" warnings will
   still show up.

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

15 years agoPathDiagnostic: replace 'std::list' with 'std::deque'
Ted Kremenek [Fri, 27 Mar 2009 14:59:04 +0000 (14:59 +0000)]
PathDiagnostic: replace 'std::list' with 'std::deque'

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

15 years agoAdd iterators to PathDiagnosticControlFlowDiagnostic for iterating over the
Ted Kremenek [Fri, 27 Mar 2009 14:54:49 +0000 (14:54 +0000)]
Add iterators to PathDiagnosticControlFlowDiagnostic for iterating over the
multiple location vectors.

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

15 years agoDriver: -print-libgcc-file-name was searching wrong path list.
Daniel Dunbar [Fri, 27 Mar 2009 14:26:33 +0000 (14:26 +0000)]
Driver: -print-libgcc-file-name was searching wrong path list.

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