diff --git a/lib/Utils/AST.cpp b/lib/Utils/AST.cpp index cad23f6a..783d9e0e 100644 --- a/lib/Utils/AST.cpp +++ b/lib/Utils/AST.cpp @@ -67,9 +67,10 @@ namespace utils { bool Analyze::IsWrapper(const FunctionDecl* ND) { if (!ND) return false; + if (!ND->getDeclName().isIdentifier()) + return false; - return StringRef(ND->getNameAsString()) - .startswith(Synthesize::UniquePrefix); + return ND->getName().startswith(Synthesize::UniquePrefix); } void Analyze::maybeMangleDeclName(const GlobalDecl& GD,