[PATCH] D81384: [AST] Fix a clang crash on an invalid for-range statement.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 08:48:29 PDT 2020


hokein marked 2 inline comments as done.
hokein added inline comments.


================
Comment at: clang/test/SemaCXX/for-range-crash.cpp:6
+  Bar<int> *variables_to_modify;
+   foo() {  // expected-error {{C++ requires a type specifier for all declarations}}
+    for (auto *c : *variables_to_modify)
----------------
sammccall wrote:
> What's the significance of the missing return type here? Can we add void)
> 
> Can we move this function out of the class?
> 
> (In both cases just to remove any confusion about what the problematic pattern actually is)
I tried both at the very beginning and failed, the crash needs both.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81384





More information about the cfe-commits mailing list