浏览代码

Features: Fix cxx_right_angle_brackets compiler feature test

The clang-format pass in commit v3.6.0-rc1~54^2~1 (Revise C++ coding
style using clang-format, 2016-05-16) changed the template right angle
brackets from `>>` to `> >`, which defeats the purpose of this test.
Change it back and exclude this content from formatting.
Alex Wang 9 年之前
父节点
当前提交
68e7250a9f
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 3 1
      Tests/CompileFeatures/cxx_right_angle_brackets.cpp
  2. 1 0
      Utilities/Scripts/clang-format.bash

+ 3 - 1
Tests/CompileFeatures/cxx_right_angle_brackets.cpp

@@ -7,6 +7,8 @@ struct A
 
 
 void someFunc()
 void someFunc()
 {
 {
-  A<A<int> > object;
+  /* clang-format off */
+  A<A<int>> object;
+  /* clang-format on */
   (void)object;
   (void)object;
 }
 }

+ 1 - 0
Utilities/Scripts/clang-format.bash

@@ -130,6 +130,7 @@ $git_ls -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
 
 
   # Exclude manually-formatted sources (e.g. with long lines).
   # Exclude manually-formatted sources (e.g. with long lines).
   egrep -z -v '^Tests/PositionIndependentTargets/pic_test.h' |
   egrep -z -v '^Tests/PositionIndependentTargets/pic_test.h' |
+  egrep -z -v '^Tests/CompileFeatures/cxx_right_angle_brackets.cpp' |
 
 
   # Exclude sources with encoding not suported by clang-format.
   # Exclude sources with encoding not suported by clang-format.
   egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
   egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |