================
@@ -51,7 +51,19 @@ class MissingOriginCollector
 } // namespace
 
 bool hasOrigins(QualType QT) {
-  return QT->isPointerOrReferenceType() || isGslPointerType(QT);
+  if (QT->isPointerOrReferenceType() || isGslPointerType(QT))
+    return true;
+  const auto *RD = QT->getAsCXXRecordDecl();
----------------
aeft wrote:

Redundant `getAsCXXRecordDecl()` call here (also inside `isGslPointerType`). 
Should I refactor this to avoid the double lookup, or is the current 
duplication acceptable for now? Happy to add a TODO if we want to refactor 
later.

https://github.com/llvm/llvm-project/pull/185216
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to