scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts. Also avoids some potential problems when nesting braces inside it.
This commit is contained in:
@ -20,7 +20,9 @@ std::string DemangleSymbol(const std::string& mangled) {
|
||||
}
|
||||
|
||||
char* demangled = nullptr;
|
||||
SCOPE_EXIT({ std::free(demangled); });
|
||||
SCOPE_EXIT {
|
||||
std::free(demangled);
|
||||
};
|
||||
|
||||
if (is_itanium(mangled)) {
|
||||
demangled = llvm::itaniumDemangle(mangled.c_str());
|
||||
|
Reference in New Issue
Block a user