Douglas Gregor
1e44e02292
Introduce a cc1-level option to provide the path to the module cache,
...
where the compiler will look for module files. Eliminates the
egregious hack where we looked into the header search paths for
modules.
llvm-svn: 139538
2011-09-12 20:41:59 +00:00
Douglas Gregor
7bfedd69c5
Kill off an irrelevant FIXME
...
llvm-svn: 139523
2011-09-12 18:58:37 +00:00
Devang Patel
b0fa5b57ac
By popular demand, enumerate all builtin types!
...
llvm-svn: 139521
2011-09-12 18:50:21 +00:00
Richard Trieu
b420bcaeb0
Refactor CheckAdditionOperands() to use early return for pointer addition.
...
llvm-svn: 139520
2011-09-12 18:37:54 +00:00
Douglas Gregor
41866816ce
Diagnose attempt to mark function-local declarations as __module_private__.
...
llvm-svn: 139519
2011-09-12 18:37:38 +00:00
Anna Zaks
05dda473e6
[analyzer] Simplify the test, use generic/more descriptive names.
...
llvm-svn: 139516
2011-09-12 18:28:35 +00:00
Devang Patel
33e097b699
Add an assert so that new builtins do not sneak without proper debug info.
...
llvm-svn: 139514
2011-09-12 18:24:46 +00:00
Devang Patel
ba15240e83
Update test to fix windows buildbot.
...
llvm-svn: 139513
2011-09-12 18:11:52 +00:00
Argyrios Kyrtzidis
14c32e8894
[libclang] In ASTUnit::Parse copy the CompilerInvocation object instead of
...
modifying directly for the preamble.
This avoids an awful, hard to find, bug where "PreprocessorOpts.DisablePCHValidation = true"
would be persistent for subsequent reparses of the translation unit which would result
in defines, present in command-line but not in the PCH, being ignored.
Fixes rdar://9615399.
llvm-svn: 139512
2011-09-12 18:09:38 +00:00
Argyrios Kyrtzidis
3405baa3f0
[libclang] Make c-index-test check CINDEXTEST_REMAP_AFTER_TRIAL environment variable,
...
which when set it determines the trial number after which the remapping of files should
take effect.
llvm-svn: 139511
2011-09-12 18:09:31 +00:00
Richard Trieu
993f3ab07b
Fix two comments from warn to emit error to match the actual diagnostic used.
...
llvm-svn: 139510
2011-09-12 18:08:02 +00:00
Anna Zaks
79301b16f3
[analyzer] Fix a failure encountered while analyzing bind (radar://10105448).
...
llvm-svn: 139509
2011-09-12 18:07:30 +00:00
Anna Zaks
6e05e32e12
Doxygen comments.
...
llvm-svn: 139508
2011-09-12 17:57:20 +00:00
Anna Zaks
295208d744
[analyzer] Fix a new failure encountered while building Adium exposed as a result of r138196(radar://10087620). ObjectiveC property of type int has a value of type ObjCPropRef, which is a Loc.
...
llvm-svn: 139507
2011-09-12 17:56:08 +00:00
Anna Zaks
964c186ffe
[analyzer] Test for -analyze-function on ObjectiveC to accompany r139439.
...
llvm-svn: 139506
2011-09-12 17:48:08 +00:00
Devang Patel
98ca8aeca6
Fix debug info encodings for char16_t and char32_t.
...
llvm-svn: 139502
2011-09-12 17:11:58 +00:00
Douglas Gregor
3baa6702ab
Allow __module_private__ on fields
...
llvm-svn: 139499
2011-09-12 16:11:24 +00:00
Douglas Gregor
fc33bcfc4a
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.
llvm-svn: 139497
2011-09-12 15:48:15 +00:00
Douglas Gregor
b63ab9477c
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.
llvm-svn: 139496
2011-09-12 15:17:19 +00:00
Hans Wennborg
be207b3c74
Silence ?: precendence warning when parenthesis are present.
...
Fixes PR10898. The warning should be silent when there are parenthesis
around the condition expression.
llvm-svn: 139492
2011-09-12 12:07:30 +00:00
Benjamin Kramer
8a8051f2cd
Silence "end of non-void function" warnings with llvm_unreachable and add an assert.
...
llvm-svn: 139474
2011-09-10 21:52:04 +00:00
Fariborz Jahanian
9f0bc5757c
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.
llvm-svn: 139473
2011-09-10 17:01:56 +00:00
Chris Lattner
d2cd41c5bf
remove pedantic ;
...
llvm-svn: 139472
2011-09-10 16:13:42 +00:00
John McCall
6acaef9fe8
Modernize and comment; no functionality change.
...
llvm-svn: 139470
2011-09-10 09:30:49 +00:00
John McCall
7f16c42b9e
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.
llvm-svn: 139468
2011-09-10 09:17:20 +00:00
John McCall
2d637d2e79
Rename the ARC cast kinds to start with "ARC".
...
llvm-svn: 139466
2011-09-10 06:18:15 +00:00
David Blaikie
f1e2924b6b
Correctly referring to the null pointer as 'null' not the macro 'NULL' in the boolean conversion diagnostic message.
...
llvm-svn: 139465
2011-09-10 05:47:59 +00:00
Julien Lerouge
d25ed06c63
Make this test portable on Win32.
...
llvm-svn: 139464
2011-09-10 05:46:15 +00:00
David Blaikie
e5f9a9e603
Show either a location or a fixit note, not both, for uninitialized variable warnings.
...
llvm-svn: 139463
2011-09-10 05:35:08 +00:00
John McCall
5dc5c1ea47
Missed a %local use; hopefully this clears this test up.
...
llvm-svn: 139462
2011-09-10 05:31:57 +00:00
Richard Trieu
7fde916498
Fix a broken assert in AST/DeclCXX.cpp.
...
llvm-svn: 139461
2011-09-10 02:16:48 +00:00
Eli Friedman
5c917278fd
clang part of r139458; un-XFAIL testcase.
...
llvm-svn: 139460
2011-09-10 02:03:28 +00:00
Richard Trieu
c41773ab6a
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.
llvm-svn: 139457
2011-09-10 01:56:32 +00:00
John McCall
e5e7e6bc84
Make this test not depend on unnecessary details and IR variable names.
...
llvm-svn: 139455
2011-09-10 01:37:23 +00:00
John McCall
cd78e805e9
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.
llvm-svn: 139451
2011-09-10 01:16:55 +00:00
Douglas Gregor
97e3590a6e
Fix a diagnostics crasher with -Wmissing-noreturn in Objective-C
...
methods, and improve the diagnostic slightly along the way. Fixes
<rdar://problem/10098695>.
llvm-svn: 139446
2011-09-10 00:56:20 +00:00
Chandler Carruth
73fddfe1b0
Fix a -Wreturn-type warning due to this field not explicitly having the
...
enumeration type.
llvm-svn: 139445
2011-09-10 00:51:24 +00:00
Devang Patel
964d758d17
Emit debug info for wchar_t.
...
llvm-svn: 139443
2011-09-10 00:44:49 +00:00
Douglas Gregor
abc5fbe9d6
Don't crash when we fail to load a module. It's unbecoming of a
...
well-bred compiler like Clang.
llvm-svn: 139442
2011-09-10 00:30:18 +00:00
Douglas Gregor
87d8124b0e
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.
llvm-svn: 139441
2011-09-10 00:22:34 +00:00
Anna Zaks
dfbea6b244
[analyzer] -analyze-function for ObjectiveC should check if any of the methods match the name (not only the first one).
...
llvm-svn: 139439
2011-09-10 00:12:23 +00:00
Douglas Gregor
98c05b286c
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).
llvm-svn: 139438
2011-09-10 00:09:20 +00:00
Chandler Carruth
a626d645d5
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.
llvm-svn: 139437
2011-09-10 00:02:34 +00:00
Douglas Gregor
1bbf030b8e
The translation unit is never deserialized
...
llvm-svn: 139436
2011-09-09 23:34:14 +00:00
Douglas Gregor
dd57400c06
Eliminate all but one caller of Decl::getPCHLevel()
...
llvm-svn: 139430
2011-09-09 23:07:59 +00:00
Douglas Gregor
b3722e2223
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().
llvm-svn: 139427
2011-09-09 23:01:35 +00:00
Caitlin Sadowski
82e2de512e
Thread safety: removing unnecessary import and reordering import list
...
llvm-svn: 139426
2011-09-09 23:00:59 +00:00
Caitlin Sadowski
0bef2279fb
Thread safety: removing unnecessary import
...
llvm-svn: 139425
2011-09-09 22:49:12 +00:00
Julien Lerouge
e0d5fad37b
Remove trailing } in comment.
...
llvm-svn: 139424
2011-09-09 22:46:39 +00:00
Julien Lerouge
5a6b6987dc
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.
llvm-svn: 139423
2011-09-09 22:41:49 +00:00