[PATCH] D116793: [AST] Add more source information for DecltypeTypeLoc.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 7 05:47:35 PST 2022


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

LG thank you!

Keeping/removing the getRParenLoc() accessor is up to you, I see arguments both ways.



================
Comment at: clang/include/clang/AST/TypeLoc.h:2001
+// FIXME: add LParenLoc, it is tricky to support due to the limitation of
+// annotated-decldtype token.
+struct DecltypeTypeLocInfo {
----------------
nit: decltype (typo)


================
Comment at: clang/include/clang/AST/TypeLoc.h:2015
+
+  SourceLocation getRParenLoc() const { return getLocalData()->RParenLoc; }
+  void setRParenLoc(SourceLocation Loc) { getLocalData()->RParenLoc = Loc; }
----------------
So concretely I think I'm talking about just removing this getter, since getEndLoc() will by default to the end of getLocalSourceRange().

Probably the setter would stay as is?

Anyway, up to you, it's harmless.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116793



More information about the cfe-commits mailing list