summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
authorVassil Vassilev <v.g.vassilev@gmail.com>2017-03-26 18:32:53 +0000
committerVassil Vassilev <v.g.vassilev@gmail.com>2017-03-26 18:32:53 +0000
commitbae9202b9a491cddda4f8d6ee9cceb40769369c9 (patch)
treef0f8ea3b58872d17dcf46eadd48aee8d1a8f7874 /clang/lib/Serialization/ASTReader.cpp
parent09fd21f45c3a6dda1f38036b2919c124abac71f0 (diff)
downloadbcm5719-llvm-bae9202b9a491cddda4f8d6ee9cceb40769369c9.tar.gz
bcm5719-llvm-bae9202b9a491cddda4f8d6ee9cceb40769369c9.zip
Revert 298754 and 298742.
They broke llvm modules builds and our internal modules infrastructure. llvm-svn: 298816
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp34
1 files changed, 7 insertions, 27 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 653629f597f..a691f7abd1a 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -9586,33 +9586,13 @@ void ASTReader::diagnoseOdrViolations() {
for (unsigned I = 0; I < FirstNumParameters; ++I) {
const ParmVarDecl *FirstParam = FirstMethod->getParamDecl(I);
const ParmVarDecl *SecondParam = SecondMethod->getParamDecl(I);
-
- QualType FirstParamType = FirstParam->getType();
- QualType SecondParamType = SecondParam->getType();
- if (FirstParamType != SecondParamType) {
- if (const DecayedType *ParamDecayedType =
- FirstParamType->getAs<DecayedType>()) {
- ODRDiagError(FirstMethod->getLocation(),
- FirstMethod->getSourceRange(), MethodParameterType)
- << FirstName << (I + 1) << FirstParamType << true
- << ParamDecayedType->getOriginalType();
- } else {
- ODRDiagError(FirstMethod->getLocation(),
- FirstMethod->getSourceRange(), MethodParameterType)
- << FirstName << (I + 1) << FirstParamType << false;
- }
-
- if (const DecayedType *ParamDecayedType =
- SecondParamType->getAs<DecayedType>()) {
- ODRDiagNote(SecondMethod->getLocation(),
- SecondMethod->getSourceRange(), MethodParameterType)
- << SecondName << (I + 1) << SecondParamType << true
- << ParamDecayedType->getOriginalType();
- } else {
- ODRDiagNote(SecondMethod->getLocation(),
- SecondMethod->getSourceRange(), MethodParameterType)
- << SecondName << (I + 1) << SecondParamType << false;
- }
+ if (FirstParam->getType() != SecondParam->getType()) {
+ ODRDiagError(FirstMethod->getLocation(),
+ FirstMethod->getSourceRange(), MethodParameterType)
+ << FirstName << (I + 1) << FirstParam->getType();
+ ODRDiagNote(SecondMethod->getLocation(),
+ SecondMethod->getSourceRange(), MethodParameterType)
+ << SecondName << (I + 1) << SecondParam->getType();
ParameterMismatch = true;
break;
}
OpenPOWER on IntegriCloud