aaron.ballman added a comment.

Thank you for working on this! We're testing the patch out internally to see if 
it solves issues for us with some of the failures we're seeing.



================
Comment at: clang/lib/Sema/SemaStmt.cpp:3314
+    return false;
+  const Decl *D = E.getReferencedDeclOfCallee();
+  if (!S.SourceMgr.isInSystemHeader(D->getLocation()))
----------------
This can return `nullptr`, so we should probably return `false` in that case; 
WDYT?


================
Comment at: clang/lib/Sema/SemaStmt.cpp:3317-3321
+  for (const DeclContext *DC = D->getDeclContext(); DC; DC = DC->getParent()) {
+    if (const auto *NS = dyn_cast<NamespaceDecl>(DC))
+      if (NS->isStdNamespace())
+        return true;
+  }
----------------
Can you use `D->isInStdNamespace()` instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105951

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to