]> granicus.if.org Git - clang/log
clang
15 years agoKeep track of type references in DeclReferenceMap.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 21:26:53 +0000 (21:26 +0000)]
Keep track of type references in DeclReferenceMap.

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

15 years agoIn ASTVisitor, call the correct base methods.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 21:26:35 +0000 (21:26 +0000)]
In ASTVisitor, call the correct base methods.

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

15 years agoFix Decl class hierarchy.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 21:26:14 +0000 (21:26 +0000)]
Fix Decl class hierarchy.

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

15 years ago13.1-p3 Overloadable declarations
Fariborz Jahanian [Tue, 29 Sep 2009 20:28:06 +0000 (20:28 +0000)]
13.1-p3 Overloadable declarations
Parameter declarations that differ only in the presence or absence of const and/or volatile are equivalent.

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

15 years agoResolve a source location inside the return type of a functon.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:58:16 +0000 (19:58 +0000)]
Resolve a source location inside the return type of a functon.

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

15 years agoWhen pointing at a type decl reference, ASTLocation is a NamedDeclRef.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:45:58 +0000 (19:45 +0000)]
When pointing at a type decl reference, ASTLocation is a NamedDeclRef.

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

15 years agoResolve a source location that is inside a type declarator.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:45:41 +0000 (19:45 +0000)]
Resolve a source location that is inside a type declarator.

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

15 years agoIntroduce ObjCInterfaceLoc which provides type source information for ObjC interfaces.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:45:22 +0000 (19:45 +0000)]
Introduce ObjCInterfaceLoc which provides type source information for ObjC interfaces.

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

15 years agoIntroduce TypedefLoc::getTypedefDecl().
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:44:47 +0000 (19:44 +0000)]
Introduce TypedefLoc::getTypedefDecl().

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

15 years agoModify ASTLocation and apart from being a Decl or Stmt, allow it to also be:
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:44:27 +0000 (19:44 +0000)]
Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:

-A NamedDecl reference
-A TypeLoc

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

15 years agoIntroduce ObjCProtocolListLoc for keeping source location information for protocol...
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:43:35 +0000 (19:43 +0000)]
Introduce ObjCProtocolListLoc for keeping source location information for protocol references.

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

15 years agoIntroduce ObjCProtocolListType type subclass.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:42:55 +0000 (19:42 +0000)]
Introduce ObjCProtocolListType type subclass.

This is used only for keeping detailed type source information for protocol references,
it should not participate in the semantics of the type system.

Its protocol list is not canonicalized.

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

15 years agoMove DeclSpec::setProtocolQualifiers() out of line.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:42:11 +0000 (19:42 +0000)]
Move DeclSpec::setProtocolQualifiers() out of line.

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

15 years agoKeep protocol source locations when parsing protocol references.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:41:44 +0000 (19:41 +0000)]
Keep protocol source locations when parsing protocol references.

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

15 years agoIntroduce Type::getTypeClassName() that returns the string associated with the TypeCl...
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:41:13 +0000 (19:41 +0000)]
Introduce Type::getTypeClassName() that returns the string associated with the TypeClass enum.

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

15 years agoIntroduce TypeLoc::getSourceRange().
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:40:46 +0000 (19:40 +0000)]
Introduce TypeLoc::getSourceRange().

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

15 years ago-Introduce TypeLoc::getOpaqueData()
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:40:20 +0000 (19:40 +0000)]
-Introduce TypeLoc::getOpaqueData()
-Make TypeLoc's constructor public.

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

15 years agoAdd more const-goodness to ASTLocation.
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:39:53 +0000 (19:39 +0000)]
Add more const-goodness to ASTLocation.

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

15 years agoFix truck sized thinko where Darwin/ARM toolchain didn't look for programs in
Daniel Dunbar [Tue, 29 Sep 2009 18:52:10 +0000 (18:52 +0000)]
Fix truck sized thinko where Darwin/ARM toolchain didn't look for programs in
libexec, *blush*.

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

15 years agoAdd a test case demonstrating a situation where we get protocol type checking
Daniel Dunbar [Tue, 29 Sep 2009 18:51:43 +0000 (18:51 +0000)]
Add a test case demonstrating a situation where we get protocol type checking
right for multiple anonymous categories.

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

15 years agoHandle C++ delete expressions when the overloaded delete operator is a
Douglas Gregor [Tue, 29 Sep 2009 18:16:17 +0000 (18:16 +0000)]
Handle C++ delete expressions when the overloaded delete operator is a
"usual deallocation function" with two arguments. CodeGen will have to
handle this case specifically, since the value for the second argument
(the size of the allocated object) may have to be computed at run
time.

Fixes the Sema part of PR4782.

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

15 years agoFixes a nasty bug which only turned up in 32bit build of clang and
Fariborz Jahanian [Tue, 29 Sep 2009 17:31:54 +0000 (17:31 +0000)]
Fixes a nasty bug which only turned up in 32bit build of clang and
had to do with an initialized field when multiple type conversions
are ambiguous but must be treated as user defined conversion for
overload resolution purposes.

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

15 years agoUpdate checker build.
Ted Kremenek [Tue, 29 Sep 2009 17:08:03 +0000 (17:08 +0000)]
Update checker build.

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

15 years agoFix: <rdar://problem/7261075> [RegionStore] crash when handling load: '*((unsigned...
Ted Kremenek [Tue, 29 Sep 2009 16:36:48 +0000 (16:36 +0000)]
Fix: <rdar://problem/7261075> [RegionStore] crash when handling load: '*((unsigned int *)"????")'

This issue was originally reported via personal email by Thomas Clement!

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

15 years agoMake sure to flush raw_string_ostream, from John Thompson
Douglas Gregor [Tue, 29 Sep 2009 15:13:39 +0000 (15:13 +0000)]
Make sure to flush raw_string_ostream, from John Thompson

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

15 years agoAllow the PYTHON make variable to override the default Python when running Clang...
Douglas Gregor [Tue, 29 Sep 2009 14:54:28 +0000 (14:54 +0000)]
Allow the PYTHON make variable to override the default Python when running Clang tests, from Ken Dyck.

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

15 years agoSet GNUMode only for the "gnu" language standard options, from Ken Dyck!
Douglas Gregor [Tue, 29 Sep 2009 14:42:43 +0000 (14:42 +0000)]
Set GNUMode only for the "gnu" language standard options, from Ken Dyck!

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

15 years agoSlightly improve the semantics of extern templates for member functions of class...
Douglas Gregor [Tue, 29 Sep 2009 14:38:03 +0000 (14:38 +0000)]
Slightly improve the semantics of extern templates for member functions of class templates

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

15 years agoFix really insidious bug in RegionStoreManager::RemoveDeadBindings()
Ted Kremenek [Tue, 29 Sep 2009 06:35:00 +0000 (06:35 +0000)]
Fix really insidious bug in RegionStoreManager::RemoveDeadBindings()
identified with a false positive reported by Thomas Clement.  This
involved doing another rewrite of
RegionStoreManager::RemoveDeadBindings(), which phrases the entire
problem of scanning for dead regions as a graph exploration problem.
It is more methodic than the previous implementation.

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

15 years agoRemove PR5061 workaround.
Anders Carlsson [Tue, 29 Sep 2009 05:36:21 +0000 (05:36 +0000)]
Remove PR5061 workaround.

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

15 years agoHandle CXXMemberCallExprs that point to a static method. Fixes PR5093.
Anders Carlsson [Tue, 29 Sep 2009 03:54:11 +0000 (03:54 +0000)]
Handle CXXMemberCallExprs that point to a static method. Fixes PR5093.

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

15 years agoForgot test.
Anders Carlsson [Tue, 29 Sep 2009 03:38:56 +0000 (03:38 +0000)]
Forgot test.

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

15 years agoReapply most of r82939, but add a guard that FieldRegions and friends
Ted Kremenek [Tue, 29 Sep 2009 03:34:03 +0000 (03:34 +0000)]
Reapply most of r82939, but add a guard that FieldRegions and friends
are only specially treated by RegionStore::InvalidateRegion() when
their super region is also invalidated.  When this isn't the case,
conjure a new symbol for a FieldRegion.  Thanks to Zhongxing Xu and
Daniel Dunbar for pointing out this issue.

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

15 years agoAdd an input file that includes all standard C++ headers
Douglas Gregor [Tue, 29 Sep 2009 03:26:11 +0000 (03:26 +0000)]
Add an input file that includes all standard C++ headers

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

15 years agoHandle CK_BaseToDerivedMemberPointer for member function pointers. Fixes PR5091.
Anders Carlsson [Tue, 29 Sep 2009 03:13:20 +0000 (03:13 +0000)]
Handle CK_BaseToDerivedMemberPointer for member function pointers. Fixes PR5091.

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

15 years agoRevert r82939. We can only not special case FieldRegions when the super region has...
Ted Kremenek [Tue, 29 Sep 2009 03:12:50 +0000 (03:12 +0000)]
Revert r82939.  We can only not special case FieldRegions when the super region has also been invalidated.

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

15 years agoImprove support for member function pointers.
Anders Carlsson [Tue, 29 Sep 2009 02:09:01 +0000 (02:09 +0000)]
Improve support for member function pointers.

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

15 years agoUse a switch statement in VisitCastExpr.
Anders Carlsson [Tue, 29 Sep 2009 01:23:39 +0000 (01:23 +0000)]
Use a switch statement in VisitCastExpr.

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

15 years agoMake hasAggregateLLVMType use positive checks.
Anders Carlsson [Tue, 29 Sep 2009 01:15:29 +0000 (01:15 +0000)]
Make hasAggregateLLVMType use positive checks.

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

15 years agoFix http://llvm.org/PR5090.
Mike Stump [Tue, 29 Sep 2009 00:50:50 +0000 (00:50 +0000)]
Fix http://llvm.org/PR5090.

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

15 years agoRemove test case's dependency on platform headers.
Ted Kremenek [Mon, 28 Sep 2009 23:54:40 +0000 (23:54 +0000)]
Remove test case's dependency on platform headers.

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

15 years agoDefine and use a helper method to call a type conversion
Fariborz Jahanian [Mon, 28 Sep 2009 23:23:40 +0000 (23:23 +0000)]
Define and use a helper method to call a type conversion
function.

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

15 years agoMinor API change. No change in functionality.
Fariborz Jahanian [Mon, 28 Sep 2009 22:03:07 +0000 (22:03 +0000)]
Minor API change. No change in functionality.

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

15 years agoAdd all of the C99 complex builtins prefixed with __builtin_
Douglas Gregor [Mon, 28 Sep 2009 21:45:01 +0000 (21:45 +0000)]
Add all of the C99 complex builtins prefixed with __builtin_

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

15 years agoAdd -Wbuiltin-macro-redefined/-Wno-builtin-macro-redefined.
Rafael Espindola [Mon, 28 Sep 2009 21:24:34 +0000 (21:24 +0000)]
Add -Wbuiltin-macro-redefined/-Wno-builtin-macro-redefined.

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

15 years agoProvide a custom diagnostic when code tries to use an unknown builtin
Douglas Gregor [Mon, 28 Sep 2009 21:14:19 +0000 (21:14 +0000)]
Provide a custom diagnostic when code tries to use an unknown builtin

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

15 years agoMultiple conversions to the same type are ambiguous but for the
Fariborz Jahanian [Mon, 28 Sep 2009 19:06:58 +0000 (19:06 +0000)]
Multiple conversions to the same type are ambiguous but for the
purpose of overload resolution is to be treated as a uner-defined
conversion.

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

15 years agoMake sure that out-of-line function and variable definitions are not
Douglas Gregor [Mon, 28 Sep 2009 18:41:37 +0000 (18:41 +0000)]
Make sure that out-of-line function and variable definitions are not
pushed into scope. Fixes PR5056.

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

15 years agoPatch for AST representation for the implicit conversion to a function
Fariborz Jahanian [Mon, 28 Sep 2009 18:35:46 +0000 (18:35 +0000)]
Patch for AST representation for the implicit conversion to a function
reference/pointer. And a test case for code gen.

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

15 years agoAdd __builtin_vsnprintf. Thanks to Anders Johnsen
Douglas Gregor [Mon, 28 Sep 2009 18:08:57 +0000 (18:08 +0000)]
Add __builtin_vsnprintf. Thanks to Anders Johnsen

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

15 years agoParse a C++ scope specifier followed by a "typename" annotation token as a type name...
Douglas Gregor [Mon, 28 Sep 2009 07:26:33 +0000 (07:26 +0000)]
Parse a C++ scope specifier followed by a "typename" annotation token as a type name within the declaration specifiers. Fixes PR5061.

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

15 years agoProperly match instantiations of member function templates to the function templates...
Douglas Gregor [Mon, 28 Sep 2009 06:34:35 +0000 (06:34 +0000)]
Properly match instantiations of member function templates to the function templates from which they were instantiated

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

15 years agoDon't allow the same function to enter the overload candidate set
Douglas Gregor [Mon, 28 Sep 2009 04:47:19 +0000 (04:47 +0000)]
Don't allow the same function to enter the overload candidate set
multiple times. This requires to be more careful about re-adding
candidates cached from the function template definition.

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

15 years agoDeterminism is for wimps. <Wimper>
Douglas Gregor [Mon, 28 Sep 2009 03:51:44 +0000 (03:51 +0000)]
Determinism is for wimps. <Wimper>

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

15 years agoTeach Sema::isDeclInScope to handle overload sets constructed from
Douglas Gregor [Mon, 28 Sep 2009 00:47:05 +0000 (00:47 +0000)]
Teach Sema::isDeclInScope to handle overload sets constructed from
functions that occur in multiple declaration contexts, e.g., because
some were found via using declarations. Now, isDeclInScope will build
a new overload set (when needed) containing only those declarations
that are actually in scope. This eliminates a problem found with
libstdc++'s <iostream>, where the presence of using

In the longer term, I'd like to eliminate Sema::isDeclInScope in favor
of better handling of the RedeclarationOnly flag in the name-lookup
routines. That way, name lookup only returns the entities that matter,
rather than taking the current two-pass approach of producing too many
results and then filtering our the wrong results. It's not efficient,
and I'm sure that we aren't filtering everywhere we should be.

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

15 years agoImprove handling of friend function templates somewhat
Douglas Gregor [Mon, 28 Sep 2009 00:08:27 +0000 (00:08 +0000)]
Improve handling of friend function templates somewhat

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

15 years agoSpecially handle fields, elements, and ivars in
Ted Kremenek [Sun, 27 Sep 2009 22:39:07 +0000 (22:39 +0000)]
Specially handle fields, elements, and ivars in
RegionStoreManager::InvalidateRegion() by only removing their old
binding, not conjuring a new symbol.

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

15 years agoAdd FIXME comment.
Ted Kremenek [Sun, 27 Sep 2009 20:50:04 +0000 (20:50 +0000)]
Add FIXME comment.

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

15 years agoFix:
Ted Kremenek [Sun, 27 Sep 2009 20:45:21 +0000 (20:45 +0000)]
Fix:

<rdar://problem/6914474> checker doesn't realize that variable might
have been assigned if a pointer to that variable was passed to another
function via a structure

The problem here was the RegionStoreManager::InvalidateRegion didn't
invalidate the bindings of invalidated regions.  This required a
rewrite of this method using a worklist.

As part of this fix, changed ValueManager::getConjuredSymbolVal() to
require a 'void*' SymbolTag argument.  This tag is used to
differentiate two different symbols created at the same location.

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

15 years agoMangle dependent name expressions. Fixes PR5063.
Anders Carlsson [Sun, 27 Sep 2009 20:11:34 +0000 (20:11 +0000)]
Mangle dependent name expressions. Fixes PR5063.

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

15 years agoUse mangleTemplatePrefix when we know that we're mangling a nested template name.
Anders Carlsson [Sun, 27 Sep 2009 19:53:49 +0000 (19:53 +0000)]
Use mangleTemplatePrefix when we know that we're mangling a nested template name.

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

15 years agoCodeGen for try statements. (We just emit the body for now).
Anders Carlsson [Sun, 27 Sep 2009 18:58:34 +0000 (18:58 +0000)]
CodeGen for try statements. (We just emit the body for now).

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

15 years agoCMake generate VS2008 project and CLang and LLVM compile without problem on VS2008...
Cedric Venet [Sun, 27 Sep 2009 10:34:36 +0000 (10:34 +0000)]
CMake generate VS2008 project and CLang and LLVM compile without problem on VS2008. Remove obsolete remark

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

15 years agoHandle Eli remark on mingw __declspec macro definition
Cedric Venet [Sun, 27 Sep 2009 10:09:11 +0000 (10:09 +0000)]
Handle Eli remark on mingw __declspec macro definition

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

15 years agoLook for substitutions when mangling TypenameTypes.
Anders Carlsson [Sun, 27 Sep 2009 01:06:07 +0000 (01:06 +0000)]
Look for substitutions when mangling TypenameTypes.

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

15 years agoBetter template parameter type mangling.
Anders Carlsson [Sun, 27 Sep 2009 00:38:53 +0000 (00:38 +0000)]
Better template parameter type mangling.

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

15 years agoMangle std::basic_string<char, std::char_traits<char>, std::allocator<char> > as Ss.
Anders Carlsson [Sun, 27 Sep 2009 00:12:57 +0000 (00:12 +0000)]
Mangle std::basic_string<char, std::char_traits<char>, std::allocator<char> > as Ss.

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

15 years agoMangle ::std::basic_string as Sb.
Anders Carlsson [Sat, 26 Sep 2009 23:14:39 +0000 (23:14 +0000)]
Mangle ::std::basic_string as Sb.

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

15 years agoMangle ::std::allocator as Sa.
Anders Carlsson [Sat, 26 Sep 2009 23:10:05 +0000 (23:10 +0000)]
Mangle ::std::allocator as Sa.

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

15 years agoHandle substitutions in mangleTemplatePrefix.
Anders Carlsson [Sat, 26 Sep 2009 22:18:22 +0000 (22:18 +0000)]
Handle substitutions in mangleTemplatePrefix.

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

15 years agoMake Decl::dump const.
Anders Carlsson [Sat, 26 Sep 2009 21:58:53 +0000 (21:58 +0000)]
Make Decl::dump const.

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

15 years agobuiltin_trap should be noreturn, this fixes PR5062, patch by
Chris Lattner [Sat, 26 Sep 2009 21:16:00 +0000 (21:16 +0000)]
builtin_trap should be noreturn, this fixes PR5062, patch by
Roman Divacky!

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

15 years agoSimplify the handling of non-dependent friend class template
Douglas Gregor [Sat, 26 Sep 2009 20:57:03 +0000 (20:57 +0000)]
Simplify the handling of non-dependent friend class template
specializations such as:

  friend class std::vector<int>;

by using the same code path as explicit specializations, customized to
reference an existing ClassTemplateSpecializationDecl (or build a new
"undeclared" one).

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

15 years agoSubstitute "::std::" as "St".
Anders Carlsson [Sat, 26 Sep 2009 20:53:44 +0000 (20:53 +0000)]
Substitute "::std::" as "St".

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

15 years agoDon't crash when trying to mangle function templates.
Anders Carlsson [Sat, 26 Sep 2009 20:13:56 +0000 (20:13 +0000)]
Don't crash when trying to mangle function templates.

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

15 years agomangleTemplatePrefix and mangleUnscopedTemplateName should take a TemplateDecl.
Anders Carlsson [Sat, 26 Sep 2009 19:45:45 +0000 (19:45 +0000)]
mangleTemplatePrefix and mangleUnscopedTemplateName should take a TemplateDecl.

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

15 years agoUse the qualified name for tag types.
Anders Carlsson [Sat, 26 Sep 2009 19:03:24 +0000 (19:03 +0000)]
Use the qualified name for tag types.

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

15 years agoSet alignment on static function level decls and VLAs. Fixes PR5060.
Anders Carlsson [Sat, 26 Sep 2009 18:16:06 +0000 (18:16 +0000)]
Set alignment on static function level decls and VLAs. Fixes PR5060.

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

15 years agoAdded test case for <rdar://problem/7152418>.
Ted Kremenek [Sat, 26 Sep 2009 17:18:44 +0000 (17:18 +0000)]
Added test case for <rdar://problem/7152418>.

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

15 years agoAddress comment from Daniel.
Anders Carlsson [Sat, 26 Sep 2009 16:55:29 +0000 (16:55 +0000)]
Address comment from Daniel.

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

15 years agoPass the formatted_raw_ostream to createPrintModulePass and
Dan Gohman [Sat, 26 Sep 2009 15:06:14 +0000 (15:06 +0000)]
Pass the formatted_raw_ostream to createPrintModulePass and
createBitcodeWriterPass instead of the underlying raw_ostream. This
avoids trouble with formatted_raw_ostream's behavior of setting the
underlying stream to be unbuffered, which resulted in
clang -emit-llvm -S using unbuffered output.

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

15 years agoRevert "Force triple in test.", this wasn't the problem.
Daniel Dunbar [Sat, 26 Sep 2009 07:43:49 +0000 (07:43 +0000)]
Revert "Force triple in test.", this wasn't the problem.

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

15 years agoUpdate checker build.
Ted Kremenek [Sat, 26 Sep 2009 07:39:39 +0000 (07:39 +0000)]
Update checker build.

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

15 years agoAdd the lib path to LD_LIBRARY_PATH, so finding .so works (more) portably.
Daniel Dunbar [Sat, 26 Sep 2009 07:36:09 +0000 (07:36 +0000)]
Add the lib path to LD_LIBRARY_PATH, so finding .so works (more) portably.

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

15 years agoForce triple in test.
Daniel Dunbar [Sat, 26 Sep 2009 07:06:36 +0000 (07:06 +0000)]
Force triple in test.

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

15 years agoFix name lookup for friend class templates to consider anything in a
Douglas Gregor [Sat, 26 Sep 2009 07:05:09 +0000 (07:05 +0000)]
Fix name lookup for friend class templates to consider anything in a
scope *up to and including* the innermost namespace scope, rather than
just searching in the innermost namespace scope.

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

15 years agoRework the Parse-Sema interaction for friends to better support friend
Douglas Gregor [Sat, 26 Sep 2009 06:47:28 +0000 (06:47 +0000)]
Rework the Parse-Sema interaction for friends to better support friend
class templates. We now treat friend class templates much more like
normal class templates, except that they still get special name lookup
rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in
<iostream>.

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

15 years agoHoist some branches in AnalysisManager::HandleTranslationUnit so we
Ted Kremenek [Sat, 26 Sep 2009 04:15:09 +0000 (04:15 +0000)]
Hoist some branches in AnalysisManager::HandleTranslationUnit so we
avoid scanning for an "entry point" FunctionDecl if we (a) have no
translation unit actions and (b) no entry point function has been
specified.

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

15 years agoUse ABIArgInfo::getDirect() for all types that have a pointer representation.
Anders Carlsson [Sat, 26 Sep 2009 03:56:53 +0000 (03:56 +0000)]
Use ABIArgInfo::getDirect() for all types that have a pointer representation.

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

15 years agoYet another simplifying use of Sema::getMostSpecialized
Douglas Gregor [Sat, 26 Sep 2009 03:56:17 +0000 (03:56 +0000)]
Yet another simplifying use of Sema::getMostSpecialized

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

15 years agoMangle record types as decls.
Anders Carlsson [Sat, 26 Sep 2009 03:55:37 +0000 (03:55 +0000)]
Mangle record types as decls.

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

15 years agoAdd a "positive" matching test case for attribute 'noreturn' that involves a nested...
Ted Kremenek [Sat, 26 Sep 2009 03:54:06 +0000 (03:54 +0000)]
Add a "positive" matching test case for attribute 'noreturn' that involves a nested infinite loop.

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

15 years agoAdd two more test cases for attribute 'noreturn'.
Ted Kremenek [Sat, 26 Sep 2009 03:48:56 +0000 (03:48 +0000)]
Add two more test cases for attribute 'noreturn'.

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

15 years agoUse Sema::getMostSpecialized to eliminate a redundant implementation of the most...
Douglas Gregor [Sat, 26 Sep 2009 03:41:46 +0000 (03:41 +0000)]
Use Sema::getMostSpecialized to eliminate a redundant implementation of the most-specialized function template

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

15 years agoChange isTemplate to return the actual template declaration.
Anders Carlsson [Sat, 26 Sep 2009 03:24:57 +0000 (03:24 +0000)]
Change isTemplate to return the actual template declaration.

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

15 years agoImprove mangling of typename types.
Anders Carlsson [Sat, 26 Sep 2009 02:26:02 +0000 (02:26 +0000)]
Improve mangling of typename types.

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

15 years agoRename NextOffset to DataSize.
Anders Carlsson [Sat, 26 Sep 2009 01:34:51 +0000 (01:34 +0000)]
Rename NextOffset to DataSize.

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

15 years agoStart at NextOffset when laying out bases as well.
Anders Carlsson [Sat, 26 Sep 2009 01:29:10 +0000 (01:29 +0000)]
Start at NextOffset when laying out bases as well.

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

15 years agoDisable c-index-test on MSVC until someone figures out the real problem.
Daniel Dunbar [Sat, 26 Sep 2009 01:21:38 +0000 (01:21 +0000)]
Disable c-index-test on MSVC until someone figures out the real problem.

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

15 years agoUse NextOffset when laying out a field.
Anders Carlsson [Sat, 26 Sep 2009 01:09:35 +0000 (01:09 +0000)]
Use NextOffset when laying out a field.

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