Sebastian Redl
0b17c61e8f
Instead of modifying the ObjC AST to not modify existing declarations, teach chained PCH to overwrite declarations from earlier PCH files in dependent ones. Tell Sema to note when it changes AST nodes so that they have to be reserialized. Finally, the ObjCProtocolDecls created in forward decls, like the ObjCInterfaceDecls in @class forward decls, are not lexically part of the decl context; only the definition is.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110989 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-13 00:28:03 +00:00
Fariborz Jahanian
8404f670f5
Make use of __func__ in a block actually refer to
...
block's helper function. Fixes radar 7860965.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110988 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-13 00:19:55 +00:00
John McCall
279b5eb691
Just disable the hidden-visibility optimization for now by hiding it behind
...
a -cc1 option. The Darwin linker complains about mixed visibility when linking
gcc-built objects with clang-built objects, and the optimization isn't really
that valuable. Platforms with less ornery linkers can feel free to enable this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110979 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 23:36:15 +00:00
Douglas Gregor
f18d0d8b39
Teach CompilerInstance to create and hold on to the Sema object used
...
for parsing, so that it can persist beyond the lifetime of the parsing
call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110978 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 23:31:19 +00:00
Tom Care
505a5065af
Small changes to UnreachableCodeChecker
...
- Added detection of Empty CFGBlocks (artificial blocks)
- Relaxed an assertion based on an incorrect assumption until further investigation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110974 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 23:01:06 +00:00
Douglas Gregor
46ea32a4b5
Add a ParseAST overload that takes a Sema object, so that the caller
...
can create (and hold on to) the Sema object. Also, move Sema-related
initialization/finalization with its various consumers and external
sources into the Sema constructor and destructor, rather than placing
it in ParseAST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110973 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 22:51:45 +00:00
Tom Care
a7a8a450d9
Improved IdempotentOperationChecker false positives and false negatives.
...
- Unfinished analysis may still report valid warnings if the path was completely analyzed
- New 'CanVary' heuristic to recursively determine if a subexpression has a varying element
- Updated test cases, including one known bug
- Exposed GRCoreEngine through GRExprEngine
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110970 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 22:45:47 +00:00
Fariborz Jahanian
80a785c245
Typo.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110965 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 22:33:42 +00:00
Fariborz Jahanian
ea16110ce3
Patch to issue warning when colllection expresion's type
...
does not implement 'countByEnumeratingWithState' API.
Implements radar 7634669.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110964 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 22:25:42 +00:00
John McCall
b7f4ffe073
Implement -Wcast-align. The initial design of this diagnostic diverges
...
from GCC's in that we warn on *any* increase in alignment requirements, not
just those that are enforced by hardware. Please let us know if this causes
major problems for you (which it shouldn't, since it's an optional warning).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110959 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 21:44:57 +00:00
John McCall
d69fd7f34f
Fixing the build isn't good enough; back out r110956 and r110953.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110958 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 21:39:05 +00:00
John McCall
e783d000b1
dgregor should write code that compiles.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110956 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 21:23:27 +00:00
Douglas Gregor
1ee17504a8
Update Xcode project
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110953 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 20:53:33 +00:00
Douglas Gregor
0eeb81baac
Add a ParseAST overload that takes a Sema object, so that the caller
...
can create (and hold on to) the Sema object. Also, move Sema-related
initialization/finalization with its various consumers and external
sources into the Sema constructor and destructor, rather than placing
it in ParseAST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110952 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 20:50:39 +00:00
Fariborz Jahanian
192b1464dc
Fixes block type matching bug. Radar 8302845.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110950 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 20:46:12 +00:00
Douglas Gregor
e737f5041a
Move Sema's headers into include/clang/Sema, renaming a few along the way.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110945 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 20:07:10 +00:00
Dan Gohman
7516451f6f
Revert r110936; this fails on clang-i686-darwin10 too.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110942 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 18:57:17 +00:00
Anton Yartsev
a816ec8338
first test commit
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110941 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 18:51:55 +00:00
Douglas Gregor
c9ef405559
Downgrade error about nonnull attribute bbeing applied to a function without point arguments to a warning
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110939 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 18:48:43 +00:00
Devang Patel
f128b85887
Make this test darwin only.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110936 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 17:42:42 +00:00
Douglas Gregor
2d474ba9e8
Don't emit end-of-file diagnostics like "unterminated conditional" or
...
"unterminated string" when we're performing code completion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110933 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 17:04:55 +00:00
Dan Gohman
d5f4487fc6
Temporarily disable this failing test, until it can be properly
...
investigated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110917 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 15:19:46 +00:00
Argyrios Kyrtzidis
f573084db5
Add a comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110913 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 12:31:25 +00:00
Abramo Bagnara
ef3dce817d
Added locations and type source info for DeclarationName inside UsingDecl.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110912 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 11:46:03 +00:00
Jordy Rose
2a479929f7
Remove OwnershipAttr::Kind, since it's essentially redundant with attr::Kind the way it's being used. Also fix isa<OwnershipAttr> support, break more-than-80-char lines, and other miscellaneous ownership attr cleanup.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110908 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 08:54:03 +00:00
John McCall
6d311229f0
Test for rdar://problem/8073696.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110907 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 07:31:42 +00:00
John McCall
7b49202090
Handle the obvious case for diagnosing redeclarations of extern "C" functions.
...
Fixes PR7859.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110906 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 07:09:11 +00:00
Jordy Rose
a205061727
Actually use reduced set of checkers in EvalAssume.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110904 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 04:05:07 +00:00
Daniel Dunbar
8eb2b0141d
Frontend: Move the bulk of the cc1_main() processing into
...
ExecuteCompilerInvocation in libFrontend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110903 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 02:53:12 +00:00
Daniel Dunbar
a6bf47f855
clang -cc1: Move real diagnostics client initialization to earlier.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110902 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 02:53:07 +00:00
John McCall
507384f007
Bail out of MaybeBindToTemporary if the record type is invalid. Test case
...
is 8.5MB, sorry.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110901 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 02:40:37 +00:00
John McCall
e8dc53e585
Implement RTTI generation for Objective C types. Fixes PR7864.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110900 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 02:17:33 +00:00
John McCall
fcadea2556
Fix a crash on invalid when declaring an implicit member of a class with an
...
invalid destructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110891 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 00:57:17 +00:00
Daniel Dunbar
a77a723489
Driver: Use the compile time linker version as the default for -mlinker-version,
...
if detected.
- This is a hack, we really want the linker version at execution time, but we
don't have any infrastructure for getting that. Yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110886 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 00:05:12 +00:00
Devang Patel
dabc3e90cc
Emit debug info for static const class member.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110885 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 00:02:44 +00:00
Devang Patel
f643264005
update test to reflect r110876 change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 00:00:41 +00:00
John McCall
b3b50a8b2c
Don't try to implicitly declare special members of an invalid class.
...
Fixes a crash in a rather large and difficult-to-reduce test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110882 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 23:52:36 +00:00
Tom Care
b5049d83fd
Fix a bug where child statements could not be identified as being in a CFGBlock in CFGStmtMap::getBlock.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110881 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 23:36:58 +00:00
Argyrios Kyrtzidis
e5c3537702
Switch on PCH for C++. C++ fans all over the world rejoice.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110879 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 23:27:58 +00:00
Daniel Dunbar
b18dc5b837
Driver/Darwin: Pass -demangle when linking, if the linker supports it.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 23:07:50 +00:00
Daniel Dunbar
c176bc6be6
Driver: Add -mlinker-version=, which forwards to -target-linker-version.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110872 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 23:07:47 +00:00
Daniel Dunbar
39065a5494
Frontend: Add -target-linker-version, for specifying the version string of the
...
linker in use.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110871 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 23:07:42 +00:00
Eli Friedman
0eff4e73d5
Fix oversight with symbolic names in TargetInfo::validateInputConstraint.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110870 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 23:03:37 +00:00
Argyrios Kyrtzidis
646395bbca
-Make TokenID of IdentifierInfo read-only, remove setTokenID().
...
-There are 2 instances that change the TokenID for GNU libstdc++ 4.2 compatibility.
To handler those cases introduce a RevertedTokenID bitfield, RevertTokenIDToIdentifier() and hasRevertedTokenIDToIdentifier() methods.
Store the bitfield in PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110868 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 22:55:12 +00:00
John McCall
b3a29f1327
Revise r110163: don't mark weak functions nounwind, because the optimizer
...
treats that as a contract to be fulfilled by any replacements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110864 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 22:38:33 +00:00
Abramo Bagnara
2577743c56
Added locations and type source info for DeclarationName.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110860 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 22:01:17 +00:00
Douglas Gregor
e6b1bb6e7f
Once code completion has completed, pass a "completion context" on to
...
the code-completion consumer. The consumer can use this information to
augument, filter, or display the code-completion results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110858 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 21:23:17 +00:00
Fariborz Jahanian
741c362a1c
Change text of diagnostics on user request.
...
radar 7948654.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110857 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 21:22:15 +00:00
Devang Patel
d67ef0eed4
Emit a stop point for delegate constructor call. This gives user a chance to step into constructor body.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110853 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 21:04:37 +00:00
John McCall
a5f2de2e49
When re-raising an exception after a cleanup, we need to call _Unwind_Resume_or_Rethrow
...
instead of _Unwind_Resume. With SJLJ exceptions, this is spelled
"_Unwind_SjLj_Resume_or_Rethrow", not "_Unwind_SjLj_Resume", which has
significantly different semantics.
We should actually never be generating a call to _Unwind_SjLj_Resume directly;
even if we were generating true cleanups (which we aren't because of the
horrible hack), we should be calling __cxa_end_cleanup() on ARM. I
haven't implemented this because there's little point as long as the HH is
present.
I believe this fixes <rdar://problem/8281377>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110851 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 20:59:53 +00:00