[PATCH] D13746: [clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-index
Matthias Gehre via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 18 13:46:56 PST 2015
mgehre added inline comments.
================
Comment at: clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-pro-bounds-constant-array-index.cpp:2
@@ +1,3 @@
+// RUN: %check_clang_tidy %s cppcoreguidelines-pro-bounds-constant-array-index %t -- -config='{CheckOptions: [{key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader, value: "dir1/gslheader.h"}]}' -- -std=c++11
+#include <array>
+// CHECK-FIXES: #include "dir1/gslheader.h"
----------------
chapuni wrote:
> Standard headers might be unavailable depending on a target, like host=linux target=msvc.
> Could you improve it?
>
>
> # Avoid <array>
> # Introduce a new feature like "native"
>
>
Just to make sure that I understand this: The array header is unavailble because the target is a pre-C++11 msvc?
I can replace #include <array> by an stub definition of std::array. I'm not sure what you mean by 'Introduce a new feature like "native"'?
Repository:
rL LLVM
http://reviews.llvm.org/D13746
More information about the cfe-commits
mailing list