]> granicus.if.org Git - clang/log
clang
13 years ago[analyzer] Test for -analyze-function on ObjectiveC to accompany r139439.
Anna Zaks [Mon, 12 Sep 2011 17:48:08 +0000 (17:48 +0000)]
[analyzer] Test for -analyze-function on ObjectiveC to accompany r139439.

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

13 years agoFix debug info encodings for char16_t and char32_t.
Devang Patel [Mon, 12 Sep 2011 17:11:58 +0000 (17:11 +0000)]
Fix debug info encodings for char16_t and char32_t.

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

13 years agoAllow __module_private__ on fields
Douglas Gregor [Mon, 12 Sep 2011 16:11:24 +0000 (16:11 +0000)]
Allow __module_private__ on fields

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

13 years agoRemove the restriction on module-private friends. Since the friend
Douglas Gregor [Mon, 12 Sep 2011 15:48:15 +0000 (15:48 +0000)]
Remove the restriction on module-private friends. Since the friend
declaration may be the first declaration, we want the ability to that
declaration to be marked module-private.

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

13 years agoOnly predefine the __EXCEPTIONS macro if C++ exceptions are turned on.
Douglas Gregor [Mon, 12 Sep 2011 15:17:19 +0000 (15:17 +0000)]
Only predefine the __EXCEPTIONS macro if C++ exceptions are turned on.
Only predefine the OBJC_ZEROCOST_EXCEPTIONS macro if Objective-C
exceptions are turned on. Fixes PR10910.

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

13 years agoSilence ?: precendence warning when parenthesis are present.
Hans Wennborg [Mon, 12 Sep 2011 12:07:30 +0000 (12:07 +0000)]
Silence ?: precendence warning when parenthesis are present.

Fixes PR10898. The warning should be silent when there are parenthesis
around the condition expression.

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

13 years agoSilence "end of non-void function" warnings with llvm_unreachable and add an assert.
Benjamin Kramer [Sat, 10 Sep 2011 21:52:04 +0000 (21:52 +0000)]
Silence "end of non-void function" warnings with llvm_unreachable and add an assert.

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

13 years agoobjc rewriter - more fixes to support compiling the rewritten
Fariborz Jahanian [Sat, 10 Sep 2011 17:01:56 +0000 (17:01 +0000)]
objc rewriter - more fixes to support compiling the rewritten
test case having instancetype. Fix in rewriter is unrelated to
using of instancetype. Test case uses other feature not yet
supported in the rewriter. There is more work to do, but this
is an ongoing task and not urgent at this time.

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

13 years agoremove pedantic ;
Chris Lattner [Sat, 10 Sep 2011 16:13:42 +0000 (16:13 +0000)]
remove pedantic ;

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

13 years agoModernize and comment; no functionality change.
John McCall [Sat, 10 Sep 2011 09:30:49 +0000 (09:30 +0000)]
Modernize and comment;  no functionality change.

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

13 years agoSimplify the generation of Objective-C setters, at least a little.
John McCall [Sat, 10 Sep 2011 09:17:20 +0000 (09:17 +0000)]
Simplify the generation of Objective-C setters, at least a little.
Use a more portable heuristic for deciding when to emit a single
atomic store;  it's possible that I've lost information here, but
I'm not sure how much of the logic before was intentionally arch-specific
and how much was just not quite consistent.

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

13 years agoRename the ARC cast kinds to start with "ARC".
John McCall [Sat, 10 Sep 2011 06:18:15 +0000 (06:18 +0000)]
Rename the ARC cast kinds to start with "ARC".

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

13 years agoCorrectly referring to the null pointer as 'null' not the macro 'NULL' in the boolean...
David Blaikie [Sat, 10 Sep 2011 05:47:59 +0000 (05:47 +0000)]
Correctly referring to the null pointer as 'null' not the macro 'NULL' in the boolean conversion diagnostic message.

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

13 years agoMake this test portable on Win32.
Julien Lerouge [Sat, 10 Sep 2011 05:46:15 +0000 (05:46 +0000)]
Make this test portable on Win32.

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

13 years agoShow either a location or a fixit note, not both, for uninitialized variable warnings.
David Blaikie [Sat, 10 Sep 2011 05:35:08 +0000 (05:35 +0000)]
Show either a location or a fixit note, not both, for uninitialized variable warnings.

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

13 years agoMissed a %local use; hopefully this clears this test up.
John McCall [Sat, 10 Sep 2011 05:31:57 +0000 (05:31 +0000)]
Missed a %local use;  hopefully this clears this test up.

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

13 years agoFix a broken assert in AST/DeclCXX.cpp.
Richard Trieu [Sat, 10 Sep 2011 02:16:48 +0000 (02:16 +0000)]
Fix a broken assert in AST/DeclCXX.cpp.

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

13 years agoclang part of r139458; un-XFAIL testcase.
Eli Friedman [Sat, 10 Sep 2011 02:03:28 +0000 (02:03 +0000)]
clang part of r139458; un-XFAIL testcase.

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

13 years agoRevision 139454 fixed a broken assert in LLVM, which causes
Richard Trieu [Sat, 10 Sep 2011 01:56:32 +0000 (01:56 +0000)]
Revision 139454 fixed a broken assert in LLVM, which causes
a test failure in CodeGen/palignr.c, which has been marked
XFAIL for the time being.  A bug has been filed at PR10901
for this issue.

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

13 years agoMake this test not depend on unnecessary details and IR variable names.
John McCall [Sat, 10 Sep 2011 01:37:23 +0000 (01:37 +0000)]
Make this test not depend on unnecessary details and IR variable names.

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

13 years agoWhen converting a block pointer to an Objective-C pointer type, extend
John McCall [Sat, 10 Sep 2011 01:16:55 +0000 (01:16 +0000)]
When converting a block pointer to an Objective-C pointer type, extend
the lifetime of the block by copying it to the heap, or else we'll get
a dangling reference because the code working with the non-block-typed
object will not know it needs to copy.

There is some danger here, e.g. with assigning a block literal to an
unsafe variable, but, well, it's an unsafe variable.

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

13 years agoFix a diagnostics crasher with -Wmissing-noreturn in Objective-C
Douglas Gregor [Sat, 10 Sep 2011 00:56:20 +0000 (00:56 +0000)]
Fix a diagnostics crasher with -Wmissing-noreturn in Objective-C
methods, and improve the diagnostic slightly along the way. Fixes
<rdar://problem/10098695>.

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

13 years agoFix a -Wreturn-type warning due to this field not explicitly having the
Chandler Carruth [Sat, 10 Sep 2011 00:51:24 +0000 (00:51 +0000)]
Fix a -Wreturn-type warning due to this field not explicitly having the
enumeration type.

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

13 years agoEmit debug info for wchar_t.
Devang Patel [Sat, 10 Sep 2011 00:44:49 +0000 (00:44 +0000)]
Emit debug info for wchar_t.

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

13 years agoDon't crash when we fail to load a module. It's unbecoming of a
Douglas Gregor [Sat, 10 Sep 2011 00:30:18 +0000 (00:30 +0000)]
Don't crash when we fail to load a module. It's unbecoming of a
well-bred compiler like Clang.

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

13 years agoClean up our handling of Objective-C definitions in AST files. Rather
Douglas Gregor [Sat, 10 Sep 2011 00:22:34 +0000 (00:22 +0000)]
Clean up our handling of Objective-C definitions in AST files. Rather
than having CodeGen check whether a declaration comes from an AST file
(which it shouldn't know or care about), make sure that the AST writer and
reader pass along "interesting" declarations that CodeGen needs to
know about.

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

13 years ago[analyzer] -analyze-function for ObjectiveC should check if any of the methods match...
Anna Zaks [Sat, 10 Sep 2011 00:12:23 +0000 (00:12 +0000)]
[analyzer] -analyze-function for ObjectiveC should check if any of the methods match the name (not only the first one).

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

13 years agoKill of the Decl::PCHLevel field entirely. We now only need to know
Douglas Gregor [Sat, 10 Sep 2011 00:09:20 +0000 (00:09 +0000)]
Kill of the Decl::PCHLevel field entirely. We now only need to know
whether a Decl was deserialized from an AST file (any AST file).

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

13 years agoExtend the Stmt AST to make it easier to look through label, default,
Chandler Carruth [Sat, 10 Sep 2011 00:02:34 +0000 (00:02 +0000)]
Extend the Stmt AST to make it easier to look through label, default,
and case statements. Use this to make the logic in the CFG builder more
robust at finding the actual statements within a compound statement,
even when there are many layers of labels obscuring it.

Also extend the test cases for a large chunk of PR10063. Still more work
to do here though.

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

13 years agoThe translation unit is never deserialized
Douglas Gregor [Fri, 9 Sep 2011 23:34:14 +0000 (23:34 +0000)]
The translation unit is never deserialized

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

13 years agoEliminate all but one caller of Decl::getPCHLevel()
Douglas Gregor [Fri, 9 Sep 2011 23:07:59 +0000 (23:07 +0000)]
Eliminate all but one caller of Decl::getPCHLevel()

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

13 years agoIntroduce a new predicate Decl::isFromASTFile() to determine whether a
Douglas Gregor [Fri, 9 Sep 2011 23:01:35 +0000 (23:01 +0000)]
Introduce a new predicate Decl::isFromASTFile() to determine whether a
declaration was deserialized from an AST file. Use this instead of
Decl::getPCHLevel() wherever possible. This is a simple step toward
killing off Decl::getPCHLevel().

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

13 years agoThread safety: removing unnecessary import and reordering import list
Caitlin Sadowski [Fri, 9 Sep 2011 23:00:59 +0000 (23:00 +0000)]
Thread safety: removing unnecessary import and reordering import list

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

13 years agoThread safety: removing unnecessary import
Caitlin Sadowski [Fri, 9 Sep 2011 22:49:12 +0000 (22:49 +0000)]
Thread safety: removing unnecessary import

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

13 years agoRemove trailing } in comment.
Julien Lerouge [Fri, 9 Sep 2011 22:46:39 +0000 (22:46 +0000)]
Remove trailing } in comment.

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

13 years agoBring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
Julien Lerouge [Fri, 9 Sep 2011 22:41:49 +0000 (22:41 +0000)]
Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.

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

13 years agoIn the ASTReader, replace the never-NULL Preprocessor pointer with a
Douglas Gregor [Fri, 9 Sep 2011 22:02:16 +0000 (22:02 +0000)]
In the ASTReader, replace the never-NULL Preprocessor pointer with a
Preprocessor reference. Simplify some code along the way, so there is
no separate "initialize the preprocessor" step.

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

13 years agoAdd smarter sorting of overload candidates that failed template deduction.
Kaelyn Uhrain [Fri, 9 Sep 2011 21:58:49 +0000 (21:58 +0000)]
Add smarter sorting of overload candidates that failed template deduction.

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

13 years agoCarry the debug information from single exit unified return block
Eric Christopher [Fri, 9 Sep 2011 21:53:04 +0000 (21:53 +0000)]
Carry the debug information from single exit unified return block
along with the new insert point.

Fixes PR10829

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

13 years agoIn ASTReader, replace the never-NULL ASTContext pointer with an
Douglas Gregor [Fri, 9 Sep 2011 21:34:22 +0000 (21:34 +0000)]
In ASTReader, replace the never-NULL ASTContext pointer with an
ASTContext reference. Remove all of the extra checking and logic that
was used to cope with a NULL ASTContext. No effective functionality
change.

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

13 years agoFriends cannot be declared module-private
Douglas Gregor [Fri, 9 Sep 2011 21:14:29 +0000 (21:14 +0000)]
Friends cannot be declared module-private

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

13 years agoMark the translation unit as having lexical/visible storage only when we actually...
Douglas Gregor [Fri, 9 Sep 2011 21:09:37 +0000 (21:09 +0000)]
Mark the translation unit as having lexical/visible storage only when we actually have data for that lexical or visible storage

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

13 years agoBack out r139358 "[PCH] When loading the decls linked to an
Douglas Gregor [Fri, 9 Sep 2011 21:05:56 +0000 (21:05 +0000)]
Back out r139358 "[PCH] When loading the decls linked to an
identifier, also make them visible in the translation unit," which
isn't needed now that John's eliminated the AST dependency in blocks
CodeGen.

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

13 years agoSpecializations cannot be module-hidden. Diagnose attempts to do so.
Douglas Gregor [Fri, 9 Sep 2011 20:53:38 +0000 (20:53 +0000)]
Specializations cannot be module-hidden. Diagnose attempts to do so.

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

13 years agoTreat the weak export of block runtime symbols as a deployment-target
John McCall [Fri, 9 Sep 2011 20:41:01 +0000 (20:41 +0000)]
Treat the weak export of block runtime symbols as a deployment-target
feature akin to the ARC runtime checks.  Removes a terrible hack where
IR gen needed to find the declarations of those symbols in the translation
unit.

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

13 years agoobjc rewriter - Add rewriter test for new instancetype
Fariborz Jahanian [Fri, 9 Sep 2011 20:35:22 +0000 (20:35 +0000)]
objc rewriter - Add rewriter test for new instancetype
along with minor rewriter fix to handle that. This
test is still incomplete due to rewriter issues
unrelated to instancetype.

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

13 years agoDon't produce 'instancetype' as the type of a message send expression. Map it down...
Douglas Gregor [Fri, 9 Sep 2011 20:05:21 +0000 (20:05 +0000)]
Don't produce 'instancetype' as the type of a message send expression. Map it down to 'id'.

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

13 years ago__module_private__ is inherited by redeclarations of an entity, and
Douglas Gregor [Fri, 9 Sep 2011 19:05:14 +0000 (19:05 +0000)]
__module_private__ is inherited by redeclarations of an entity, and
must also be present of the first declaration of that entity.

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

13 years ago[analyzer] When running scan-build with -plist on ./configure, delete the plist files.
Anna Zaks [Fri, 9 Sep 2011 18:43:53 +0000 (18:43 +0000)]
[analyzer] When running scan-build with -plist on ./configure, delete the plist files.
(scan-build does not set the $HtmlDir when running against configure. Previously, this implied that the plist files would appear in the current directory, with this patch they will get deleted.)

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

13 years agoPropagate __module_private__ from previous declarations to later
Douglas Gregor [Fri, 9 Sep 2011 18:32:39 +0000 (18:32 +0000)]
Propagate __module_private__ from previous declarations to later
declarations.

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

13 years agoWhen type-checking a call to an overloaded, builtin atomic operation,
Douglas Gregor [Fri, 9 Sep 2011 16:51:10 +0000 (16:51 +0000)]
When type-checking a call to an overloaded, builtin atomic operation,
construct a new DeclRefExpr rather than re-using the existing
DeclRefExpr. Patch by Likai Liu, fixes PR8345.

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

13 years agoThread safety: This patch deals with previously unhandled cases when building lock...
Caitlin Sadowski [Fri, 9 Sep 2011 16:21:55 +0000 (16:21 +0000)]
Thread safety: This patch deals with previously unhandled cases when building lock expressions. We now resolve this expressions, avoid crashing when encountering cast expressions, and have a diagnostic for unresolved lock expressions

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

13 years agoThread Safety: Moving the analysis to a new file
Caitlin Sadowski [Fri, 9 Sep 2011 16:11:56 +0000 (16:11 +0000)]
Thread Safety: Moving the analysis to a new file

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

13 years agoThread safety: refactoring test cases
Caitlin Sadowski [Fri, 9 Sep 2011 16:07:55 +0000 (16:07 +0000)]
Thread safety: refactoring test cases

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

13 years agoThread safety: refactoring to use an error handler
Caitlin Sadowski [Fri, 9 Sep 2011 16:04:02 +0000 (16:04 +0000)]
Thread safety: refactoring to use an error handler

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

13 years agoUpdate comment because JumpDiagnostics.cpp is not just about VLA scope.
Francois Pichet [Fri, 9 Sep 2011 11:02:57 +0000 (11:02 +0000)]
Update comment because JumpDiagnostics.cpp is not just about VLA scope.

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

13 years agoClean up the sentinel-attribute checking code a lot. Document
John McCall [Fri, 9 Sep 2011 07:56:05 +0000 (07:56 +0000)]
Clean up the sentinel-attribute checking code a lot.  Document
what 'nullPos' is supposed to mean, at least at this one site.
Use closed forms for the arithmetic.  Rip out some clever but
ultimately pointless code that was trying to use 0 or 0L depending
the size of a pointer vs. the size of int;  first, it didn't work
on LLP64 systems, and second, the sentinel checking code requires
a pointer-typed value anyway, so this fixit would not have actually
removed the warning.

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

13 years agoDo a lookup for the blocks runtime globals to see if they were declared,
Argyrios Kyrtzidis [Fri, 9 Sep 2011 06:44:21 +0000 (06:44 +0000)]
Do a lookup for the blocks runtime globals to see if they were declared,
instead of codegen waiting to consume such a declaration, which won't
happen if that decls are coming from a PCH.

Fixes rdar://10028656.

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

13 years ago[PCH] When loading the decls linked to an identifier, also make them visible
Argyrios Kyrtzidis [Fri, 9 Sep 2011 06:44:17 +0000 (06:44 +0000)]
[PCH] When loading the decls linked to an identifier, also make them visible
in the translation unit.

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

13 years agoUse ArrayRef in ExternalASTSource::SetExternalVisibleDeclsForName.
Argyrios Kyrtzidis [Fri, 9 Sep 2011 06:44:14 +0000 (06:44 +0000)]
Use ArrayRef in ExternalASTSource::SetExternalVisibleDeclsForName.

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

13 years agoCode formatting; no functionality change.
John McCall [Fri, 9 Sep 2011 06:12:06 +0000 (06:12 +0000)]
Code formatting; no functionality change.

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

13 years agoContextually converting to 'id' is not a useful operation. Contextually
John McCall [Fri, 9 Sep 2011 06:11:02 +0000 (06:11 +0000)]
Contextually converting to 'id' is not a useful operation.  Contextually
converting to an arbitrary Objective-C pointer type is.  Without
significantly re-implementing anything, change the API to reflect this,
and as a minor optimization, strip the pointer conversion off before
potentially building it.

Mostly, this removes a really bizarre-looking bit of code from
BuildInstanceMessage.

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

13 years agoGive conversions of block pointers to ObjC pointers a different cast kind
John McCall [Fri, 9 Sep 2011 05:25:32 +0000 (05:25 +0000)]
Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers.  In order to ensure that
we've caught every case, add asserts to CastExpr that strictly determine
which cast kind is used for which kind of bit cast.

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

13 years agoClean up the RebuildUnknownAnyExpr visitor in SemaExpr.cpp. Mainly swapped around...
Richard Trieu [Fri, 9 Sep 2011 03:59:41 +0000 (03:59 +0000)]
Clean up the RebuildUnknownAnyExpr visitor in SemaExpr.cpp.  Mainly swapped around variable names so that this visitor be more like other visitors in clang.

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

13 years agoChanged references of BaseTy, MemInitTy, CXXScopeTy, TemplateParamsTy to CXXBaseSpeci...
Richard Trieu [Fri, 9 Sep 2011 03:18:59 +0000 (03:18 +0000)]
Changed references of BaseTy, MemInitTy, CXXScopeTy, TemplateParamsTy to CXXBaseSpecifier, CXXCtorInitializer, NestedNameSpecifier, TemplateParameterList and removed their typedefs.

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

13 years agoChange references to StmtTy to Stmt and removed typedefs of StmtTy. Also removed...
Richard Trieu [Fri, 9 Sep 2011 02:16:15 +0000 (02:16 +0000)]
Change references to StmtTy to Stmt and removed typedefs of StmtTy.  Also removed typedef of AttrTy since it is not used.

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

13 years agoModules: introduce the __module_private__ declaration specifier, which
Douglas Gregor [Fri, 9 Sep 2011 02:06:17 +0000 (02:06 +0000)]
Modules: introduce the __module_private__ declaration specifier, which
indicates that a declaration is only visible within the module it is
declared in.

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

13 years agoChange all references of type ExprTy to Expr and get rid of the typedefs.
Richard Trieu [Fri, 9 Sep 2011 02:00:50 +0000 (02:00 +0000)]
Change all references of type ExprTy to Expr and get rid of the typedefs.

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

13 years agoCapitialize paramater names in SemaExpr.cpp and resolve any parameter name conflicts...
Richard Trieu [Fri, 9 Sep 2011 01:45:06 +0000 (01:45 +0000)]
Capitialize paramater names in SemaExpr.cpp and resolve any parameter name conflicts between declarations and definitions from this and previous refactorings.

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

13 years agoThe integer type of an enumeration type isn't always canonical
Douglas Gregor [Thu, 8 Sep 2011 23:29:05 +0000 (23:29 +0000)]
The integer type of an enumeration type isn't always canonical

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

13 years agoRearrange comment slightly for Bill.
Eric Christopher [Thu, 8 Sep 2011 23:28:19 +0000 (23:28 +0000)]
Rearrange comment slightly for Bill.

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

13 years agoRemove WCHAR_MIN and WCHAR_MAX from limits.h. According to posix and c99
Eric Christopher [Thu, 8 Sep 2011 23:25:25 +0000 (23:25 +0000)]
Remove WCHAR_MIN and WCHAR_MAX from limits.h. According to posix and c99
these should be in stdint.h - and they already are.

Fixes rdar://10097036.

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

13 years agoThread safety: small edit to unused variation on warning left in by accident from...
Caitlin Sadowski [Thu, 8 Sep 2011 23:17:03 +0000 (23:17 +0000)]
Thread safety: small edit to unused variation on warning left in by accident from earlier commit

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

13 years agoAdd some delay between PCH creation and modifying one of the headers it depends on...
Douglas Gregor [Thu, 8 Sep 2011 22:32:33 +0000 (22:32 +0000)]
Add some delay between PCH creation and modifying one of the headers it depends on, which will---hopefully make this test predictably pass on Windows

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

13 years agoExtend -Wliteral-conversion to catch "int i = -1.234"
Matt Beaumont-Gay [Thu, 8 Sep 2011 22:30:47 +0000 (22:30 +0000)]
Extend -Wliteral-conversion to catch "int i = -1.234"

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

13 years agoThread Safety: In C++0x Mutexes are the objects that control access to shared variab...
Caitlin Sadowski [Thu, 8 Sep 2011 21:52:50 +0000 (21:52 +0000)]
Thread Safety:  In C++0x Mutexes are the objects that control access to shared variables, while Locks are the objects that acquire and release Mutexes. We switch to this new terminology.

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

13 years agoThe frexp, modf, and remquo builtins are not 'const'.
Jakob Stoklund Olesen [Thu, 8 Sep 2011 21:18:03 +0000 (21:18 +0000)]
The frexp, modf, and remquo builtins are not 'const'.

These functions return a second value by writing to a pointer argument,
so they cannot be marked 'readnone' which implies that they don't access
memory.

<rdar://problem/10070234>

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

13 years agoThread Safety: adding basic no thread safety analysis option
Caitlin Sadowski [Thu, 8 Sep 2011 18:35:21 +0000 (18:35 +0000)]
Thread Safety: adding basic no thread safety analysis option

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

13 years agoThread safety: Adding basic support for locks required and excluded attributes
Caitlin Sadowski [Thu, 8 Sep 2011 18:27:31 +0000 (18:27 +0000)]
Thread safety: Adding basic support for locks required and excluded attributes

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

13 years agoThread safety: shared vs. exclusive locks
Caitlin Sadowski [Thu, 8 Sep 2011 18:19:38 +0000 (18:19 +0000)]
Thread safety: shared vs. exclusive locks

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

13 years agoThread safety: small formatting change in test comments
Caitlin Sadowski [Thu, 8 Sep 2011 18:07:26 +0000 (18:07 +0000)]
Thread safety: small formatting change in test comments

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

13 years agoLook through SubstNonTypeTemplateParmExpr nodes in the various
Douglas Gregor [Thu, 8 Sep 2011 17:56:33 +0000 (17:56 +0000)]
Look through SubstNonTypeTemplateParmExpr nodes in the various
Expr::Ignore* methods that also look through implicit casts.

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

13 years agoThread safety: added support for function scopes in attribute arguments.
Caitlin Sadowski [Thu, 8 Sep 2011 17:42:31 +0000 (17:42 +0000)]
Thread safety: added support for function scopes in attribute arguments.

This patch was written by DeLesley Hutchins.

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

13 years agoThread Safety: Patch to implement delayed parsing of attributes within a
Caitlin Sadowski [Thu, 8 Sep 2011 17:42:22 +0000 (17:42 +0000)]
Thread Safety: Patch to implement delayed parsing of attributes within a
class scope.

This patch was also written by DeLesley Hutchins.

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

13 years agoDocument __has_feature(objc_instancetype).
Douglas Gregor [Thu, 8 Sep 2011 17:19:31 +0000 (17:19 +0000)]
Document __has_feature(objc_instancetype).

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

13 years ago[libclang] Fix annotation and getting a "macro expansion" cursor
Argyrios Kyrtzidis [Thu, 8 Sep 2011 17:18:41 +0000 (17:18 +0000)]
[libclang] Fix annotation and getting a "macro expansion" cursor
for a builtin macro expansion.

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

13 years agoAllow C++0x enumerations with a fixed underlying type in
Douglas Gregor [Thu, 8 Sep 2011 17:18:35 +0000 (17:18 +0000)]
Allow C++0x enumerations with a fixed underlying type in
Objective-C. The @encode'ing of such an enumeration type is the same
as its underlying type. <rdar://problem/5276348>.

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

13 years agoFormatting.
Eric Christopher [Thu, 8 Sep 2011 17:15:04 +0000 (17:15 +0000)]
Formatting.

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

13 years agoAdd a block comment explaining how the different source locations work
Eric Christopher [Thu, 8 Sep 2011 17:15:01 +0000 (17:15 +0000)]
Add a block comment explaining how the different source locations work
including some source examples.

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

13 years agoAdded missing initialization.
Abramo Bagnara [Thu, 8 Sep 2011 14:20:25 +0000 (14:20 +0000)]
Added missing initialization.

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

13 years agoAdding FixIts to static/inline main declaration diagnostics.
David Blaikie [Thu, 8 Sep 2011 06:33:04 +0000 (06:33 +0000)]
Adding FixIts to static/inline main declaration diagnostics.

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

13 years agoImplement the Objective-C 'instancetype' type, which is an alias of
Douglas Gregor [Thu, 8 Sep 2011 01:46:34 +0000 (01:46 +0000)]
Implement the Objective-C 'instancetype' type, which is an alias of
'id' that can be used (only!) via a contextual keyword as the result
type of an Objective-C message send. 'instancetype' then gives the
method a related result type, which we have already been inferring for
a variety of methods (new, alloc, init, self, retain). Addresses
<rdar://problem/9267640>.

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

13 years ago[driver] i386 kext preprocessor jobs also need their unsupported options
Chad Rosier [Thu, 8 Sep 2011 00:38:00 +0000 (00:38 +0000)]
[driver] i386 kext preprocessor jobs also need their unsupported options
filtered.  This happenis when -save-temps is specified.
<rdar://problem/10088387>

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

13 years agoOptimize the preprocessor's handling of the __import_module__
Douglas Gregor [Wed, 7 Sep 2011 23:11:54 +0000 (23:11 +0000)]
Optimize the preprocessor's handling of the __import_module__
keyword. We now handle this keyword in HandleIdentifier, making a note
for ourselves when we've seen the __import_module__ keyword so that
the next lexed token can trigger a module import (if needed). This
greatly simplifies Preprocessor::Lex(), and completely erases the 5.5%
-Eonly slowdown Argiris noted when I originally implemented
__import_module__. Big thanks to Argiris for noting that horrible
regression!

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

13 years ago[arcmt] Try fixing the windows buildbot.
Argyrios Kyrtzidis [Wed, 7 Sep 2011 21:50:18 +0000 (21:50 +0000)]
[arcmt] Try fixing the windows buildbot.

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

13 years agoRevert r139222, operator->() in PreprocessingRecord::iterator. It is useful
Argyrios Kyrtzidis [Wed, 7 Sep 2011 21:50:10 +0000 (21:50 +0000)]
Revert r139222, operator->() in PreprocessingRecord::iterator. It is useful
to meet the requirements of the InputIterator concept.

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

13 years agoChange diagnoseAddressOfInvalidType() to use an enum to determine what error message...
Richard Trieu [Wed, 7 Sep 2011 21:46:33 +0000 (21:46 +0000)]
Change diagnoseAddressOfInvalidType() to use an enum to determine what error message to display.  Also, move the function call into on location instead of having it spread among many places in the if/else statements.

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

13 years agoWhen parsing a function-try-block that does not have a
Douglas Gregor [Wed, 7 Sep 2011 20:36:12 +0000 (20:36 +0000)]
When parsing a function-try-block that does not have a
ctor-initializer, remember to call the Sema action to generate default
ctor-initializers. What a delightful little miscompile. Fixes PR10578
/ <rdar://problem/9877267>.

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

13 years agoFix Sema::CorrectTypo to ignore found but unresolved symbols
Kaelyn Uhrain [Wed, 7 Sep 2011 20:25:59 +0000 (20:25 +0000)]
Fix Sema::CorrectTypo to ignore found but unresolved symbols

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

13 years agoMore missing dependencies picked up by Ninja.
Peter Collingbourne [Wed, 7 Sep 2011 19:12:36 +0000 (19:12 +0000)]
More missing dependencies picked up by Ninja.

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