diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2016-01-19 22:54:26 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2016-01-19 22:54:26 +0000 |
| commit | 6c8848abe6931015306f53714deffb7fa7c1fbe8 (patch) | |
| tree | 92950f58c413d369d6066fa0ef28c85dbdd734f8 /clang/lib/Sema | |
| parent | 13fe2a9517e93ae10cca848b5ebf87a1de17bffb (diff) | |
| download | bcm5719-llvm-6c8848abe6931015306f53714deffb7fa7c1fbe8.tar.gz bcm5719-llvm-6c8848abe6931015306f53714deffb7fa7c1fbe8.zip | |
Allow __attribute__((mode)) to appertain to field declarations again. Corrects compile issues with LibreOffice.
Patch by Stephan Bergmann
llvm-svn: 258213
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index f670b52d0d2..31741be618a 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -3392,7 +3392,7 @@ static void handleModeAttr(Sema &S, Decl *D, const AttributeList &Attr) { if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(D)) OldTy = TD->getUnderlyingType(); else - OldTy = cast<VarDecl>(D)->getType(); + OldTy = cast<ValueDecl>(D)->getType(); // Base type can also be a vector type (see PR17453). // Distinguish between base type and base element type. @@ -3465,7 +3465,7 @@ static void handleModeAttr(Sema &S, Decl *D, const AttributeList &Attr) { if (TypedefNameDecl *TD = dyn_cast<TypedefNameDecl>(D)) TD->setModedTypeSourceInfo(TD->getTypeSourceInfo(), NewTy); else - cast<VarDecl>(D)->setType(NewTy); + cast<ValueDecl>(D)->setType(NewTy); D->addAttr(::new (S.Context) ModeAttr(Attr.getRange(), S.Context, Name, |

