kbobyrev added a comment.

Mostly LG with few nits. I think it might be able to make it into the 14 
release if we cherry-pick into the release branch.



================
Comment at: 
clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp:407
 
-  if (F->getLocation().isInvalid())
+  // operator<=> generates also the AST of e.g. operator==, which is implicit
+  if (F->getLocation().isInvalid() || F->isImplicit())
----------------
nit: probably explains the situation better


================
Comment at: 
clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp:411
 
-  // Skip functions which return just 'auto'.
-  const auto *AT = F->getDeclaredReturnType()->getAs<AutoType>();
-  if (AT != nullptr && !AT->isConstrained() &&
-      AT->getKeyword() == AutoTypeKeyword::Auto &&
-      !hasAnyNestedLocalQualifiers(F->getDeclaredReturnType()))
-    return;
+  { // Skip functions which return just 'auto' or are also defaulted operators.
+    const auto *AT = F->getDeclaredReturnType()->getAs<AutoType>();
----------------
This scope seems unnecessary.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118847

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D118847: Added earl... Fabian Keßler via Phabricator via cfe-commits
    • [PATCH] D118847: Added... Kirill Bobyrev via Phabricator via cfe-commits

Reply via email to