diff options
| author | Richard Trieu <rtrieu@google.com> | 2017-07-01 02:00:05 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2017-07-01 02:00:05 +0000 |
| commit | 96b416496839657a59ccad6ef15d7737ef7f2695 (patch) | |
| tree | 4b708a04247d4129768b6060aa13ad68fe99587a /clang/test/Modules | |
| parent | 28082ab0e5f5e8875084ad00cd934f93006b2f90 (diff) | |
| download | bcm5719-llvm-96b416496839657a59ccad6ef15d7737ef7f2695.tar.gz bcm5719-llvm-96b416496839657a59ccad6ef15d7737ef7f2695.zip | |
[ODRHash] Revert r305104 - Skip inline namespaces when hashing.
Test inline namespaces and handle them in the ODR hash again.
llvm-svn: 306926
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/odr_hash.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/Modules/odr_hash.cpp b/clang/test/Modules/odr_hash.cpp index 3b213971696..6e01e989a37 100644 --- a/clang/test/Modules/odr_hash.cpp +++ b/clang/test/Modules/odr_hash.cpp @@ -968,6 +968,24 @@ S9 s9; // expected-error@second.h:* {{'NestedNamespaceSpecifier::S9' has different definitions in different modules; first difference is definition in module 'SecondModule' found field 'x' with type 'P9::I' (aka 'int')}} // expected-note@first.h:* {{but in 'FirstModule' found field 'x' with type 'O9::I' (aka 'int')}} #endif + +namespace N10 { +#if defined(FIRST) +inline namespace A { struct X {}; } +struct S10 { + A::X x; +}; +#elif defined(SECOND) +inline namespace B { struct X {}; } +struct S10 { + B::X x; +}; +#else +S10 s10; +// expected-error@second.h:* {{'NestedNamespaceSpecifier::N10::S10::x' from module 'SecondModule' is not present in definition of 'NestedNamespaceSpecifier::N10::S10' in module 'FirstModule'}} +// expected-note@first.h:* {{declaration of 'x' does not match}} +#endif +} } namespace TemplateSpecializationType { |

