6c4898b6ff23950cddca6948ef3fa0dd1848f6f1 |
|
09-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
Attempt typo correction for function calls with the wrong number of arguments. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
b2567ddad9a1142d7224e5363029d640e8f4f59d |
|
03-Jul-2013 |
Kaelyn Uhrain <rikka@google.com> |
Allow typo correction to try removing nested name specifiers. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
8d90b4ab994c48c4b6d53122282dc93ac722bfc7 |
|
24-Jun-2013 |
Kaelyn Uhrain <rikka@google.com> |
Add the global namespace (the "::" namespace specifier) to the list of namespaces to try for potential typo corrections. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
6952c018318a8ce57e336d7ed2a4819a98182fa2 |
|
12-Oct-2012 |
David Blaikie <dblaikie@gmail.com> |
Fix typo correction of one qualified name to another. 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 ). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
07f4a06c402a2ccdd9eae7a3d710990b22040001 |
|
01-Jul-2011 |
Douglas Gregor <dgregor@apple.com> |
When adding boolean keywords for typo correction, add either "bool" or "_Bool" (depending on dialect), but not both, since they have the same edit distance from "Bool". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
d8bba9c15230d2b1b3893e272106aa79efc50251 |
|
28-Jun-2011 |
Douglas Gregor <dgregor@apple.com> |
Add support for C++ namespace-aware typo correction, e.g., correcting vector<int> to std::vector<int> Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes PR5776/<rdar://problem/8652971>. Thanks Kaelyn! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
3b887354b1b667c97d070ddc67b5354353c4c07b |
|
27-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Extend Sema::ClassifyName() to support C++, ironing out a few issues 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
27766d2501259c7b12b1056e0c491a927b304e10 |
|
27-Apr-2011 |
Douglas Gregor <dgregor@apple.com> |
Improve diagnostics for typo correction via Sema::ClassifyName(), by looking at the context and the correction and using a custom diagnostic. Also, enable some Fix-It tests that were somewhat lamely disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
9a632eaa0ee73e4db701a8df74e92909d1fa350e |
|
20-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix handling of property and ivar lookup in typo correction; the two kinds of lookup into Objective-C classes were tangled together, a situation that was compounded by automatically synthesized ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
06ff47b0bbd6d311745010bf4d83ff394502ac0e |
|
20-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Disable this test while I track down the platform-specific issue git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
ed8407692d47833abddd31a8cf30bf560e771c9b |
|
29-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix broken testcase git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
0e8c4b9fac447c6c9849e3ef8beb1ef273ac0f97 |
|
29-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for namespace alias definitions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
6699220f73f11e471b5e5aa42eaf064afeaa079e |
|
29-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Allow a using directive to refer to the implicitly-defined namespace "std", with a warning, to improve GCC compatibility. Fixes PR7517. As a drive-by, add typo correction for using directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
ba5f6eced29937e4e4851a2c0980744768413d66 |
|
24-Apr-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Teach clang -fixit to modify files in-place, or -fixit=suffix to create new files with the additional suffix in the middle. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
7002f4c03c2d0544f4e8bea8d3a5636519081e35 |
|
09-Apr-2010 |
John McCall <rjmccall@apple.com> |
Turn access control on by default in -cc1. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
7c2342dd4c9947806842e5aca3d2bb2e542853c9 |
|
10-Mar-2010 |
John McCall <rjmccall@apple.com> |
When pretty-printing tag types, only print the tag if we're in C (and 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
539c5c34063066753f27bb0f39fdcde1acc06328 |
|
07-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix the search for visible declarations within a Scope to ensure that 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
0d535c89c5d02017153fb971e1ef080cd80cb4b8 |
|
07-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
When we typo-correct a base class initializer, point to the base class specifier that we corrected to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
67dd1d4df1b28973e12e0981129b2517d2033b66 |
|
07-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Whenever we emit a typo-correction diagnostic, also emit a note pointing to the declaration that we found that has that name (if it is unique). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
e3582011a63a78cdfa0917077ed87ccb9b3a87b5 |
|
01-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Make sure that the search for visible declarations looks into the semantic parents of out-of-line function contexts git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
736fc1b5884158387bfc49b8958ebc07b526d1da |
|
01-Jan-2010 |
Douglas Gregor <dgregor@apple.com> |
Fix typo test RUN lines git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
fe0241e31dd2d1af60116adf6f71dedc88cd1f68 |
|
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for C++ base and member initializers, e.g., 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
6c409a031946c069b7f8c33e7d71175563028afb |
|
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Add another typo test for nested-name-specifiers git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
175a65686eba7c7a9cb02412136fddd2d2c56dd7 |
|
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for identifiers within nested name specifiers, e.g., typo.cpp:18:1: error: use of undeclared identifier 'other_std'; did you mean 'otherstd'? other_std::strng str1; ^~~~~~~~~ otherstd git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
bfea239cafdb13256982eb891b151c5c07c1e7a9 |
|
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for template names, e.g., 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
2dcc01195b7850692b9e25c65f77978e6a5a69a5 |
|
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for member access into classes/structs/unions, e.g., s.fnd("hello") git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
bb092bafa984e9fa05136b5cef40fd4374dea0f6 |
|
31-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Implement typo correction for id-expressions, e.g., 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|
546be3c5c000626c8cdf65e32e8ed9b90c424edd |
|
30-Dec-2009 |
Douglas Gregor <dgregor@apple.com> |
Typo correction for type names when they appear in declarations, e.g., given 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/FixIt/typo.cpp
|