hokein added inline comments.

================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:3109
+        QualType PreferredType;
+        if (TypeRep)
+          PreferredType = Actions.ProduceConstructorSignatureHelp(
----------------
sammccall wrote:
> Add a comment for what the null case means? (When do we actually hit this?)
yeah, the 
[`CompleteTest`](https://github.com/llvm/llvm-project/blob/master/clang/unittests/Sema/CodeCompleteTest.cpp#L490)
 hits the assertion after this patch. 

the assertion seems incorrect  -- IIUC, the assertion is for the 
`isInvalidType()` sanity check on Line 3090, however
In `ActOnTypeName`,  `DeclaratorInfo` could be modified (by 
`GetTypeForDeclarator`) before calling `isInvalidType`.


btw, I think for the CodeCompleteTest, would be nicer to make `ActOnTypeName` 
return `decltype(<recovery-expr>(bar))`, rather than the null type, but I'm not 
sure changing the `ActOnTypeName` behavior has any side effect.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77037



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to