HomePhabricator

[clang-tidy] Fix crash on end location inside macro

Description

[clang-tidy] Fix crash on end location inside macro

Summary:
Lexer::getLocForEndOfToken is defined to return an
invalid location if the given location is inside a macro.
Other checks conditionally warn based off location
validity. Updating this check to do the same.

Reviewers: JonasToth, aaron.ballman, nickdesaulniers

Reviewed By: nickdesaulniers

Subscribers: lebedev.ri, nickdesaulniers, xazax.hun, cfe-commits

Tags: #clang

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

Details

Committed
Nathan-HuckleberryJul 17 2019, 10:22 AM
Reviewer
nickdesaulniers
Differential Revision
D64607: [clang-tidy] Fix crash on end location inside macro
Parents
rL366352: [Test] Add module cache for TestWeakSymbols
Branches
Unknown
Tags
Unknown