[cfe-commits] r165810 - in /cfe/trunk: lib/Parse/ParseDeclCXX.cpp test/Parser/pragma-options.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Fri Oct 12 10:40:00 PDT 2012


Author: akirtzidis
Date: Fri Oct 12 12:39:59 2012
New Revision: 165810

URL: http://llvm.org/viewvc/llvm-project?rev=165810&view=rev
Log:
Handle a "#pragma options align" inside a class.

Added:
    cfe/trunk/test/Parser/pragma-options.cpp
Modified:
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=165810&r1=165809&r2=165810&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Fri Oct 12 12:39:59 2012
@@ -2372,6 +2372,11 @@
         continue;
       }
 
+      if (Tok.is(tok::annot_pragma_align)) {
+        HandlePragmaAlign();
+        continue;
+      }
+
       AccessSpecifier AS = getAccessSpecifierIfPresent();
       if (AS != AS_none) {
         // Current token is a C++ access specifier.

Added: cfe/trunk/test/Parser/pragma-options.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-options.cpp?rev=165810&view=auto
==============================================================================
--- cfe/trunk/test/Parser/pragma-options.cpp (added)
+++ cfe/trunk/test/Parser/pragma-options.cpp Fri Oct 12 12:39:59 2012
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s
+
+class C {
+#pragma options align=natural
+};





More information about the cfe-commits mailing list