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:
Martchus 2021-09-19 01:17:30 +02:00
parent 44c6b8c609
commit 8b66ca3e6b
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ void SerializationCodeGenerator::computeRelevantClass(RelevantClass &possiblyRel
// consider all classes inheriting from an instantiation of "JsonSerializable" relevant
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.SuppressScope = false;
policy.SuppressUnwrittenScope = false;