[PATCH] D128762: [Clang] Rename StringLiteral::isAscii() => isOrdinary() [NFC]

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 29 06:06:49 PDT 2022


aaron.ballman added inline comments.


================
Comment at: clang/include/clang/AST/Expr.h:1789-1886
+  enum StringKind { Ordinary, Wide, UTF8, UTF16, UTF32 };
 
 private:
   unsigned numTrailingObjects(OverloadToken<unsigned>) const { return 1; }
   unsigned numTrailingObjects(OverloadToken<SourceLocation>) const {
     return getNumConcatenated();
   }
----------------
I like the idea of renaming both of these -- `isASCII()` can be a bit confusing with `containsNonAscii()` as well. However, instead of "ordinary", would it make more sense to go with "narrow" as the term of art? That also goes nicely with the use of "wide" in this interface.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128762



More information about the cfe-commits mailing list