Skip to content

Commit de96f77

Browse files
committed
Don't mangle VarDecl
This fix a crash when mangling the symbol std::__1::__find_detail::__find_exactly_one_checked::__matches VarDecl should not need to be mangled.
1 parent 2618a2e commit de96f77

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

generator/annotator.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,7 @@ std::pair< std::string, std::string > Annotator::getReferenceAndTitle(clang::Nam
901901
decl = getSpecializedCursorTemplate(decl);
902902

903903
std::string qualName = decl->getQualifiedNameAsString();
904-
if ((llvm::isa<clang::FunctionDecl>(decl) || llvm::isa<clang::VarDecl>(decl))
905-
&& mangle->shouldMangleDeclName(decl)
904+
if (llvm::isa<clang::FunctionDecl>(decl) && mangle->shouldMangleDeclName(decl)
906905
//workaround crash in clang while trying to mangle some buitins types
907906
&& !llvm::StringRef(qualName).startswith("__")) {
908907
llvm::raw_string_ostream s(cached.first);

0 commit comments

Comments
 (0)