aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ArchiveWriter.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein.wu@gmail.com>2020-10-26 12:40:00 +0100
committerHaojian Wu <hokein.wu@gmail.com>2020-10-26 12:40:00 +0100
commitefa9aaad703e6b150980ed1a74b4e7c9da7d85a2 (patch)
tree303189cdd1cd86426b42ab4f117825c85f93fe18 /llvm/lib/Object/ArchiveWriter.cpp
parent6b2eb31e1e2db1f3ca7a5c4914ab08cb18698de7 (diff)
downloadllvm-efa9aaad703e6b150980ed1a74b4e7c9da7d85a2.zip
llvm-efa9aaad703e6b150980ed1a74b4e7c9da7d85a2.tar.gz
llvm-efa9aaad703e6b150980ed1a74b4e7c9da7d85a2.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Object/ArchiveWriter.cpp')
0 files changed, 0 insertions, 0 deletions