[PATCH] D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds.
    John McCall via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Jun 20 09:07:29 PDT 2017
    
    
  
rjmccall added inline comments.
================
Comment at: lib/Sema/SemaExprCXX.cpp:4128
+        return true;
+    }
+
----------------
I don't understand the difference you're creating between traits here.  Three specific traits about destructibility allow incomplete array types regardless of whether the base type is incomplete, but the rest do not?
Anyway, I think what you want here is basically just:
  if (auto ArrayTy = S.Context.getAsIncompleteArrayType(ArgTy)) {
    ArgTy = ArrayTy->getElementType();
  }
https://reviews.llvm.org/D34198
    
    
More information about the cfe-commits
mailing list