Граф коммитов

31273 Коммитов

Автор SHA1 Сообщение Дата
Devang Patel e8ee3f2cda 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
2011-09-12 17:11:58 +00:00
Douglas Gregor 591dc84101 Allow __module_private__ on fields
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139499 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 16:11:24 +00:00
Douglas Gregor f3a762a8de 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
2011-09-12 15:48:15 +00:00
Douglas Gregor eced60c185 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
2011-09-12 15:17:19 +00:00
Hans Wennborg cb4d7c202e 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
2011-09-12 12:07:30 +00:00
Benjamin Kramer afc5b15022 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
2011-09-10 21:52:04 +00:00
Fariborz Jahanian 3a448fb539 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
2011-09-10 17:01:56 +00:00
Chris Lattner a2f4ae8cfa remove pedantic ;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139472 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 16:13:42 +00:00
John McCall bbb253c307 Modernize and comment; no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139470 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 09:30:49 +00:00
John McCall 71c758d3f4 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
2011-09-10 09:17:20 +00:00
John McCall 33e56f3273 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
2011-09-10 06:18:15 +00:00
David Blaikie ac5ecf46c5 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
2011-09-10 05:47:59 +00:00
Julien Lerouge 6f2ec515d9 Make this test portable on Win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139464 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 05:46:15 +00:00
David Blaikie 4f4f349208 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
2011-09-10 05:35:08 +00:00
John McCall b1f251f30e 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
2011-09-10 05:31:57 +00:00
Richard Trieu a81b36d7bc 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
2011-09-10 02:16:48 +00:00
Eli Friedman 42f19be40f clang part of r139458; un-XFAIL testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139460 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 02:03:28 +00:00
Richard Trieu 5c988bd71c 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
2011-09-10 01:56:32 +00:00
John McCall bf379a6571 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
2011-09-10 01:37:23 +00:00
John McCall dc05b11c67 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
2011-09-10 01:16:55 +00:00
Douglas Gregor b3321093f6 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
2011-09-10 00:56:20 +00:00
Chandler Carruth 78bf680ddf 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
2011-09-10 00:51:24 +00:00
Devang Patel 68f76b112c Emit debug info for wchar_t.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139443 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 00:44:49 +00:00
Douglas Gregor 02a5e875cc 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
2011-09-10 00:30:18 +00:00
Douglas Gregor 94da1587f7 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
2011-09-10 00:22:34 +00:00
Anna Zaks d1fe529b1a [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
2011-09-10 00:12:23 +00:00
Douglas Gregor 08e0bc16b3 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
2011-09-10 00:09:20 +00:00
Chandler Carruth a1364be341 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
2011-09-10 00:02:34 +00:00
Douglas Gregor 35120c6285 The translation unit is never deserialized
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139436 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 23:34:14 +00:00
Douglas Gregor 530b14ad27 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
2011-09-09 23:07:59 +00:00
Douglas Gregor 919814def9 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
2011-09-09 23:01:35 +00:00
Caitlin Sadowski d5b1605578 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
2011-09-09 23:00:59 +00:00
Caitlin Sadowski 0fed26d945 Thread safety: removing unnecessary import
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139425 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 22:49:12 +00:00
Julien Lerouge ef004ec5ad Remove trailing } in comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139424 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 22:46:39 +00:00
Julien Lerouge 77f68bb90a 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
2011-09-09 22:41:49 +00:00
Douglas Gregor 712f2fcb70 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
2011-09-09 22:02:16 +00:00
Kaelyn Uhrain fd641f943a 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
2011-09-09 21:58:49 +00:00
Eric Christopher acae011241 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
2011-09-09 21:53:04 +00:00
Douglas Gregor 3594277947 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
2011-09-09 21:34:22 +00:00
Douglas Gregor 6274d30d77 Friends cannot be declared module-private
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139411 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 21:14:29 +00:00
Douglas Gregor 5db255e02f 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
2011-09-09 21:09:37 +00:00
Douglas Gregor 5181ad023c 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
2011-09-09 21:05:56 +00:00
Douglas Gregor d023aec890 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
2011-09-09 20:53:38 +00:00
John McCall 13db5cfc4e 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
2011-09-09 20:41:01 +00:00
Fariborz Jahanian 88914801a4 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
2011-09-09 20:35:22 +00:00
Douglas Gregor 5c16d635ff 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
2011-09-09 20:05:21 +00:00
Douglas Gregor e761230ae3 __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
2011-09-09 19:05:14 +00:00
Anna Zaks 9134294114 [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
2011-09-09 18:43:53 +00:00
Douglas Gregor 6311d2bb3d 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
2011-09-09 18:32:39 +00:00
Douglas Gregor bbcb7ea8a0 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
2011-09-09 16:51:10 +00:00