r197043 - Add comment about PragmaIntroducerKind

Dmitri Gribenko gribozavr at gmail.com
Wed Dec 11 10:21:06 PST 2013


On Wed, Dec 11, 2013 at 6:45 AM, Renato Golin <renato.golin at linaro.org> wrote:
> Author: rengolin
> Date: Wed Dec 11 08:45:53 2013
> New Revision: 197043
>
> URL: http://llvm.org/viewvc/llvm-project?rev=197043&view=rev
> Log:
> Add comment about PragmaIntroducerKind
>
> Modified:
>     cfe/trunk/include/clang/Lex/Pragma.h
>
> Modified: cfe/trunk/include/clang/Lex/Pragma.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/Pragma.h?rev=197043&r1=197042&r2=197043&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Lex/Pragma.h (original)
> +++ cfe/trunk/include/clang/Lex/Pragma.h Wed Dec 11 08:45:53 2013
> @@ -28,6 +28,12 @@ namespace clang {
>    /**
>     * \brief Describes how the pragma was introduced, e.g., with \#pragma,
>     * _Pragma, or __pragma.
> +   *
> +   * This is a callback and there is code outside of clang using it.
> +   *
> +   * The source location passed down together with the introducer kind is
> +   * the one of the token *following* the introducer, so it would not be
> +   * immediate for clients to re-lex to see which introducer it was.
>     */
>    enum PragmaIntroducerKind {
>      /**

Hi Renato,

This does not feel like the right place to put this comment.  An enum
is not a callback and an enum does not pass the source location.  Did
you mean to put this comment onto HandlePragma?

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list