From de32b20bdd1bb32967e52aff6947c0a579363a44 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Fri, 11 Feb 2011 19:59:54 +0000 Subject: Reject forbidden storage class specifiers in OpenCL. Patch by George Russell! llvm-svn: 125399 --- clang/lib/Sema/SemaDecl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Sema/SemaDecl.cpp') diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index d756de5e2db..2807e759b56 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1922,7 +1922,7 @@ Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, // Recover by adding 'static'. DS.SetStorageClassSpec(DeclSpec::SCS_static, SourceLocation(), - PrevSpec, DiagID); + PrevSpec, DiagID, getLangOptions()); } // C++ [class.union]p3: // A storage class is not allowed in a declaration of an @@ -1935,7 +1935,7 @@ Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, // Recover by removing the storage specifier. DS.SetStorageClassSpec(DeclSpec::SCS_unspecified, SourceLocation(), - PrevSpec, DiagID); + PrevSpec, DiagID, getLangOptions()); } // C++ [class.union]p2: -- cgit v1.2.3