Skip to content
Snippets Groups Projects
  1. Jun 02, 2016
  2. May 31, 2016
  3. May 30, 2016
    • Etienne Bergeron's avatar
      [ASTMatchers] Add support of hasCondition for SwitchStmt. · c33ca9eb
      Etienne Bergeron authored
      Summary:
      The switch statement could be added to the hasCondition matcher.
      
      Example:
      ```
      clang-query> match switchStmt(hasCondition(ignoringImpCasts(declRefExpr())))
      ```
      
      Output:
      ```
      Match #1:
      
      Binding for "root":
      SwitchStmt 0x2f9b528 </usr/local/google/home/etienneb/examples/enum.cc:35:3, line:38:3>
      |-<<<NULL>>>
      |-ImplicitCastExpr 0x2f9b510 <line:35:11> 'int' <IntegralCast>
      | `-ImplicitCastExpr 0x2f9b4f8 <col:11> 'enum Color' <LValueToRValue>
      |   `-DeclRefExpr 0x2f9b4d0 <col:11> 'enum Color' lvalue Var 0x2f9a118 'C' 'enum Color'
      `-CompoundStmt 0x2f9b610 <col:14, line:38:3>
        |-CaseStmt 0x2f9b578 <line:36:3, col:22>
        | |-ImplicitCastExpr 0x2f9b638 <col:8> 'int' <IntegralCast>
        | | `-DeclRefExpr 0x2f9b550 <col:8> 'enum Size' EnumConstant 0x2f99e40 'Small' 'enum Size'
        | |-<<<NULL>>>
        | `-ReturnStmt 0x2f9b5d0 <col:15, col:22>
        |   `-IntegerLiteral 0x2f9b5b0 <col:22> 'int' 1
        `-DefaultStmt 0x2f9b5f0 <line:37:3, col:12>
          `-BreakStmt 0x2f9b5e8 <col:12>
      
      1 match.
      ```
      
      Reviewers: aaron.ballman, sbenza, klimek
      
      Subscribers: klimek, cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D20767
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271208 91177308-0d34-0410-b5e6-96231b3b80d8
      c33ca9eb
  4. May 28, 2016
  5. May 27, 2016
  6. May 25, 2016
  7. May 23, 2016
    • David Majnemer's avatar
      Clang support for __is_assignable intrinsic · d1cedd4e
      David Majnemer authored
      MSVC now supports the __is_assignable type trait intrinsic,
      to enable easier and more efficient implementation of the
      Standard Library's is_assignable trait.
      As of Visual Studio 2015 Update 3, the VC Standard Library
      implementation uses the new intrinsic unconditionally.
      
      The implementation is pretty straightforward due to the previously
      existing is_nothrow_assignable and is_trivially_assignable.
      We handle __is_assignable via the same code as the other two except
      that we skip the extra checks for nothrow or triviality.
      
      Patch by Dave Bartolomeo!
      
      Differential Revision: http://reviews.llvm.org/D20492
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270458 91177308-0d34-0410-b5e6-96231b3b80d8
      d1cedd4e
  8. May 20, 2016
  9. May 18, 2016
  10. May 16, 2016
  11. May 13, 2016
  12. May 12, 2016
  13. May 06, 2016
  14. May 05, 2016
  15. May 04, 2016
  16. May 03, 2016
  17. Apr 28, 2016
  18. Apr 27, 2016
    • Peter Collingbourne's avatar
      Rework interface for bitset-using features to use a notion of LTO visibility. · 47213cf9
      Peter Collingbourne authored
      Bitsets, and the compiler features they rely on (vtable opt, CFI),
      only have visibility within the LTO'd part of the linkage unit. Therefore,
      only enable these features for classes with hidden LTO visibility. This
      notion is based on object file visibility or (on Windows)
      dllimport/dllexport attributes.
      
      We provide the [[clang::lto_visibility_public]] attribute to override the
      compiler's LTO visibility inference in cases where the class is defined
      in the non-LTO'd part of the linkage unit, or where the ABI supports
      calling classes derived from abstract base classes with hidden visibility
      in other linkage units (e.g. COM on Windows).
      
      If the cross-DSO CFI mode is enabled, bitset checks are emitted even for
      classes with public LTO visibility, as that mode uses a separate mechanism
      to cause bitsets to be exported.
      
      This mechanism replaces the whole-program-vtables blacklist, so remove the
      -fwhole-program-vtables-blacklist flag.
      
      Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the
      support for the special attr:uuid blacklist entry is removed.
      
      Differential Revision: http://reviews.llvm.org/D18635
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267784 91177308-0d34-0410-b5e6-96231b3b80d8
      47213cf9
  19. Apr 26, 2016
  20. Apr 25, 2016
  21. Apr 18, 2016
  22. Apr 14, 2016
  23. Apr 13, 2016
  24. Apr 04, 2016
  25. Mar 31, 2016
  26. Mar 30, 2016
    • Gabor Horvath's avatar
      [ASTMatchers] Existing matcher hasAnyArgument fixed · 222b56d7
      Gabor Horvath authored
      Summary: A checker (will be uploaded after this patch) needs to check implicit casts. The checker needs matcher hasAnyArgument but it ignores implicit casts and parenthesized expressions which disables checking of implicit casts for arguments in the checker. However the documentation of the matcher contains a FIXME that this should be removed once separate matchers for ignoring implicit casts and parenthesized expressions are ready. Since these matchers were already there the fix could be executed. Only one Clang checker was affected which was also fixed (ignoreParenImpCasts added) and is separately uploaded. Third party checkers (not in the Clang repository) may be affected by this fix so the fix must be emphasized in the release notes.
      
      Reviewers: klimek, sbenza, alexfh
      
      Subscribers: alexfh, klimek, xazax.hun, cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D18243
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264855 91177308-0d34-0410-b5e6-96231b3b80d8
      222b56d7
  27. Mar 28, 2016
  28. Mar 24, 2016
Loading