llvm-project/clang/lib
Volodymyr Sapsai 31f7c4aa77 [Parser] Avoid correcting delayed typos in array subscript multiple times.
We correct some typos in `ActOnArraySubscriptExpr` and
`ActOnOMPArraySectionExpr`, so when their result is `ExprError`, we can
end up correcting delayed typos in the same expressions again. In
general it is OK but when `NumTypos` is incorrect, we can hit the
assertion

> Assertion failed: (Entry != DelayedTypos.end() && "Failed to get the state for a TypoExpr!"), function getTypoExprState, file clang/lib/Sema/SemaLookup.cpp, line 5219.

Fix by replacing some subscript `ExprResult` with typo-corrected expressions
instead of keeping the original expressions. Thus if original expressions
contained `TypoExpr`, we'll use corrected expressions instead of trying to
correct them again.

rdar://problem/47403222

Reviewers: rsmith, erik.pilkington, majnemer

Reviewed By: erik.pilkington

Subscribers: jkorous, dexonsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D60848

llvm-svn: 359713
2019-05-01 19:24:50 +00:00
..
ARCMigrate Range-style std::find{,_if} -> llvm::find{,_if}. NFC 2019-03-31 08:48:19 +00:00
AST [NFC] typo 2019-04-30 00:11:53 +00:00
ASTMatchers [ASTMatchers] Introduce Objective-C matchers `isClassMessage`, `isClassMethod`, and `isInstanceMethod` 2019-04-22 17:54:11 +00:00
Analysis [analyzer] Treat functions without run-time branches as "small". 2019-04-30 03:01:02 +00:00
Basic AMDGPU: Enable _Float16 2019-04-30 18:35:37 +00:00
CodeGen Variable auto-init: don't initialize aggregate padding of all aggregates 2019-04-30 22:56:53 +00:00
CrossTU [analyzer][CrossTU] Extend CTU to VarDecls with initializer 2019-04-23 11:04:41 +00:00
Driver [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux 2019-04-30 19:35:14 +00:00
Edit Range-style std::find{,_if} -> llvm::find{,_if}. NFC 2019-03-31 08:48:19 +00:00
Format [clang-format] Fix a bug in AlignConsecutiveDeclarations. 2019-05-01 18:23:44 +00:00
Frontend [analyzer][NFC] Reimplement checker options 2019-04-19 12:32:10 +00:00
FrontendTool [analyzer][NFC] Supply CheckerRegistry with AnalyzerOptions 2019-01-26 15:59:21 +00:00
Headers lib/Header: Fix Visual Studio builds try #2 2019-05-01 06:18:03 +00:00
Index Use llvm::stable_sort 2019-04-24 14:43:05 +00:00
Lex When skipping code at the start of a file during PCH use, Preprocessor::Lex 2019-04-29 21:21:17 +00:00
Parse [Parser] Avoid correcting delayed typos in array subscript multiple times. 2019-05-01 19:24:50 +00:00
Rewrite Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Sema [NFC] typo 2019-04-30 00:19:43 +00:00
Serialization [Serialization] Stable serialization order for OpenCLTypeExtMap and OpenCLDeclExtMap 2019-04-18 15:13:27 +00:00
StaticAnalyzer [analyzer][UninitializedObjectChecker] PR41611: Regard vector types as primitive 2019-04-30 08:47:56 +00:00
Tooling [LibTooling] Change Transformer's TextGenerator to a partial function. 2019-04-30 16:48:33 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00