Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4 |
|
#
2cb2cd24 |
| 04-May-2022 |
Aaron Ballman <aaron@aaronballman.com> |
Change the behavior of implicit int diagnostics
C89 allowed a type specifier to be elided with the resulting type being int, aka implicit int behavior. This feature was subsequently removed in C99 w
Change the behavior of implicit int diagnostics
C89 allowed a type specifier to be elided with the resulting type being int, aka implicit int behavior. This feature was subsequently removed in C99 without a deprecation period, so implementations continued to support the feature. Now, as with implicit function declarations, is a good time to reevaluate the need for this support.
This patch allows -Wimplicit-int to issue warnings in C89 mode (off by default), defaults the warning to an error in C99 through C17, and disables support for the feature entirely in C2x. It also removes a warning about missing declaration specifiers that really was just an implicit int warning in disguise and other minor related cleanups.
show more ...
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init |
|
#
d972d4c7 |
| 22-Jan-2021 |
Haojian Wu <hokein.wu@gmail.com> |
Revert "[clang] Suppress "follow-up" diagnostics on recovery call expressions."
This reverts commit efa9aaad703e6b150980ed1a74b4e7c9da7d85a2 and adds a crash test.
The commit caused a crash in Code
Revert "[clang] Suppress "follow-up" diagnostics on recovery call expressions."
This reverts commit efa9aaad703e6b150980ed1a74b4e7c9da7d85a2 and adds a crash test.
The commit caused a crash in CodeGen with -fms-compatibility, see https://bugs.llvm.org/show_bug.cgi?id=48690.
show more ...
|
Revision tags: llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
#
efa9aaad |
| 26-Oct-2020 |
Haojian Wu <hokein.wu@gmail.com> |
[clang] Suppress "follow-up" diagnostics on recovery call expressions.
Because of typo-correction, the AST can be transformed, and the transformed AST is marginally useful for diagnostics purpose, t
[clang] Suppress "follow-up" diagnostics on recovery call expressions.
Because of typo-correction, the AST can be transformed, and the transformed AST is marginally useful for diagnostics purpose, the following diagnostics usually do harm than good (easily cause confusions).
Given the following code:
``` void abcc(); void test() { if (abc()); // diagnostic 1 (for the typo-correction): the typo is correct to `abcc()`, so the code is treate as `if (abcc())` in AST perspective; // diagnostic 2 (for mismatch type): we perform an type-analysis on `if`, discover the type is not match } ```
The secondary diagnostic "convertable to bool" is likely bogus to users.
The idea is to use RecoveryExpr (clang's dependent mechanism) to preserve the recovery behavior but suppress all follow-up diagnostics.
Differential Revision: https://reviews.llvm.org/D89946
show more ...
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1 |
|
#
7af852dc |
| 21-Jul-2020 |
Haojian Wu <hokein.wu@gmail.com> |
[AST][RecoveryExpr] Preserve the invalid "undef_var" initializer.
And don't invalidate the VarDecl if the type is known.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D813
[AST][RecoveryExpr] Preserve the invalid "undef_var" initializer.
And don't invalidate the VarDecl if the type is known.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D81395
show more ...
|
Revision tags: llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1, llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1, llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1 |
|
#
0fcbb289 |
| 26-Apr-2017 |
Rui Ueyama <ruiu@google.com> |
Revert r301487: Replace HashString algorithm with xxHash64
This reverts commit r301487 to make buildbots green.
llvm-svn: 301491
|
#
87b30ac9 |
| 26-Apr-2017 |
Rui Ueyama <ruiu@google.com> |
Replace HashString algorithm with xxHash64
The previous algorithm processed one character at a time, which is very painful on a modern CPU. Replace it with xxHash64, which both already exists in the
Replace HashString algorithm with xxHash64
The previous algorithm processed one character at a time, which is very painful on a modern CPU. Replace it with xxHash64, which both already exists in the codebase and is fairly fast.
Patch from Scott Smith!
Differential Revision: https://reviews.llvm.org/D32509
llvm-svn: 301487
show more ...
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1, llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1 |
|
#
85dec559 |
| 10-Dec-2015 |
Charles Li <charles_li@playstation.sony.com> |
[Lit Test] Updated 20 Lit tests to be C++11 compatible.
This is the 5th Lit test patch. Expanded expected diagnostics to vary by C++ dialect. Expanded RUN line to: default, C++98/03 and C++11.
llvm
[Lit Test] Updated 20 Lit tests to be C++11 compatible.
This is the 5th Lit test patch. Expanded expected diagnostics to vary by C++ dialect. Expanded RUN line to: default, C++98/03 and C++11.
llvm-svn: 255196
show more ...
|
Revision tags: llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1, llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1 |
|
#
40055d11 |
| 02-May-2015 |
Kaelyn Takata <rikka@google.com> |
Diagnose delayed typos when parsing a postfix expression with an unmatched l_paren before setting the LHS to ExprError().
Fixes PR23285.
llvm-svn: 236371
|
#
a8dfd336 |
| 01-May-2015 |
Kaelyn Takata <rikka@google.com> |
Also correct typos in the middle of a ternary expression when the RHS is invalid.
The LHS was already being corrected before being set to ExprError when the RHS is invalid, but when it was present t
Also correct typos in the middle of a ternary expression when the RHS is invalid.
The LHS was already being corrected before being set to ExprError when the RHS is invalid, but when it was present the middle of a ternary expression would be dropped in the error paths.
Fixes PR23350.
llvm-svn: 236347
show more ...
|
#
92565b51 |
| 27-Mar-2015 |
Kaelyn Takata <rikka@google.com> |
Diagnose delayed typos in an expr list that is in an invalid expression.
Previously, if the expr list parsed fine but the expr to the left of the open parenthesis was invalid (when parsing the suffi
Diagnose delayed typos in an expr list that is in an invalid expression.
Previously, if the expr list parsed fine but the expr to the left of the open parenthesis was invalid (when parsing the suffix of a postfix-expression), the parsed expr list was just ignored.
Fixes PR23005.
llvm-svn: 233347
show more ...
|
Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2 |
|
#
c49838b3 |
| 28-Jan-2015 |
Kaelyn Takata <rikka@google.com> |
Revert a change from r222797 that is no longer needed and can cause infinite recursion.
Also guard against said infinite recursion by adding an assert that will trigger if CorrectDelayedTyposInExpr
Revert a change from r222797 that is no longer needed and can cause infinite recursion.
Also guard against said infinite recursion by adding an assert that will trigger if CorrectDelayedTyposInExpr is called before a previous call to CorrectDelayedTyposInExpr returns (i.e. if the TreeTransform run by CorrectDelayedTyposInExpr calls a sequence of methods that end up calling CorrectDelayedTyposInExpr, as the new test case had done prior to this commit). Fixes PR22292.
llvm-svn: 227368
show more ...
|
#
7a503694 |
| 27-Jan-2015 |
Kaelyn Takata <rikka@google.com> |
Fix a think-o in handling ambiguous corrections for a TypoExpr.
Under certain circumstances, the identifier mentioned in the diagnostic won't match the intended correction even though the replacemen
Fix a think-o in handling ambiguous corrections for a TypoExpr.
Under certain circumstances, the identifier mentioned in the diagnostic won't match the intended correction even though the replacement expression and the note pointing to the decl are both correct. Basically, the TreeTransform assumes the TypoExpr's Consumer points to the correct TypoCorrection, but the handling of typos that appear to be ambiguous from the point of view of TransformTypoExpr would cause that assumption to be violated by altering the Consumer's correction stream. This fix allows the Consumer's correction stream to be reset to the right TypoCorrection after successfully resolving the percieved ambiguity.
Included is a fix to suppress correcting the RHS of an assignment to the LHS of that assignment for non-C++ code, to prevent a regression in test/SemaObjC/provisional-ivar-lookup.m.
This fixes PR22297.
llvm-svn: 227251
show more ...
|
#
21a88693 |
| 21-Jan-2015 |
Kaelyn Takata <rikka@google.com> |
Correct all typos in the initialization arguments, even if one could not be corrected.
This fixes PR22250, which exposed the bug where if there's more than one TypoExpr in the arguments, once one fa
Correct all typos in the initialization arguments, even if one could not be corrected.
This fixes PR22250, which exposed the bug where if there's more than one TypoExpr in the arguments, once one failed to be corrected none of the TypoExprs after it would be handled at all thanks to an early return.
llvm-svn: 226624
show more ...
|
#
ae9e97c9 |
| 16-Jan-2015 |
Kaelyn Takata <rikka@google.com> |
Fix a case where delayed typo correction should have resolved an ambiguity but wasn't.
In the new test case, "click" wasn't being corrected properly because Sema::ClassifyName would call CorrectTypo
Fix a case where delayed typo correction should have resolved an ambiguity but wasn't.
In the new test case, "click" wasn't being corrected properly because Sema::ClassifyName would call CorrectTypo for "click" then later Sema::DiagnoseEmptyLookup would call CorrectTypoDelayed for the same use of "click" (the former by the parser needing to determine what the identifier is so it knows how to parse the statement, i.e. is it the beginning of a declaration or an expression). CorrectTypo would record that typo correction for "click" failed and CorrectTypoDelayed would see that and not even try to correct the typo, even though in this case CorrectTypo failed due to an ambiguity (both "Click" and "clock" having an edit distance of one from "click") that could be resolved with more information. The fix is two-fold: 1) Have CorrectTypo not record failed corrections if the reason for the failure was two or more corrections with the same edit distance, and 2) Make the CorrectionCandidateCallback used by Parser::ParseCastExpression reject FunctionDecl candidates when the next token after the identifier is a ".", "=", or "->" since functions cannot be assigned to and do not have members that can be referenced.
The reason for two correction spots is that from r222549 until r224375 landed, the first correction attempt would fail completely but the second would suggest "clock" while having the note point to the declaration of "Click".
llvm-svn: 226334
show more ...
|
Revision tags: llvmorg-3.6.0-rc1 |
|
#
42118a95 |
| 07-Jan-2015 |
Kaelyn Takata <rikka@google.com> |
Handle OpaqueValueExprs more intelligently in the TransformTypos tree transform.
Also diagnose typos in the initializer of an invalid C++ declaration. Both issues were hit using the same line of tes
Handle OpaqueValueExprs more intelligently in the TransformTypos tree transform.
Also diagnose typos in the initializer of an invalid C++ declaration. Both issues were hit using the same line of test code, depending on whether the code was treated as C or C++.
Fixes PR22092.
llvm-svn: 225389
show more ...
|
#
91126074 |
| 19-Dec-2014 |
Kaelyn Takata <rikka@google.com> |
Correct delayed typos in the operand to typeof expressions.
Fixes PR21947.
llvm-svn: 224558
|
Revision tags: llvmorg-3.5.1, llvmorg-3.5.1-rc2 |
|
#
938204aa |
| 16-Dec-2014 |
Kaelyn Takata <rikka@google.com> |
Try typo correction on all initialization arguments and be less pessimistic about when to do so.
This also fixes PR21905 as the initialization argument was no longer viewed as being type dependent d
Try typo correction on all initialization arguments and be less pessimistic about when to do so.
This also fixes PR21905 as the initialization argument was no longer viewed as being type dependent due to the TypoExpr being type-cast.
llvm-svn: 224386
show more ...
|
#
4d59b778 |
| 16-Dec-2014 |
Nick Lewycky <nicholas@mxc.ca> |
Look at whether TransformTypos returned a different Expr instead of looking at the number of uncorrected typos before and after. Correcting one typo may produce an expression with another TypoExpr in
Look at whether TransformTypos returned a different Expr instead of looking at the number of uncorrected typos before and after. Correcting one typo may produce an expression with another TypoExpr in it, leading to matching counts even though a typo was corrected.
Fixes PR21925!
llvm-svn: 224380
show more ...
|
#
a9e65ba1 |
| 13-Dec-2014 |
Reid Kleckner <reid@kleckner.net> |
Implement feedback on r224172 in PR21899
Based on suggestions from Kaelyn.
llvm-svn: 224173
|
#
a7fe33e0 |
| 13-Dec-2014 |
Reid Kleckner <reid@kleckner.net> |
Typo correction: Ignore temporary binding exprs after overload resolution
Transformation of a CallExpr doesn't always result in a new CallExpr.
Fixes PR21899.
llvm-svn: 224172
|
Revision tags: llvmorg-3.5.1-rc1 |
|
#
a15a6dc7 |
| 08-Dec-2014 |
Kaelyn Takata <rikka@google.com> |
Handle possible TypoExprs in member initializers.
Includes a new test case since none of the existing tests were hitting this code path.
llvm-svn: 223705
|
#
53ac6a04 |
| 03-Dec-2014 |
Kaelyn Takata <rikka@google.com> |
Handle delayed corrections in a couple more error paths in ParsePostfixExpressionSuffix.
llvm-svn: 223209
|
#
999dd85e |
| 02-Dec-2014 |
Kaelyn Takata <rikka@google.com> |
Ensure typos in the default values of template parameters get diagnosed.
llvm-svn: 223177
|
#
443d61d6 |
| 25-Nov-2014 |
Kaelyn Takata <rikka@google.com> |
Ensure that any TypoExprs in the arguments to bultins with custom type checking are handled before the custom type checking is performed.
Fixes PR21669.
llvm-svn: 222797
|
#
4c3ffc4f |
| 21-Nov-2014 |
Kaelyn Takata <rikka@google.com> |
Properly correct initializer expressions based on whether they would be valid.
llvm-svn: 222550
|