From: Richard Trieu Date: Sat, 3 Jun 2017 00:11:23 +0000 (+0000) Subject: Revert r304592 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36a7841dc7f049d1ddd6848c784eedbd1754bff2;p=clang Revert r304592 r304592 - [ODRHash] Add support for TemplateArgument types. Possibly causing one of the errors in modules build bot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304618 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ODRHash.cpp b/lib/AST/ODRHash.cpp index bd08de45c6..0e822ce35b 100644 --- a/lib/AST/ODRHash.cpp +++ b/lib/AST/ODRHash.cpp @@ -128,25 +128,7 @@ void ODRHash::AddTemplateName(TemplateName Name) { } } -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() { diff --git a/test/Modules/odr_hash.cpp b/test/Modules/odr_hash.cpp index fb7005be25..a6a0b74743 100644 --- a/test/Modules/odr_hash.cpp +++ b/test/Modules/odr_hash.cpp @@ -900,24 +900,6 @@ S2 s2; #endif } -namespace TemplateArgument { -#if defined(FIRST) -template struct U1 {}; -struct S1 { - U1 u; -}; -#elif defined(SECOND) -template struct U1 {}; -struct S1 { - U1 u; -}; -#else -S1 s1; -// expected-error@first.h:* {{'TemplateArgument::S1::u' from module 'FirstModule' is not present in definition of 'TemplateArgument::S1' in module 'SecondModule'}} -// expected-note@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 {