[PATCH] D95871: [clang] Store the location for invalid type of a declarator.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 3 00:24:38 PST 2021
sammccall added a comment.
It would be nice to have a testcase with a nontrivial range so we can see the choice of location...
================
Comment at: clang/lib/Sema/SemaType.cpp:5659
if (D.isInvalidType())
- return Context.getTrivialTypeSourceInfo(T);
-
+ return Context.getTrivialTypeSourceInfo(T, D.getEndLoc());
return GetTypeSourceInfoForDeclarator(state, T, TInfo);
----------------
why endloc rather than start or something else?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95871/new/
https://reviews.llvm.org/D95871
More information about the cfe-commits
mailing list