We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c819137 commit 1aebbf9Copy full SHA for 1aebbf9
clang/lib/AST/DeclBase.cpp
@@ -1471,6 +1471,11 @@ DeclContext *DeclContext::getPrimaryContext() {
1471
case Decl::ObjCCategoryImpl:
1472
return this;
1473
1474
+ case Decl::CXXRecord:
1475
+ if (auto *OPD = dyn_cast<CXXRecordDecl>(this))
1476
+ if (auto *Def = OPD->getDefinition())
1477
+ return Def;
1478
+ return this;
1479
default:
1480
if (getDeclKind() >= Decl::firstTag && getDeclKind() <= Decl::lastTag) {
1481
// If this is a tag type that has a definition or is currently
0 commit comments