File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -1756,7 +1756,7 @@ ExprResult SemaOpenACC::ActOnRoutineName(Expr *RoutineName) {
1756
1756
return ExprError ();
1757
1757
}
1758
1758
void SemaOpenACC::ActOnVariableDeclarator (VarDecl *VD) {
1759
- if (!VD->isStaticLocal () || !getLangOpts (). OpenACC )
1759
+ if (!getLangOpts (). OpenACC || VD->isInvalidDecl () || !VD-> isStaticLocal () )
1760
1760
return ;
1761
1761
1762
1762
// This cast should be safe, since a static-local can only happen in a
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 %s -fopenacc -verify
2
+
3
+ // Ensure that we are properly handling 'vardecl' when they are created during
4
+ // error recovery. The errors themselves aren't really relevant/necessary to the
5
+ // bug fix.
6
+ struct Thing { };
7
+ struct pair {
8
+ // expected-error@+2{{no member named 'T1'}}
9
+ // expected-error@+1{{expected a qualified name after 'typename'}}
10
+ template <typename enable_if<Thing::template T1<int >() &&
11
+ !Thing::template T1<int >(),
12
+ // expected-error@+4{{non-friend class member 'type' cannot have a qualified name}}
13
+ // expected-error@+3{{type specifier is required}}
14
+ // expected-error@+2{{non-static data member 'type' cannot be declared as a template}}
15
+ // expected-error@+1{{no member named 'type' in the global namespace}}
16
+ bool >::type = false >
17
+ // expected-error@+1{{expected '(' for function-style cast or type construction}}
18
+ void func (void );
19
+ };
You can’t perform that action at this time.
0 commit comments