Eugene.Zelenko added inline comments.
================ Comment at: clang-tidy/altera/KernelNameRestrictionCheck.cpp:13 +#include "clang/Lex/Preprocessor.h" + +using namespace clang::ast_matchers; ---------------- Please include string, vector ================ Comment at: clang-tidy/altera/KernelNameRestrictionCheck.cpp:69 + for (IncludeDirective &ID : IncludeDirectives) { + auto FilePath = StringRef(ID.Filename); + auto FileName = FilePath.substr(FilePath.find_last_of("/\\") + 1); ---------------- Please don't use auto unless type is not spelled in same statement or iterator. ================ Comment at: clang-tidy/altera/KernelNameRestrictionCheck.cpp:70 + auto FilePath = StringRef(ID.Filename); + auto FileName = FilePath.substr(FilePath.find_last_of("/\\") + 1); + if (FileName.equals_lower("kernel.cl") || ---------------- Please don't use auto unless type is not spelled in same statement or iterator. ================ Comment at: clang-tidy/altera/KernelNameRestrictionCheck.cpp:82 + // Check main file for restricted names. + auto Entry = SM.getFileEntryForID(SM.getMainFileID()); + StringRef FilePath = Entry->getName(); ---------------- Please don't use auto unless type is not spelled in same statement or iterator. ================ Comment at: clang-tidy/altera/KernelNameRestrictionCheck.cpp:84 + StringRef FilePath = Entry->getName(); + auto FileName = FilePath.substr(FilePath.find_last_of("/\\") + 1); + if (FileName.equals_lower("kernel.cl") || ---------------- Please don't use auto unless type is not spelled in same statement or iterator. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72218/new/ https://reviews.llvm.org/D72218 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits