================
@@ -3522,6 +3525,35 @@ void CIRGenModule::setCXXSpecialMemberAttr(
}
}
+void CIRGenModule::setFuncInfoAttr(cir::FuncOp funcOp,
+ const clang::FunctionDecl *funcDecl) {
+ // Functions without a plain identifier, for example overloaded operators
+ // and constructors, carry no information, since no pass can match a
+ // function it cannot name.
+ if (!funcDecl || !funcDecl->getIdentifier())
+ return;
+
+ // A member function lives inside its record, so the record decides
+ // whether the function belongs to the std namespace. Static member
+ // functions carry no attribute, so that a static member like
+ // char_traits::find can never be mistaken for the free std::find.
+ const auto *method = dyn_cast<CXXMethodDecl>(funcDecl);
+ if (method && method->isStatic())
----------------
erichkeane wrote:
```suggestion
if (!method || method->isStatic())
```
https://github.com/llvm/llvm-project/pull/207261
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits