[PATCH] D72073: [Sema] Fix location of star ('*') inside MemberPointerTypeLoc

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 15 12:32:50 PST 2020


gribozavr2 added inline comments.


================
Comment at: clang/lib/Parse/ParseDecl.cpp:5556
+      SourceLocation StarLoc = Tok.getLocation();
       SourceLocation Loc = ConsumeToken();
       D.SetRangeEnd(Loc);
----------------
ConsumeToken() returns Tok.getLocation(), so why do we need a separate variable?

D.SetRangeEnd() sets the end of source range to Tok.getLocation, which is then propagated to DeclSpec... I don't think this patch changes the behavior. Is this change testable?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72073/new/

https://reviews.llvm.org/D72073





More information about the cfe-commits mailing list