summaryrefslogtreecommitdiffstats
path: root/lib/Serialization
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2017-06-08 00:56:21 +0000
committerRichard Trieu <rtrieu@google.com>2017-06-08 00:56:21 +0000
commitef255fa628ac2ea4ca2fb3dc465bb7083187c395 (patch)
tree44f1f33521ff2117e8423b517ae3d7638e1a73c2 /lib/Serialization
parent23a6e4b63aba4ba1407afca8728e024ce066f2b9 (diff)
[ODRHash] Change the fall-back diagnostic error.
Provide a little more information when a ODR violation is detected, but the specific error could not be diagnosed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization')
-rw-r--r--lib/Serialization/ASTReader.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp
index 015a16eade..94a8f609f5 100644
--- a/lib/Serialization/ASTReader.cpp
+++ b/lib/Serialization/ASTReader.cpp
@@ -9753,13 +9753,13 @@ void ASTReader::diagnoseOdrViolations() {
if (Diagnosed == true)
continue;
- Diag(FirstRecord->getLocation(),
- diag::err_module_odr_violation_different_definitions)
- << FirstRecord << FirstModule.empty() << FirstModule;
-
- Diag(SecondRecord->getLocation(),
- diag::note_module_odr_violation_different_definitions)
- << SecondModule;
+ Diag(FirstDecl->getLocation(),
+ diag::err_module_odr_violation_mismatch_decl_unknown)
+ << FirstRecord << FirstModule.empty() << FirstModule << FirstDiffType
+ << FirstDecl->getSourceRange();
+ Diag(SecondDecl->getLocation(),
+ diag::note_module_odr_violation_mismatch_decl_unknown)
+ << SecondModule << FirstDiffType << SecondDecl->getSourceRange();
Diagnosed = true;
}