[PATCH] D17990: [clang-tidy] minor improvements in modernise-deprecated-headers check

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 10 10:33:21 PDT 2016


alexfh added inline comments.

================
Comment at: clang-tidy/modernize/DeprecatedHeadersCheck.cpp:83
@@ +82,3 @@
+  for (const auto &Key : DeleteHeaders) {
+    DeleteHeadersSet.insert(Key);
+  }
----------------
No danger of dangling references here, since `StringMap` copies keys. See `StringMap` comments and `StringMapEntry::Create` implementation.

So there's no need to store another copy of this data. 

Kirill, please revert the latest change in this constructor.


https://reviews.llvm.org/D17990





More information about the cfe-commits mailing list