[PATCH] Fix to PR13580 - Problem in preprocessing pragma with block comments
Serge Pavlov
sepavloff at gmail.com
Thu Apr 11 19:34:37 PDT 2013
Friendly ping.
2013/4/4 Serge Pavlov <sepavloff at gmail.com>:
> sepavloff added you to the CC list for the revision "Fix to PR13580 - Problem in preprocessing pragma with block comments".
>
> This patch fixes PR13580 - Problem in preprocessing pragma with block comments.
>
> Could someone please review this patch?
> Thank you.
>
> http://llvm-reviews.chandlerc.com/D619
>
> Files:
> lib/Parse/ParseDecl.cpp
> test/Parser/pragma-options.c
> test/Parser/pragma-pack.c
>
> Index: lib/Parse/ParseDecl.cpp
> ===================================================================
> --- lib/Parse/ParseDecl.cpp
> +++ lib/Parse/ParseDecl.cpp
> @@ -3100,6 +3100,16 @@
> continue;
> }
>
> + if (Tok.is(tok::annot_pragma_pack)) {
> + HandlePragmaPack();
> + continue;
> + }
> +
> + if (Tok.is(tok::annot_pragma_align)) {
> + HandlePragmaAlign();
> + continue;
> + }
> +
> if (!Tok.is(tok::at)) {
> struct CFieldCallback : FieldCallback {
> Parser &P;
> Index: test/Parser/pragma-options.c
> ===================================================================
> --- test/Parser/pragma-options.c
> +++ test/Parser/pragma-options.c
> @@ -20,3 +20,15 @@
> #pragma align=reset
> #pragma align=mac68k
> #pragma align=power
> +
> +// PR13580
> +struct S
> +{
> + char a[3];
> +#pragma align=packed
> + struct T
> + {
> + char b;
> + int c;
> + } d;
> +};
> Index: test/Parser/pragma-pack.c
> ===================================================================
> --- test/Parser/pragma-pack.c
> +++ test/Parser/pragma-pack.c
> @@ -30,3 +30,17 @@
>
> _Pragma("pack(push)")
> /* expected-warning {{expected integer or identifier in '#pragma pack'}}*/ _Pragma("pack(push,)")
> +
> +// PR13580
> +struct S
> +{
> + char a[3];
> +#pragma pack(1)
> + struct T
> + {
> + char b;
> + int c;
> + } d;
> +#pragma pack()
> + int e;
> +};
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
--
Thanks,
--Serge
More information about the cfe-commits
mailing list