[PATCH 10/11] Check for an empty error log.
Andreas Simbuerger
simbuerg at fim.uni-passau.de
Tue Jun 10 05:07:54 PDT 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/10/2014 09:12 AM, Tobias Grosser wrote:
> On 09/06/2014 02:42, Andreas Simbuerger wrote:
>> Fixes #19976.
>>
>> The error log does not contain an error, in case we reject a
>> candidate without generating a diagnostic message by using
>> invalid<>(...). --- lib/Analysis/ScopDetection.cpp | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/Analysis/ScopDetection.cpp
>> b/lib/Analysis/ScopDetection.cpp index a15ca19..2730d81 100644
>> --- a/lib/Analysis/ScopDetection.cpp +++
>> b/lib/Analysis/ScopDetection.cpp @@ -219,7 +219,14 @@
>> std::string ScopDetection::regionIsInvalidBecause(const Region
>> *R) const { // Get the first error we found. Even in keep-going
>> mode, this is the first // reason that caused the candidate to be
>> rejected. RejectLog Errors = Logs.at(R); - return
>> (*Errors.begin())->getMessage(); + + // This can happen when we
>> marked a region invalid, but didn't track + // an error for it.
>> + if (Errors.size() == 0) + return "";
>
> Are there cases where we expect to not track an error?
Well, the check for the top level region does not trigger a diagnostic
report. That should be the only case and adding a report for it seems
a bit useless anyway.
>
> LGTM. It misses a test case. If you can add one that would be nice.
> If it only triggeres in -viewCFG() and this is hard to test, just
> give this as a reason why you did not provide a test case.
I'll add the file you provided in the bug report, sorry forgo to add it.
>
> As this is independent, please go ahead and commit it immediately.
>
> Cheers, Tobias
>
- --
Andreas Simbürger
University of Passau - Programming Group
http://www.infosun.fim.uni-passau.de/cl/staff/simbuerger/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQEcBAEBAgAGBQJTlvUaAAoJELS7a/6Ti2HYIZYH/A3NGL8QOQkXsQ6P/9dyyLHU
s/CWALxCEjWp9dsBKBmmdY43cOUNIyDwyJwuaBgUS0AVcqMCcUzqyNVyRNwoda5M
Nfum3LM/2/MoteyJ9wAUe6AFVjEB4TWgSKJcEidCnkpxtwrxXBJdrgFTOaCSiYyp
UX/TX2nRWl/0G1TFxHyOivG54V1hmJEPfClgVFYliV5AhqalEGRqdgs6XhOiE//Z
vvxt30uUDz1+mIBcAekgMvMeMOTzu5o19zTwLa6ruaWNbhboGKix56SYF1FhO2zy
RTJRXbRDhW6y7+zD51vbwCbq1UlzGpmCPPnt0+oBToJPuA5Mx69NUEqElVQvs3I=
=KrLI
-----END PGP SIGNATURE-----
More information about the llvm-commits
mailing list