eduucaldas marked 2 inline comments as done.
eduucaldas added inline comments.


================
Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:723
+  syntax::UserDefinedLiteralExpression *
+  buildUserDefinedLiteral(UserDefinedLiteral *S) {
+    switch (S->getLiteralOperatorKind()) {
----------------
b or B? Should I use camelCase or TitleCase?



================
Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:735-751
+      auto TokLoc = S->getBeginLoc();
+      auto buffer = SmallVector<char, 16>();
+      bool invalidSpelling = false;
+      auto TokSpelling =
+          Lexer::getSpelling(TokLoc, buffer, Context.getSourceManager(),
+                             Context.getLangOpts(), &invalidSpelling);
+      assert(!invalidSpelling);
----------------
I'll write a comment explaining why this crazyness. Promise not to rant about 
the lexer that doesn't distinguish between float and integer.


================
Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:738-740
+      auto TokSpelling =
+          Lexer::getSpelling(TokLoc, buffer, Context.getSourceManager(),
+                             Context.getLangOpts(), &invalidSpelling);
----------------
This is exactly the function used by the parser to get the `TokSpelling`. see: 
llvm-project/clang/lib/Sema/SemaExpr.cpp:3633


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82157



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to