[PATCH] D95860: [clang][Frontend] Fix a crash in DiagnosticRenderer.

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 3 01:16:27 PST 2021


steakhal added a comment.

In D95860#2536721 <https://reviews.llvm.org/D95860#2536721>, @balazske wrote:

> In D95860#2536609 <https://reviews.llvm.org/D95860#2536609>, @steakhal wrote:
>
>> Please, also add a regression test for Haoxin Tu's reproducer.
>>
>>   // RUN: %clang %s
>>   
>>   // expected warning....
>>   volatile long a ( a .~b
>
> What about the already added test?

Oh sorry, I was tricked by that the analyzer is enabled.

We would crash even without the analyzer, so pushing this test under the Analysis seems unnecessary to me.
BTW, the analysis expects a compiler-error-free program. This shouldn't compile. This is not related to analysis in any way.

The alpha.clone.CloneChecker reproducer however, crashes at the end of the analysis when it tries to emit the diagnostics. IMO that should be in the `Analysis`, the current one should be where frontend tests are.
IMO we should have tests for both of these.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95860/new/

https://reviews.llvm.org/D95860



More information about the cfe-commits mailing list