Skip to content

Commit 246c5a9

Browse files
committed
[ODRHash diagnostics] Transform method ASTReader::diagnoseOdrViolations into a class ODRDiagsEmitter. NFC.
Preparing to use diagnostics about ODR hash mismatches outside of ASTReader. Differential Revision: https://reviews.llvm.org/D128490
1 parent 053841c commit 246c5a9

File tree

3 files changed

+425
-438
lines changed

3 files changed

+425
-438
lines changed

clang/include/clang/AST/DeclCXX.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ class CXXRecordDecl : public RecordDecl {
260260
friend class ASTWriter;
261261
friend class DeclContext;
262262
friend class LambdaExpr;
263+
friend class ODRDiagsEmitter;
263264

264265
friend void FunctionDecl::setPure(bool);
265266
friend void TagDecl::startDefinition();

clang/include/clang/Serialization/ASTReader.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,10 +1845,6 @@ class ASTReader
18451845
/// if the declaration is not from a module file.
18461846
ModuleFile *getOwningModuleFile(const Decl *D);
18471847

1848-
/// Get the best name we know for the module that owns the given
1849-
/// declaration, or an empty string if the declaration is not from a module.
1850-
std::string getOwningModuleNameForDiagnostic(const Decl *D);
1851-
18521848
/// Returns the source location for the decl \p ID.
18531849
SourceLocation getSourceLocationForDeclID(serialization::GlobalDeclID ID);
18541850

0 commit comments

Comments
 (0)