summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaAttr.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-10-04 02:36:51 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-10-04 02:36:51 +0000
commit68be1649ee65d59468e01f69862b7709134ed423 (patch)
tree1a2915bc5cbbdbe0107770a8f5eee2f10f3d6084 /clang/lib/Sema/SemaAttr.cpp
parent0b744b3105d00068e28d4bb27a7aa60c4e0b7ba2 (diff)
downloadbcm5719-llvm-68be1649ee65d59468e01f69862b7709134ed423.tar.gz
bcm5719-llvm-68be1649ee65d59468e01f69862b7709134ed423.zip
Permanently end the whole "pragma got handled by the parser too early"
mess by handling all pragmas which the parser touches uniformly. <rdar://problem/12248901>, etc. llvm-svn: 165195
Diffstat (limited to 'clang/lib/Sema/SemaAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaAttr.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/lib/Sema/SemaAttr.cpp
index e935fc735b2..f1154c1a8ae 100644
--- a/clang/lib/Sema/SemaAttr.cpp
+++ b/clang/lib/Sema/SemaAttr.cpp
@@ -136,23 +136,12 @@ void Sema::AddMsStructLayoutForRecord(RecordDecl *RD) {
}
void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind,
- SourceLocation PragmaLoc,
- SourceLocation KindLoc) {
+ SourceLocation PragmaLoc) {
if (PackContext == 0)
PackContext = new PragmaPackStack();
PragmaPackStack *Context = static_cast<PragmaPackStack*>(PackContext);
- // Reset just pops the top of the stack, or resets the current alignment to
- // default.
- if (Kind == Sema::POAK_Reset) {
- if (!Context->pop(0, /*IsReset=*/true)) {
- Diag(PragmaLoc, diag::warn_pragma_options_align_reset_failed)
- << "stack empty";
- }
- return;
- }
-
switch (Kind) {
// For all targets we support native and natural are the same.
//
@@ -181,9 +170,13 @@ void Sema::ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind,
Context->setAlignment(PackStackEntry::kMac68kAlignmentSentinel);
break;
- default:
- Diag(PragmaLoc, diag::warn_pragma_options_align_unsupported_option)
- << KindLoc;
+ case POAK_Reset:
+ // Reset just pops the top of the stack, or resets the current alignment to
+ // default.
+ if (!Context->pop(0, /*IsReset=*/true)) {
+ Diag(PragmaLoc, diag::warn_pragma_options_align_reset_failed)
+ << "stack empty";
+ }
break;
}
}
OpenPOWER on IntegriCloud