[PATCH] D25244: [clang-tidy] Add a whitelist option in google-runtime-references.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 11 09:50:46 PDT 2016


alexfh added inline comments.


================
Comment at: clang-tidy/google/NonConstReferences.cpp:73
+                   [&](llvm::StringRef WhiteListType) {
+                     return ReferencedType.getCanonicalType().getAsString(
+                                Result.Context->getPrintingPolicy()) ==
----------------
It should be possible to check the whitelist in the matcher (`qualType(unless(anyOf(isConstQualified(), hasDeclaration(namedDecl(hasAnyName(WhiteListTypes))))))` or something similar).


https://reviews.llvm.org/D25244





More information about the cfe-commits mailing list