diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-11 19:59:54 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-02-11 19:59:54 +0000 |
| commit | de32b20bdd1bb32967e52aff6947c0a579363a44 (patch) | |
| tree | 07f477ff4e1f5f9d45f4b3cdc295d57db7c984e7 /clang/lib/Sema/SemaDecl.cpp | |
| parent | a49a02a04f5fc09f67a8bfbe84193e28d7452bfe (diff) | |
| download | bcm5719-llvm-de32b20bdd1bb32967e52aff6947c0a579363a44.tar.gz bcm5719-llvm-de32b20bdd1bb32967e52aff6947c0a579363a44.zip | |
Reject forbidden storage class specifiers in OpenCL. Patch by George Russell!
llvm-svn: 125399
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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: |

