HomePhabricator

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

Authored by Nathan-Huckleberry on Jul 17 2019, 10:22 AM.

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

llvm-svn: 366353

Details

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