[PATCH] D76953: [AST] Fix a crash on invalid bitwidth exprs when preserving the recoveryexprs.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 27 14:52:55 PDT 2020
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/AST/ASTContext.cpp:2165
+ if (ObjCI->getDecl()->isInvalidDecl()) {
+ // FIXME: are the numbers correct?
+ Width = 8;
----------------
these numbers are arbitrary AFAICT, this seems fine.
================
Comment at: clang/test/Sema/invalid-bitwidth-expr.mm:1
+// RUN: %clang_cc1 -fobjc-runtime=gcc -frecovery-ast -verify %s
+// RUN: %clang_cc1 -fobjc-runtime=gcc -fno-recovery-ast -verify %s
----------------
you might consider merging both tests into this file
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76953/new/
https://reviews.llvm.org/D76953
More information about the cfe-commits
mailing list