Avoid using `DeclBase::getLangOpts()` to support older Clang versions
The `DeclBase::getLangOpts()` is merely a convenience but only available in Clang 11 or newer.
This commit is contained in:
parent
44c6b8c609
commit
8b66ca3e6b
|
@ -96,7 +96,7 @@ void SerializationCodeGenerator::computeRelevantClass(RelevantClass &possiblyRel
|
||||||
|
|
||||||
// consider all classes inheriting from an instantiation of "JsonSerializable" relevant
|
// consider all classes inheriting from an instantiation of "JsonSerializable" relevant
|
||||||
if (const auto *const relevantBase = inheritsFromInstantiationOf(possiblyRelevantClass.record, m_qualifiedNameOfRecords)) {
|
if (const auto *const relevantBase = inheritsFromInstantiationOf(possiblyRelevantClass.record, m_qualifiedNameOfRecords)) {
|
||||||
auto policy = clang::PrintingPolicy(possiblyRelevantClass.record->getLangOpts());
|
auto policy = clang::PrintingPolicy(possiblyRelevantClass.record->getASTContext().getLangOpts());
|
||||||
policy.FullyQualifiedName = true;
|
policy.FullyQualifiedName = true;
|
||||||
policy.SuppressScope = false;
|
policy.SuppressScope = false;
|
||||||
policy.SuppressUnwrittenScope = false;
|
policy.SuppressUnwrittenScope = false;
|
||||||
|
|
Loading…
Reference in New Issue