Anders Carlsson
274a70ed7f
Add a __has_attribute macro that works much like __has_feature and __has_builtin.
...
llvm-svn: 116906
2010-10-20 02:31:43 +00:00
Douglas Gregor
9b2f537f69
Disable this test while I track down the platform-specific issue
...
llvm-svn: 116904
2010-10-20 01:46:04 +00:00
Douglas Gregor
87074f19e8
Introduce a simple cache for unqualified typo corrections, so that we
...
don't repeatedly loop through identifiers, correcting the same typo'd
identifier over and over again.
We still bail out after 20 typo corrections, but this should help
improve performance in the common case where we're typo-correcting
because the user forgot to include a header.
llvm-svn: 116901
2010-10-20 01:32:02 +00:00
Douglas Gregor
30bb275b6b
Bah, incompetence
...
llvm-svn: 116898
2010-10-20 01:16:12 +00:00
Douglas Gregor
1f32ebe892
Eliminate another ordering dependency in typo correction. Re-enable typo.m, which seems to be working properly.
...
llvm-svn: 116894
2010-10-20 01:01:57 +00:00
Bill Wendling
67c5621742
Linux still needs these hacks.
...
llvm-svn: 116888
2010-10-20 00:12:59 +00:00
Argyrios Kyrtzidis
a41f66064f
Fix issue with chained PCH where forward references did not pick up later definition in the chained PCH.
...
llvm-svn: 116887
2010-10-20 00:11:15 +00:00
Fariborz Jahanian
7c299bc6fa
Do not rewrite new accessor if user has defined accessors.
...
Fixes //rdar: // 8570020.
llvm-svn: 116882
2010-10-19 23:47:54 +00:00
Andrew Trick
ba266eec79
Putting back safe fixes 116836,116837,116838
...
llvm-svn: 116866
2010-10-19 21:54:32 +00:00
Andrew Trick
b20ed574ab
Reverting 116836,116837,116838 until we resolve the getLangStandardForKind failures.
...
llvm-svn: 116859
2010-10-19 21:14:46 +00:00
Bill Wendling
2bb7c59356
Now that mm_malloc.h was rewritten to *not* include errno.h (see
...
http://llvm.org/viewvc/llvm-project?rev=116771&view=rev ) we can get rid of these
hacks.
llvm-svn: 116853
2010-10-19 20:08:12 +00:00
Fariborz Jahanian
bfcbc85fea
Fixes a bug in ivar lookup in the new objc's default
...
property synthesis mode, when dealing with legacy code.
Fixes //rdar: //8565343.
llvm-svn: 116846
2010-10-19 19:08:23 +00:00
John McCall
32723e9198
Tag references shouldn't ever get template parameter lists.
...
Fixes rdar://problem/8568507
llvm-svn: 116843
2010-10-19 18:40:57 +00:00
Argyrios Kyrtzidis
40338af47d
Merge headers into test/PCH/chain-cxx.cpp for convenience.
...
llvm-svn: 116836
2010-10-19 18:06:43 +00:00
Ted Kremenek
2c8028bcf4
In ~Preprocessor(), also cleanup the MacroInfo objects left-over from stray "#pragma push_macro" uses. This
...
fixes a potential memory leak.
llvm-svn: 116826
2010-10-19 17:40:53 +00:00
Fariborz Jahanian
50c925fe96
This patch implements Next's IRGen for -fconstant-string-class=class-name.
...
PR6056, //rdar: //8564463
llvm-svn: 116819
2010-10-19 17:19:29 +00:00
Douglas Gregor
f0873f4c85
When marking declarations referenced within an expression (e.g.,
...
within a default argument), recurse into default arguments. Fixes
PR8401, a regression I introduced in r113700 while refactoring our
handling of "used" declarations in default arguments.
llvm-svn: 116817
2010-10-19 17:17:35 +00:00
Michael J. Spencer
8d3f5db7e5
test: FileCheck'ize and document test.
...
llvm-svn: 116799
2010-10-19 06:39:49 +00:00
John McCall
1a1b53e9ad
When instantiating a dependently-scoped friend function declaration,
...
we may need to complete the type before looking into it.
llvm-svn: 116795
2010-10-19 05:01:53 +00:00
NAKAMURA Takumi
1984479896
test/Coverage/html-diagnostics.c: Use find(1) to glob wildcards.
...
MSYS cat(1) does not expand wildcards.
llvm-svn: 116793
2010-10-19 03:38:22 +00:00
John McCall
d0e23ecdc2
Instantiate enclosing template parameter lists when instantiating friends.
...
llvm-svn: 116789
2010-10-19 02:26:41 +00:00
John McCall
e3df2638ce
Uncomputable contexts are always records but can exist.
...
llvm-svn: 116787
2010-10-19 01:54:45 +00:00
John McCall
ace48cd872
Redirect templated friend class decls to a new Sema callback and
...
construct an unsupported friend when there's a friend with a templated
scope specifier. Fixes a consistency crash, rdar://problem/8540527
llvm-svn: 116786
2010-10-19 01:40:49 +00:00
NAKAMURA Takumi
5a391c97b5
test/Sema/return.c: Cygwin does not have _longjmp().
...
Although Cygwin-1.7 has _longjmp(), it would not be essential for this
to distinguish Cygwin's version with <cygwin/version.h>.
llvm-svn: 116783
2010-10-19 01:17:08 +00:00
NAKAMURA Takumi
3ad833be0e
test/Coverage/html-diagnostics.c: Do not make hit "CHECK: Dereference of null pointer" to the output itself!
...
llvm-svn: 116782
2010-10-19 01:11:16 +00:00
Douglas Gregor
0787b3224d
Tweak code-completion result priorities, so that exact and similar
...
type matches have a bigger impact. The impetus for this change was
that, when initializing an enumeration value, we want enumerators of
that enumeration type to have a higher priority than, e.g., unrelated
local variables.
llvm-svn: 116774
2010-10-19 00:03:23 +00:00
Daniel Dunbar
cb79c22678
tests: Force triple to avoid limited precision warning on win32.
...
llvm-svn: 116770
2010-10-18 23:37:08 +00:00
Ted Kremenek
da8a79ac8d
"Fix" bogus idempotent operations warning due to loop unrolling not unrolling enough loops to show that an invariant
...
doesn't hold. This fix is to increase the loop unrolling count to 4, which experiments show doesn't typically impact
analysis time. The real fix is to modify the IdempotentOperationsChecker to suppress warnings where an analysis point
could be preceded by a point where we gave up due to loop unrolling.
llvm-svn: 116769
2010-10-18 23:36:05 +00:00
Douglas Gregor
c769d6e007
Fix the translation of the PCC_ForInit code-completion context for
...
C++/C99/Objective-C, so that we properly include types. This fix
affects global caching of code-completion results; without caching,
the behavior was already correct.
llvm-svn: 116757
2010-10-18 22:01:46 +00:00
Douglas Gregor
643c330b91
Provide code completion for types after the '^' that starts a block
...
literal.
llvm-svn: 116754
2010-10-18 21:34:55 +00:00
John McCall
18e4edae82
Fix some bugs in local class mangling brought up in PR8355.
...
Patch by Richard Smith!
llvm-svn: 116752
2010-10-18 21:28:44 +00:00
Douglas Gregor
8e3e8743fb
Introduce code completion results for Objective-C methods, both when
...
declaring methods and when sending messages to them, by bringing all
of the selector into TypedCheck chunks in the completion result. This
way, we can improve the sorting of these results to account for the
full selector name rather than just the first chunk.
llvm-svn: 116746
2010-10-18 21:05:04 +00:00
Argyrios Kyrtzidis
9beef8e53d
Read/write declaration attributes from/to PCH properly. Embed them in the declaration block instead of trying to create another block.
...
The new block was messing with the assumption that after decls block comes the stmts block.
Fixes http://llvm.org/PR8406
llvm-svn: 116737
2010-10-18 19:20:11 +00:00
Argyrios Kyrtzidis
754fb5ffb3
Merge header & cpp for test/PCH/attrs.c - more convenient to keep the tests in one source file.
...
llvm-svn: 116736
2010-10-18 19:20:05 +00:00
Douglas Gregor
1b035bbe3a
When providing code completions of Objective-C method declarations
...
(after - or +), always traverse superclasses and all categories. The
programmer may want to complete a method from *anywhere*.
llvm-svn: 116723
2010-10-18 18:21:28 +00:00
Fariborz Jahanian
f34011e4ca
patch fixes class names missing from method names in debug information for
...
synthesized property. // rdar: //8498026
llvm-svn: 116717
2010-10-18 17:51:06 +00:00
Anders Carlsson
778ca32c88
Implement the first half of [dcl.attr.override]p6.
...
llvm-svn: 116709
2010-10-18 16:24:27 +00:00
Francois Pichet
a310806ae5
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
llvm-svn: 116704
2010-10-18 15:01:13 +00:00
Bill Wendling
5cd41c4b13
Reapply r116684 with fixes. The test cases needed to be updated.
...
llvm-svn: 116696
2010-10-18 03:41:31 +00:00
Anders Carlsson
0ea1047d51
Implement [dcl.attr.override]p2 and add tests for p1 and p2.
...
llvm-svn: 116692
2010-10-17 23:36:12 +00:00
Anders Carlsson
fa9de26518
Add test for [dcl.attr.final]p4.
...
llvm-svn: 116691
2010-10-17 22:47:44 +00:00
John McCall
d509182336
Coding by inspection has its problems.
...
llvm-svn: 116672
2010-10-16 16:34:08 +00:00
John McCall
17afe45a87
objc_exception_rethrow does not take an exception argument.
...
rdar://problem/8535238
llvm-svn: 116663
2010-10-16 08:21:07 +00:00
John McCall
2c2eb12d9c
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.
llvm-svn: 116661
2010-10-16 06:59:13 +00:00
Daniel Dunbar
622581b73b
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.
llvm-svn: 116660
2010-10-16 05:04:10 +00:00
Daniel Dunbar
90bb5c2315
IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
...
generate unnecessary %al clear on x86_64.
llvm-svn: 116656
2010-10-16 04:08:16 +00:00
Fariborz Jahanian
1cee0adea3
Fix a rewriting bug of rewriting properties declared in
...
protocols. // rdar: //8558702
llvm-svn: 116652
2010-10-16 00:29:27 +00:00
Chandler Carruth
dc689c4156
Not really sure how this worked, but it seems like a clear typo. =]
...
llvm-svn: 116650
2010-10-16 00:24:52 +00:00
Douglas Gregor
1f81ced14c
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>.
llvm-svn: 116647
2010-10-15 23:53:28 +00:00
Douglas Gregor
bafff22b91
Disable this test again, which naturally fails on every platform except the one I'm building with
...
llvm-svn: 116642
2010-10-15 23:23:05 +00:00