]> granicus.if.org Git - clang/log
clang
14 years agoMake two methods have compatible signatures with the methods they override.
John McCall [Fri, 13 Aug 2010 03:01:11 +0000 (03:01 +0000)]
Make two methods have compatible signatures with the methods they override.

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

14 years agoPerform access control when template lookup finds a class template.
John McCall [Fri, 13 Aug 2010 02:23:42 +0000 (02:23 +0000)]
Perform access control when template lookup finds a class template.
This is *really* hacky.

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

14 years agoZap unused UnaryOperator::OffsetOf.
Eli Friedman [Fri, 13 Aug 2010 01:36:11 +0000 (01:36 +0000)]
Zap unused UnaryOperator::OffsetOf.

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

14 years agoThe Sema object will get destroyed before all of the others anyway. We don't need...
Douglas Gregor [Fri, 13 Aug 2010 00:52:31 +0000 (00:52 +0000)]
The Sema object will get destroyed before all of the others anyway. We don't need to force it

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

14 years agoInstead of modifying the ObjC AST to not modify existing declarations, teach chained...
Sebastian Redl [Fri, 13 Aug 2010 00:28:03 +0000 (00:28 +0000)]
Instead of modifying the ObjC AST to not modify existing declarations, teach chained PCH to overwrite declarations from earlier PCH files in dependent ones. Tell Sema to note when it changes AST nodes so that they have to be reserialized. Finally, the ObjCProtocolDecls created in forward decls, like the ObjCInterfaceDecls in @class forward decls, are not lexically part of the decl context; only the definition is.

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

14 years agoMake use of __func__ in a block actually refer to
Fariborz Jahanian [Fri, 13 Aug 2010 00:19:55 +0000 (00:19 +0000)]
Make use of __func__ in a block actually refer to
block's helper function. Fixes radar 7860965.

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

14 years agoJust disable the hidden-visibility optimization for now by hiding it behind
John McCall [Thu, 12 Aug 2010 23:36:15 +0000 (23:36 +0000)]
Just disable the hidden-visibility optimization for now by hiding it behind
a -cc1 option.  The Darwin linker complains about mixed visibility when linking
gcc-built objects with clang-built objects, and the optimization isn't really
that valuable.  Platforms with less ornery linkers can feel free to enable this.

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

14 years agoTeach CompilerInstance to create and hold on to the Sema object used
Douglas Gregor [Thu, 12 Aug 2010 23:31:19 +0000 (23:31 +0000)]
Teach CompilerInstance to create and hold on to the Sema object used
for parsing, so that it can persist beyond the lifetime of the parsing
call.

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

14 years agoSmall changes to UnreachableCodeChecker
Tom Care [Thu, 12 Aug 2010 23:01:06 +0000 (23:01 +0000)]
Small changes to UnreachableCodeChecker
- Added detection of Empty CFGBlocks (artificial blocks)
- Relaxed an assertion based on an incorrect assumption until further investigation

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

14 years agoAdd a ParseAST overload that takes a Sema object, so that the caller
Douglas Gregor [Thu, 12 Aug 2010 22:51:45 +0000 (22:51 +0000)]
Add a ParseAST overload that takes a Sema object, so that the caller
can create (and hold on to) the Sema object. Also, move Sema-related
initialization/finalization with its various consumers and external
sources into the Sema constructor and destructor, rather than placing
it in ParseAST.

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

14 years agoImproved IdempotentOperationChecker false positives and false negatives.
Tom Care [Thu, 12 Aug 2010 22:45:47 +0000 (22:45 +0000)]
Improved IdempotentOperationChecker false positives and false negatives.
- Unfinished analysis may still report valid warnings if the path was completely analyzed
- New 'CanVary' heuristic to recursively determine if a subexpression has a varying element
- Updated test cases, including one known bug
- Exposed GRCoreEngine through GRExprEngine

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

14 years agoTypo.
Fariborz Jahanian [Thu, 12 Aug 2010 22:33:42 +0000 (22:33 +0000)]
Typo.

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

14 years agoPatch to issue warning when colllection expresion's type
Fariborz Jahanian [Thu, 12 Aug 2010 22:25:42 +0000 (22:25 +0000)]
Patch to issue warning when colllection expresion's type
does not implement 'countByEnumeratingWithState' API.
Implements radar 7634669.

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

14 years agoImplement -Wcast-align. The initial design of this diagnostic diverges
John McCall [Thu, 12 Aug 2010 21:44:57 +0000 (21:44 +0000)]
Implement -Wcast-align.  The initial design of this diagnostic diverges
from GCC's in that we warn on *any* increase in alignment requirements, not
just those that are enforced by hardware.  Please let us know if this causes
major problems for you (which it shouldn't, since it's an optional warning).

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

14 years agoFixing the build isn't good enough; back out r110956 and r110953.
John McCall [Thu, 12 Aug 2010 21:39:05 +0000 (21:39 +0000)]
Fixing the build isn't good enough;  back out r110956 and r110953.

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

14 years agodgregor should write code that compiles.
John McCall [Thu, 12 Aug 2010 21:23:27 +0000 (21:23 +0000)]
dgregor should write code that compiles.

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

14 years agoUpdate Xcode project
Douglas Gregor [Thu, 12 Aug 2010 20:53:33 +0000 (20:53 +0000)]
Update Xcode project

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

14 years agoAdd a ParseAST overload that takes a Sema object, so that the caller
Douglas Gregor [Thu, 12 Aug 2010 20:50:39 +0000 (20:50 +0000)]
Add a ParseAST overload that takes a Sema object, so that the caller
can create (and hold on to) the Sema object. Also, move Sema-related
initialization/finalization with its various consumers and external
sources into the Sema constructor and destructor, rather than placing
it in ParseAST.

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

14 years agoFixes block type matching bug. Radar 8302845.
Fariborz Jahanian [Thu, 12 Aug 2010 20:46:12 +0000 (20:46 +0000)]
Fixes block type matching bug. Radar 8302845.

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

14 years agoMove Sema's headers into include/clang/Sema, renaming a few along the way.
Douglas Gregor [Thu, 12 Aug 2010 20:07:10 +0000 (20:07 +0000)]
Move Sema's headers into include/clang/Sema, renaming a few along the way.

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

14 years agoRevert r110936; this fails on clang-i686-darwin10 too.
Dan Gohman [Thu, 12 Aug 2010 18:57:17 +0000 (18:57 +0000)]
Revert r110936; this fails on clang-i686-darwin10 too.

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

14 years agofirst test commit
Anton Yartsev [Thu, 12 Aug 2010 18:51:55 +0000 (18:51 +0000)]
first test commit

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

14 years agoDowngrade error about nonnull attribute bbeing applied to a function without point...
Douglas Gregor [Thu, 12 Aug 2010 18:48:43 +0000 (18:48 +0000)]
Downgrade  error about nonnull attribute bbeing applied to a function without point arguments to a warning

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

14 years agoMake this test darwin only.
Devang Patel [Thu, 12 Aug 2010 17:42:42 +0000 (17:42 +0000)]
Make this test darwin only.

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

14 years agoDon't emit end-of-file diagnostics like "unterminated conditional" or
Douglas Gregor [Thu, 12 Aug 2010 17:04:55 +0000 (17:04 +0000)]
Don't emit end-of-file diagnostics like "unterminated conditional" or
"unterminated string" when we're performing code completion.

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

14 years agoTemporarily disable this failing test, until it can be properly
Dan Gohman [Thu, 12 Aug 2010 15:19:46 +0000 (15:19 +0000)]
Temporarily disable this failing test, until it can be properly
investigated.

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

14 years agoAdd a comment.
Argyrios Kyrtzidis [Thu, 12 Aug 2010 12:31:25 +0000 (12:31 +0000)]
Add a comment.

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

14 years agoAdded locations and type source info for DeclarationName inside UsingDecl.
Abramo Bagnara [Thu, 12 Aug 2010 11:46:03 +0000 (11:46 +0000)]
Added locations and type source info for DeclarationName inside UsingDecl.

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

14 years agoRemove OwnershipAttr::Kind, since it's essentially redundant with attr::Kind the...
Jordy Rose [Thu, 12 Aug 2010 08:54:03 +0000 (08:54 +0000)]
Remove OwnershipAttr::Kind, since it's essentially redundant with attr::Kind the way it's being used. Also fix isa<OwnershipAttr> support, break more-than-80-char lines, and other miscellaneous ownership attr cleanup.

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

14 years agoTest for rdar://problem/8073696.
John McCall [Thu, 12 Aug 2010 07:31:42 +0000 (07:31 +0000)]
Test for rdar://problem/8073696.

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

14 years agoHandle the obvious case for diagnosing redeclarations of extern "C" functions.
John McCall [Thu, 12 Aug 2010 07:09:11 +0000 (07:09 +0000)]
Handle the obvious case for diagnosing redeclarations of extern "C" functions.

Fixes PR7859.

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

14 years agoActually use reduced set of checkers in EvalAssume.
Jordy Rose [Thu, 12 Aug 2010 04:05:07 +0000 (04:05 +0000)]
Actually use reduced set of checkers in EvalAssume.

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

14 years agoFrontend: Move the bulk of the cc1_main() processing into
Daniel Dunbar [Thu, 12 Aug 2010 02:53:12 +0000 (02:53 +0000)]
Frontend: Move the bulk of the cc1_main() processing into
ExecuteCompilerInvocation in libFrontend.

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

14 years agoclang -cc1: Move real diagnostics client initialization to earlier.
Daniel Dunbar [Thu, 12 Aug 2010 02:53:07 +0000 (02:53 +0000)]
clang -cc1: Move real diagnostics client initialization to earlier.

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

14 years agoBail out of MaybeBindToTemporary if the record type is invalid. Test case
John McCall [Thu, 12 Aug 2010 02:40:37 +0000 (02:40 +0000)]
Bail out of MaybeBindToTemporary if the record type is invalid.  Test case
is 8.5MB, sorry.

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

14 years agoImplement RTTI generation for Objective C types. Fixes PR7864.
John McCall [Thu, 12 Aug 2010 02:17:33 +0000 (02:17 +0000)]
Implement RTTI generation for Objective C types.  Fixes PR7864.

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

14 years agoFix a crash on invalid when declaring an implicit member of a class with an
John McCall [Thu, 12 Aug 2010 00:57:17 +0000 (00:57 +0000)]
Fix a crash on invalid when declaring an implicit member of a class with an
invalid destructor.

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

14 years agoDriver: Use the compile time linker version as the default for -mlinker-version,
Daniel Dunbar [Thu, 12 Aug 2010 00:05:12 +0000 (00:05 +0000)]
Driver: Use the compile time linker version as the default for -mlinker-version,
if detected.
 - This is a hack, we really want the linker version at execution time, but we
   don't have any infrastructure for getting that. Yet.

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

14 years agoEmit debug info for static const class member.
Devang Patel [Thu, 12 Aug 2010 00:02:44 +0000 (00:02 +0000)]
Emit debug info for static const class member.

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

14 years agoupdate test to reflect r110876 change.
Devang Patel [Thu, 12 Aug 2010 00:00:41 +0000 (00:00 +0000)]
update test to reflect r110876 change.

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

14 years agoDon't try to implicitly declare special members of an invalid class.
John McCall [Wed, 11 Aug 2010 23:52:36 +0000 (23:52 +0000)]
Don't try to implicitly declare special members of an invalid class.
Fixes a crash in a rather large and difficult-to-reduce test case.

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

14 years agoFix a bug where child statements could not be identified as being in a CFGBlock in...
Tom Care [Wed, 11 Aug 2010 23:36:58 +0000 (23:36 +0000)]
Fix a bug where child statements could not be identified as being in a CFGBlock in CFGStmtMap::getBlock.

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

14 years agoSwitch on PCH for C++. C++ fans all over the world rejoice.
Argyrios Kyrtzidis [Wed, 11 Aug 2010 23:27:58 +0000 (23:27 +0000)]
Switch on PCH for C++. C++ fans all over the world rejoice.

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

14 years agoDriver/Darwin: Pass -demangle when linking, if the linker supports it.
Daniel Dunbar [Wed, 11 Aug 2010 23:07:50 +0000 (23:07 +0000)]
Driver/Darwin: Pass -demangle when linking, if the linker supports it.

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

14 years agoDriver: Add -mlinker-version=, which forwards to -target-linker-version.
Daniel Dunbar [Wed, 11 Aug 2010 23:07:47 +0000 (23:07 +0000)]
Driver: Add -mlinker-version=, which forwards to -target-linker-version.

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

14 years agoFrontend: Add -target-linker-version, for specifying the version string of the
Daniel Dunbar [Wed, 11 Aug 2010 23:07:42 +0000 (23:07 +0000)]
Frontend: Add -target-linker-version, for specifying the version string of the
linker in use.

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

14 years agoFix oversight with symbolic names in TargetInfo::validateInputConstraint.
Eli Friedman [Wed, 11 Aug 2010 23:03:37 +0000 (23:03 +0000)]
Fix oversight with symbolic names in TargetInfo::validateInputConstraint.

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

14 years ago-Make TokenID of IdentifierInfo read-only, remove setTokenID().
Argyrios Kyrtzidis [Wed, 11 Aug 2010 22:55:12 +0000 (22:55 +0000)]
-Make TokenID of IdentifierInfo read-only, remove setTokenID().
-There are 2 instances that change the TokenID for GNU libstdc++ 4.2 compatibility.
  To handler those cases introduce a RevertedTokenID bitfield, RevertTokenIDToIdentifier() and hasRevertedTokenIDToIdentifier() methods.
  Store the bitfield in PCH.

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

14 years agoRevise r110163: don't mark weak functions nounwind, because the optimizer
John McCall [Wed, 11 Aug 2010 22:38:33 +0000 (22:38 +0000)]
Revise r110163: don't mark weak functions nounwind, because the optimizer
treats that as a contract to be fulfilled by any replacements.

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

14 years agoAdded locations and type source info for DeclarationName.
Abramo Bagnara [Wed, 11 Aug 2010 22:01:17 +0000 (22:01 +0000)]
Added locations and type source info for DeclarationName.

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

14 years agoOnce code completion has completed, pass a "completion context" on to
Douglas Gregor [Wed, 11 Aug 2010 21:23:17 +0000 (21:23 +0000)]
Once code completion has completed, pass a "completion context" on to
the code-completion consumer. The consumer can use this information to
augument, filter, or display the code-completion results.

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

14 years agoChange text of diagnostics on user request.
Fariborz Jahanian [Wed, 11 Aug 2010 21:22:15 +0000 (21:22 +0000)]
Change text of diagnostics on user request.
radar 7948654.

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

14 years agoEmit a stop point for delegate constructor call. This gives user a chance to step...
Devang Patel [Wed, 11 Aug 2010 21:04:37 +0000 (21:04 +0000)]
Emit a stop point for delegate constructor call. This gives user a chance to step into constructor body.

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

14 years agoWhen re-raising an exception after a cleanup, we need to call _Unwind_Resume_or_Rethrow
John McCall [Wed, 11 Aug 2010 20:59:53 +0000 (20:59 +0000)]
When re-raising an exception after a cleanup, we need to call _Unwind_Resume_or_Rethrow
instead of _Unwind_Resume.  With SJLJ exceptions, this is spelled
"_Unwind_SjLj_Resume_or_Rethrow", not "_Unwind_SjLj_Resume", which has
significantly different semantics.

We should actually never be generating a call to _Unwind_SjLj_Resume directly;
even if we were generating true cleanups (which we aren't because of the
horrible hack), we should be calling __cxa_end_cleanup() on ARM.  I
haven't implemented this because there's little point as long as the HH is
present.

I believe this fixes <rdar://problem/8281377>.

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

14 years agoWork in progress for PR7864. Someone more familiar with ObjC++ needs to fill
Eli Friedman [Wed, 11 Aug 2010 20:41:51 +0000 (20:41 +0000)]
Work in progress for PR7864.  Someone more familiar with ObjC++ needs to fill
in the code after the "FIXME: Needs to be written".

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

14 years agoRemove rsqrtps_nr256 and sqrtps_nr256 builtins, at least until we need them
Bruno Cardoso Lopes [Wed, 11 Aug 2010 19:18:36 +0000 (19:18 +0000)]
Remove rsqrtps_nr256 and sqrtps_nr256 builtins, at least until we need them

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

14 years agoUpdate documentation regarding use of 'class' in
Fariborz Jahanian [Wed, 11 Aug 2010 18:57:26 +0000 (18:57 +0000)]
Update documentation regarding use of 'class' in
property-dot syntax.

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

14 years agoReintroduce the ASTConsumer/ASTUnit fix from r110610, it has nothing to do with the...
Sebastian Redl [Wed, 11 Aug 2010 18:52:41 +0000 (18:52 +0000)]
Reintroduce the ASTConsumer/ASTUnit fix from r110610, it has nothing to do with the breakage.

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

14 years agoFix define inserting a comma :)
Bruno Cardoso Lopes [Wed, 11 Aug 2010 18:45:43 +0000 (18:45 +0000)]
Fix define inserting a comma :)

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

14 years agoIRGen support for functions returning objc object
Fariborz Jahanian [Wed, 11 Aug 2010 17:37:35 +0000 (17:37 +0000)]
IRGen support for functions returning objc object
types. Fixes PR7865.

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

14 years agoAdd a (currently unused) "options" parameter to
Douglas Gregor [Wed, 11 Aug 2010 15:58:42 +0000 (15:58 +0000)]
Add a (currently unused) "options" parameter to
clang_reparseTranslationUnit(), along with a function to retrieve the
default recommended reparsing options for a translation unit.

Also, add the CXTranslationUnit_CacheCompletionResults flag, which is
also currently unused.

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

14 years agoRemove wpa 'example', it isn't being maintained.
Daniel Dunbar [Wed, 11 Aug 2010 15:21:41 +0000 (15:21 +0000)]
Remove wpa 'example', it isn't being maintained.

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

14 years agoRandom temporary string cleanup.
Benjamin Kramer [Wed, 11 Aug 2010 14:47:12 +0000 (14:47 +0000)]
Random temporary string cleanup.

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

14 years agoIf name lookup finds different type declarations in different scopes
Douglas Gregor [Wed, 11 Aug 2010 14:45:53 +0000 (14:45 +0000)]
If name lookup finds different type declarations in different scopes
that actually refer to the same underlying type, it is not an
ambiguity; add uniquing support based on the canonical type of type
declarations. Fixes <rdar://problem/8296180>.

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

14 years agoFix a thinko in the creation of temporary files for the precompiled preamble
Douglas Gregor [Wed, 11 Aug 2010 13:06:56 +0000 (13:06 +0000)]
Fix a thinko in the creation of temporary files for the precompiled preamble

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

14 years agoSpeculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
Douglas Gregor [Wed, 11 Aug 2010 12:19:30 +0000 (12:19 +0000)]
Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
breakage.

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

14 years agoMemRegion can refer to ASTContext without external help.
Zhongxing Xu [Wed, 11 Aug 2010 06:10:55 +0000 (06:10 +0000)]
MemRegion can refer to ASTContext without external help.

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

14 years agotests: Add a missing -Xclang.
Daniel Dunbar [Wed, 11 Aug 2010 02:32:03 +0000 (02:32 +0000)]
tests: Add a missing -Xclang.

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

14 years agoARM: Recognize single precision float register names.
Daniel Dunbar [Wed, 11 Aug 2010 02:17:20 +0000 (02:17 +0000)]
ARM: Recognize single precision float register names.
 - We don't recognize double or NEON register names yet -- we don't have the
   infrastructure to generate the right clobbers for them.

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

14 years agoARM: Swap which registers we consider real / aliases to match LLVM and llvm-gcc.
Daniel Dunbar [Wed, 11 Aug 2010 02:17:11 +0000 (02:17 +0000)]
ARM: Swap which registers we consider real / aliases to match LLVM and llvm-gcc.

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

14 years agoImprove our handling of user-defined conversions when computing
Douglas Gregor [Wed, 11 Aug 2010 02:15:33 +0000 (02:15 +0000)]
Improve our handling of user-defined conversions when computing
implicit conversion sequences. In particular, model the "standard
conversion" from a class to its own type (or a base type) directly as
a standard conversion in the normal path *without* trying to determine
if there is a valid copy constructor. This appears to match the intent
of C++ [over.best.ics]p6 and more closely matches GCC and EDG.

As part of this, model non-lvalue reference initialization via
user-defined conversion in overloading the same way we handle it in
InitializationSequence, separating the "general user-defined
conversion" and "conversion to compatible class type" cases.

The churn in the overload-call-copycon.cpp test case is because the
test case was originally wrong; it assumed that we should do more
checking for copy constructors that we actually should, which affected
overload resolution.

Fixes PR7055. Bootstrapped okay.

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

14 years agoRemove 256-bit cast built-ins and make the AVX intrinsic call llvm __builtin_shufflev...
Bruno Cardoso Lopes [Wed, 11 Aug 2010 02:14:38 +0000 (02:14 +0000)]
Remove 256-bit cast built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

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

14 years agoMake this test a little less dependent on exact optimizer results.
John McCall [Wed, 11 Aug 2010 02:06:44 +0000 (02:06 +0000)]
Make this test a little less dependent on exact optimizer results.

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

14 years agoRemove 256-bit unpack built-ins and make the AVX intrinsic call llvm __builtin_shuffl...
Bruno Cardoso Lopes [Wed, 11 Aug 2010 01:43:24 +0000 (01:43 +0000)]
Remove 256-bit unpack built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

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

14 years agoRemove 256-bit shuffle built-ins and make the AVX intrinsic call llvm __builtin_shuff...
Bruno Cardoso Lopes [Wed, 11 Aug 2010 01:17:34 +0000 (01:17 +0000)]
Remove 256-bit shuffle built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

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

14 years agoFix for pr7869, inline asm mult-alt constraints.
John Thompson [Wed, 11 Aug 2010 00:58:20 +0000 (00:58 +0000)]
Fix for pr7869, inline asm mult-alt constraints.

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

14 years agoFix a bug in @finally emission in both the fragile and non-fragile EH schemes
John McCall [Wed, 11 Aug 2010 00:16:14 +0000 (00:16 +0000)]
Fix a bug in @finally emission in both the fragile and non-fragile EH schemes
where we weren't accounting for the possibility that a @finally block might
have internal cleanups and therefore might write to the cleanup destination slot.

Fixes <rdar://problem/8293901>.

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

14 years agoHave GRCoreEngine record the blocks where analysis was aborted because we visited...
Ted Kremenek [Wed, 11 Aug 2010 00:03:02 +0000 (00:03 +0000)]
Have GRCoreEngine record the blocks where analysis was aborted because we visited a block too many times along a given path.  This is to support the unreachable code analysis.

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

14 years agoAdd test case for <rdar://problem/8288645>. While this is fixed in trunk, we previou...
Ted Kremenek [Tue, 10 Aug 2010 22:30:29 +0000 (22:30 +0000)]
Add test case for <rdar://problem/8288645>.  While this is fixed in trunk, we previously were getting the following assertion failure not too long ago:

Assertion failed: (getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one.")

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

14 years agoSomething's wrong with this test on other platforms. I'll probably need to simplify...
John Thompson [Tue, 10 Aug 2010 22:04:00 +0000 (22:04 +0000)]
Something's wrong with this test on other platforms.  I'll probably need to simplify it later.  For now revert.

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

14 years agoFix test to not depend on objc.h header.
Fariborz Jahanian [Tue, 10 Aug 2010 20:59:58 +0000 (20:59 +0000)]
Fix test to not depend on objc.h header.

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

14 years agoSimplify
Devang Patel [Tue, 10 Aug 2010 20:16:57 +0000 (20:16 +0000)]
Simplify

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

14 years agoTest case for llvm r110712.
Devang Patel [Tue, 10 Aug 2010 20:01:51 +0000 (20:01 +0000)]
Test case for llvm r110712.

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

14 years agotests: Avoid unnecessary redirection.
Daniel Dunbar [Tue, 10 Aug 2010 19:33:56 +0000 (19:33 +0000)]
tests: Avoid unnecessary redirection.

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

14 years agotests: Tests which include system headers must use the driver, not -cc1.
Daniel Dunbar [Tue, 10 Aug 2010 19:32:44 +0000 (19:32 +0000)]
tests: Tests which include system headers must use the driver, not -cc1.

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

14 years agoSlightly revised handling of mult-alt constraints, to avoid an assert, until we have...
John Thompson [Tue, 10 Aug 2010 19:20:14 +0000 (19:20 +0000)]
Slightly revised handling of mult-alt constraints, to avoid an assert, until we have the full fix.

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

14 years agoWhen initializing a static local, pop the guard-abort EH cleanup after
John McCall [Tue, 10 Aug 2010 18:51:44 +0000 (18:51 +0000)]
When initializing a static local, pop the guard-abort EH cleanup after
the variable is fully initialized.

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

14 years agoan objective-c++ test for -Wstrict-selector-match
Fariborz Jahanian [Tue, 10 Aug 2010 18:32:37 +0000 (18:32 +0000)]
an objective-c++ test for -Wstrict-selector-match
(radar 8127244).

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

14 years agoDo not use DIGlobalVariable to emit debugging information for enums.
Devang Patel [Tue, 10 Aug 2010 18:27:15 +0000 (18:27 +0000)]
Do not use DIGlobalVariable to emit debugging information for enums.

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

14 years agoFix a spurious warning when message sent to qualified-id
Fariborz Jahanian [Tue, 10 Aug 2010 18:10:50 +0000 (18:10 +0000)]
Fix a spurious warning when message sent to qualified-id
type receiver (pr7861).

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

14 years agoTurn on idempotent operations checker when using --analyze.
Ted Kremenek [Tue, 10 Aug 2010 18:03:13 +0000 (18:03 +0000)]
Turn on idempotent operations checker when using --analyze.

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

14 years agoSimplify code and add comments, in code that generate debug info for constant integer...
Devang Patel [Tue, 10 Aug 2010 17:53:33 +0000 (17:53 +0000)]
Simplify code and add comments, in code that generate debug info for constant integer globals, based on Chris's feedback.

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

14 years agoDriver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for the
Daniel Dunbar [Tue, 10 Aug 2010 17:39:05 +0000 (17:39 +0000)]
Driver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for the
cases we care about.
 - This is eventually going to be unified outside the host specific code.

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

14 years agoTeach the libclang cursor visitor to walk into the type information
Douglas Gregor [Tue, 10 Aug 2010 15:02:34 +0000 (15:02 +0000)]
Teach the libclang cursor visitor to walk into the type information
provided by __builtin_types_compatible_p and __builtin_va_arg
expressions, now that Abramo has added proper type-source information
to those expressions.

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

14 years agoEliminate unnecessary uses of TemporaryBase in TreeTransform;
Douglas Gregor [Tue, 10 Aug 2010 14:27:00 +0000 (14:27 +0000)]
Eliminate unnecessary uses of TemporaryBase in TreeTransform;
transforming TypeSourceInfos already gives us proper (and better)
source-location information.

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

14 years agoFixed redundant NNS loading.
Abramo Bagnara [Tue, 10 Aug 2010 13:46:45 +0000 (13:46 +0000)]
Fixed redundant NNS loading.

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

14 years agoAdded TypeLocs to VAArgExpr node.
Abramo Bagnara [Tue, 10 Aug 2010 10:06:15 +0000 (10:06 +0000)]
Added TypeLocs to VAArgExpr node.

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

14 years agoAdded TypeLocs to TypesCompatibleExpr node.
Abramo Bagnara [Tue, 10 Aug 2010 08:50:03 +0000 (08:50 +0000)]
Added TypeLocs to TypesCompatibleExpr node.

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

14 years agoEven if a constant's evaluated value is used, emit debug info for the constant variable.
Devang Patel [Tue, 10 Aug 2010 07:24:25 +0000 (07:24 +0000)]
Even if a constant's evaluated value is used, emit debug info for the constant variable.

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

14 years agoFix redefinition of typedefs of fixable variably-modified array types; should
Eli Friedman [Tue, 10 Aug 2010 03:13:15 +0000 (03:13 +0000)]
Fix redefinition of typedefs of fixable variably-modified array types; should
fix an issue compiling <windows.h>.

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