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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165195 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp
index e935fc7..f1154c1 100644
--- a/lib/Sema/SemaAttr.cpp
+++ b/lib/Sema/SemaAttr.cpp
@@ -136,23 +136,12 @@
 }
 
 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 @@
     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;
   }
 }