forked from OSchip/llvm-project
[clang-rename] NFC, make getCanonicalSymbolDeclaration robust on nullptr input.
This commit is contained in:
parent
ce1e249a68
commit
3d9632a997
|
@ -39,6 +39,8 @@ namespace clang {
|
|||
namespace tooling {
|
||||
|
||||
const NamedDecl *getCanonicalSymbolDeclaration(const NamedDecl *FoundDecl) {
|
||||
if (!FoundDecl)
|
||||
return nullptr;
|
||||
// If FoundDecl is a constructor or destructor, we want to instead take
|
||||
// the Decl of the corresponding class.
|
||||
if (const auto *CtorDecl = dyn_cast<CXXConstructorDecl>(FoundDecl))
|
||||
|
|
Loading…
Reference in New Issue