[PATCH] D21603: [include-fixer] Add missing namespace qualifiers after inserting a missing header.

Benjamin Kramer via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 6 04:23:14 PDT 2016


bkramer added a comment.

In the future I'd prefer to have patches like this split up in a part that refactors and a part that contains the actual change. Having that in one patch makes it really hard to review.


================
Comment at: include-fixer/IncludeFixer.cpp:73
@@ -72,2 +72,3 @@
     clang::ASTContext &context = getCompilerInstance().getASTContext();
-    query(T.getUnqualifiedType().getAsString(context.getPrintingPolicy()), Loc);
+    llvm::StringRef QueryString =
+        T.getUnqualifiedType().getAsString(context.getPrintingPolicy());
----------------
std::string, otherwise this will be a user after free.

================
Comment at: include-fixer/IncludeFixerContext.h:76
@@ +75,3 @@
+
+  /// \brief The scoped qualifiers of SymbolIndentifier.
+  std::string SymbolScopedQualifiers;
----------------
Explain what a scoped qualifier is in this comment.

================
Comment at: include-fixer/IncludeFixerContext.h:86
@@ +85,3 @@
+
+  /// \breif The replacement range of SymbolIdentifier.
+  tooling::Range SymbolRange;
----------------
typo: breif


http://reviews.llvm.org/D21603





More information about the cfe-commits mailing list