Skip to content

Commit 1b62ca7

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 (cherry picked from commit 246c5a9)
1 parent 1f6e124 commit 1b62ca7

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
@@ -1833,10 +1833,6 @@ class ASTReader
18331833
/// if the declaration is not from a module file.
18341834
ModuleFile *getOwningModuleFile(const Decl *D);
18351835

1836-
/// Get the best name we know for the module that owns the given
1837-
/// declaration, or an empty string if the declaration is not from a module.
1838-
std::string getOwningModuleNameForDiagnostic(const Decl *D);
1839-
18401836
/// Returns the source location for the decl \p ID.
18411837
SourceLocation getSourceLocationForDeclID(serialization::GlobalDeclID ID);
18421838

0 commit comments

Comments
 (0)