whisperity added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp:42-46 +/// Remove all '_' characters at the beginning of the identifier. Only reserved +/// identifiers are allowed to start with these. +static StringRef dropLeadingUnderscores(StringRef Identifier) { + return Identifier.drop_while([](char c) { return c == '_'; }); +} ---------------- Is this true? At least in C++ (and perhaps in C) I believe `_foo` is a non-reserved identifier, only `__foo` or `_Foo` would be reserved. ================ Comment at: clang-tools-extra/clang-tidy/utils/HeaderGuard.h:41 + /// Ensure that the provided header guard is a valid identifier. + static std::string sanitizeHeaderGuard(StringRef Guard); ---------------- valid **non-reserved** Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114149/new/ https://reviews.llvm.org/D114149 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits