clang-tidy: readability-redundant-declaration assertion failure

Hi,

The readability-redundant-declaration check hits an assertion failure
when including a number of system headers, e.g. tuple. Here is a
stripped down test.cpp:

Hello!

Thanks for reporting this bug.

I've tried a trivial workaround in RedundantDeclarationCheck::check(), to call
diag() only in case 'Prev->getLocation().isInvalid()' is true, but that did not
help, nor feels like a proper fix.

I think it sounds reasonable to bailout not valid. I only intended to warn when there are duplicate declarations in the code.

For me that bailout fixed the crash.

http://reviews.llvm.org/D26911

Best regards,
Daniel Marjamäki

..................................................................................................................
Daniel Marjamäki Senior Engineer
Evidente ES East AB Warfvinges väg 34 SE-112 51 Stockholm Sweden

Mobile: +46 (0)709 12 42 62
E-mail: Daniel.Marjamaki@evidente.se

www.evidente.se

Hi Daniel,

Hi Daniel,

Sorry, I just found one more problem with this check. :wink:

test.cpp: