[clang] [clang] Improved isSimpleTypeSpecifier (PR #79037)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 26 18:55:42 PST 2024


================
@@ -128,10 +128,15 @@ class TypeNameValidatorCCC final : public CorrectionCandidateCallback {
 } // end anonymous namespace
 
 /// Determine whether the token kind starts a simple-type-specifier.
-bool Sema::isSimpleTypeSpecifier(tok::TokenKind Kind) const {
+bool Sema::isSimpleTypeSpecifier(Token &Tok) const {
+  auto Kind = Tok.getKind();
+  auto LangOpts = getLangOpts();
+
   switch (Kind) {
----------------
owenca wrote:

```suggestion
bool Sema::isSimpleTypeSpecifier(const Token &Tok) const {
  switch (Tok.getKind()) {
```

https://github.com/llvm/llvm-project/pull/79037


More information about the cfe-commits mailing list