[PATCH] Add CommentOptions, allow specifying custom comment block commands

Ben Gertzfield bgertzfield at gmail.com
Mon Feb 4 18:30:25 PST 2013


  Got the unit tests working! (I was running gdb on the wrong command.)

  The core problem was that I previously required the comment options when constructing
  CommandTraits -- but in PCH-reading mode, we construct CommandTraits way before reading
  the PCH.

  Now, I added a new method CommandTraits::RegisterCommentOptions() with which we can
  register comment options from LangOptions after parsing the PCH.  Tests are now passing.

    - Don't pass in -fcustom-comment-block command when reading PCH in test.
    - Add CommandTraits::RegisterCommentOptions(). Call from ASTInfoCollector::updated().

Hi indygreg, gribozavr, doug.gregor,

http://llvm-reviews.chandlerc.com/D272

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D272?vs=879&id=881#toc

Files:
  include/clang/AST/CommentCommandTraits.h
  include/clang/Basic/CommentOptions.h
  include/clang/Basic/LangOptions.h
  include/clang/Driver/Options.td
  include/clang/Frontend/ASTUnit.h
  lib/AST/ASTContext.cpp
  lib/AST/CommentCommandTraits.cpp
  lib/Driver/Tools.cpp
  lib/Frontend/ASTUnit.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Serialization/ASTReader.cpp
  lib/Serialization/ASTWriter.cpp
  test/Driver/fcomment-block-commands.c
  test/Index/comment-custom-block-command.cpp
  unittests/AST/CommentLexer.cpp
  unittests/AST/CommentParser.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D272.7.patch
Type: text/x-patch
Size: 22807 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130204/f5706c6a/attachment.bin>


More information about the cfe-commits mailing list