[PATCH] D114609: [clang] Fix crash on broken parameter declarators
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 26 01:12:54 PST 2021
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Thanks!
================
Comment at: clang/test/Parser/cxx-decltype-parameter.cpp:1
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
----------------
I'd place this test in `Parser/cxx-keyword-identifiers.cpp` since the crash is in the relevant code path.
================
Comment at: clang/test/Parser/cxx-decltype-parameter.cpp:5
+struct Foo {
+ Bar bar(*decltype(Bar{}) aux); // expected-error {{C++ requires a type specifier for all declarations}}. \
+ // expected-error {{expected ')'}} expected-note {{to match this '('}}
----------------
this can be simplified further: `void bar(*decltype(1) aux);`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114609/new/
https://reviews.llvm.org/D114609
More information about the cfe-commits
mailing list