[PATCH] D149612: [Sema] avoid merge error type

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 2 10:45:40 PDT 2023


shafik added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:4395
                              bool MergeTypeWithOld) {
-  if (New->isInvalidDecl() || Old->isInvalidDecl())
+  if (New->isInvalidDecl() || Old->isInvalidDecl() || New->getType()->containsErrors() || Old->getType()->containsErrors())
     return;
----------------
I wonder why it is not an `InvalidDecl()` as well? I don't see that we check both of these anywhere else.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149612/new/

https://reviews.llvm.org/D149612



More information about the cfe-commits mailing list