| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Combined with typo correction's new ability to apply global/absolute nested
name specifiers to possible corrections, cases such as in PR12287 where the
desired function is being shadowed by a lexically closer function with the
same name but a different number of parameters will now include a FixIt.
On a side note, since the test for this change caused
test/SemaCXX/typo-correction.cpp to exceed the typo correction limit for
a single file, I've included a test case for exceeding the limit and added
some comments to both the original and part two of typo-correction.cpp
warning future editors of the files about the limit.
llvm-svn: 185881
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The removal is tried by retrying the failed lookup of a correction
candidate with either the MemberContext or SS (CXXScopeSpecifier) or
both set to NULL if they weren't already. If the candidate identifier
is then looked up successfully, make a note in the candidate that the
SourceRange should include any existing nested name specifier even if
the candidate isn't adding a different one (i.e. the candidate has a
NULL NestedNameSpecifier).
Also tweak the diagnostic messages to differentiate between a suggestion
that just replaces the identifer but leaves the existing nested name
specifier intact and one that replaces the entire qualified identifier,
in cases where the suggested replacement is unqualified.
llvm-svn: 185487
|
|
|
|
|
|
| |
namespaces to try for potential typo corrections.
llvm-svn: 184762
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When suggesting "foo::bar" as a correction for "fob::bar" we mistakenly
replaced only "bar" with "foo::bar" producing "fob::foo::bar" which was broken.
This corrects that replacement in as many places as I could find & provides
test cases for all those cases I could find a test case for. There are a couple
that don't seem to be reachable (one looks entirely dead, the other just
doesn't seem to ever get called with a namespace to namespace change).
Review by Richard Smith ( http://llvm-reviews.chandlerc.com/D57 ).
llvm-svn: 165817
|
|
|
|
|
|
|
| |
"_Bool" (depending on dialect), but not both, since they have the same
edit distance from "Bool".
llvm-svn: 134263
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vector<int>
to
std::vector<int>
Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes
PR5776/<rdar://problem/8652971>.
Thanks Kaelyn!
llvm-svn: 134007
|
|
|
|
|
|
|
|
|
| |
in the classification of template names and using declarations. We now
properly typo-correct the leading identifiers in statements to types,
templates, values, etc. As an added bonus, this reduces the number of
lookups required for disambiguation.
llvm-svn: 130288
|
|
|
|
|
|
|
|
| |
looking at the context and the correction and using a custom
diagnostic. Also, enable some Fix-It tests that were somewhat lamely
disabled.
llvm-svn: 130283
|
|
|
|
|
|
|
| |
kinds of lookup into Objective-C classes were tangled together, a
situation that was compounded by automatically synthesized ivars.
llvm-svn: 116907
|
|
|
|
| |
llvm-svn: 116904
|
|
|
|
| |
llvm-svn: 107194
|
|
|
|
| |
llvm-svn: 107191
|
|
|
|
|
|
|
|
| |
"std", with a warning, to improve GCC compatibility. Fixes PR7517.
As a drive-by, add typo correction for using directives.
llvm-svn: 107172
|
|
|
|
|
|
| |
files with the additional suffix in the middle.
llvm-svn: 102230
|
|
|
|
|
|
|
|
| |
Remove -faccess-control from -cc1; add -fno-access-control.
Make the driver pass -fno-access-control by default.
Update a bunch of tests to be correct under access control.
llvm-svn: 100880
|
|
|
|
|
|
|
|
|
|
| |
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).
Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.
llvm-svn: 98149
|
|
|
|
|
|
|
|
| |
we look into a Scope that corresponds to a compound statement whose
scope was combined with the scope of the function that owns it. This
improves typo correction in many common cases.
llvm-svn: 92879
|
|
|
|
|
|
| |
specifier that we corrected to.
llvm-svn: 92878
|
|
|
|
|
|
|
| |
pointing to the declaration that we found that has that name (if it is
unique).
llvm-svn: 92877
|
|
|
|
|
|
| |
parents of out-of-line function contexts
llvm-svn: 92397
|
|
|
|
| |
llvm-svn: 92396
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test/FixIt/typo.cpp:41:15: error: initializer 'base' does not name a non-static
data member or base class; did you mean the base class 'Base'?
Derived() : base(),
^~~~
Base
test/FixIt/typo.cpp:42:15: error: initializer 'ember' does not name a non-static
data member or base class; did you mean the member 'member'?
ember() { }
^~~~~
member
llvm-svn: 92355
|
|
|
|
| |
llvm-svn: 92351
|
|
|
|
|
|
|
|
|
|
| |
typo.cpp:18:1: error: use of undeclared identifier 'other_std'; did
you mean 'otherstd'?
other_std::strng str1;
^~~~~~~~~
otherstd
llvm-svn: 92350
|
|
|
|
|
|
|
|
|
|
| |
typo.cpp:27:8: error: no template named 'basic_sting' in namespace 'std';
did you mean 'basic_string'?
std::basic_sting<char> b2;
~~~~~^~~~~~~~~~~
basic_string
llvm-svn: 92348
|
|
|
|
|
|
| |
s.fnd("hello")
llvm-svn: 92345
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
typo.cpp:22:10: error: use of undeclared identifier 'radious'; did
you mean 'radius'?
return radious * pi;
^~~~~~~
radius
This was super-easy, since we already had decent recovery by looking
for names in dependent base classes.
llvm-svn: 92341
|
|
tring str2;
we produce the following diagnostic + fix-it:
typo.cpp:15:1: error: unknown type name 'tring'; did you mean 'string'?
tring str2;
^~~~~
string
To make this really useful, we'll need to introduce typo correction in
many more places (wherever we do name lookup), and implement
declaration-vs-expression heuristics that cope with typos
better. However, for now this will handle the simple cases where we
already get good "unknown type name" diagnostics.
The LookupVisibleDecls functions are intended to be used by code
completion as well as typo correction; that refactoring will happen
later.
llvm-svn: 92308
|