mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-20 20:15:49 -04:00

Summary: In a decl like `int AA(BB cc)` where BB isn't defined, we end up trying to parse `BB cc` as an expression (vexing parse) and end up triggering the parser's "recovery-in-function" completion with no actual function scope. This patch avoids the assumption that such a scope exists in this context. Reviewers: kadircet Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53070 llvm-svn: 344133
6 lines
239 B
C++
6 lines
239 B
C++
// Important that BB is unknown.
|
|
// This triggers completion in PCC_RecoveryInFunction context, with no function.
|
|
int AA(BB cc);
|
|
// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:3:12 %s | FileCheck %s
|
|
// CHECK: COMPLETION: char
|