]> granicus.if.org Git - clang/log
clang
14 years agoImplement the first half of [dcl.attr.override]p6.
Anders Carlsson [Mon, 18 Oct 2010 16:24:27 +0000 (16:24 +0000)]
Implement the first half of [dcl.attr.override]p6.

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

14 years agoMicrosoft enum extensions. 2 things will change on -fms-extensions:
Francois Pichet [Mon, 18 Oct 2010 15:01:13 +0000 (15:01 +0000)]
Microsoft enum extensions. 2 things will change on -fms-extensions:
1. enum underlying type is int by default.
2. Error "enumerator value is not representable in the underlying type"is a ExtWarning

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

14 years agoAdd iteration over the preprocessor conditional stack to PreprocessorLexer
Douglas Gregor [Mon, 18 Oct 2010 14:43:21 +0000 (14:43 +0000)]
Add iteration over the preprocessor conditional stack to PreprocessorLexer

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

14 years agoAdd declarations nested in a linkage specification to the output of
Douglas Gregor [Mon, 18 Oct 2010 14:35:28 +0000 (14:35 +0000)]
Add declarations nested in a linkage specification to the output of
-ast-print-xml, from Martin Vejnar!

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

14 years agoCodeGen: Fix long double on Windows using MSVC runtime.
Michael J. Spencer [Mon, 18 Oct 2010 07:11:10 +0000 (07:11 +0000)]
CodeGen: Fix long double on Windows using MSVC runtime.

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

14 years agoFix Whitespace.
Michael J. Spencer [Mon, 18 Oct 2010 07:10:59 +0000 (07:10 +0000)]
Fix Whitespace.

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

14 years agoReapply r116684 with fixes. The test cases needed to be updated.
Bill Wendling [Mon, 18 Oct 2010 03:41:31 +0000 (03:41 +0000)]
Reapply r116684 with fixes. The test cases needed to be updated.

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

14 years agoDo not use absolute path on the clang++ symlink.
Oscar Fuentes [Mon, 18 Oct 2010 02:25:54 +0000 (02:25 +0000)]
Do not use absolute path on the clang++ symlink.

Based on a patch by Ryuta Suzuki!

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

14 years agoImplement [dcl.attr.override]p2 and add tests for p1 and p2.
Anders Carlsson [Sun, 17 Oct 2010 23:36:12 +0000 (23:36 +0000)]
Implement [dcl.attr.override]p2 and add tests for p1 and p2.

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

14 years agoAdd test for [dcl.attr.final]p4.
Anders Carlsson [Sun, 17 Oct 2010 22:47:44 +0000 (22:47 +0000)]
Add test for [dcl.attr.final]p4.

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

14 years agoUse a script for creating the clang++ executable.
Oscar Fuentes [Sun, 17 Oct 2010 16:10:32 +0000 (16:10 +0000)]
Use a script for creating the clang++ executable.

The previous method used the DESTDIR environment variable at configure
time, but sometimes it is only available at install time. See PR8397.

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

14 years agoTemporarily revert r116684. It was causing failures with
Bill Wendling [Sun, 17 Oct 2010 07:58:46 +0000 (07:58 +0000)]
Temporarily revert r116684. It was causing failures with

    Clang :: CodeGen/x86_32-arguments-darwin.c
    Clang :: CodeGen/x86_32-arguments-linux.c

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

14 years agoThe "gcc.dg/compat/vector-1 -m32" test was broken after the MMX rewrite. The
Bill Wendling [Sun, 17 Oct 2010 07:38:01 +0000 (07:38 +0000)]
The "gcc.dg/compat/vector-1 -m32" test was broken after the MMX rewrite. The
function parameters weren't converted to use the correct type (x86_mmx). Add a
check, similar to the one in llvm-gcc, to see if we need the x86_mmx type for
that function parameter. If so, it coerces the type to be that.

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

14 years agoXcode keeps modifying the project file and I don't know how to ignore the change...
Argyrios Kyrtzidis [Sat, 16 Oct 2010 17:18:07 +0000 (17:18 +0000)]
Xcode keeps modifying the project file and I don't know how to ignore the change; just commit it.

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

14 years agoCoding by inspection has its problems.
John McCall [Sat, 16 Oct 2010 16:34:08 +0000 (16:34 +0000)]
Coding by inspection has its problems.

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

14 years agovalidator
Gabor Greif [Sat, 16 Oct 2010 09:40:21 +0000 (09:40 +0000)]
validator

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

14 years agothese items are done, afaik
Gabor Greif [Sat, 16 Oct 2010 09:29:38 +0000 (09:29 +0000)]
these items are done, afaik

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

14 years agoobjc_exception_rethrow does not take an exception argument.
John McCall [Sat, 16 Oct 2010 08:21:07 +0000 (08:21 +0000)]
objc_exception_rethrow does not take an exception argument.
rdar://problem/8535238

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

14 years agoReformatting.
John McCall [Sat, 16 Oct 2010 07:23:36 +0000 (07:23 +0000)]
Reformatting.

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

14 years agoWhite-listing templated-scope friend decls is a good idea, but doing it
John McCall [Sat, 16 Oct 2010 06:59:13 +0000 (06:59 +0000)]
White-listing templated-scope friend decls is a good idea, but doing it
by marking the decl invalid isn't.  Make some steps towards supporting these
and then hastily shut them down at the last second by marking them as
unsupported.

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

14 years agoRevert r116656, "IRgen/Obj-C/NeXT: Fix the IR signature for
Daniel Dunbar [Sat, 16 Oct 2010 05:04:10 +0000 (05:04 +0000)]
Revert r116656, "IRgen/Obj-C/NeXT: Fix the IR signature for
objc_exception_rethrow, so we don't...", since something is actually trying to
call this with the wrong signature (!). Unfortunately I don't understand the new
EH infrastructure well enough to fix it immediately.

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

14 years agoAdd an empty robots.txt, mostly just to reduce errors in HTTP log.
Daniel Dunbar [Sat, 16 Oct 2010 04:10:37 +0000 (04:10 +0000)]
Add an empty robots.txt, mostly just to reduce errors in HTTP log.

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

14 years agoAdd a favicon.ico, mostly just to reduce errors in HTTP log.
Daniel Dunbar [Sat, 16 Oct 2010 04:08:19 +0000 (04:08 +0000)]
Add a favicon.ico, mostly just to reduce errors in HTTP log.

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

14 years agoIRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
Daniel Dunbar [Sat, 16 Oct 2010 04:08:16 +0000 (04:08 +0000)]
IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
generate unnecessary %al clear on x86_64.

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

14 years agoFix a rewriting bug of rewriting properties declared in
Fariborz Jahanian [Sat, 16 Oct 2010 00:29:27 +0000 (00:29 +0000)]
Fix a rewriting bug of rewriting properties declared in
protocols. // rdar: //8558702

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

14 years agoTweak scan-build to work with naked clang commands.
Ted Kremenek [Sat, 16 Oct 2010 00:29:16 +0000 (00:29 +0000)]
Tweak scan-build to work with naked clang commands.

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

14 years agoNot really sure how this worked, but it seems like a clear typo. =]
Chandler Carruth [Sat, 16 Oct 2010 00:24:52 +0000 (00:24 +0000)]
Not really sure how this worked, but it seems like a clear typo. =]

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

14 years agoAllow list-initialization of a local variable of class type with a
Douglas Gregor [Fri, 15 Oct 2010 23:53:28 +0000 (23:53 +0000)]
Allow list-initialization of a local variable of class type with a
flexible array member, so long as the flexibility array member is
either not initialized or is initialized with an empty initializer
list. Fixes <rdar://problem/8540437>.

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

14 years agoDisable this test again, which naturally fails on every platform except the one I...
Douglas Gregor [Fri, 15 Oct 2010 23:23:05 +0000 (23:23 +0000)]
Disable this test again, which naturally fails on every platform except the one I'm building with

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

14 years agoTweak retain/release checker diagnostics to specify a leak occurs because an object...
Ted Kremenek [Fri, 15 Oct 2010 22:50:23 +0000 (22:50 +0000)]
Tweak retain/release checker diagnostics to specify a leak occurs because an object is not referenced later in the path,
not that it isn't referenced later in the code.  Fixes <rdar://problem/8527839>.

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

14 years agoCheck for ivar being a C++ object before attempting to
Fariborz Jahanian [Fri, 15 Oct 2010 22:42:59 +0000 (22:42 +0000)]
Check for ivar being a C++ object before attempting to
find a copy constructor/assignment operator used
in getter/setter synthesis. This removes an unintended
diagnostics and makes objc++ consistant with objective-c.
// rdar: //8550657.

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

14 years agoDriver: Error on -fno-for-scope, which we have no intention of supporting.
Daniel Dunbar [Fri, 15 Oct 2010 22:30:42 +0000 (22:30 +0000)]
Driver: Error on -fno-for-scope, which we have no intention of supporting.

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

14 years agoReport the location of the syntax error inside a macro. Fixes PR7944.
Nick Lewycky [Fri, 15 Oct 2010 21:43:24 +0000 (21:43 +0000)]
Report the location of the syntax error inside a macro. Fixes PR7944.

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

14 years agobool bit fields are causing problems with MSVC. Replace them with unsigned bit fields.
Francois Pichet [Fri, 15 Oct 2010 21:34:50 +0000 (21:34 +0000)]
bool bit fields are causing problems with MSVC. Replace them with unsigned bit fields.

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

14 years agoMention the paragraphs in the standards which sanction TBAA.
Dan Gohman [Fri, 15 Oct 2010 20:54:41 +0000 (20:54 +0000)]
Mention the paragraphs in the standards which sanction TBAA.

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

14 years agoUse a different name for pointer types in tbaa, to be a little
Dan Gohman [Fri, 15 Oct 2010 20:26:20 +0000 (20:26 +0000)]
Use a different name for pointer types in tbaa, to be a little
more consistent with other names, and to look less like a magic name.

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

14 years agoAdd a comment.
Dan Gohman [Fri, 15 Oct 2010 20:24:53 +0000 (20:24 +0000)]
Add a comment.

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

14 years agoFix a typo in a comment Frits van Bommel spotted.
Dan Gohman [Fri, 15 Oct 2010 20:24:10 +0000 (20:24 +0000)]
Fix a typo in a comment Frits van Bommel spotted.

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

14 years agoExperimental TBAA support for enum types.
Dan Gohman [Fri, 15 Oct 2010 20:23:12 +0000 (20:23 +0000)]
Experimental TBAA support for enum types.

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

14 years agoAgain, add '-include-pch' option to the driver, so it can get passed to the cc1 driver.
Argyrios Kyrtzidis [Fri, 15 Oct 2010 18:52:45 +0000 (18:52 +0000)]
Again, add '-include-pch' option to the driver, so it can get passed to the cc1 driver.

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

14 years agoRevert r116605, a lot more were committed by mistake.
Argyrios Kyrtzidis [Fri, 15 Oct 2010 18:51:34 +0000 (18:51 +0000)]
Revert r116605, a lot more were committed by mistake.

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

14 years agoAdd '-include-pch' option to the driver, so it can get passed to the cc1 driver.
Argyrios Kyrtzidis [Fri, 15 Oct 2010 18:49:01 +0000 (18:49 +0000)]
Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.

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

14 years agoEradicate IsSuper field from ObjCImplicitSetterGetterRefExprClass
Fariborz Jahanian [Fri, 15 Oct 2010 18:40:05 +0000 (18:40 +0000)]
Eradicate IsSuper field from ObjCImplicitSetterGetterRefExprClass
AST node. (finishing off radar 8525788).

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

14 years agoTBAA = Type Based Alias Analysis
Devang Patel [Fri, 15 Oct 2010 18:23:36 +0000 (18:23 +0000)]
TBAA = Type Based Alias Analysis

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

14 years agoRead/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and QualifierInfos...
Argyrios Kyrtzidis [Fri, 15 Oct 2010 18:21:24 +0000 (18:21 +0000)]
Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and QualifierInfos (rdar://8513756).

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

14 years agoDon't leak the TBAA object.
Dan Gohman [Fri, 15 Oct 2010 18:04:46 +0000 (18:04 +0000)]
Don't leak the TBAA object.

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

14 years agoAdd a comment about odd "signed char" incompatibility between C++ and C.
Dan Gohman [Fri, 15 Oct 2010 17:52:03 +0000 (17:52 +0000)]
Add a comment about odd "signed char" incompatibility between C++ and C.

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

14 years agoAdd clang_getLocationForOffset() to libclang, for gives a source location from a...
David Chisnall [Fri, 15 Oct 2010 17:07:39 +0000 (17:07 +0000)]
Add clang_getLocationForOffset() to libclang, for gives a source location from a character index into a file.

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

14 years agoWhen performing typo correction, keep track of whether the last lookup
Douglas Gregor [Fri, 15 Oct 2010 16:49:56 +0000 (16:49 +0000)]
When performing typo correction, keep track of whether the last lookup
we did was an acceptable lookup. If it is, then we can re-use that
lookup result. If it isn't, we have to perform the lookup again. This
is almost surely the cause behind the mysterious typo.m failures on
some builders; we were getting the wrong lookup results returned.

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

14 years agoDisable type.m while failures are investigated.
Daniel Dunbar [Fri, 15 Oct 2010 15:28:09 +0000 (15:28 +0000)]
Disable type.m while failures are investigated.

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

14 years agoMake test more consistent.
Daniel Dunbar [Fri, 15 Oct 2010 15:13:02 +0000 (15:13 +0000)]
Make test more consistent.

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

14 years agoWhen we're in the context of an Objective-C message send's receiver,
Douglas Gregor [Fri, 15 Oct 2010 13:35:25 +0000 (13:35 +0000)]
When we're in the context of an Objective-C message send's receiver,
typo correction prefers "super" over other, equivalent completions. I
believe this will fix the regression on the buildbot.

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

14 years agoDiagnose C++ [class.mem]p13-14, where a class member has the same name
Douglas Gregor [Fri, 15 Oct 2010 13:21:21 +0000 (13:21 +0000)]
Diagnose C++ [class.mem]p13-14, where a class member has the same name
as the class itself. Fixes PR7082.

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

14 years agozap trailing whitespace
Gabor Greif [Fri, 15 Oct 2010 08:48:51 +0000 (08:48 +0000)]
zap trailing whitespace

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

14 years agotestcase for http://llvm.org/PR8371 of my last commit, r116570
Gabor Greif [Fri, 15 Oct 2010 08:44:44 +0000 (08:44 +0000)]
testcase for http://llvm.org/PR8371 of my last commit, r116570

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

14 years agofix http://llvm.org/PR8371 in the straightforward way, also adding a comment
Gabor Greif [Fri, 15 Oct 2010 08:26:25 +0000 (08:26 +0000)]
fix http://llvm.org/PR8371 in the straightforward way, also adding a comment

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

14 years agoTreat __extension__ like ParenExpr.
Abramo Bagnara [Fri, 15 Oct 2010 07:51:18 +0000 (07:51 +0000)]
Treat __extension__ like ParenExpr.

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

14 years agoRecurse on a TypeLoc rather than a Type for TypedefDecl, now that the
Craig Silverstein [Fri, 15 Oct 2010 06:51:01 +0000 (06:51 +0000)]
Recurse on a TypeLoc rather than a Type for TypedefDecl, now that the
typloc information is available (I don't think it was, originally).
Submitted as a 'trivial' change.

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

14 years agoDeath to blocks, or at least the word "block" in one particular obnoxiously
John McCall [Fri, 15 Oct 2010 04:57:14 +0000 (04:57 +0000)]
Death to blocks, or at least the word "block" in one particular obnoxiously
ambiguous context.

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

14 years agoDon't complain about a variable within a linkage-specification that is
Douglas Gregor [Fri, 15 Oct 2010 01:21:46 +0000 (01:21 +0000)]
Don't complain about a variable within a linkage-specification that is
initialized. Fixes PR7076.

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

14 years agoWhen we are missing the ',' or '>' to terminate a template parameter
Douglas Gregor [Fri, 15 Oct 2010 01:15:58 +0000 (01:15 +0000)]
When we are missing the ',' or '>' to terminate a template parameter
list, complain about it! Fixes PR7053.

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

14 years agoAdd builtin conditional operator candidates for scoped enumeration
Douglas Gregor [Fri, 15 Oct 2010 00:50:56 +0000 (00:50 +0000)]
Add builtin conditional operator candidates for scoped enumeration
types, from Alp Toker! Fixes PR8344.

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

14 years agoUpdate CMake.
Daniel Dunbar [Fri, 15 Oct 2010 00:39:31 +0000 (00:39 +0000)]
Update CMake.

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

14 years agoCopied some flags from the Makefile build to the list of GCC flags.
Oscar Fuentes [Fri, 15 Oct 2010 00:16:22 +0000 (00:16 +0000)]
Copied some flags from the Makefile build to the list of GCC flags.

This removes a lot of warnings.

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

14 years agoAdd a TBAA type for pointer types.
Dan Gohman [Fri, 15 Oct 2010 00:01:39 +0000 (00:01 +0000)]
Add a TBAA type for pointer types.

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

14 years agoUnsigned types are TBAA-compatible with their signed counterparts.
Dan Gohman [Thu, 14 Oct 2010 23:39:00 +0000 (23:39 +0000)]
Unsigned types are TBAA-compatible with their signed counterparts.
Also, handle unknown types conservatively.

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

14 years agoRewrite bug fix rewriting a property assignment when
Fariborz Jahanian [Thu, 14 Oct 2010 23:31:39 +0000 (23:31 +0000)]
Rewrite bug fix rewriting a property assignment when
its RHS is an ivar. Fixes //rdar: //8541517.

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

14 years agoExperimental TBAA support.
Dan Gohman [Thu, 14 Oct 2010 23:06:10 +0000 (23:06 +0000)]
Experimental TBAA support.

This enables metadata generation by default, however the TBAA pass
in the optimizer is still disabled for now.

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

14 years agoUse root non-virtual primary base class, not just immediate primary base class, for...
Devang Patel [Thu, 14 Oct 2010 22:59:23 +0000 (22:59 +0000)]
Use root non-virtual primary base class, not just immediate primary base class, for AT_containing_type.
This is tested by virtfunc.exp in gdb testsuite.

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

14 years agoWire up the -fstrict-aliasing and -fno-strict-aliasing options
Dan Gohman [Thu, 14 Oct 2010 22:36:56 +0000 (22:36 +0000)]
Wire up the -fstrict-aliasing and -fno-strict-aliasing options
to CodeGenOption flags.

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

14 years agotemplate-ids are looked up differently in friend declarations.
John McCall [Thu, 14 Oct 2010 22:22:28 +0000 (22:22 +0000)]
template-ids are looked up differently in friend declarations.

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

14 years agoWhen performing typo correction, look through the set of known
Douglas Gregor [Thu, 14 Oct 2010 22:11:03 +0000 (22:11 +0000)]
When performing typo correction, look through the set of known
identifiers to determine good typo-correction candidates. Once we've
identified those candidates, we perform name lookup on each of them
and the consider the results.

This optimization makes typo correction > 2x faster on a benchmark
example using a single typo (NSstring) in a tiny file that includes
Cocoa.h from a precompiled header, since we are deserializing far less
information now during typo correction.

There is a semantic change here, which is interesting. The presence of
a similarly-named entity that is not visible can now affect typo
correction. This is both good (you won't get weird corrections if the
thing you wanted isn't in scope) and bad (you won't get good
corrections if there is a similarly-named-but-completely-unrelated
thing). Time will tell whether it was a good choice or not.

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

14 years agoMake sure that we diagnose invalid qualifiers on friend functions.
Douglas Gregor [Thu, 14 Oct 2010 22:03:51 +0000 (22:03 +0000)]
Make sure that we diagnose invalid qualifiers on friend functions.

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

14 years agoAt Fariborz's request, a somewhat cleaner bit-combining hack.
John McCall [Thu, 14 Oct 2010 21:48:26 +0000 (21:48 +0000)]
At Fariborz's request, a somewhat cleaner bit-combining hack.

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

14 years agoReverting r116493: removes a test that failed on clang selfhost and msvc
Andrew Trick [Thu, 14 Oct 2010 21:41:16 +0000 (21:41 +0000)]
Reverting r116493: removes a test that failed on clang selfhost and msvc

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

14 years agoFix compiler error that clang didn't report (probably same problem as rdar://8552377).
Argyrios Kyrtzidis [Thu, 14 Oct 2010 21:35:29 +0000 (21:35 +0000)]
Fix compiler error that clang didn't report (probably same problem as rdar://8552377).

It's more stress-free without access checking though..

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

14 years agoPut line number on the diagnostic. //rdar: //8550657.
Fariborz Jahanian [Thu, 14 Oct 2010 21:30:10 +0000 (21:30 +0000)]
Put line number on the diagnostic. //rdar: //8550657.

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

14 years agor116509 fixed the Win32 XFAIL.
Francois Pichet [Thu, 14 Oct 2010 20:49:46 +0000 (20:49 +0000)]
r116509 fixed the Win32 XFAIL.

The failing was due to this:
1. preamble.c contains CR+LF new lines
2. write() is called with a buffer containing the original (CR+LF) to output the result on the console.
3. In text mode(the default), write() convert LF to CR+LF even if LF is preceded by CR, hence we have CR+CR+LF which filecheck interprets as 2 lines.

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

14 years agoTweak the typo-correction implementation to determine corrections
Douglas Gregor [Thu, 14 Oct 2010 20:34:08 +0000 (20:34 +0000)]
Tweak the typo-correction implementation to determine corrections
solely based on the names it sees, rather than actual declarations it
gets. In essence, we determine the set of names that are "close
enough" to the typo'd name. Then, we perform name lookup for each of
those names, filtering out those that aren't actually visible, and
typo-correct from the remaining results.

Overall, there isn't much of a change in the behavior of typo
correction here. The only test-suite change comes from the fact that
we make good on our promise to require that the user type 3 characters
for each 1 character corrected.

The real intent behind this change is to set the stage for an
optimization to typo correction (so that we don't need to deserialize
all declarations in a translation unit) and future work in finding
missing qualification ("'vector' isn't in scope; did you mean
'std::vector'?). Plus, the code is cleaner this way.

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

14 years agoStore in PCH the key function of C++ class to avoid deserializing the complete declar...
Argyrios Kyrtzidis [Thu, 14 Oct 2010 20:14:38 +0000 (20:14 +0000)]
Store in PCH the key function of C++ class to avoid deserializing the complete declaration context in order to compute it.
Progress for rdar://7260160.

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

14 years agoAllow deserialization of just the fields of a record, when we want to iterate over...
Argyrios Kyrtzidis [Thu, 14 Oct 2010 20:14:34 +0000 (20:14 +0000)]
Allow deserialization of just the fields of a record, when we want to iterate over them,
instead of deserializing the complete declaration context of the record.

Iterating over the fields of a record is very common (e.g to determine the layout), unfortunately we needlessly deserialize every declaration
that the declaration context of the record contains; this can be bad for large C++ classes that contain a lot of methods.
Fix this by allow deserialization of just the fields when we want to iterate over them.
Progress for rdar://7260160.

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

14 years agoGive a default implementation for ASTDeserializationListener's methods, no functional...
Argyrios Kyrtzidis [Thu, 14 Oct 2010 20:14:28 +0000 (20:14 +0000)]
Give a default implementation for ASTDeserializationListener's methods, no functionality change.

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

14 years agoIntroduce command line option -error-on-deserialized-decl that is accompanied by...
Argyrios Kyrtzidis [Thu, 14 Oct 2010 20:14:25 +0000 (20:14 +0000)]
Introduce command line option -error-on-deserialized-decl that is accompanied by a name
and emits an error if a declaration with this name is deserialized from PCH.

This is for testing, to make sure that we don't deserialize stuff needlessly.

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

14 years agoDon't add the injected class name to the redeclarations chain; the chain should conta...
Argyrios Kyrtzidis [Thu, 14 Oct 2010 20:14:21 +0000 (20:14 +0000)]
Don't add the injected class name to the redeclarations chain; the chain should contain actual redeclarations, not implicits.
As a bonus, now we don't deserialize it unless we need it.

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

14 years agoIntroduce command line option -dump-deserialized-decls which is used to print the...
Argyrios Kyrtzidis [Thu, 14 Oct 2010 20:14:18 +0000 (20:14 +0000)]
Introduce command line option -dump-deserialized-decls which is used to print the PCH decls that got deserialized, for testing purposes.

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

14 years agoTest case for r116439
David Chisnall [Thu, 14 Oct 2010 18:15:20 +0000 (18:15 +0000)]
Test case for r116439

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

14 years agoEliminate usage of ObjCSuperExpr used for
Fariborz Jahanian [Thu, 14 Oct 2010 16:04:05 +0000 (16:04 +0000)]
Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788

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

14 years agosupport for AltiVec extensions from the Cell architecture
Anton Yartsev [Thu, 14 Oct 2010 14:37:46 +0000 (14:37 +0000)]
support for AltiVec extensions from the Cell architecture

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

14 years agoCall PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.
Zhongxing Xu [Thu, 14 Oct 2010 05:22:59 +0000 (05:22 +0000)]
Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.

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

14 years agoCompress bit fields / enums from ReferenceType, BuiltinType, FunctionType, and
John McCall [Thu, 14 Oct 2010 03:00:17 +0000 (03:00 +0000)]
Compress bit fields / enums from ReferenceType, BuiltinType, FunctionType, and
ObjCObjectType into Type.

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

14 years agoWhoops. This really shouldn't compile in clang, either.
John McCall [Thu, 14 Oct 2010 02:06:32 +0000 (02:06 +0000)]
Whoops.  This really shouldn't compile in clang, either.

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

14 years agoPerform range restrictions on regparm when applied to a type and
John McCall [Thu, 14 Oct 2010 01:57:10 +0000 (01:57 +0000)]
Perform range restrictions on regparm when applied to a type and
not a decl.

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

14 years agoTeach Diagnostic to recursively expand inside %plural formats.
John McCall [Thu, 14 Oct 2010 01:55:31 +0000 (01:55 +0000)]
Teach Diagnostic to recursively expand inside %plural formats.

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

14 years agoallow I128 suffixes in msextensions mode just like i128 suffixes, patch
Chris Lattner [Thu, 14 Oct 2010 00:24:10 +0000 (00:24 +0000)]
allow I128 suffixes in msextensions mode just like i128 suffixes, patch
by Martin Vejnar!

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

14 years agomove logic for computing signed integer overflow when constant folding
Chris Lattner [Wed, 13 Oct 2010 23:46:56 +0000 (23:46 +0000)]
move logic for computing signed integer overflow when constant folding
into APInt.

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

14 years agoDiagnose when a 'static' member function overrides a virtual function
Douglas Gregor [Wed, 13 Oct 2010 22:55:32 +0000 (22:55 +0000)]
Diagnose when a 'static' member function overrides a virtual function
in a base class. Fixes PR8168.

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

14 years agoGeneralize the checking for qualification of (non-friend) class
Douglas Gregor [Wed, 13 Oct 2010 22:19:53 +0000 (22:19 +0000)]
Generalize the checking for qualification of (non-friend) class
members. Provide a hard error when the qualification doesn't match the
current class type, or a warning + Fix-it if it does match the current
class type. Fixes PR8159.

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

14 years agoDon't claim that things that are Objective-C keywords if preceded by an @ are keyword...
David Chisnall [Wed, 13 Oct 2010 21:44:48 +0000 (21:44 +0000)]
Don't claim that things that are Objective-C keywords if preceded by an @ are keywords unless they are preceded by an @.

For example, don't claim that end is a keyword in:

unsigned end;

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

14 years agoEliminate the use of ObjCSuperExpr in code completion.
Douglas Gregor [Wed, 13 Oct 2010 21:24:53 +0000 (21:24 +0000)]
Eliminate the use of ObjCSuperExpr in code completion.

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

14 years agoThere is no reason for dereferencing a pointer-to-member to require
Douglas Gregor [Wed, 13 Oct 2010 20:41:14 +0000 (20:41 +0000)]
There is no reason for dereferencing a pointer-to-member to require
that the class type into which the pointer points be complete, even
though the standard requires it. GCC/EDG do not require a complete
type here, so we're calling this a problem with the standard. Fixes
PR8328.

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