[clang-tools-extra] ee1f132 - Revert "[clang] ASTImporter: Fix importing of va_list types and declarations"

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 31 11:36:01 PDT 2022


Author: Matheus Izvekov
Date: 2022-10-31T19:34:23+01:00
New Revision: ee1f132d2c4d399be711275a62698ea9e766c199

URL: https://github.com/llvm/llvm-project/commit/ee1f132d2c4d399be711275a62698ea9e766c199
DIFF: https://github.com/llvm/llvm-project/commit/ee1f132d2c4d399be711275a62698ea9e766c199.diff

LOG: Revert "[clang] ASTImporter: Fix importing of va_list types and declarations"

This reverts commit 5f820c0f55cd9d4f4520cc92eae0a1c4afe05a54.

Apparently it breaks aarch64 buildbots.
https://lab.llvm.org/buildbot#builders/188/builds/21591

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.cpp
    clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
    clang/docs/ReleaseNotes.rst
    clang/lib/Frontend/ASTMerge.cpp
    clang/lib/Sema/Sema.cpp
    clang/test/AST/ast-dump-file-line-json.c
    clang/test/AST/ast-dump-overloaded-operators.cpp
    clang/test/AST/ast-dump-record-definition-data-json.cpp
    clang/test/AST/ast-dump-records-json.cpp
    clang/test/AST/ast-dump-template-decls-json.cpp
    clang/test/AST/ast-dump-traits.cpp
    clang/test/AST/fixed_point.c
    clang/test/AST/float16.cpp
    clang/test/PCH/stmt-openmp_structured_block-bit.cpp
    clang/unittests/AST/ASTImporterTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.cpp b/clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.cpp
index 1735242418671..b5f8d082d8877 100644
--- a/clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.cpp
+++ b/clang-tools-extra/clang-tidy/altera/StructPackAlignCheck.cpp
@@ -19,11 +19,10 @@ namespace tidy {
 namespace altera {
 
 void StructPackAlignCheck::registerMatchers(MatchFinder *Finder) {
-  Finder->addMatcher(
-      recordDecl(isStruct(), isDefinition(),
-                 unless(anyOf(isExpansionInSystemHeader(), isImplicit())))
-          .bind("struct"),
-      this);
+  Finder->addMatcher(recordDecl(isStruct(), isDefinition(),
+                                unless(isExpansionInSystemHeader()))
+                         .bind("struct"),
+                     this);
 }
 
 CharUnits

diff  --git a/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp b/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
index 89f2bb6aaf50a..73b47dca20930 100644
--- a/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
+++ b/clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
@@ -111,10 +111,7 @@ void RenamerClangTidyCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
 }
 
 void RenamerClangTidyCheck::registerMatchers(MatchFinder *Finder) {
-  Finder->addMatcher(
-      namedDecl(unless(anyOf(isImplicit(), hasDeclContext(isImplicit()))))
-          .bind("decl"),
-      this);
+  Finder->addMatcher(namedDecl().bind("decl"), this);
   Finder->addMatcher(usingDecl().bind("using"), this);
   Finder->addMatcher(declRefExpr().bind("declRef"), this);
   Finder->addMatcher(cxxConstructorDecl(unless(isImplicit())).bind("classRef"),

diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 991ffac7b8316..f751f96d29e9d 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -268,7 +268,6 @@ Bug Fixes
   functions. `Issue 56154 <https://github.com/llvm/llvm-project/issues/56154>`_
 - Fix handling of unexpanded packs in template argument expressions.
   `Issue 58679 <https://github.com/llvm/llvm-project/issues/58679>`_
-- Fix importing of va_list types and declarations.
 
 Improvements to Clang's diagnostics
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

diff  --git a/clang/lib/Frontend/ASTMerge.cpp b/clang/lib/Frontend/ASTMerge.cpp
index 750866892d058..14d781ccdf936 100644
--- a/clang/lib/Frontend/ASTMerge.cpp
+++ b/clang/lib/Frontend/ASTMerge.cpp
@@ -59,6 +59,12 @@ void ASTMergeAction::ExecuteAction() {
 
     TranslationUnitDecl *TU = Unit->getASTContext().getTranslationUnitDecl();
     for (auto *D : TU->decls()) {
+      // Don't re-import __va_list_tag, __builtin_va_list.
+      if (const auto *ND = dyn_cast<NamedDecl>(D))
+        if (IdentifierInfo *II = ND->getIdentifier())
+          if (II->isStr("__va_list_tag") || II->isStr("__builtin_va_list"))
+            continue;
+
       llvm::Expected<Decl *> ToDOrError = Importer.Import(D);
 
       if (ToDOrError) {

diff  --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index fae85921b0402..c229a77ff0b8d 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -449,26 +449,6 @@ void Sema::Initialize() {
       PushOnScopeChains(Context.getBuiltinMSVaListDecl(), TUScope);
   }
 
-  if (auto *ND = dyn_cast_if_present<NamedDecl>(Context.getVaListTagDecl())) {
-    if (auto *DC = ND->getLexicalDeclContext(); DC->isStdNamespace()) {
-      auto *NS = cast<NamespaceDecl>(DC);
-      if (!StdNamespace)
-        StdNamespace = NS;
-      if (!Context.getTranslationUnitDecl()->containsDecl(NS))
-        PushOnScopeChains(NS, TUScope);
-      if (!DC->containsDecl(ND)) {
-        Scope S(TUScope, Scope::DeclScope, getDiagnostics());
-        PushDeclContext(&S, DC);
-        PushOnScopeChains(ND, &S);
-        PopDeclContext();
-      }
-    } else {
-      assert(DC == Context.getTranslationUnitDecl());
-      if (!DC->containsDecl(ND))
-        PushOnScopeChains(ND, TUScope);
-    }
-  }
-
   DeclarationName BuiltinVaList = &Context.Idents.get("__builtin_va_list");
   if (IdResolver.begin(BuiltinVaList) == IdResolver.end())
     PushOnScopeChains(Context.getBuiltinVaListDecl(), TUScope);

diff  --git a/clang/test/AST/ast-dump-file-line-json.c b/clang/test/AST/ast-dump-file-line-json.c
index 722d138704874..da1c8dbd755d5 100644
--- a/clang/test/AST/ast-dump-file-line-json.c
+++ b/clang/test/AST/ast-dump-file-line-json.c
@@ -129,82 +129,6 @@ int e;
 // CHECK-NEXT:   },
 // CHECK-NEXT:   {
 // CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "RecordDecl",
-// CHECK-NEXT:    "loc": {},
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "isImplicit": true,
-// CHECK-NEXT:    "name": "__va_list_tag",
-// CHECK-NEXT:    "tagUsed": "struct",
-// CHECK-NEXT:    "completeDefinition": true,
-// CHECK-NEXT:    "inner": [
-// CHECK-NEXT:     {
-// CHECK-NEXT:      "id": "0x{{.*}}",
-// CHECK-NEXT:      "kind": "TypeVisibilityAttr",
-// CHECK-NEXT:      "range": {
-// CHECK-NEXT:       "begin": {},
-// CHECK-NEXT:       "end": {}
-// CHECK-NEXT:      },
-// CHECK-NEXT:      "implicit": true
-// CHECK-NEXT:     },
-// CHECK-NEXT:     {
-// CHECK-NEXT:      "id": "0x{{.*}}",
-// CHECK-NEXT:      "kind": "FieldDecl",
-// CHECK-NEXT:      "loc": {},
-// CHECK-NEXT:      "range": {
-// CHECK-NEXT:       "begin": {},
-// CHECK-NEXT:       "end": {}
-// CHECK-NEXT:      },
-// CHECK-NEXT:      "name": "gp_offset",
-// CHECK-NEXT:      "type": {
-// CHECK-NEXT:       "qualType": "unsigned int"
-// CHECK-NEXT:      }
-// CHECK-NEXT:     },
-// CHECK-NEXT:     {
-// CHECK-NEXT:      "id": "0x{{.*}}",
-// CHECK-NEXT:      "kind": "FieldDecl",
-// CHECK-NEXT:      "loc": {},
-// CHECK-NEXT:      "range": {
-// CHECK-NEXT:       "begin": {},
-// CHECK-NEXT:       "end": {}
-// CHECK-NEXT:      },
-// CHECK-NEXT:      "name": "fp_offset",
-// CHECK-NEXT:      "type": {
-// CHECK-NEXT:       "qualType": "unsigned int"
-// CHECK-NEXT:      }
-// CHECK-NEXT:     },
-// CHECK-NEXT:     {
-// CHECK-NEXT:      "id": "0x{{.*}}",
-// CHECK-NEXT:      "kind": "FieldDecl",
-// CHECK-NEXT:      "loc": {},
-// CHECK-NEXT:      "range": {
-// CHECK-NEXT:       "begin": {},
-// CHECK-NEXT:       "end": {}
-// CHECK-NEXT:      },
-// CHECK-NEXT:      "name": "overflow_arg_area",
-// CHECK-NEXT:      "type": {
-// CHECK-NEXT:       "qualType": "void *"
-// CHECK-NEXT:      }
-// CHECK-NEXT:     },
-// CHECK-NEXT:     {
-// CHECK-NEXT:      "id": "0x{{.*}}",
-// CHECK-NEXT:      "kind": "FieldDecl",
-// CHECK-NEXT:      "loc": {},
-// CHECK-NEXT:      "range": {
-// CHECK-NEXT:       "begin": {},
-// CHECK-NEXT:       "end": {}
-// CHECK-NEXT:      },
-// CHECK-NEXT:      "name": "reg_save_area",
-// CHECK-NEXT:      "type": {
-// CHECK-NEXT:       "qualType": "void *"
-// CHECK-NEXT:      }
-// CHECK-NEXT:     }
-// CHECK-NEXT:    ]
-// CHECK-NEXT:   },
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
 // CHECK-NEXT:    "kind": "TypedefDecl",
 // CHECK-NEXT:    "loc": {},
 // CHECK-NEXT:    "range": {

diff  --git a/clang/test/AST/ast-dump-overloaded-operators.cpp b/clang/test/AST/ast-dump-overloaded-operators.cpp
index 5b951ba461373..dc6d7bdc9b085 100644
--- a/clang/test/AST/ast-dump-overloaded-operators.cpp
+++ b/clang/test/AST/ast-dump-overloaded-operators.cpp
@@ -24,7 +24,7 @@ void test() {
 // CHECK-NEXT: |-FunctionDecl {{.*}} <line:12:1, col:19> col:6{{( imported)?}} used operator, 'void (E, E)'
 // CHECK-NEXT: | |-ParmVarDecl {{.*}} <col:16> col:17{{( imported)?}} 'E'
 // CHECK-NEXT: | `-ParmVarDecl {{.*}} <col:18> col:19{{( imported)?}} 'E'
-// CHECK-NEXT:  -FunctionDecl {{.*}} <line:14:1, line:18:1> line:14:6{{( imported)?}} test 'void ()'
+// CHECK-NEXT: `-FunctionDecl {{.*}} <line:14:1, line:18:1> line:14:6{{( imported)?}} test 'void ()'
 // CHECK-NEXT:   `-CompoundStmt {{.*}} <col:13, line:18:1>
 // CHECK-NEXT:     |-DeclStmt {{.*}} <line:15:3, col:6>
 // CHECK-NEXT:     | `-VarDecl {{.*}} <col:3, col:5> col:5{{( imported)?}} used e 'E'

diff  --git a/clang/test/AST/ast-dump-record-definition-data-json.cpp b/clang/test/AST/ast-dump-record-definition-data-json.cpp
index d75aa05908e79..c102c436a2a4b 100644
--- a/clang/test/AST/ast-dump-record-definition-data-json.cpp
+++ b/clang/test/AST/ast-dump-record-definition-data-json.cpp
@@ -132,128 +132,6 @@ struct DoesNotAllowConstDefaultInit {
 // CHECK-NEXT:  "name": "__NSConstantString_tag"
 // CHECK-NEXT: }
 
-// CHECK-NOT: {{^}}Dumping
-// CHECK:  "kind": "CXXRecordDecl",
-// CHECK-NEXT:  "loc": {},
-// CHECK-NEXT:  "range": {
-// CHECK-NEXT:   "begin": {},
-// CHECK-NEXT:   "end": {}
-// CHECK-NEXT:  },
-// CHECK-NEXT:  "isImplicit": true,
-// CHECK-NEXT:  "name": "__va_list_tag",
-// CHECK-NEXT:  "tagUsed": "struct",
-// CHECK-NEXT:  "completeDefinition": true,
-// CHECK-NEXT:  "definitionData": {
-// CHECK-NEXT:   "canPassInRegisters": true,
-// CHECK-NEXT:   "copyAssign": {
-// CHECK-NEXT:    "hasConstParam": true,
-// CHECK-NEXT:    "implicitHasConstParam": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "simple": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "copyCtor": {
-// CHECK-NEXT:    "hasConstParam": true,
-// CHECK-NEXT:    "implicitHasConstParam": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "simple": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "defaultCtor": {
-// CHECK-NEXT:    "exists": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "dtor": {
-// CHECK-NEXT:    "irrelevant": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "simple": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "isAggregate": true,
-// CHECK-NEXT:   "isLiteral": true,
-// CHECK-NEXT:   "isPOD": true,
-// CHECK-NEXT:   "isStandardLayout": true,
-// CHECK-NEXT:   "isTrivial": true,
-// CHECK-NEXT:   "isTriviallyCopyable": true,
-// CHECK-NEXT:   "moveAssign": {
-// CHECK-NEXT:    "exists": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "simple": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "moveCtor": {
-// CHECK-NEXT:    "exists": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "simple": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   }
-// CHECK-NEXT:  },
-// CHECK-NEXT:  "inner": [
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "TypeVisibilityAttr",
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "implicit": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "FieldDecl",
-// CHECK-NEXT:    "loc": {},
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "name": "gp_offset",
-// CHECK-NEXT:    "type": {
-// CHECK-NEXT:     "qualType": "unsigned int"
-// CHECK-NEXT:    }
-// CHECK-NEXT:   },
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "FieldDecl",
-// CHECK-NEXT:    "loc": {},
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "name": "fp_offset",
-// CHECK-NEXT:    "type": {
-// CHECK-NEXT:     "qualType": "unsigned int"
-// CHECK-NEXT:    }
-// CHECK-NEXT:   },
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "FieldDecl",
-// CHECK-NEXT:    "loc": {},
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "name": "overflow_arg_area",
-// CHECK-NEXT:    "type": {
-// CHECK-NEXT:     "qualType": "void *"
-// CHECK-NEXT:    }
-// CHECK-NEXT:   },
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "FieldDecl",
-// CHECK-NEXT:    "loc": {},
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "name": "reg_save_area",
-// CHECK-NEXT:    "type": {
-// CHECK-NEXT:     "qualType": "void *"
-// CHECK-NEXT:    }
-// CHECK-NEXT:   }
-// CHECK-NEXT:  ]
-// CHECK-NEXT: }
-
 // CHECK-NOT: {{^}}Dumping
 // CHECK:  "kind": "CXXRecordDecl",
 // CHECK-NEXT:  "name": "__va_list_tag"

diff  --git a/clang/test/AST/ast-dump-records-json.cpp b/clang/test/AST/ast-dump-records-json.cpp
index 8b779ca629eb7..bc53d03176f66 100644
--- a/clang/test/AST/ast-dump-records-json.cpp
+++ b/clang/test/AST/ast-dump-records-json.cpp
@@ -92,128 +92,6 @@ struct Derived6 : virtual public Bases... {
 // CHECK-NEXT:  "name": "__NSConstantString_tag"
 // CHECK-NEXT: }
 
-// CHECK-NOT: {{^}}Dumping
-// CHECK:  "kind": "CXXRecordDecl",
-// CHECK-NEXT:  "loc": {},
-// CHECK-NEXT:  "range": {
-// CHECK-NEXT:   "begin": {},
-// CHECK-NEXT:   "end": {}
-// CHECK-NEXT:  },
-// CHECK-NEXT:  "isImplicit": true,
-// CHECK-NEXT:  "name": "__va_list_tag",
-// CHECK-NEXT:  "tagUsed": "struct",
-// CHECK-NEXT:  "completeDefinition": true,
-// CHECK-NEXT:  "definitionData": {
-// CHECK-NEXT:   "canPassInRegisters": true,
-// CHECK-NEXT:   "copyAssign": {
-// CHECK-NEXT:    "hasConstParam": true,
-// CHECK-NEXT:    "implicitHasConstParam": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "simple": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "copyCtor": {
-// CHECK-NEXT:    "hasConstParam": true,
-// CHECK-NEXT:    "implicitHasConstParam": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "simple": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "defaultCtor": {
-// CHECK-NEXT:    "exists": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "dtor": {
-// CHECK-NEXT:    "irrelevant": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "simple": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "isAggregate": true,
-// CHECK-NEXT:   "isLiteral": true,
-// CHECK-NEXT:   "isPOD": true,
-// CHECK-NEXT:   "isStandardLayout": true,
-// CHECK-NEXT:   "isTrivial": true,
-// CHECK-NEXT:   "isTriviallyCopyable": true,
-// CHECK-NEXT:   "moveAssign": {
-// CHECK-NEXT:    "exists": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "simple": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   "moveCtor": {
-// CHECK-NEXT:    "exists": true,
-// CHECK-NEXT:    "needsImplicit": true,
-// CHECK-NEXT:    "simple": true,
-// CHECK-NEXT:    "trivial": true
-// CHECK-NEXT:   }
-// CHECK-NEXT:  },
-// CHECK-NEXT:  "inner": [
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "TypeVisibilityAttr",
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "implicit": true
-// CHECK-NEXT:   },
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "FieldDecl",
-// CHECK-NEXT:    "loc": {},
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "name": "gp_offset",
-// CHECK-NEXT:    "type": {
-// CHECK-NEXT:     "qualType": "unsigned int"
-// CHECK-NEXT:    }
-// CHECK-NEXT:   },
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "FieldDecl",
-// CHECK-NEXT:    "loc": {},
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "name": "fp_offset",
-// CHECK-NEXT:    "type": {
-// CHECK-NEXT:     "qualType": "unsigned int"
-// CHECK-NEXT:    }
-// CHECK-NEXT:   },
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "FieldDecl",
-// CHECK-NEXT:    "loc": {},
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "name": "overflow_arg_area",
-// CHECK-NEXT:    "type": {
-// CHECK-NEXT:     "qualType": "void *"
-// CHECK-NEXT:    }
-// CHECK-NEXT:   },
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "FieldDecl",
-// CHECK-NEXT:    "loc": {},
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "name": "reg_save_area",
-// CHECK-NEXT:    "type": {
-// CHECK-NEXT:     "qualType": "void *"
-// CHECK-NEXT:    }
-// CHECK-NEXT:   }
-// CHECK-NEXT:  ]
-// CHECK-NEXT: }
-
 // CHECK-NOT: {{^}}Dumping
 // CHECK:  "kind": "CXXRecordDecl",
 // CHECK-NEXT:  "name": "__va_list_tag"

diff  --git a/clang/test/AST/ast-dump-template-decls-json.cpp b/clang/test/AST/ast-dump-template-decls-json.cpp
index 0afb7af218d5d..f51ef937d91db 100644
--- a/clang/test/AST/ast-dump-template-decls-json.cpp
+++ b/clang/test/AST/ast-dump-template-decls-json.cpp
@@ -177,128 +177,6 @@ void i();
 // CHECK-NEXT:   },
 // CHECK-NEXT:   {
 // CHECK-NEXT:    "id": "0x{{.*}}",
-// CHECK-NEXT:    "kind": "CXXRecordDecl",
-// CHECK-NEXT:    "loc": {},
-// CHECK-NEXT:    "range": {
-// CHECK-NEXT:     "begin": {},
-// CHECK-NEXT:     "end": {}
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "isImplicit": true,
-// CHECK-NEXT:    "name": "__va_list_tag",
-// CHECK-NEXT:    "tagUsed": "struct",
-// CHECK-NEXT:    "completeDefinition": true,
-// CHECK-NEXT:    "definitionData": {
-// CHECK-NEXT:     "canPassInRegisters": true,
-// CHECK-NEXT:     "copyAssign": {
-// CHECK-NEXT:      "hasConstParam": true,
-// CHECK-NEXT:      "implicitHasConstParam": true,
-// CHECK-NEXT:      "needsImplicit": true,
-// CHECK-NEXT:      "simple": true,
-// CHECK-NEXT:      "trivial": true
-// CHECK-NEXT:     },
-// CHECK-NEXT:     "copyCtor": {
-// CHECK-NEXT:      "hasConstParam": true,
-// CHECK-NEXT:      "implicitHasConstParam": true,
-// CHECK-NEXT:      "needsImplicit": true,
-// CHECK-NEXT:      "simple": true,
-// CHECK-NEXT:      "trivial": true
-// CHECK-NEXT:     },
-// CHECK-NEXT:     "defaultCtor": {
-// CHECK-NEXT:      "exists": true,
-// CHECK-NEXT:      "needsImplicit": true,
-// CHECK-NEXT:      "trivial": true
-// CHECK-NEXT:     },
-// CHECK-NEXT:     "dtor": {
-// CHECK-NEXT:      "irrelevant": true,
-// CHECK-NEXT:      "needsImplicit": true,
-// CHECK-NEXT:      "simple": true,
-// CHECK-NEXT:      "trivial": true
-// CHECK-NEXT:     },
-// CHECK-NEXT:     "isAggregate": true,
-// CHECK-NEXT:     "isLiteral": true,
-// CHECK-NEXT:     "isPOD": true,
-// CHECK-NEXT:     "isStandardLayout": true,
-// CHECK-NEXT:     "isTrivial": true,
-// CHECK-NEXT:     "isTriviallyCopyable": true,
-// CHECK-NEXT:     "moveAssign": {
-// CHECK-NEXT:      "exists": true,
-// CHECK-NEXT:      "needsImplicit": true,
-// CHECK-NEXT:      "simple": true,
-// CHECK-NEXT:      "trivial": true
-// CHECK-NEXT:     },
-// CHECK-NEXT:     "moveCtor": {
-// CHECK-NEXT:      "exists": true,
-// CHECK-NEXT:      "needsImplicit": true,
-// CHECK-NEXT:      "simple": true,
-// CHECK-NEXT:      "trivial": true
-// CHECK-NEXT:     }
-// CHECK-NEXT:    },
-// CHECK-NEXT:    "inner": [
-// CHECK-NEXT:     {
-// CHECK-NEXT:      "id": "0x{{.*}}",
-// CHECK-NEXT:      "kind": "TypeVisibilityAttr",
-// CHECK-NEXT:      "range": {
-// CHECK-NEXT:       "begin": {},
-// CHECK-NEXT:       "end": {}
-// CHECK-NEXT:      },
-// CHECK-NEXT:      "implicit": true
-// CHECK-NEXT:     },
-// CHECK-NEXT:     {
-// CHECK-NEXT:      "id": "0x{{.*}}",
-// CHECK-NEXT:      "kind": "FieldDecl",
-// CHECK-NEXT:      "loc": {},
-// CHECK-NEXT:      "range": {
-// CHECK-NEXT:       "begin": {},
-// CHECK-NEXT:       "end": {}
-// CHECK-NEXT:      },
-// CHECK-NEXT:      "name": "gp_offset",
-// CHECK-NEXT:      "type": {
-// CHECK-NEXT:       "qualType": "unsigned int"
-// CHECK-NEXT:      }
-// CHECK-NEXT:     },
-// CHECK-NEXT:     {
-// CHECK-NEXT:      "id": "0x{{.*}}",
-// CHECK-NEXT:      "kind": "FieldDecl",
-// CHECK-NEXT:      "loc": {},
-// CHECK-NEXT:      "range": {
-// CHECK-NEXT:       "begin": {},
-// CHECK-NEXT:       "end": {}
-// CHECK-NEXT:      },
-// CHECK-NEXT:      "name": "fp_offset",
-// CHECK-NEXT:      "type": {
-// CHECK-NEXT:       "qualType": "unsigned int"
-// CHECK-NEXT:      }
-// CHECK-NEXT:     },
-// CHECK-NEXT:     {
-// CHECK-NEXT:      "id": "0x{{.*}}",
-// CHECK-NEXT:      "kind": "FieldDecl",
-// CHECK-NEXT:      "loc": {},
-// CHECK-NEXT:      "range": {
-// CHECK-NEXT:       "begin": {},
-// CHECK-NEXT:       "end": {}
-// CHECK-NEXT:      },
-// CHECK-NEXT:      "name": "overflow_arg_area",
-// CHECK-NEXT:      "type": {
-// CHECK-NEXT:       "qualType": "void *"
-// CHECK-NEXT:      }
-// CHECK-NEXT:     },
-// CHECK-NEXT:     {
-// CHECK-NEXT:      "id": "0x{{.*}}",
-// CHECK-NEXT:      "kind": "FieldDecl",
-// CHECK-NEXT:      "loc": {},
-// CHECK-NEXT:      "range": {
-// CHECK-NEXT:       "begin": {},
-// CHECK-NEXT:       "end": {}
-// CHECK-NEXT:      },
-// CHECK-NEXT:      "name": "reg_save_area",
-// CHECK-NEXT:      "type": {
-// CHECK-NEXT:       "qualType": "void *"
-// CHECK-NEXT:      }
-// CHECK-NEXT:     }
-// CHECK-NEXT:    ]
-// CHECK-NEXT:   },
-// CHECK-NEXT:   {
-// CHECK-NEXT:    "id": "0x{{.*}}",
 // CHECK-NEXT:    "kind": "TypedefDecl",
 // CHECK-NEXT:    "loc": {},
 // CHECK-NEXT:    "range": {

diff  --git a/clang/test/AST/ast-dump-traits.cpp b/clang/test/AST/ast-dump-traits.cpp
index 0baa8856514ae..99ad50f528eb7 100644
--- a/clang/test/AST/ast-dump-traits.cpp
+++ b/clang/test/AST/ast-dump-traits.cpp
@@ -52,7 +52,7 @@ void test_unary_expr_or_type_trait() {
 // CHECK-NEXT: | `-CompoundStmt {{.*}} <col:30, line:28:1>
 // CHECK-NEXT: |   `-CStyleCastExpr {{.*}} <line:27:3, col:28> 'void' <ToVoid>
 // CHECK-NEXT: |     `-ExpressionTraitExpr {{.*}} <col:10, col:28> 'bool' __is_lvalue_expr
-// CHECK-NEXT:  -FunctionDecl {{.*}} <line:30:1, line:35:1> line:30:6{{( imported)?}} test_unary_expr_or_type_trait 'void ()'
+// CHECK-NEXT: `-FunctionDecl {{.*}} <line:30:1, line:35:1> line:30:6{{( imported)?}} test_unary_expr_or_type_trait 'void ()'
 // CHECK-NEXT:   `-CompoundStmt {{.*}} <col:38, line:35:1>
 // CHECK-NEXT:     |-CStyleCastExpr {{.*}} <line:32:3, col:20> 'void' <ToVoid>
 // CHECK-NEXT:     | `-UnaryExprOrTypeTraitExpr {{.*}} <col:10, col:20> 'unsigned long' sizeof 'int'

diff  --git a/clang/test/AST/fixed_point.c b/clang/test/AST/fixed_point.c
index 530069509b0ed..62511ba701fea 100644
--- a/clang/test/AST/fixed_point.c
+++ b/clang/test/AST/fixed_point.c
@@ -402,5 +402,5 @@ unsigned long _Fract   u_long_fract_one  = 1.0ulr;
 
 _Accum literallast = 1.0k;    // One
 
-//CHECK-NEXT:  -VarDecl {{.*}} literallast '_Accum' cinit
+//CHECK-NEXT: `-VarDecl {{.*}} literallast '_Accum' cinit
 //CHECK-NEXT:   `-FixedPointLiteral {{.*}} '_Accum' 1.0

diff  --git a/clang/test/AST/float16.cpp b/clang/test/AST/float16.cpp
index e1c4c9bbba600..9e0d70b9a1c00 100644
--- a/clang/test/AST/float16.cpp
+++ b/clang/test/AST/float16.cpp
@@ -29,7 +29,7 @@ namespace {
   }
 }
 
-//CHECK:      |-NamespaceDecl {{.*}} <{{.*}}:22:1,
+//CHECK:      |-NamespaceDecl
 //CHECK-NEXT: | |-VarDecl {{.*}} f1n '_Float16'
 //CHECK-NEXT: | |-VarDecl {{.*}} f2n '_Float16' cinit
 //CHECK-NEXT: | | `-FloatingLiteral {{.*}} '_Float16' 3.300000e+01

diff  --git a/clang/test/PCH/stmt-openmp_structured_block-bit.cpp b/clang/test/PCH/stmt-openmp_structured_block-bit.cpp
index a562319c13647..cb2d3638c5bde 100644
--- a/clang/test/PCH/stmt-openmp_structured_block-bit.cpp
+++ b/clang/test/PCH/stmt-openmp_structured_block-bit.cpp
@@ -13,7 +13,7 @@ void test() {
 // expected-no-diagnostics
 
 // CHECK: TranslationUnitDecl 0x{{.*}} <<invalid sloc>> <invalid sloc>
-// CHECK:  -FunctionDecl 0x{{.*}} <{{.*}}stmt-openmp_structured_block-bit.cpp:8:1, line:11:1> line:8:6 {{(test|imported test)}} 'void ()'
+// CHECK: `-FunctionDecl 0x{{.*}} <{{.*}}stmt-openmp_structured_block-bit.cpp:8:1, line:11:1> line:8:6 {{(test|imported test)}} 'void ()'
 // CHECK-NEXT:   `-CompoundStmt 0x{{.*}} <col:13, line:11:1>
 // CHECK-NEXT:     `-OMPParallelDirective 0x{{.*}} <line:9:1, col:21>
 // CHECK-NEXT:       `-CapturedStmt 0x{{.*}} <line:10:3>

diff  --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp
index d0eaf63d4e0d9..cb8c0bf5dcd5a 100644
--- a/clang/unittests/AST/ASTImporterTest.cpp
+++ b/clang/unittests/AST/ASTImporterTest.cpp
@@ -7499,14 +7499,7 @@ TEST_P(ASTImporterOptionSpecificTestBase, ImportOfCapturedVLAType) {
       }
       )",
       Lang_CXX14);
-
-  auto *FromF = FirstDeclMatcher<FunctionDecl>().match(
-      FromTU, functionDecl(hasName("declToImport")));
-  CXXRecordDecl *FromLambda =
-      cast<LambdaExpr>((cast<CompoundStmt>(FromF->getBody())->body_back()))
-          ->getLambdaClass();
-
-  auto *FromFD = *FromLambda->field_begin();
+  auto *FromFD = FirstDeclMatcher<FieldDecl>().match(FromTU, fieldDecl());
   ASSERT_TRUE(FromFD);
   ASSERT_TRUE(FromFD->hasCapturedVLAType());
 
@@ -8082,24 +8075,6 @@ TEST_P(ASTImporterOptionSpecificTestBase, isNewDecl) {
   EXPECT_FALSE(SharedStatePtr->isNewDecl(ToBar));
 }
 
-TEST_P(ASTImporterOptionSpecificTestBase, VaList) {
-  Decl *FromTU = getTuDecl(R"(typedef __builtin_va_list va_list;)", Lang_C99);
-
-  auto *FromVaList = FirstDeclMatcher<TypedefDecl>().match(
-      FromTU, typedefDecl(hasName("va_list")));
-  ASSERT_TRUE(FromVaList);
-
-  auto *ToVaList = Import(FromVaList, Lang_C99);
-  ASSERT_TRUE(ToVaList);
-
-  auto *ToBuiltinVaList = FirstDeclMatcher<TypedefDecl>().match(
-      ToAST->getASTContext().getTranslationUnitDecl(),
-      typedefDecl(hasName("__builtin_va_list")));
-
-  ASSERT_TRUE(ToAST->getASTContext().hasSameType(
-      ToVaList->getUnderlyingType(), ToBuiltinVaList->getUnderlyingType()));
-}
-
 INSTANTIATE_TEST_SUITE_P(ParameterizedTests, ASTImporterLookupTableTest,
                          DefaultTestValuesForRunOptions);
 


        


More information about the cfe-commits mailing list