| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
don't have access to (e.g., fprintf, which needs the library type
FILE), fail with a warning and forget about the builtin
entirely. Previously, we would actually provide an error, which breaks
autoconf's super-lame checks for fprintf, longjmp, etc. Fixes PR8316.
llvm-svn: 122744
|
|
|
|
| |
llvm-svn: 122686
|
|
|
|
| |
llvm-svn: 121763
|
|
|
|
| |
llvm-svn: 121759
|
|
|
|
|
|
|
| |
class to be passed around. The line between argument and return types and
everything else is kindof vague, but I think it's justifiable.
llvm-svn: 121752
|
|
|
|
|
|
|
|
|
|
| |
global code completions are disabled (e.g., because they are
cached). Also, make sure that forward-declared protocols are visited
when we look for all visible names within a declaration context.
Previously, we would end up with duplicate completions for protocols.
llvm-svn: 121416
|
|
|
|
|
|
| |
macri; the extra bool fits into padding anyway.
llvm-svn: 120708
|
|
|
|
|
|
|
|
|
| |
a specific language. We are adding such language info. by
extensing Builtins.def and via a language flag added
to LIBBUILTIN/BUILTIN and check for that when deciding
a name is builtin or not. Implements //rdar://8689273.
llvm-svn: 120429
|
|
|
|
|
|
| |
// rdar://8632525
llvm-svn: 118634
|
|
|
|
| |
llvm-svn: 118371
|
|
|
|
|
|
| |
can be used to automatically synthesize an ivar.
llvm-svn: 118052
|
|
|
|
|
|
| |
Better performance and fixes rdar://8603569.
llvm-svn: 117656
|
|
|
|
| |
llvm-svn: 117446
|
|
|
|
|
|
|
|
| |
typo. This can happen with context-sensitive keywords like "super",
when typo correction didn't know that "super" wasn't permitted in this
context.
llvm-svn: 117372
|
|
|
|
|
|
|
| |
name *in the same scope*, but not across scopes. Implement the
highlighted condition.
llvm-svn: 117212
|
|
|
|
|
|
|
|
| |
members in class subobjects of different types. So long as the
underlying declaration sets are the same, and the declaration sets
involve non-instance members, this is not an ambiguity.
llvm-svn: 117163
|
|
|
|
|
|
|
| |
kinds of lookup into Objective-C classes were tangled together, a
situation that was compounded by automatically synthesized ivars.
llvm-svn: 116907
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
which seems to be working properly.
llvm-svn: 116894
|
|
|
|
|
|
| |
typo correction, to allow early exits.
llvm-svn: 116868
|
|
|
|
|
|
|
|
|
|
| |
computation to compute the lower bound of the edit distance, so that
we can avoid computing the edit distance for names that will clearly
be rejected later. Since edit distance is such an expensive algorithm
(M x N), this leads to a 7.5x speedup when correcting NSstring ->
NSString in the presence of a Cocoa PCH.
llvm-svn: 116849
|
|
|
|
|
|
|
|
|
| |
we did was an acceptable lookup. If it is, then we can re-use that
lookup result. If it isn't, we have to perform the lookup again. This
is almost surely the cause behind the mysterious typo.m failures on
some builders; we were getting the wrong lookup results returned.
llvm-svn: 116586
|
|
|
|
|
|
|
| |
typo correction prefers "super" over other, equivalent completions. I
believe this will fix the regression on the buildbot.
llvm-svn: 116574
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
identifiers to determine good typo-correction candidates. Once we've
identified those candidates, we perform name lookup on each of them
and the consider the results.
This optimization makes typo correction > 2x faster on a benchmark
example using a single typo (NSstring) in a tiny file that includes
Cocoa.h from a precompiled header, since we are deserializing far less
information now during typo correction.
There is a semantic change here, which is interesting. The presence of
a similarly-named entity that is not visible can now affect typo
correction. This is both good (you won't get weird corrections if the
thing you wanted isn't in scope) and bad (you won't get good
corrections if there is a similarly-named-but-completely-unrelated
thing). Time will tell whether it was a good choice or not.
llvm-svn: 116528
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
solely based on the names it sees, rather than actual declarations it
gets. In essence, we determine the set of names that are "close
enough" to the typo'd name. Then, we perform name lookup for each of
those names, filtering out those that aren't actually visible, and
typo-correct from the remaining results.
Overall, there isn't much of a change in the behavior of typo
correction here. The only test-suite change comes from the fact that
we make good on our promise to require that the user type 3 characters
for each 1 character corrected.
The real intent behind this change is to set the stage for an
optimization to typo correction (so that we don't need to deserialize
all declarations in a translation unit) and future work in finding
missing qualification ("'vector' isn't in scope; did you mean
'std::vector'?). Plus, the code is cleaner this way.
llvm-svn: 116511
|
|
|
|
| |
llvm-svn: 113076
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols
(and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in
an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced
in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is
needed to maintain the lexical information of the original source.
Fixes <rdar://problem/8380046>.
llvm-svn: 112691
|
|
|
|
|
|
| |
doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces.
llvm-svn: 112637
|
|
|
|
|
|
|
| |
Clients of Sema don't need to know (for example) the list of diagnostics we
support.
llvm-svn: 112093
|
|
|
|
|
|
| |
to the new constants.
llvm-svn: 112047
|
|
|
|
| |
llvm-svn: 112038
|
|
|
|
| |
llvm-svn: 112030
|
|
|
|
| |
llvm-svn: 112026
|
|
|
|
|
|
|
| |
#include Sema.h while keeping all the AST declarations opaque. That may
not be reasonably attainable, though.
llvm-svn: 111907
|
|
|
|
| |
llvm-svn: 111733
|
|
|
|
|
|
|
|
|
| |
- move DeclSpec &c into the Sema library
- move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.
llvm-svn: 111667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations (in addition to macros). Each kind of declaration maps to
a certain set of completion contexts, and the ASTUnit completion logic
introduces the completion strings for those declarations if the actual
code-completion occurs in one of the contexts where it matters.
There are a few new code-completion-context kinds. Without these,
certain completions (e.g., after "using namespace") would need to
suppress all global completions, which would be unfortunate.
Note that we don't get the priorities right for global completions,
because we don't have enough type information. We'll need a way to
compare types in an ASTContext-agnostic way before this can be
implemented.
llvm-svn: 111093
|
|
|
|
| |
llvm-svn: 110945
|
|
|
|
|
|
| |
Fixes a crash in a rather large and difficult-to-reduce test case.
llvm-svn: 110882
|
|
|
|
| |
llvm-svn: 110860
|
|
|
|
|
|
|
|
| |
that actually refer to the same underlying type, it is not an
ambiguity; add uniquing support based on the canonical type of type
declarations. Fixes <rdar://problem/8296180>.
llvm-svn: 110806
|
|
|
|
|
|
|
| |
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.
llvm-svn: 107992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations for implicit default constructors, copy constructors,
copy assignment operators, and destructors. On a "simple" translation
unit that includes a bunch of C++ standard library headers, we
generate relatively few of these implicit declarations now:
4/159 implicit default constructors created
18/236 implicit copy constructors created
70/241 implicit copy assignment operators created
0/173 implicit destructors created
And, on this translation unit, this optimization doesn't really
provide any benefit. I'll do some more performance measurements soon,
but this completes the implementation work for <rdar://problem/8151045>.
llvm-svn: 107551
|
|
|
|
| |
llvm-svn: 107543
|
|
|
|
|
|
| |
constructor-name lookup.
llvm-svn: 107536
|
|
|
|
| |
llvm-svn: 107521
|
|
|
|
| |
llvm-svn: 107510
|
|
|
|
|
|
| |
calls use that routine
llvm-svn: 107444
|
|
|
|
|
|
| |
rdar://problem/8124080 and PR7118.
llvm-svn: 107358
|
|
|
|
| |
llvm-svn: 104991
|