r304618 - Revert r304592
Richard Trieu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 2 17:11:23 PDT 2017
Author: rtrieu
Date: Fri Jun 2 19:11:23 2017
New Revision: 304618
URL: http://llvm.org/viewvc/llvm-project?rev=304618&view=rev
Log:
Revert r304592
r304592 - [ODRHash] Add support for TemplateArgument types.
Possibly causing one of the errors in modules build bot.
Modified:
cfe/trunk/lib/AST/ODRHash.cpp
cfe/trunk/test/Modules/odr_hash.cpp
Modified: cfe/trunk/lib/AST/ODRHash.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ODRHash.cpp?rev=304618&r1=304617&r2=304618&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ODRHash.cpp (original)
+++ cfe/trunk/lib/AST/ODRHash.cpp Fri Jun 2 19:11:23 2017
@@ -128,25 +128,7 @@ void ODRHash::AddTemplateName(TemplateNa
}
}
-void ODRHash::AddTemplateArgument(TemplateArgument TA) {
- auto Kind = TA.getKind();
- ID.AddInteger(Kind);
-
- switch (Kind) {
- case TemplateArgument::Null:
- case TemplateArgument::Declaration:
- case TemplateArgument::NullPtr:
- case TemplateArgument::Integral:
- case TemplateArgument::Template:
- case TemplateArgument::TemplateExpansion:
- case TemplateArgument::Expression:
- case TemplateArgument::Pack:
- break;
- case TemplateArgument::Type:
- AddQualType(TA.getAsType());
- break;
- }
-}
+void ODRHash::AddTemplateArgument(TemplateArgument TA) {}
void ODRHash::AddTemplateParameterList(const TemplateParameterList *TPL) {}
void ODRHash::clear() {
Modified: cfe/trunk/test/Modules/odr_hash.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/odr_hash.cpp?rev=304618&r1=304617&r2=304618&view=diff
==============================================================================
--- cfe/trunk/test/Modules/odr_hash.cpp (original)
+++ cfe/trunk/test/Modules/odr_hash.cpp Fri Jun 2 19:11:23 2017
@@ -900,24 +900,6 @@ S2 s2;
#endif
}
-namespace TemplateArgument {
-#if defined(FIRST)
-template<typename> struct U1 {};
-struct S1 {
- U1<int> u;
-};
-#elif defined(SECOND)
-template<typename> struct U1 {};
-struct S1 {
- U1<double> u;
-};
-#else
-S1 s1;
-// expected-error at first.h:* {{'TemplateArgument::S1::u' from module 'FirstModule' is not present in definition of 'TemplateArgument::S1' in module 'SecondModule'}}
-// expected-note at second.h:* {{declaration of 'u' does not match}}
-#endif
-}
-
// Interesting cases that should not cause errors. struct S should not error
// while struct T should error at the access specifier mismatch at the end.
namespace AllDecls {
More information about the cfe-commits
mailing list