Author: teemperor Date: Tue Oct 1 04:53:20 2019 New Revision: 373327 URL: http://llvm.org/viewvc/llvm-project?rev=373327&view=rev Log: [clang] Ignore builtin namespaces in test/Import/cxx-anon-namespace
Some platforms (e.g. AArch64) put __va_list in the 'std' namespace which might end up being the first namespace we match in this test. Instead let the first namespace match via file name/line so that we skip the builtin namespaces. Modified: cfe/trunk/test/Import/cxx-anon-namespace/test.cpp Modified: cfe/trunk/test/Import/cxx-anon-namespace/test.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Import/cxx-anon-namespace/test.cpp?rev=373327&r1=373326&r2=373327&view=diff ============================================================================== --- cfe/trunk/test/Import/cxx-anon-namespace/test.cpp (original) +++ cfe/trunk/test/Import/cxx-anon-namespace/test.cpp Tue Oct 1 04:53:20 2019 @@ -2,9 +2,13 @@ // The implicit UsingDirectiveDecls for the anonymous namespaces are created by the Sema. -// CHECK: NamespaceDecl +// There might be another builtin namespace before our first namespace, so we can't +// just look for NamespaceDecl. Instead look for the first line of F.cpp (which only +// contains the namespace we are looking for but no other decl). +// CHECK: F.cpp:1:1 // The nested anonymous namespace. // CHECK-NEXT: NamespaceDecl +// CHECK-SAME: <invalid sloc> // CHECK: FunctionDecl // CHECK-SAME: func4 // CHECK-NEXT: CompoundStmt _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits