Author: jonastoth Date: Tue Oct 9 06:29:31 2018 New Revision: 344046 URL: http://llvm.org/viewvc/llvm-project?rev=344046&view=rev Log: [clang-tidy] NFC fix warnings from missing braces
The std::array create multiple StringRef but did not wrap them in braces. Some compilers warned for that. Adding the braces is not possible and result in a compilation error. This commit changes the array to vector which works without warning. Modified: clang-tools-extra/trunk/clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.cpp Modified: clang-tools-extra/trunk/clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.cpp?rev=344046&r1=344045&r2=344046&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.cpp (original) +++ clang-tools-extra/trunk/clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.cpp Tue Oct 9 06:29:31 2018 @@ -17,11 +17,12 @@ namespace clang { namespace tidy { namespace modernize { -static const std::array<StringRef, 5> DeprecatedTypes = { - "::std::ios_base::io_state", "::std::ios_base::open_mode", - "::std::ios_base::seek_dir", "::std::ios_base::streamoff", - "::std::ios_base::streampos", -}; +static const llvm::SmallVector<StringRef, 5> DeprecatedTypes = { + {"::std::ios_base::io_state"}, + {"::std::ios_base::open_mode"}, + {"::std::ios_base::seek_dir"}, + {"::std::ios_base::streamoff"}, + {"::std::ios_base::streampos"}}; static const llvm::StringMap<StringRef> ReplacementTypes = { {"io_state", "iostate"}, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits